diff options
2569 files changed, 69269 insertions, 22811 deletions
diff --git a/.bzrignore b/.bzrignore index 71dde1f3204..060ecf37a07 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1463,4 +1463,4 @@ storage/tokudb/ft-index/utils/tokudb_gen storage/tokudb/ft-index/utils/tokudb_load storage/connect/connect.cnf storage/cassandra/cassandra.cnf -libmysql/libmysql.version +libmysql/libmysql_versions.ld diff --git a/CMakeLists.txt b/CMakeLists.txt index 60b46f7a8b8..eb6ce6c726f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,7 @@ INCLUDE(readline) INCLUDE(libutils) INCLUDE(dtrace) INCLUDE(jemalloc) +INCLUDE(pcre) INCLUDE(ctest) INCLUDE(plugin) INCLUDE(install_macros) @@ -177,6 +178,81 @@ MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED) OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF) +include(CheckCSourceCompiles) +include(CheckCXXSourceCompiles) +# We need some extra FAIL_REGEX patterns +# Note that CHECK_C_SOURCE_COMPILES is a misnomer, it will also link. +MACRO (MY_CHECK_C_COMPILER_FLAG FLAG RESULT) + SET(SAVE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}") + CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${RESULT} + FAIL_REGEX "argument unused during compilation" + FAIL_REGEX "unsupported .*option" + FAIL_REGEX "unknown .*option" + FAIL_REGEX "unrecognized .*option" + FAIL_REGEX "ignoring unknown option" + FAIL_REGEX "[Ww]arning: [Oo]ption" + ) + SET(CMAKE_REQUIRED_FLAGS "${SAVE_CMAKE_REQUIRED_FLAGS}") +ENDMACRO() + +MACRO (MY_CHECK_CXX_COMPILER_FLAG FLAG RESULT) + SET(SAVE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}") + CHECK_CXX_SOURCE_COMPILES("int main(void) { return 0; }" ${RESULT} + FAIL_REGEX "argument unused during compilation" + FAIL_REGEX "unsupported .*option" + FAIL_REGEX "unknown .*option" + FAIL_REGEX "unrecognized .*option" + FAIL_REGEX "ignoring unknown option" + FAIL_REGEX "[Ww]arning: [Oo]ption" + ) + SET(CMAKE_REQUIRED_FLAGS "${SAVE_CMAKE_REQUIRED_FLAGS}") +ENDMACRO() + +OPTION(WITH_ASAN "Enable address sanitizer" OFF) +IF (WITH_ASAN) + # gcc 4.8.1 and new versions of clang + MY_CHECK_C_COMPILER_FLAG("-fsanitize=address" HAVE_C_FSANITIZE) + MY_CHECK_CXX_COMPILER_FLAG("-fsanitize=address" HAVE_CXX_FSANITIZE) + + IF(HAVE_C_FSANITIZE AND HAVE_CXX_FSANITIZE) + # We switch on basic optimization also for debug builds. + # With optimization we may get some warnings, so we switch off -Werror + SET(CMAKE_C_FLAGS_DEBUG + "${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -O1 -Wno-error -fPIC") + SET(CMAKE_C_FLAGS_RELWITHDEBINFO + "${CMAKE_C_FLAGS_RELWITHDEBINFO} -fsanitize=address -fPIC") + SET(CMAKE_CXX_FLAGS_DEBUG + "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -O1 -Wno-error -fPIC") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO + "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fsanitize=address -fPIC") + SET(WITH_ASAN_OK 1) + ELSE() + # older versions of clang + MY_CHECK_C_COMPILER_FLAG("-faddress-sanitizer" HAVE_C_FADDRESS) + MY_CHECK_CXX_COMPILER_FLAG("-faddress-sanitizer" HAVE_CXX_FFADDRESS) + + IF(HAVE_C_FADDRESS AND HAVE_CXX_FFADDRESS) + # We switch on basic optimization also for debug builds. + SET(CMAKE_C_FLAGS_DEBUG + "${CMAKE_C_FLAGS_DEBUG} -faddress-sanitizer -O1 -fPIC") + SET(CMAKE_C_FLAGS_RELWITHDEBINFO + "${CMAKE_C_FLAGS_RELWITHDEBINFO} -faddress-sanitizer -fPIC") + SET(CMAKE_CXX_FLAGS_DEBUG + "${CMAKE_CXX_FLAGS_DEBUG} -faddress-sanitizer -O1 -fPIC") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO + "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -faddress-sanitizer -fPIC") + SET(WITH_ASAN_OK 1) + ENDIF() + ENDIF() + + IF(NOT WITH_ASAN_OK) + MESSAGE(FATAL_ERROR "Do not know how to enable address sanitizer") + ENDIF() +ENDIF() + + OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON) IF(ENABLE_DEBUG_SYNC) SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC") @@ -261,13 +337,25 @@ SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}") IF(INSTALL_SYSCONFDIR) SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}") ENDIF() + +OPTION(TMPDIR +"PATH to MySQL TMP dir. If unspecified, defaults to P_tmpdir in <stdio.h>" OFF) IF(TMPDIR) - SET(DEFAULT_TMPDIR "${TMPDIR}") + # Quote it, to make it a const char string. + SET(DEFAULT_TMPDIR "\"${TMPDIR}\"") +ELSE() + # Do not quote it, to refer to the P_tmpdir macro in <stdio.h>. + SET(DEFAULT_TMPDIR "P_tmpdir") ENDIF() # Run platform tests INCLUDE(configure.cmake) +# Find header files from the bundled libraries +# (jemalloc, yassl, readline, pcre, etc) +# before the ones installed in the system +SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) + # Common defines and includes ADD_DEFINITIONS(-DHAVE_CONFIG_H) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include) @@ -279,8 +367,11 @@ MYSQL_CHECK_SSL() # Add readline or libedit. MYSQL_CHECK_READLINE() +SET(MALLOC_LIBRARY "system") CHECK_JEMALLOC() +CHECK_PCRE() + # # Setup maintainer mode options. Platform checks are # not run with the warning options as to not perturb fragile checks @@ -316,7 +407,6 @@ ADD_SUBDIRECTORY(include) ADD_SUBDIRECTORY(dbug) ADD_SUBDIRECTORY(strings) ADD_SUBDIRECTORY(vio) -ADD_SUBDIRECTORY(pcre) ADD_SUBDIRECTORY(mysys) ADD_SUBDIRECTORY(mysys_ssl) ADD_SUBDIRECTORY(libmysql) @@ -347,6 +437,7 @@ IF(NOT WITHOUT_SERVER) ADD_SUBDIRECTORY(internal) ENDIF() ADD_SUBDIRECTORY(packaging/rpm-uln) + ADD_SUBDIRECTORY(packaging/rpm-oel) ENDIF() IF(UNIX) @@ -4,5 +4,5 @@ # MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=0 -MYSQL_VERSION_PATCH=7 +MYSQL_VERSION_PATCH=9 MYSQL_VERSION_EXTRA= diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 7f725e09006..1bf466c1e47 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -15,8 +15,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include - ${CMAKE_BINARY_DIR}/pcre - ${CMAKE_SOURCE_DIR}/pcre + ${PCRE_INCLUDES} ${CMAKE_SOURCE_DIR}/mysys_ssl ${ZLIB_INCLUDE_DIR} ${SSL_INCLUDE_DIRS} diff --git a/client/mysql.cc b/client/mysql.cc index 19383d9a382..b95f5742a11 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -915,6 +915,7 @@ static COMMANDS commands[] = { { "MAKE_SET", 0, 0, 0, ""}, { "MAKEDATE", 0, 0, 0, ""}, { "MAKETIME", 0, 0, 0, ""}, + { "MASTER_GTID_WAIT", 0, 0, 0, ""}, { "MASTER_POS_WAIT", 0, 0, 0, ""}, { "MAX", 0, 0, 0, ""}, { "MBRCONTAINS", 0, 0, 0, ""}, @@ -1227,7 +1228,7 @@ int main(int argc,char *argv[]) put_info("Welcome to the MariaDB monitor. Commands end with ; or \\g.", INFO_INFO); - sprintf((char*) glob_buffer.ptr(), + my_snprintf((char*) glob_buffer.ptr(), glob_buffer.alloced_length(), "Your %s connection id is %lu\nServer version: %s\n", mysql_get_server_name(&mysql), mysql_thread_id(&mysql), server_version_string(&mysql)); @@ -1411,7 +1412,8 @@ sig_handler window_resize(int sig) struct winsize window_size; if (ioctl(fileno(stdin), TIOCGWINSZ, &window_size) == 0) - terminal_width= window_size.ws_col; + if (window_size.ws_col > 0) + terminal_width= window_size.ws_col; } #endif @@ -1675,8 +1677,9 @@ static void usage(int version) return; puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); printf("Usage: %s [OPTIONS] [database]\n", my_progname); - my_print_help(my_long_options); print_defaults("my", load_default_groups); + puts(""); + my_print_help(my_long_options); my_print_variables(my_long_options); } diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c index c3fa1a49e81..99da157f8c6 100644 --- a/client/mysql_plugin.c +++ b/client/mysql_plugin.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2011, 2013, 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 @@ -857,7 +857,7 @@ static int process_options(int argc, char *argv[], char *operation) strncat(buff, FN_DIRSEP, sizeof(buff) - strlen(buff) - 1); #endif buff[sizeof(buff) - 1]= 0; - my_delete(opt_basedir, MYF(0)); + my_free(opt_basedir); opt_basedir= my_strdup(buff, MYF(MY_FAE)); } } diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 5f9a06dc07f..ec49134a111 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -22,7 +22,7 @@ #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ -#define VER "1.3" +#define VER "1.3a" #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> @@ -164,6 +164,15 @@ static struct my_option my_long_options[]= }; +static const char *load_default_groups[]= +{ + "client", /* Read settings how to connect to server */ + "mysql_upgrade", /* Read special settings for mysql_upgrade */ + "client-server", /* Reads settings common between client & server */ + "client-mariadb", /* Read mariadb unique client settings */ + 0 +}; + static void free_used_memory(void) { /* Free memory allocated by 'load_defaults' */ @@ -180,6 +189,7 @@ static void die(const char *fmt, ...) DBUG_ENTER("die"); /* Print the error message */ + fflush(stdout); va_start(args, fmt); if (fmt) { @@ -259,8 +269,11 @@ get_one_option(int optid, const struct my_option *opt, 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")); - puts("MariaDB utility for upgrading databases to new MariaDB versions.\n"); + puts("MariaDB utility for upgrading databases to new MariaDB versions."); + print_defaults("my", load_default_groups); + puts(""); my_print_help(my_long_options); + my_print_variables(my_long_options); die(0); break; @@ -736,6 +749,7 @@ static int run_mysqlcheck_upgrade(void) !opt_silent || opt_verbose ? "--verbose": "", opt_silent ? "--silent": "", opt_write_binlog ? "--write-binlog" : "--skip-write-binlog", + "2>&1", NULL); } @@ -754,6 +768,7 @@ static int run_mysqlcheck_fixnames(void) opt_verbose ? "--verbose": "", opt_silent ? "--silent": "", opt_write_binlog ? "--write-binlog" : "--skip-write-binlog", + "2>&1", NULL); } @@ -874,14 +889,11 @@ static int run_sql_fix_privilege_tables(void) } -static const char *load_default_groups[]= +static void print_error(const char *error_msg, DYNAMIC_STRING *output) { - "client", /* Read settings how to connect to server */ - "mysql_upgrade", /* Read special settings for mysql_upgrade */ - "client-server", /* Reads settings common between client & server */ - "client-mariadb", /* Read mariadb unique client settings */ - 0 -}; + fprintf(stderr, "%s\n", error_msg); + fprintf(stderr, "%s", output->str); +} /* Convert the specified version string into the numeric format. */ @@ -914,6 +926,8 @@ static int check_version_match(void) &ds_version, FALSE) || extract_variable_from_show(&ds_version, version_str)) { + print_error("Version check failed. Got the following error when calling " + "the 'mysql' command line client", &ds_version); dynstr_free(&ds_version); return 1; /* Query failed */ } @@ -982,7 +996,8 @@ int main(int argc, char **argv) } else { - printf("The --upgrade-system-tables option was used, databases won't be touched.\n"); + if (!opt_silent) + printf("The --upgrade-system-tables option was used, databases won't be touched.\n"); } /* diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 71bc37a4161..bd5d2eac4e5 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -1230,9 +1230,10 @@ static void usage(void) puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); puts("Administration program for the mysqld daemon."); printf("Usage: %s [OPTIONS] command command....\n", my_progname); + print_defaults("my",load_default_groups); + puts(""); my_print_help(my_long_options); my_print_variables(my_long_options); - print_defaults("my",load_default_groups); puts("\nWhere command is a one or more of: (Commands may be shortened)\n\ create databasename Create a new database\n\ debug Instruct server to write debug information to log\n\ diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 498f174f7cb..319be9111aa 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1546,6 +1546,8 @@ static void usage() Dumps a MySQL binary log in a format usable for viewing or for piping to\n\ the mysql command line client.\n\n"); printf("Usage: %s [options] log-files\n", my_progname); + print_defaults("my",load_groups); + puts(""); my_print_help(my_options); my_print_variables(my_options); } diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index ab9cbfb14c9..57b7ce09ab5 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -250,6 +250,7 @@ static void usage(void) puts("http://kb.askmonty.org/v/mysqlcheck for latest information about"); puts("this program."); print_defaults("my", load_default_groups); + puts(""); my_print_help(my_long_options); my_print_variables(my_long_options); DBUG_VOID_RETURN; @@ -1046,7 +1047,7 @@ int main(int argc, char **argv) for (i = 0; i < alter_table_cmds.elements ; i++) run_query((char*) dynamic_array_ptr(&alter_table_cmds, i)); } - ret= test(first_error); + ret= MY_TEST(first_error); end: dbDisconnect(current_host); diff --git a/client/mysqldump.c b/client/mysqldump.c index a29f3f367bd..a0222f370b3 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -39,7 +39,7 @@ ** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov */ -#define DUMP_VERSION "10.14" +#define DUMP_VERSION "10.15" #include <my_global.h> #include <my_sys.h> @@ -137,6 +137,12 @@ static uint opt_slave_data; static uint my_end_arg; static char * opt_mysql_unix_port=0; static int first_error=0; +/* + multi_source is 0 if old server or 2 if server that support multi source + This is choosen this was as multi_source has 2 extra columns first in + SHOW ALL SLAVES STATUS. +*/ +static uint multi_source= 0; static DYNAMIC_STRING extended_row; #include <sslopt-vars.h> FILE *md_result_file= 0; @@ -160,6 +166,8 @@ static void dynstr_set_checked(DYNAMIC_STRING *str, const char *init_str); static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append, uint length); static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size); + +static int do_start_slave_sql(MYSQL *mysql_con); /* Constant for detection of default value of default_charset. If default_charset is equal to mysql_universal_client_charset, then @@ -612,7 +620,8 @@ static void usage(void) puts("Dumping structure and contents of MySQL databases and tables."); short_usage_sub(); print_defaults("my",load_default_groups); - my_print_help(my_long_options); + puts(""); +my_print_help(my_long_options); my_print_variables(my_long_options); } /* usage */ @@ -1493,6 +1502,8 @@ static void free_resources() static void maybe_exit(int error) { + if (opt_slave_data) + do_start_slave_sql(mysql); if (!first_error) first_error= error; if (ignore_errors) @@ -3648,7 +3659,8 @@ static void dump_table(char *table, char *db) field->type == MYSQL_TYPE_BLOB || field->type == MYSQL_TYPE_LONG_BLOB || field->type == MYSQL_TYPE_MEDIUM_BLOB || - field->type == MYSQL_TYPE_TINY_BLOB)) ? 1 : 0; + field->type == MYSQL_TYPE_TINY_BLOB || + field->type == MYSQL_TYPE_GEOMETRY)) ? 1 : 0; if (extended_insert && !opt_xml) { if (i == 0) @@ -3992,7 +4004,13 @@ static int dump_tablespaces(char* ts_where) char *ubs; char *endsemi; DBUG_ENTER("dump_tablespaces"); - + + /* + Try to turn off semi-join optimization (if that fails, this is a + pre-optimizer_switch server, and the old query plan is ok for us. + */ + mysql_query(mysql, "set optimizer_switch='semijoin=off'"); + init_dynamic_string_checked(&sqlbuf, "SELECT LOGFILE_GROUP_NAME," " FILE_NAME," @@ -4152,6 +4170,8 @@ static int dump_tablespaces(char* ts_where) mysql_free_result(tableres); dynstr_free(&sqlbuf); + mysql_query(mysql, "set optimizer_switch=default"); + DBUG_RETURN(0); } @@ -4734,7 +4754,8 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos) } else { - if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS")) + if (mysql_query_with_error_report(mysql_con, &master, + "SHOW MASTER STATUS")) return 1; row= mysql_fetch_row(master); @@ -4779,29 +4800,37 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos) static int do_stop_slave_sql(MYSQL *mysql_con) { MYSQL_RES *slave; - /* We need to check if the slave sql is running in the first place */ - if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS")) + MYSQL_ROW row; + + if (mysql_query_with_error_report(mysql_con, &slave, + multi_source ? + "SHOW ALL SLAVES STATUS" : + "SHOW SLAVE STATUS")) return(1); - else + + /* Loop over all slaves */ + while ((row= mysql_fetch_row(slave))) { - MYSQL_ROW row= mysql_fetch_row(slave); - if (row && row[11]) + if (row[11 + multi_source]) { /* if SLAVE SQL is not running, we don't stop it */ - if (!strcmp(row[11],"No")) + if (strcmp(row[11 + multi_source], "No")) { - mysql_free_result(slave); - /* Silently assume that they don't have the slave running */ - return(0); + char query[160]; + if (multi_source) + sprintf(query, "STOP SLAVE '%.80s' SQL_THREAD", row[0]); + else + strmov(query, "STOP SLAVE SQL_THREAD"); + + if (mysql_query_with_error_report(mysql_con, 0, query)) + { + mysql_free_result(slave); + return 1; + } } } } mysql_free_result(slave); - - /* now, stop slave if running */ - if (mysql_query_with_error_report(mysql_con, 0, "STOP SLAVE SQL_THREAD")) - return(1); - return(0); } @@ -4810,7 +4839,10 @@ static int add_stop_slave(void) if (opt_comments) fprintf(md_result_file, "\n--\n-- stop slave statement to make a recovery dump)\n--\n\n"); - fprintf(md_result_file, "STOP SLAVE;\n"); + if (multi_source) + fprintf(md_result_file, "STOP ALL SLAVES;\n"); + else + fprintf(md_result_file, "STOP SLAVE;\n"); return(0); } @@ -4819,16 +4851,24 @@ static int add_slave_statements(void) if (opt_comments) fprintf(md_result_file, "\n--\n-- start slave statement to make a recovery dump)\n--\n\n"); - fprintf(md_result_file, "START SLAVE;\n"); + if (multi_source) + fprintf(md_result_file, "START ALL SLAVES;\n"); + else + fprintf(md_result_file, "START SLAVE;\n"); return(0); } static int do_show_slave_status(MYSQL *mysql_con) { MYSQL_RES *UNINIT_VAR(slave); + MYSQL_ROW row; const char *comment_prefix= (opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : ""; - if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS")) + + if (mysql_query_with_error_report(mysql_con, &slave, + multi_source ? + "SHOW ALL SLAVES STATUS" : + "SHOW SLAVE STATUS")) { if (!ignore_errors) { @@ -4838,10 +4878,10 @@ static int do_show_slave_status(MYSQL *mysql_con) mysql_free_result(slave); return 1; } - else + + while ((row= mysql_fetch_row(slave))) { - MYSQL_ROW row= mysql_fetch_row(slave); - if (row && row[9] && row[21]) + if (row[9 + multi_source] && row[21 + multi_source]) { /* SHOW MASTER STATUS reports file and position */ if (opt_comments) @@ -4849,54 +4889,70 @@ static int do_show_slave_status(MYSQL *mysql_con) "\n--\n-- Position to start replication or point-in-time " "recovery from (the master of this slave)\n--\n\n"); - fprintf(md_result_file, "%sCHANGE MASTER TO ", comment_prefix); - + if (multi_source) + fprintf(md_result_file, "%sCHANGE MASTER '%.80s' TO ", + comment_prefix, row[0]); + else + fprintf(md_result_file, "%sCHANGE MASTER TO ", comment_prefix); + if (opt_include_master_host_port) { - if (row[1]) - fprintf(md_result_file, "MASTER_HOST='%s', ", row[1]); + if (row[1 + multi_source]) + fprintf(md_result_file, "MASTER_HOST='%s', ", row[1 + multi_source]); if (row[3]) - fprintf(md_result_file, "MASTER_PORT=%s, ", row[3]); + fprintf(md_result_file, "MASTER_PORT=%s, ", row[3 + multi_source]); } fprintf(md_result_file, - "MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", row[9], row[21]); + "MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", + row[9 + multi_source], row[21 + multi_source]); check_io(md_result_file); } - mysql_free_result(slave); } + mysql_free_result(slave); return 0; } static int do_start_slave_sql(MYSQL *mysql_con) { MYSQL_RES *slave; + MYSQL_ROW row; + int error= 0; + DBUG_ENTER("do_start_slave_sql"); + /* We need to check if the slave sql is stopped in the first place */ - if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS")) - return(1); - else + if (mysql_query_with_error_report(mysql_con, &slave, + multi_source ? + "SHOW ALL SLAVES STATUS" : + "SHOW SLAVE STATUS")) + DBUG_RETURN(1); + + while ((row= mysql_fetch_row(slave))) { - MYSQL_ROW row= mysql_fetch_row(slave); - if (row && row[11]) + DBUG_PRINT("info", ("Connection: '%s' status: '%s'", + multi_source ? row[0] : "", row[11 + multi_source])); + if (row[11 + multi_source]) { /* if SLAVE SQL is not running, we don't start it */ - if (!strcmp(row[11],"Yes")) + if (strcmp(row[11 + multi_source], "Yes")) { - mysql_free_result(slave); - /* Silently assume that they don't have the slave running */ - return(0); + char query[160]; + if (multi_source) + sprintf(query, "START SLAVE '%.80s'", row[0]); + else + strmov(query, "START SLAVE"); + + if (mysql_query_with_error_report(mysql_con, 0, query)) + { + fprintf(stderr, "%s: Error: Unable to start slave '%s'\n", + my_progname_short, multi_source ? row[0] : ""); + error= 1; + } } } } mysql_free_result(slave); - - /* now, start slave if stopped */ - if (mysql_query_with_error_report(mysql_con, 0, "START SLAVE")) - { - fprintf(stderr, "%s: Error: Unable to start slave\n", my_progname_short); - return 1; - } - return(0); + DBUG_RETURN(error); } @@ -5574,6 +5630,10 @@ int main(int argc, char **argv) if (!path) write_header(md_result_file, *argv); + /* Check if the server support multi source */ + if (mysql_get_server_version(mysql) >= 100000) + multi_source= 2; + if (opt_slave_data && do_stop_slave_sql(mysql)) goto err; @@ -5653,10 +5713,6 @@ int main(int argc, char **argv) dump_databases(argv); } - /* if --dump-slave , start the slave sql thread */ - if (opt_slave_data && do_start_slave_sql(mysql)) - goto err; - /* add 'START SLAVE' to end of dump */ if (opt_slave_apply && add_slave_statements()) goto err; @@ -5672,9 +5728,6 @@ int main(int argc, char **argv) if (opt_delete_master_logs && purge_bin_logs_to(mysql, bin_log_name)) goto err; -#ifdef HAVE_SMEM - my_free(shared_memory_base_name); -#endif /* No reason to explicitely COMMIT the transaction, neither to explicitely UNLOCK TABLES: these will be automatically be done by the server when we @@ -5682,6 +5735,14 @@ int main(int argc, char **argv) server. */ err: + /* if --dump-slave , start the slave sql thread */ + if (opt_slave_data && do_start_slave_sql(mysql)) + goto err; + +#ifdef HAVE_SMEM + my_free(shared_memory_base_name); +#endif + dbDisconnect(current_host); if (!path) write_footer(md_result_file); diff --git a/client/mysqlimport.c b/client/mysqlimport.c index 60e42c305aa..af0d86b1ed5 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -216,8 +216,9 @@ If one uses sockets to connect to the MySQL server, the server will open and\n\ read the text file directly. In other cases the client will open the text\n\ file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n"); - printf("\nUsage: %s [OPTIONS] database textfile...",my_progname); + printf("\nUsage: %s [OPTIONS] database textfile...\n",my_progname); print_defaults("my",load_default_groups); + puts(""); my_print_help(my_long_options); my_print_variables(my_long_options); } diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 58e679365de..d1ffb6a4876 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -286,6 +286,7 @@ If no table is given, then all matching tables in database are shown.\n\ If no column is given, then all matching columns and column types in table\n\ are shown."); print_defaults("my",load_default_groups); + puts(""); my_print_help(my_long_options); my_print_variables(my_long_options); } diff --git a/client/mysqlslap.c b/client/mysqlslap.c index e4c118bf990..3ba5eb80a07 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -739,7 +739,9 @@ static void usage(void) puts("Run a query multiple times against the server.\n"); printf("Usage: %s [OPTIONS]\n",my_progname); print_defaults("my",load_default_groups); + puts(""); my_print_help(my_long_options); + my_print_variables(my_long_options); } diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 4307293f6f1..3304af3981d 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -528,6 +528,7 @@ struct st_command { char *query, *query_buf,*first_argument,*last_argument,*end; DYNAMIC_STRING content; + DYNAMIC_STRING eval_query; int first_word_len, query_len; my_bool abort_on_error, used_replace; struct st_expected_errors expected_errors; @@ -1399,6 +1400,8 @@ void free_used_memory() { struct st_command **q= dynamic_element(&q_lines, i, struct st_command**); my_free((*q)->query_buf); + if ((*q)->eval_query.str) + dynstr_free(&(*q)->eval_query); if ((*q)->content.str) dynstr_free(&(*q)->content); my_free((*q)); @@ -7030,8 +7033,9 @@ void usage() puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); 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); + print_defaults("my",load_default_groups); + puts(""); my_print_help(my_long_options); - printf(" --no-defaults Don't read default options from any options file.\n"); my_print_variables(my_long_options); } @@ -8341,7 +8345,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) DYNAMIC_STRING ds_result; DYNAMIC_STRING ds_sorted; DYNAMIC_STRING ds_warnings; - DYNAMIC_STRING eval_query; char *query; int query_len; my_bool view_created= 0, sp_created= 0; @@ -8364,10 +8367,14 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) if (command->type == Q_EVAL || command->type == Q_SEND_EVAL || command->type == Q_EVALP) { - init_dynamic_string(&eval_query, "", command->query_len+256, 1024); - do_eval(&eval_query, command->query, command->end, FALSE); - query = eval_query.str; - query_len = eval_query.length; + if (!command->eval_query.str) + init_dynamic_string(&command->eval_query, "", command->query_len + 256, + 1024); + else + dynstr_set(&command->eval_query, 0); + do_eval(&command->eval_query, command->query, command->end, FALSE); + query= command->eval_query.str; + query_len= command->eval_query.length; } else { @@ -8535,8 +8542,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) dynstr_free(&ds_warnings); ds_warn= 0; - if (command->type == Q_EVAL || command->type == Q_SEND_EVAL) - dynstr_free(&eval_query); if (display_result_sorted) { @@ -8583,7 +8588,7 @@ char *re_eprint(int err) { static char epbuf[100]; size_t len __attribute__((unused))= - regerror(REG_ITOA|err, (regex_t *)NULL, epbuf, sizeof(epbuf)); + regerror(err, (regex_t *)NULL, epbuf, sizeof(epbuf)); assert(len <= sizeof(epbuf)); return(epbuf); } @@ -8940,7 +8945,7 @@ int main(int argc, char **argv) my_init_dynamic_array(&q_lines, sizeof(struct st_command*), 1024, 1024, MYF(0)); if (my_hash_init2(&var_hash, 64, charset_info, - 128, 0, 0, get_var_key, var_free, MYF(0))) + 128, 0, 0, get_var_key, 0, var_free, MYF(0))) die("Variable hash initialization failed"); var_set_string("MYSQL_SERVER_VERSION", MYSQL_SERVER_VERSION); diff --git a/cmake/CPackRPM.cmake b/cmake/CPackRPM.cmake new file mode 100644 index 00000000000..1d22387d098 --- /dev/null +++ b/cmake/CPackRPM.cmake @@ -0,0 +1,16 @@ +# +# Wrapper for CPackRPM.cmake +# + +# load the original CPackRPM.cmake +set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) +unset(CMAKE_MODULE_PATH) +include(CPackRPM) +set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH}) + +# per-component cleanup +foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV) + unset(TMP_RPM_${_RPM_SPEC_HEADER}) + unset(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP) +endforeach() + diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 53161575be6..6adc27bf83d 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -28,7 +28,7 @@ SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts SET(CPACK_RPM_PACKAGE_NAME "MariaDB-Galera") SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}") -SET(CPACK_RPM_PACKAGE_RELEASE 1) # FIX: add distribution name here +SET(CPACK_RPM_PACKAGE_RELEASE "1%{?dist}") SET(CPACK_RPM_PACKAGE_LICENSE "GPL") SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE) SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases") @@ -92,57 +92,158 @@ SET(CPACK_RPM_compat_USER_FILELIST ${ignored}) SET(CPACK_RPM_devel_USER_FILELIST ${ignored}) SET(CPACK_RPM_test_USER_FILELIST ${ignored}) -SET(CPACK_RPM_client_PACKAGE_OBSOLETES "mysql-client MySQL-client MySQL-OurDelta-client") -SET(CPACK_RPM_client_PACKAGE_PROVIDES "MySQL-client mysql-client") +# "set/append array" - append a set of strings, separated by a space +MACRO(SETA var) + FOREACH(v ${ARGN}) + SET(${var} "${${var}} ${v}") + ENDFOREACH() +ENDMACRO(SETA) + +SETA(CPACK_RPM_client_PACKAGE_OBSOLETES + "mysql-client" + "MySQL-client" + "MySQL-OurDelta-client") +SETA(CPACK_RPM_client_PACKAGE_PROVIDES + "MySQL-client" + "mysql-client") + +SETA(CPACK_RPM_devel_PACKAGE_OBSOLETES + "MySQL-devel" + "MySQL-OurDelta-devel") +SETA(CPACK_RPM_devel_PACKAGE_PROVIDES + "MySQL-devel") + +SETA(CPACK_RPM_server_PACKAGE_OBSOLETES + "MariaDB" + "MySQL" + "mysql-server" + "MySQL-server" + "MySQL-OurDelta-server") +SETA(CPACK_RPM_server_PACKAGE_PROVIDES + "MariaDB" + "MySQL" + "MySQL-server" + "msqlormysql" + "mysql-server") +SETA(CPACK_RPM_server_PACKAGE_REQUIRES + "${CPACK_RPM_PACKAGE_REQUIRES}" + "galera") + +SETA(CPACK_RPM_shared_PACKAGE_OBSOLETES + "mysql-shared" + "MySQL-shared-standard" + "MySQL-shared-pro" + "MySQL-shared-pro-cert" + "MySQL-shared-pro-gpl" + "MySQL-shared-pro-gpl-cert" + "MySQL-shared" + "MySQL-OurDelta-shared") +SETA(CPACK_RPM_shared_PACKAGE_PROVIDES + "MySQL-shared" + "mysql-shared") + +SETA(CPACK_RPM_test_PACKAGE_OBSOLETES + "MySQL-test" + "MySQL-OurDelta-test") +SETA(CPACK_RPM_test_PACKAGE_PROVIDES + "MySQL-test") -# this is a workaround for CPackRPM.cmake (as of 2.8.8) bug. -# If a package group does not specify OBSOLETES/REQUIRES the values of the -# previous (alphabetically) group will apply. -SET(CPACK_RPM_common_PACKAGE_OBSOLETES "MySQL-common") -SET(CPACK_RPM_common_PACKAGE_PROVIDES "MariaDB-common") - -SET(CPACK_RPM_devel_PACKAGE_OBSOLETES "mysql-devel MySQL-devel MySQL-OurDelta-devel") -SET(CPACK_RPM_devel_PACKAGE_PROVIDES "MySQL-devel mysql-devel") - -SET(CPACK_RPM_server_PACKAGE_OBSOLETES "MariaDB MySQL mysql-server MySQL-server MySQL-OurDelta-server") -SET(CPACK_RPM_server_PACKAGE_PROVIDES "MariaDB MySQL MySQL-server msqlormysql mysql-server") SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh) SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh) SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh) SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh) - -SET(CPACK_RPM_shared_PACKAGE_OBSOLETES "mysql-shared MySQL-shared-standard MySQL-shared-pro MySQL-shared-pro-cert MySQL-shared-pro-gpl MySQL-shared-pro-gpl-cert MySQL-shared MySQL-OurDelta-shared mysql-libs") -SET(CPACK_RPM_shared_PACKAGE_PROVIDES "MySQL-shared mysql-shared") - SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh) SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh) -SET(CPACK_RPM_test_PACKAGE_OBSOLETES "mysql-test MySQL-test MySQL-OurDelta-test") -SET(CPACK_RPM_test_PACKAGE_PROVIDES "MySQL-test mysql-test") - -# Argh! Different distributions call packages differently, to be a drop-in replacement -# we have to fake distribution-speficic dependencies MACRO(ALTERNATIVE_NAME real alt) + SET(ver "%{version}-%{release}") + IF (${epoch}) + SET(ver "${epoch}:${ver}") + ENDIF() + SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES") - SET(${p} "${${p}} ${alt} ${alt}(x86-32) ${alt}(x86-64) config(${alt})") + SET(${p} "${${p}} ${alt} = ${ver} ${alt}%{?_isa} = ${ver} config(${alt}) = ${ver}") SET(o "CPACK_RPM_${real}_PACKAGE_OBSOLETES") - SET(${o} "${${o}} ${alt}") + SET(${o} "${${o}} ${alt} ${alt}%{_isa}") ENDMACRO(ALTERNATIVE_NAME) +# Argh! Different distributions call packages differently, to be a drop-in +# replacement we have to fake distribution-speficic dependencies + +ALTERNATIVE_NAME("devel" "mysql-devel") +ALTERNATIVE_NAME("server" "mysql-server") +ALTERNATIVE_NAME("test" "mysql-test") + IF(RPM MATCHES "(rhel|centos)5") ALTERNATIVE_NAME("shared" "mysql") ELSEIF(RPM MATCHES "(rhel|centos)6") ALTERNATIVE_NAME("client" "mysql") ALTERNATIVE_NAME("shared" "mysql-libs") ELSEIF(RPM MATCHES "fedora") + SET(epoch 1) # this is fedora + ALTERNATIVE_NAME("client" "mariadb") ALTERNATIVE_NAME("client" "mysql") + ALTERNATIVE_NAME("devel" "mariadb-devel") + ALTERNATIVE_NAME("server" "mariadb-server") + ALTERNATIVE_NAME("shared" "mariadb-libs") ALTERNATIVE_NAME("shared" "mysql-libs") + ALTERNATIVE_NAME("test" "mariadb-test") + SET(CPACK_RPM_common_PACKAGE_CONFLICTS "mariadb-libs < 1:%{version}-%{release}") ENDIF() # workaround for lots of perl dependencies added by rpmbuild -SET(CPACK_RPM_test_PACKAGE_PROVIDES "${CPACK_RPM_test_PACKAGE_PROVIDES} perl(lib::mtr_gcov.pl) perl(lib::mtr_gprof.pl) perl(lib::mtr_io.pl) perl(lib::mtr_misc.pl) perl(lib::mtr_process.pl) perl(lib::v1/mtr_cases.pl) perl(lib::v1/mtr_gcov.pl) perl(lib::v1/mtr_gprof.pl) perl(lib::v1/mtr_im.pl) perl(lib::v1/mtr_io.pl) perl(lib::v1/mtr_match.pl) perl(lib::v1/mtr_misc.pl) perl(lib::v1/mtr_process.pl) perl(lib::v1/mtr_report.pl) perl(lib::v1/mtr_stress.pl) perl(lib::v1/mtr_timer.pl) perl(lib::v1/mtr_unique.pl) perl(mtr_cases) perl(mtr_io.pl) perl(mtr_match) perl(mtr_misc.pl) perl(mtr_report) perl(mtr_results) perl(mtr_unique)") +SETA(CPACK_RPM_test_PACKAGE_PROVIDES + "perl(lib::mtr_gcov.pl)" + "perl(lib::mtr_gprof.pl)" + "perl(lib::mtr_io.pl)" + "perl(lib::mtr_misc.pl)" + "perl(lib::mtr_process.pl)" + "perl(lib::v1/mtr_cases.pl)" + "perl(lib::v1/mtr_gcov.pl)" + "perl(lib::v1/mtr_gprof.pl)" + "perl(lib::v1/mtr_im.pl)" + "perl(lib::v1/mtr_io.pl)" + "perl(lib::v1/mtr_match.pl)" + "perl(lib::v1/mtr_misc.pl)" + "perl(lib::v1/mtr_process.pl)" + "perl(lib::v1/mtr_report.pl)" + "perl(lib::v1/mtr_stress.pl)" + "perl(lib::v1/mtr_timer.pl)" + "perl(lib::v1/mtr_unique.pl)" + "perl(mtr_cases)" + "perl(mtr_io.pl)" + "perl(mtr_match)" + "perl(mtr_misc.pl)" + "perl(mtr_report)" + "perl(mtr_results)" + "perl(mtr_unique)") + +# If we want to build build MariaDB-shared-compat, +# extract compat libraries from MariaDB-shared-5.3 rpm +FILE(GLOB compat_rpm RELATIVE ${CMAKE_SOURCE_DIR} + "${CMAKE_SOURCE_DIR}/../MariaDB-shared-5.3.*.rpm") +IF (compat_rpm) + MESSAGE("Using ${compat_rpm} to build MariaDB-compat") + INSTALL(CODE "EXECUTE_PROCESS( + COMMAND rpm2cpio ${CMAKE_SOURCE_DIR}/${compat_rpm} + COMMAND cpio --extract --make-directories */libmysqlclient*.so.* - + WORKING_DIRECTORY \$ENV{DESTDIR}) + EXECUTE_PROCESS( + COMMAND chmod -R a+rX . + WORKING_DIRECTORY \$ENV{DESTDIR})" + COMPONENT Compat) + SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} Compat) + + # RHEL6/CentOS6 install Postfix by default, and it requires + # libmysqlclient.so.16 that pulls in mysql-libs-5.1.x + # And the latter conflicts with our rpms. + # Make sure that for these distribuions all our rpms require + # MariaDB-compat, that will replace mysql-libs-5.1 + IF(RPM MATCHES "(rhel|centos)6") + SET(CPACK_RPM_common_PACKAGE_REQUIRES "MariaDB-compat") + ENDIF() +ENDIF(compat_rpm) -SET(CPACK_RPM_compat_PACKAGE_REQUIRES "/bin/sh") # to mask CPACK_RPM_PACKAGE_REQUIRES SET(CPACK_RPM_compat_PACKAGE_PROVIDES "mysql-libs = 5.3.5") # exact version doesn't matter as long as it greater than 5.1 SET(CPACK_RPM_compat_PACKAGE_OBSOLETES "mysql-libs < 5.3.5") diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index ebca9f14c31..1d77da2710b 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -47,10 +47,10 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS) ) IF(NOT ARG_COMPONENT) - MESSAGE(FATAL_ERROR "No COMPONENT passed to INSTALL_DEBUG_SYMBOLS") + SET(ARG_COMPONENT DebugBinaries) ENDIF() IF(NOT ARG_INSTALL_LOCATION) - MESSAGE(FATAL_ERROR "No INSTALL_LOCATION passed to INSTALL_DEBUG_SYMBOLS") + SET(ARG_INSTALL_LOCATION lib) ENDIF() SET(targets ${ARG_DEFAULT_ARGS}) FOREACH(target ${targets}) @@ -420,6 +420,7 @@ FUNCTION(INSTALL_MYSQL_TEST from to) PATTERN "*.vcxproj.filters" EXCLUDE PATTERN "*.vcxproj.user" EXCLUDE PATTERN "CTest" EXCLUDE + PATTERN "*~" EXCLUDE ) ENDIF() ENDFUNCTION() diff --git a/cmake/jemalloc.cmake b/cmake/jemalloc.cmake index bc6bf60781d..b677f226266 100644 --- a/cmake/jemalloc.cmake +++ b/cmake/jemalloc.cmake @@ -46,13 +46,14 @@ ELSE() ENDIF() SET(WITH_JEMALLOC ${WITH_JEMALLOC_DEFAULT} CACHE STRING - "Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)") + "Which jemalloc to use. Possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)") MACRO (CHECK_JEMALLOC) IF(WITH_JEMALLOC STREQUAL "system" OR WITH_JEMALLOC STREQUAL "yes") CHECK_LIBRARY_EXISTS(jemalloc malloc_stats_print "" HAVE_JEMALLOC) IF (HAVE_JEMALLOC) SET(LIBJEMALLOC jemalloc) + SET(MALLOC_LIBRARY "system jemalloc") ELSEIF (WITH_JEMALLOC STREQUAL "system") MESSAGE(FATAL_ERROR "system jemalloc is not found") ELSEIF (WITH_JEMALLOC STREQUAL "yes") @@ -61,5 +62,6 @@ MACRO (CHECK_JEMALLOC) ENDIF() IF(WITH_JEMALLOC STREQUAL "bundled" OR trybundled) USE_BUNDLED_JEMALLOC() + SET(MALLOC_LIBRARY "bundled jemalloc") ENDIF() ENDMACRO() diff --git a/cmake/mysql_add_executable.cmake b/cmake/mysql_add_executable.cmake index b1e1d3129e6..0c93fb179f5 100644 --- a/cmake/mysql_add_executable.cmake +++ b/cmake/mysql_add_executable.cmake @@ -1,48 +1,48 @@ -# Copyright (c) 2009, 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
-
-# Add executable plus some additional MySQL specific stuff
-# Usage (same as for standard CMake's ADD_EXECUTABLE)
-#
-# MYSQL_ADD_EXECUTABLE(target source1...sourceN)
-#
-# MySQL specifics:
-# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
-# On Windows :
-# - add version resource
-# - instruct CPack to do autenticode signing if SIGNCODE is set
-
-INCLUDE(cmake_parse_arguments)
-
-FUNCTION (MYSQL_ADD_EXECUTABLE)
- # Pass-through arguments for ADD_EXECUTABLE
- MYSQL_PARSE_ARGUMENTS(ARG
- "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
- ""
- ${ARGN}
- )
- LIST(GET ARG_DEFAULT_ARGS 0 target)
- LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
-
- SET(sources ${ARG_DEFAULT_ARGS})
- ADD_VERSION_INFO(${target} EXECUTABLE sources)
- ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
- # tell CPack where to install
- IF(NOT ARG_EXCLUDE_FROM_ALL)
- IF(NOT ARG_DESTINATION)
- SET(ARG_DESTINATION ${INSTALL_BINDIR})
+# Copyright (c) 2009, 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 + +# Add executable plus some additional MySQL specific stuff +# Usage (same as for standard CMake's ADD_EXECUTABLE) +# +# MYSQL_ADD_EXECUTABLE(target source1...sourceN) +# +# MySQL specifics: +# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory +# On Windows : +# - add version resource +# - instruct CPack to do autenticode signing if SIGNCODE is set + +INCLUDE(cmake_parse_arguments) + +FUNCTION (MYSQL_ADD_EXECUTABLE) + # Pass-through arguments for ADD_EXECUTABLE + MYSQL_PARSE_ARGUMENTS(ARG + "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT" + "" + ${ARGN} + ) + LIST(GET ARG_DEFAULT_ARGS 0 target) + LIST(REMOVE_AT ARG_DEFAULT_ARGS 0) + + SET(sources ${ARG_DEFAULT_ARGS}) + ADD_VERSION_INFO(${target} EXECUTABLE sources) + ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources}) + # tell CPack where to install + IF(NOT ARG_EXCLUDE_FROM_ALL) + IF(NOT ARG_DESTINATION) + SET(ARG_DESTINATION ${INSTALL_BINDIR}) ENDIF() IF(ARG_COMPONENT) SET(COMP COMPONENT ${ARG_COMPONENT}) @@ -50,7 +50,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE) SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT}) ELSE() SET(COMP COMPONENT Client) - ENDIF()
- MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
- ENDIF()
+ ENDIF() + MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP}) + ENDIF() ENDFUNCTION() diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake index 36d7ade66a7..b0680d92a1b 100644 --- a/cmake/os/Linux.cmake +++ b/cmake/os/Linux.cmake @@ -1,5 +1,5 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2013, 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,7 +34,10 @@ ENDFOREACH() # Ensure we have clean build for shared libraries # without unresolved symbols -SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined") +# Not supported with AddressSanitizer +IF(NOT WITH_ASAN) + SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined") +ENDIF() # 64 bit file offset support flag SET(_FILE_OFFSET_BITS 64) diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake new file mode 100644 index 00000000000..45d9bc01ddb --- /dev/null +++ b/cmake/pcre.cmake @@ -0,0 +1,16 @@ +SET(WITH_PCRE "auto" CACHE STRING + "Which pcre to use (possible values are 'bundled', 'system', or 'auto')") + +MACRO (CHECK_PCRE) + IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto") + CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE) + ENDIF() + IF(NOT HAVE_PCRE) + IF (WITH_PCRE STREQUAL "system") + MESSAGE(FATAL_ERROR "system pcre is not found or unusable") + ENDIF() + SET(PCRE_INCLUDES ${CMAKE_BINARY_DIR}/pcre ${CMAKE_SOURCE_DIR}/pcre) + ADD_SUBDIRECTORY(pcre) + ENDIF() +ENDMACRO() + diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index d0847f1f84e..07372849a10 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -37,8 +37,7 @@ MACRO(MYSQL_ADD_PLUGIN) # Add common include directories INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql - ${CMAKE_BINARY_DIR}/pcre - ${CMAKE_SOURCE_DIR}/pcre + ${PCRE_INCLUDES} ${SSL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) diff --git a/cmake/versioninfo.rc.in b/cmake/versioninfo.rc.in index 6eb853936d2..cd880b917e0 100644 --- a/cmake/versioninfo.rc.in +++ b/cmake/versioninfo.rc.in @@ -1,38 +1,38 @@ -// Copyright (c) 2009, 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
-
-#include <windows.h>
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
-PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
-FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-FILEFLAGS 0
-FILEOS VOS__WINDOWS32
-FILETYPE @FILETYPE@
-FILESUBTYPE VFT2_UNKNOWN
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904E4"
- BEGIN
- VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
- VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1252
- END
-END
+// Copyright (c) 2009, 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 + +#include <windows.h> +VS_VERSION_INFO VERSIONINFO +FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@ +PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@ +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +FILEFLAGS 0 +FILEOS VOS__WINDOWS32 +FILETYPE @FILETYPE@ +FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0" + VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake index d2e78dd7049..03d2c542ba4 100644 --- a/cmake/zlib.cmake +++ b/cmake/zlib.cmake @@ -1,5 +1,4 @@ -# Copyright (c) 2009 Sun Microsystems, Inc. -# Use is subject to license terms. +# Copyright (c) 2009, 2013, 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 diff --git a/config.h.cmake b/config.h.cmake index d09be63894e..06c18da66c8 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 2013, 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 @@ -618,7 +618,7 @@ #cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@" #cmakedefine PLUGINDIR "@PLUGINDIR@" #cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@" -#cmakedefine DEFAULT_TMPDIR "@DEFAULT_TMPDIR@" +#cmakedefine DEFAULT_TMPDIR @DEFAULT_TMPDIR@ #cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@" @@ -636,6 +636,7 @@ #define VERSION "@VERSION@" #define PROTOCOL_VERSION 10 +#define MALLOC_LIBRARY "@MALLOC_LIBRARY@" /* time_t related defines */ diff --git a/configure.cmake b/configure.cmake index 911cb38c454..7ec87f6e9a8 100644 --- a/configure.cmake +++ b/configure.cmake @@ -140,6 +140,10 @@ IF(UNIX) SET(CMAKE_REQUIRED_LIBRARIES ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO}) + # Need explicit pthread for gcc -fsanitize=address + IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=") + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread) + ENDIF() IF(CMAKE_REQUIRED_LIBRARIES) LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES) diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control index 0604d56ceb0..cb4164fabf3 100644 --- a/debian/dist/Debian/control +++ b/debian/dist/Debian/control @@ -17,14 +17,14 @@ Recommends: libhtml-template-perl Pre-Depends: mariadb-common, adduser (>= 3.40), debconf Depends: mariadb-client-10.0 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), libmariadbclient18 (>= ${binary:Version}), galera (>=25.2) Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5, mysql-server-core-10.0, mariadb-server, mysql-server, virtual-mysql-server, mariadb-galera-server -Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mariadb-galera-server (<< ${source:Version}), +Conflicts: mariadb-server, mysql-server, mariadb-galera-server (<< ${source:Version}), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5, mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5, mariadb-server-core-10.0, mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0 -Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mariadb-galera-server (<< ${source:Version}), +Replaces: mariadb-server, mysql-server, mariadb-galera-server (<< ${source:Version}), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-server-5.5, libmariadbclient16 (<< 5.3.4), libmariadbclient-dev (<< 5.5.0), @@ -73,4 +73,4 @@ Depends: mariadb-test-10.0 (= ${source:Version}) Description: MariaDB database regression test suite (metapackage depending on the latest version) This is an empty package that depends on the current "best" version of mariadb-test (currently mariadb-test-10.0), as determined by the MariaDB - maintainers.
\ No newline at end of file + maintainers. diff --git a/debian/dist/Debian/mariadb-galera-server-10.0.files.in b/debian/dist/Debian/mariadb-galera-server-10.0.files.in index 4c2d448adae..8080db1d29d 100644 --- a/debian/dist/Debian/mariadb-galera-server-10.0.files.in +++ b/debian/dist/Debian/mariadb-galera-server-10.0.files.in @@ -3,8 +3,7 @@ usr/lib/mysql/plugin/auth_pam.so usr/lib/mysql/plugin/auth_socket.so usr/lib/mysql/plugin/ha_sequence.so usr/lib/mysql/plugin/ha_sphinx.so -usr/lib/mysql/plugin/ha_xtradb.so -usr/lib/mysql/plugin/ha_oqgraph.so +usr/lib/mysql/plugin/ha_innodb.so usr/lib/mysql/plugin/handlersocket.so usr/lib/mysql/plugin/locales.so usr/lib/mysql/plugin/metadata_lock_info.so diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control index 8db3ef29a58..1d07dffb50e 100644 --- a/debian/dist/Ubuntu/control +++ b/debian/dist/Ubuntu/control @@ -17,14 +17,14 @@ Recommends: libhtml-template-perl Pre-Depends: mariadb-common, adduser (>= 3.40), debconf Depends: mariadb-client-10.0 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), libmariadbclient18 (>= ${binary:Version}), galera (>=25.2) Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5, mysql-server-core-10.0, mariadb-server, mysql-server, virtual-mysql-server, mariadb-galera-server -Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mariadb-galera-server (<< ${source:Version}), +Conflicts: mariadb-server, mysql-server, mariadb-galera-server (<< ${source:Version}), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5, mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5, mariadb-server-core-10.0, mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0 -Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mariadb-galera-server (<< ${source:Version}), +Replaces: mariadb-server, mysql-server, mariadb-galera-server (<< ${source:Version}), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-server-5.5, libmariadbclient16 (<< 5.3.4), libmariadbclient-dev (<< 5.5.0), @@ -73,4 +73,4 @@ Depends: mariadb-test-10.0 (= ${source:Version}) Description: MariaDB database regression test suite (metapackage depending on the latest version) This is an empty package that depends on the current "best" version of mariadb-test (currently mariadb-test-10.0), as determined by the MariaDB - maintainers.
\ No newline at end of file + maintainers. diff --git a/debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in b/debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in index 14388f44c1d..52ce01efb39 100644 --- a/debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in +++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in @@ -3,8 +3,7 @@ usr/lib/mysql/plugin/auth_pam.so usr/lib/mysql/plugin/auth_socket.so usr/lib/mysql/plugin/ha_sequence.so usr/lib/mysql/plugin/ha_sphinx.so -usr/lib/mysql/plugin/ha_xtradb.so -usr/lib/mysql/plugin/ha_oqgraph.so +usr/lib/mysql/plugin/ha_innodb.so usr/lib/mysql/plugin/handlersocket.so usr/lib/mysql/plugin/locales.so usr/lib/mysql/plugin/metadata_lock_info.so diff --git a/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch b/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch index 615261713b0..7ce692a96b0 100755 --- a/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch +++ b/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch @@ -10,21 +10,30 @@ @DPATCH@ --- old/scripts/mysql_system_tables_data.sql 2008-12-04 22:59:44.000000000 +0100 +++ new/scripts/mysql_system_tables_data.sql 2008-12-04 23:00:07.000000000 +0100 -@@ -31,8 +31,6 @@ - -- Fill "db" table with default grants for anyone to - -- access database 'test' and 'test_%' if "db" table didn't exist - CREATE TEMPORARY TABLE tmp_db LIKE db; +@@ -26,16 +26,6 @@ + -- a plain character + SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname; + +- +--- Fill "db" table with default grants for anyone to +--- access database 'test' and 'test_%' if "db" table didn't exist +-CREATE TEMPORARY TABLE tmp_db LIKE db; -INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); -INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); - INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; - DROP TABLE tmp_db; - -@@ -44,8 +42,6 @@ - REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N' FROM dual WHERE LOWER( @current_hostname) != 'localhost'; +-INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; +-DROP TABLE tmp_db; +- +- + -- Fill "user" table with default users allowing root access + -- from local machine if "user" table didn't exist before + CREATE TEMPORARY TABLE tmp_user LIKE user; +@@ -43,8 +33,6 @@ INSERT INTO tmp_user VALUES ('localhost' + REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N' FROM dual WHERE @current_hostname != 'localhost'; REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N'); REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N'); -INSERT INTO tmp_user (host,user) VALUES ('localhost',''); --INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost'; +-INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; DROP TABLE tmp_user; + diff --git a/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch b/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch index 81c1baf4375..5a9c3a59698 100755 --- a/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch +++ b/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch @@ -9,7 +9,7 @@ --- a/scripts/mysqld_safe.sh 2013-01-11 16:02:41 +0000 +++ b/scripts/mysqld_safe.sh 2013-01-11 16:03:14 +0000 -@@ -30,7 +30,6 @@ +@@ -32,7 +32,6 @@ err_log= syslog_tag_mysqld=mysqld syslog_tag_mysqld_safe=mysqld_safe @@ -17,7 +17,7 @@ # MySQL-specific environment variable. First off, it's not really a umask, # it's the desired mode. Second, it follows umask(2), not umask(3) in that -@@ -156,7 +155,7 @@ +@@ -163,7 +162,7 @@ eval_log_error () { # sed buffers output (only GNU sed supports a -u (unbuffered) option) # which means that messages may not get sent to syslog until the # mysqld process quits. @@ -26,7 +26,7 @@ ;; *) echo "Internal program error (non-fatal):" \ -@@ -758,6 +757,13 @@ +@@ -805,6 +804,13 @@ then fi # diff --git a/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch b/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch index d4e67b321b0..5ab8ab3d3d7 100755 --- a/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch +++ b/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch @@ -9,12 +9,12 @@ --- mysql-dfsg-5.1-5.1.23rc.orig/scripts/mysql_install_db.sh 2008-01-29 22:41:20.000000000 +0100 +++ mysql-dfsg-5.1-5.1.23rc/scripts/mysql_install_db.sh 2008-02-28 10:08:11.000000000 +0100 -@@ -306,7 +306,7 @@ +@@ -372,7 +372,7 @@ then fi # Create database directories -for dir in "$ldata" "$ldata/mysql" "$ldata/test" +for dir in "$ldata" "$ldata/mysql" do - if test ! -d $dir + if test ! -d "$dir" then diff --git a/debian/patches/44_scripts__mysql_config__libs.dpatch b/debian/patches/44_scripts__mysql_config__libs.dpatch index 1c15200aead..a8569617dba 100755 --- a/debian/patches/44_scripts__mysql_config__libs.dpatch +++ b/debian/patches/44_scripts__mysql_config__libs.dpatch @@ -8,7 +8,7 @@ diff -Nur mysql-dfsg-5.1-5.1.31.orig/scripts/mysql_config.sh mysql-dfsg-5.1-5.1.31/scripts/mysql_config.sh --- mysql-dfsg-5.1-5.1.31.orig/scripts/mysql_config.sh 2009-01-19 17:30:55.000000000 +0100 +++ mysql-dfsg-5.1-5.1.31/scripts/mysql_config.sh 2009-02-08 17:17:48.000000000 +0100 -@@ -110,10 +110,10 @@ +@@ -106,10 +106,10 @@ fi # Create options # We intentionally add a space to the beginning and end of lib strings, simplifies replace later diff --git a/debian/patches/50_mysql-test__db_test.dpatch b/debian/patches/50_mysql-test__db_test.dpatch index fe356ae46ef..670afbf14ac 100755 --- a/debian/patches/50_mysql-test__db_test.dpatch +++ b/debian/patches/50_mysql-test__db_test.dpatch @@ -10,9 +10,9 @@ --- old/mysql-test/mysql-test-run.pl 2009-06-16 14:24:09.000000000 +0200 +++ new/mysql-test/mysql-test-run.pl 2009-07-04 00:03:34.000000000 +0200 -@@ -2717,6 +2717,11 @@ +@@ -3578,6 +3578,11 @@ sub mysql_install_db { mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql", - $bootstrap_sql_file); + $bootstrap_sql_file); + mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n"); + mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n"); diff --git a/debian/po/it.po b/debian/po/it.po index ec6751b2574..0feaa77a45f 100644 --- a/debian/po/it.po +++ b/debian/po/it.po @@ -1,8 +1,8 @@ -# Italian (it) translation of debconf templates for mysql-dfsg-5.1
-# Copyright (C) 2009 Software in the Public Interest
-# This file is distributed under the same license as the mysql-dfsg-5.1 package.
-# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009.
-#
+# Italian (it) translation of debconf templates for mysql-dfsg-5.1 +# Copyright (C) 2009 Software in the Public Interest +# This file is distributed under the same license as the mysql-dfsg-5.1 package. +# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009. +# msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.1 5.1.37 italian debconf templates\n" @@ -177,9 +177,6 @@ msgstr "" #. Description #: ../mariadb-galera-server-10.0.templates:8001 #, fuzzy -#| msgid "" -#| "Please read the /usr/share/doc/mariadb-server-10.0/README.Debian file for " -#| "more information." msgid "" "Please read the /usr/share/doc/mariadb-server-10.0/README.Debian file for " "more information." diff --git a/debian/po/sv.po b/debian/po/sv.po index 586dd7f460f..fe21df1e229 100644 --- a/debian/po/sv.po +++ b/debian/po/sv.po @@ -1,9 +1,9 @@ -# Translation of mysql-dfsg-5.1 debconf template to Swedish
-# Copyright (C) 2009 Martin Bagge <brother@bsnet.se>
-# This file is distributed under the same license as the mysql-dfsg-5.1 package.
-#
-# Andreas Henriksson <andreas@fatal.se>, 2007
-# Martin Bagge <brother@bsnet.se>, 2009
+# Translation of mysql-dfsg-5.1 debconf template to Swedish +# Copyright (C) 2009 Martin Bagge <brother@bsnet.se> +# This file is distributed under the same license as the mysql-dfsg-5.1 package. +# +# Andreas Henriksson <andreas@fatal.se>, 2007 +# Martin Bagge <brother@bsnet.se>, 2009 msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.1 5.0.21-3\n" @@ -178,9 +178,6 @@ msgstr "Du bör kontrollera kontots lösenord efter installationen av paketet." #. Description #: ../mariadb-galera-server-10.0.templates:8001 #, fuzzy -#| msgid "" -#| "Please read the /usr/share/doc/mariadb-server-10.0/README.Debian file for " -#| "more information." msgid "" "Please read the /usr/share/doc/mariadb-server-10.0/README.Debian file for " "more information." diff --git a/extra/jemalloc/ChangeLog b/extra/jemalloc/ChangeLog index fc096d8f42f..4f03fc141cb 100644 --- a/extra/jemalloc/ChangeLog +++ b/extra/jemalloc/ChangeLog @@ -6,6 +6,15 @@ found in the git revision history: http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git git://canonware.com/jemalloc.git +* 3.3.1a (December 27, 2013) + + Bug fixes from 3.4.1 + - Fix Valgrind integration flaws that caused Valgrind warnings about reads of + uninitialized memory in: + + arena chunk headers + + internal zero-initialized data structures (relevant to tcache and prof + code) + * 3.3.1 (March 6, 2013) This version fixes bugs that are typically encountered only when utilizing diff --git a/extra/jemalloc/include/jemalloc/internal/arena.h b/extra/jemalloc/include/jemalloc/internal/arena.h index f2c18f43543..bbcfedacead 100644 --- a/extra/jemalloc/include/jemalloc/internal/arena.h +++ b/extra/jemalloc/include/jemalloc/internal/arena.h @@ -441,6 +441,7 @@ void arena_postfork_child(arena_t *arena); #ifndef JEMALLOC_ENABLE_INLINE arena_chunk_map_t *arena_mapp_get(arena_chunk_t *chunk, size_t pageind); size_t *arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind); +size_t arena_mapbitsp_read(size_t *mapbitsp); size_t arena_mapbits_get(arena_chunk_t *chunk, size_t pageind); size_t arena_mapbits_unallocated_size_get(arena_chunk_t *chunk, size_t pageind); @@ -451,6 +452,7 @@ size_t arena_mapbits_dirty_get(arena_chunk_t *chunk, size_t pageind); size_t arena_mapbits_unzeroed_get(arena_chunk_t *chunk, size_t pageind); size_t arena_mapbits_large_get(arena_chunk_t *chunk, size_t pageind); size_t arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind); +void arena_mapbitsp_write(size_t *mapbitsp, size_t mapbits); void arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, size_t size, size_t flags); void arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind, @@ -498,10 +500,17 @@ arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind) } JEMALLOC_ALWAYS_INLINE size_t +arena_mapbitsp_read(size_t *mapbitsp) +{ + + return (*mapbitsp); +} + +JEMALLOC_ALWAYS_INLINE size_t arena_mapbits_get(arena_chunk_t *chunk, size_t pageind) { - return (*arena_mapbitsp_get(chunk, pageind)); + return (arena_mapbitsp_read(arena_mapbitsp_get(chunk, pageind))); } JEMALLOC_ALWAYS_INLINE size_t @@ -585,82 +594,89 @@ arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind) } JEMALLOC_ALWAYS_INLINE void +arena_mapbitsp_write(size_t *mapbitsp, size_t mapbits) +{ + + *mapbitsp = mapbits; +} + +JEMALLOC_ALWAYS_INLINE void arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, size_t size, size_t flags) { - size_t *mapbitsp; + size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); - mapbitsp = arena_mapbitsp_get(chunk, pageind); assert((size & PAGE_MASK) == 0); assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0); assert((flags & (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == flags); - *mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags; + arena_mapbitsp_write(mapbitsp, size | CHUNK_MAP_BININD_INVALID | flags); } JEMALLOC_ALWAYS_INLINE void arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind, size_t size) { - size_t *mapbitsp; + size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); + size_t mapbits = arena_mapbitsp_read(mapbitsp); - mapbitsp = arena_mapbitsp_get(chunk, pageind); assert((size & PAGE_MASK) == 0); - assert((*mapbitsp & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0); - *mapbitsp = size | (*mapbitsp & PAGE_MASK); + assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0); + arena_mapbitsp_write(mapbitsp, size | (mapbits & PAGE_MASK)); } JEMALLOC_ALWAYS_INLINE void arena_mapbits_large_set(arena_chunk_t *chunk, size_t pageind, size_t size, size_t flags) { - size_t *mapbitsp; + size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); + size_t mapbits = arena_mapbitsp_read(mapbitsp); size_t unzeroed; - mapbitsp = arena_mapbitsp_get(chunk, pageind); assert((size & PAGE_MASK) == 0); assert((flags & CHUNK_MAP_DIRTY) == flags); - unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */ - *mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags | unzeroed | - CHUNK_MAP_LARGE | CHUNK_MAP_ALLOCATED; + unzeroed = mapbits & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */ + arena_mapbitsp_write(mapbitsp, size | CHUNK_MAP_BININD_INVALID | flags + | unzeroed | CHUNK_MAP_LARGE | CHUNK_MAP_ALLOCATED); } JEMALLOC_ALWAYS_INLINE void arena_mapbits_large_binind_set(arena_chunk_t *chunk, size_t pageind, size_t binind) { - size_t *mapbitsp; + size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); + size_t mapbits = arena_mapbitsp_read(mapbitsp); assert(binind <= BININD_INVALID); - mapbitsp = arena_mapbitsp_get(chunk, pageind); assert(arena_mapbits_large_size_get(chunk, pageind) == PAGE); - *mapbitsp = (*mapbitsp & ~CHUNK_MAP_BININD_MASK) | (binind << - CHUNK_MAP_BININD_SHIFT); + arena_mapbitsp_write(mapbitsp, (mapbits & ~CHUNK_MAP_BININD_MASK) | + (binind << CHUNK_MAP_BININD_SHIFT)); } JEMALLOC_ALWAYS_INLINE void arena_mapbits_small_set(arena_chunk_t *chunk, size_t pageind, size_t runind, size_t binind, size_t flags) { - size_t *mapbitsp; + size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); + size_t mapbits = arena_mapbitsp_read(mapbitsp); size_t unzeroed; assert(binind < BININD_INVALID); - mapbitsp = arena_mapbitsp_get(chunk, pageind); assert(pageind - runind >= map_bias); assert((flags & CHUNK_MAP_DIRTY) == flags); - unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */ - *mapbitsp = (runind << LG_PAGE) | (binind << CHUNK_MAP_BININD_SHIFT) | - flags | unzeroed | CHUNK_MAP_ALLOCATED; + unzeroed = mapbits & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */ + arena_mapbitsp_write(mapbitsp, (runind << LG_PAGE) | (binind << + CHUNK_MAP_BININD_SHIFT) | flags | unzeroed | CHUNK_MAP_ALLOCATED); } JEMALLOC_ALWAYS_INLINE void arena_mapbits_unzeroed_set(arena_chunk_t *chunk, size_t pageind, size_t unzeroed) { - size_t *mapbitsp; + size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); + size_t mapbits = arena_mapbitsp_read(mapbitsp); - mapbitsp = arena_mapbitsp_get(chunk, pageind); - *mapbitsp = (*mapbitsp & ~CHUNK_MAP_UNZEROED) | unzeroed; + arena_mapbitsp_write(mapbitsp, (mapbits & ~CHUNK_MAP_UNZEROED) | + unzeroed); } JEMALLOC_INLINE bool diff --git a/extra/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in b/extra/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in index 50d84cabf69..124ec34bddf 100644 --- a/extra/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in +++ b/extra/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in @@ -235,6 +235,7 @@ static const bool config_ivsalloc = #ifdef JEMALLOC_DEBUG /* Disable inlining to make debugging easier. */ # define JEMALLOC_ALWAYS_INLINE +# define JEMALLOC_ALWAYS_INLINE_C static # define JEMALLOC_INLINE # define inline #else @@ -242,8 +243,11 @@ static const bool config_ivsalloc = # ifdef JEMALLOC_HAVE_ATTR # define JEMALLOC_ALWAYS_INLINE \ static inline JEMALLOC_ATTR(unused) JEMALLOC_ATTR(always_inline) +# define JEMALLOC_ALWAYS_INLINE_C \ + static inline JEMALLOC_ATTR(always_inline) # else # define JEMALLOC_ALWAYS_INLINE static inline +# define JEMALLOC_ALWAYS_INLINE_C static inline # endif # define JEMALLOC_INLINE static inline # ifdef _MSC_VER diff --git a/extra/jemalloc/include/jemalloc/internal/private_namespace.h b/extra/jemalloc/include/jemalloc/internal/private_namespace.h index 65de3163fd3..cdb0b0eb1c4 100644 --- a/extra/jemalloc/include/jemalloc/internal/private_namespace.h +++ b/extra/jemalloc/include/jemalloc/internal/private_namespace.h @@ -33,6 +33,8 @@ #define arena_mapbits_unzeroed_get JEMALLOC_N(arena_mapbits_unzeroed_get) #define arena_mapbits_unzeroed_set JEMALLOC_N(arena_mapbits_unzeroed_set) #define arena_mapbitsp_get JEMALLOC_N(arena_mapbitsp_get) +#define arena_mapbitsp_read JEMALLOC_N(arena_mapbitsp_read) +#define arena_mapbitsp_write JEMALLOC_N(arena_mapbitsp_write) #define arena_mapp_get JEMALLOC_N(arena_mapp_get) #define arena_maxclass JEMALLOC_N(arena_maxclass) #define arena_new JEMALLOC_N(arena_new) diff --git a/extra/jemalloc/include/jemalloc/internal/tcache.h b/extra/jemalloc/include/jemalloc/internal/tcache.h index ba36204ff21..d4eecdee0dc 100644 --- a/extra/jemalloc/include/jemalloc/internal/tcache.h +++ b/extra/jemalloc/include/jemalloc/internal/tcache.h @@ -313,6 +313,7 @@ tcache_alloc_small(tcache_t *tcache, size_t size, bool zero) } else if (opt_zero) memset(ret, 0, size); } + VALGRIND_MAKE_MEM_UNDEFINED(ret, size); } else { if (config_fill && opt_junk) { arena_alloc_junk_small(ret, &arena_bin_info[binind], @@ -321,7 +322,6 @@ tcache_alloc_small(tcache_t *tcache, size_t size, bool zero) VALGRIND_MAKE_MEM_UNDEFINED(ret, size); memset(ret, 0, size); } - VALGRIND_MAKE_MEM_UNDEFINED(ret, size); if (config_stats) tbin->tstats.nrequests++; @@ -368,11 +368,11 @@ tcache_alloc_large(tcache_t *tcache, size_t size, bool zero) else if (opt_zero) memset(ret, 0, size); } + VALGRIND_MAKE_MEM_UNDEFINED(ret, size); } else { VALGRIND_MAKE_MEM_UNDEFINED(ret, size); memset(ret, 0, size); } - VALGRIND_MAKE_MEM_UNDEFINED(ret, size); if (config_stats) tbin->tstats.nrequests++; diff --git a/extra/jemalloc/src/arena.c b/extra/jemalloc/src/arena.c index 05a787f89d9..d28b629a1e1 100644 --- a/extra/jemalloc/src/arena.c +++ b/extra/jemalloc/src/arena.c @@ -369,13 +369,20 @@ arena_run_zero(arena_chunk_t *chunk, size_t run_ind, size_t npages) } static inline void +arena_run_page_mark_zeroed(arena_chunk_t *chunk, size_t run_ind) +{ + + VALGRIND_MAKE_MEM_DEFINED((void *)((uintptr_t)chunk + (run_ind << + LG_PAGE)), PAGE); +} + +static inline void arena_run_page_validate_zeroed(arena_chunk_t *chunk, size_t run_ind) { size_t i; UNUSED size_t *p = (size_t *)((uintptr_t)chunk + (run_ind << LG_PAGE)); - VALGRIND_MAKE_MEM_DEFINED((void *)((uintptr_t)chunk + (run_ind << - LG_PAGE)), PAGE); + arena_run_page_mark_zeroed(chunk, run_ind); for (i = 0; i < PAGE / sizeof(size_t); i++) assert(p[i] == 0); } @@ -458,6 +465,9 @@ arena_run_split(arena_t *arena, arena_run_t *run, size_t size, bool large, } else if (config_debug) { arena_run_page_validate_zeroed( chunk, run_ind+i); + } else { + arena_run_page_mark_zeroed( + chunk, run_ind+i); } } } else { @@ -467,6 +477,9 @@ arena_run_split(arena_t *arena, arena_run_t *run, size_t size, bool large, */ arena_run_zero(chunk, run_ind, need_pages); } + } else { + VALGRIND_MAKE_MEM_UNDEFINED((void *)((uintptr_t)chunk + + (run_ind << LG_PAGE)), (need_pages << LG_PAGE)); } /* @@ -508,9 +521,9 @@ arena_run_split(arena_t *arena, arena_run_t *run, size_t size, bool large, arena_run_page_validate_zeroed(chunk, run_ind+need_pages-1); } + VALGRIND_MAKE_MEM_UNDEFINED((void *)((uintptr_t)chunk + + (run_ind << LG_PAGE)), (need_pages << LG_PAGE)); } - VALGRIND_MAKE_MEM_UNDEFINED((void *)((uintptr_t)chunk + (run_ind << - LG_PAGE)), (need_pages << LG_PAGE)); } static arena_chunk_t * @@ -569,17 +582,24 @@ arena_chunk_alloc(arena_t *arena) * unless the chunk is not zeroed. */ if (zero == false) { + VALGRIND_MAKE_MEM_UNDEFINED( + (void *)arena_mapp_get(chunk, map_bias+1), + (size_t)((uintptr_t) arena_mapp_get(chunk, + chunk_npages-1) - (uintptr_t)arena_mapp_get(chunk, + map_bias+1))); for (i = map_bias+1; i < chunk_npages-1; i++) arena_mapbits_unzeroed_set(chunk, i, unzeroed); - } else if (config_debug) { + } else { VALGRIND_MAKE_MEM_DEFINED( (void *)arena_mapp_get(chunk, map_bias+1), - (void *)((uintptr_t) - arena_mapp_get(chunk, chunk_npages-1) - - (uintptr_t)arena_mapp_get(chunk, map_bias+1))); - for (i = map_bias+1; i < chunk_npages-1; i++) { - assert(arena_mapbits_unzeroed_get(chunk, i) == - unzeroed); + (size_t)((uintptr_t) arena_mapp_get(chunk, + chunk_npages-1) - (uintptr_t)arena_mapp_get(chunk, + map_bias+1))); + if (config_debug) { + for (i = map_bias+1; i < chunk_npages-1; i++) { + assert(arena_mapbits_unzeroed_get(chunk, + i) == unzeroed); + } } } arena_mapbits_unallocated_set(chunk, chunk_npages-1, @@ -1458,6 +1478,7 @@ arena_malloc_small(arena_t *arena, size_t size, bool zero) } else if (opt_zero) memset(ret, 0, size); } + VALGRIND_MAKE_MEM_UNDEFINED(ret, size); } else { if (config_fill && opt_junk) { arena_alloc_junk_small(ret, &arena_bin_info[binind], @@ -1466,7 +1487,6 @@ arena_malloc_small(arena_t *arena, size_t size, bool zero) VALGRIND_MAKE_MEM_UNDEFINED(ret, size); memset(ret, 0, size); } - VALGRIND_MAKE_MEM_UNDEFINED(ret, size); return (ret); } diff --git a/extra/yassl/CMakeLists.txt b/extra/yassl/CMakeLists.txt index 26ea7e23e33..08e0f49d8a2 100644 --- a/extra/yassl/CMakeLists.txt +++ b/extra/yassl/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2013, 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 @@ -33,4 +33,9 @@ SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp sr ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES}) RESTRICT_SYMBOL_EXPORTS(yassl) +INSTALL_DEBUG_SYMBOLS(yassl) +IF(MSVC) + INSTALL_DEBUG_TARGET(yassl DESTINATION ${INSTALL_LIBDIR}/debug) +ENDIF() + diff --git a/extra/yassl/include/yassl_error.hpp b/extra/yassl/include/yassl_error.hpp index a4b29ae2e8c..beba7b0b5dd 100644 --- a/extra/yassl/include/yassl_error.hpp +++ b/extra/yassl/include/yassl_error.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2013, 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 diff --git a/extra/yassl/include/yassl_types.hpp b/extra/yassl/include/yassl_types.hpp index 6a8c3f6c075..129661c58ed 100644 --- a/extra/yassl/include/yassl_types.hpp +++ b/extra/yassl/include/yassl_types.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2013, 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 diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp index d4c45ae8a3d..79a0c291fb6 100644 --- a/extra/yassl/src/handshake.cpp +++ b/extra/yassl/src/handshake.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. + Copyright (c) 2005, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp index 2d42e82ab4a..36e286a73ce 100644 --- a/extra/yassl/src/yassl_error.cpp +++ b/extra/yassl/src/yassl_error.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates + Copyright (c) 2005, 2013, Oracle and/or its affiliates This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index d943775101b..b927a55237d 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates + Copyright (c) 2005, 2013, Oracle and/or its affiliates This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/taocrypt/CMakeLists.txt b/extra/yassl/taocrypt/CMakeLists.txt index b75d478037e..84f1fc186e4 100644 --- a/extra/yassl/taocrypt/CMakeLists.txt +++ b/extra/yassl/taocrypt/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2013, 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,3 +32,8 @@ SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES}) RESTRICT_SYMBOL_EXPORTS(taocrypt) +INSTALL_DEBUG_SYMBOLS(taocrypt) +IF(MSVC) + INSTALL_DEBUG_TARGET(taocrypt DESTINATION ${INSTALL_LIBDIR}/debug) +ENDIF() + diff --git a/include/handler_ername.h b/include/handler_ername.h index 91780be553d..50f7f535806 100644 --- a/include/handler_ername.h +++ b/include/handler_ername.h @@ -78,3 +78,4 @@ { "HA_ERR_ROW_NOT_VISIBLE", HA_ERR_ROW_NOT_VISIBLE, "" }, { "HA_ERR_ABORTED_BY_USER", HA_ERR_ABORTED_BY_USER, "" }, { "HA_ERR_DISK_FULL", HA_ERR_DISK_FULL, "" }, +{ "HA_ERR_INCOMPATIBLE_DEFINITION", HA_ERR_INCOMPATIBLE_DEFINITION, "" }, diff --git a/include/hash.h b/include/hash.h index f014c44c7ec..ba36df23f58 100644 --- a/include/hash.h +++ b/include/hash.h @@ -44,6 +44,8 @@ extern "C" { typedef uint my_hash_value_type; typedef uchar *(*my_hash_get_key)(const uchar *,size_t*,my_bool); +typedef my_hash_value_type (*my_hash_function)(const CHARSET_INFO *, + const uchar *, size_t); typedef void (*my_hash_free_key)(void *); typedef my_bool (*my_hash_walk_action)(void *,void *); @@ -54,6 +56,7 @@ typedef struct st_hash { uint flags; DYNAMIC_ARRAY array; /* Place for hash_keys */ my_hash_get_key get_key; + my_hash_function hash_function; void (*free)(void *); CHARSET_INFO *charset; } HASH; @@ -61,10 +64,11 @@ typedef struct st_hash { /* A search iterator state */ typedef uint HASH_SEARCH_STATE; -#define my_hash_init(A,B,C,D,E,F,G,H) my_hash_init2(A,0,B,C,D,E,F,G,H) +#define my_hash_init(A,B,C,D,E,F,G,H) my_hash_init2(A,0,B,C,D,E,F,0,G,H) my_bool my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset, ulong default_array_elements, size_t key_offset, size_t key_length, my_hash_get_key get_key, + my_hash_function hash_function, void (*free_element)(void*), uint flags); void my_hash_free(HASH *tree); @@ -74,8 +78,9 @@ uchar *my_hash_search(const HASH *info, const uchar *key, size_t length); uchar *my_hash_search_using_hash_value(const HASH *info, my_hash_value_type hash_value, const uchar *key, size_t length); -my_hash_value_type my_calc_hash(const HASH *info, +my_hash_value_type my_hash_sort(const CHARSET_INFO *cs, const uchar *key, size_t length); +#define my_calc_hash(A, B, C) my_hash_sort((A)->charset, B, C) uchar *my_hash_first(const HASH *info, const uchar *key, size_t length, HASH_SEARCH_STATE *state); uchar *my_hash_first_from_hash_value(const HASH *info, diff --git a/include/maria.h b/include/maria.h index 5812c543c1e..908825b9970 100644 --- a/include/maria.h +++ b/include/maria.h @@ -69,8 +69,8 @@ extern "C" { #if MARIA_MAX_KEY > MARIA_KEYMAP_BITS #define maria_is_key_active(_keymap_,_keyno_) \ (((_keyno_) < MARIA_KEYMAP_BITS) ? \ - test((_keymap_) & (1ULL << (_keyno_))) : \ - test((_keymap_) & MARIA_KEYMAP_HIGH_MASK)) + MY_TEST((_keymap_) & (1ULL << (_keyno_))) : \ + MY_TEST((_keymap_) & MARIA_KEYMAP_HIGH_MASK)) #define maria_set_key_active(_keymap_,_keyno_) \ (_keymap_)|= (((_keyno_) < MARIA_KEYMAP_BITS) ? \ (1ULL << (_keyno_)) : \ @@ -81,14 +81,14 @@ extern "C" { (~ (0ULL)) /*ignore*/ ) #else #define maria_is_key_active(_keymap_,_keyno_) \ - test((_keymap_) & (1ULL << (_keyno_))) + MY_TEST((_keymap_) & (1ULL << (_keyno_))) #define maria_set_key_active(_keymap_,_keyno_) \ (_keymap_)|= (1ULL << (_keyno_)) #define maria_clear_key_active(_keymap_,_keyno_) \ (_keymap_)&= (~ (1ULL << (_keyno_))) #endif #define maria_is_any_key_active(_keymap_) \ - test((_keymap_)) + MY_TEST((_keymap_)) #define maria_is_all_keys_active(_keymap_,_keys_) \ ((_keymap_) == maria_get_mask_all_keys_active(_keys_)) #define maria_set_all_keys_active(_keymap_,_keys_) \ diff --git a/include/my_base.h b/include/my_base.h index c9f9a8a4ed3..cc056bffa70 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -200,11 +200,6 @@ enum ha_extra_function { HA_EXTRA_ATTACH_CHILDREN, HA_EXTRA_IS_ATTACHED_CHILDREN, HA_EXTRA_DETACH_CHILDREN, - /* - Prepare table for export - (e.g. quiesce the table and write table metadata). - */ - HA_EXTRA_EXPORT, HA_EXTRA_DETACH_CHILD, /* Inform handler we will force a close as part of flush */ HA_EXTRA_PREPARE_FOR_FORCED_CLOSE @@ -264,13 +259,11 @@ enum ha_base_keytype { #define HA_SPATIAL 1024 /* For spatial search */ #define HA_NULL_ARE_EQUAL 2048 /* NULL in key are cmp as equal */ #define HA_GENERATED_KEY 8192 /* Automaticly generated key */ -#define HA_RTREE_INDEX 16384 /* For RTREE search */ /* The combination of the above can be used for key type comparison. */ #define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \ HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \ - HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY | \ - HA_RTREE_INDEX) + HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY) /* Key contains partial segments. @@ -507,7 +500,8 @@ enum ha_base_keytype { #define HA_ERR_ROW_NOT_VISIBLE 187 #define HA_ERR_ABORTED_BY_USER 188 #define HA_ERR_DISK_FULL 189 -#define HA_ERR_LAST 189 /* Copy of last error nr */ +#define HA_ERR_INCOMPATIBLE_DEFINITION 190 +#define HA_ERR_LAST 190 /* Copy of last error nr */ /* Number of different errors */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) diff --git a/include/my_bitmap.h b/include/my_bitmap.h index ef3274a8269..9c9550e3141 100644 --- a/include/my_bitmap.h +++ b/include/my_bitmap.h @@ -41,9 +41,14 @@ typedef struct st_bitmap #ifdef __cplusplus extern "C" { #endif + +/* compatibility functions */ +#define bitmap_init(A,B,C,D) my_bitmap_init(A,B,C,D) +#define bitmap_free(A) my_bitmap_free(A) + extern void create_last_word_mask(MY_BITMAP *map); -extern my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, - my_bool thread_safe); +extern my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, + my_bool thread_safe); extern my_bool bitmap_is_clear_all(const MY_BITMAP *map); extern my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size); extern my_bool bitmap_is_set_all(const MY_BITMAP *map); @@ -64,7 +69,7 @@ extern uint bitmap_get_first(const MY_BITMAP *map); extern uint bitmap_get_first_set(const MY_BITMAP *map); extern uint bitmap_bits_set(const MY_BITMAP *map); extern uint bitmap_get_next_set(const MY_BITMAP *map, uint bitmap_bit); -extern void bitmap_free(MY_BITMAP *map); +extern void my_bitmap_free(MY_BITMAP *map); extern void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit); extern void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size); extern void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2); diff --git a/include/my_check_opt.h b/include/my_check_opt.h new file mode 100644 index 00000000000..a95cb79b3ac --- /dev/null +++ b/include/my_check_opt.h @@ -0,0 +1,76 @@ +/* Copyright (c) 2000, 2013, 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 Street, Fifth Floor, Boston, MA 02110-1301, USA */ + +#ifndef _my_check_opt_h +#define _my_check_opt_h + +#ifdef __cplusplus +extern "C" { +#endif + +/* + All given definitions needed for MyISAM storage engine: + myisamchk.c or/and ha_myisam.cc or/and micheck.c + Some definitions are needed by the MySQL parser. +*/ + +#define T_AUTO_INC (1UL << 0) +#define T_AUTO_REPAIR (1UL << 1) +#define T_BACKUP_DATA (1UL << 2) +#define T_CALC_CHECKSUM (1UL << 3) +#define T_CHECK (1UL << 4) +#define T_CHECK_ONLY_CHANGED (1UL << 5) +#define T_CREATE_MISSING_KEYS (1UL << 6) +#define T_DESCRIPT (1UL << 7) +#define T_DONT_CHECK_CHECKSUM (1UL << 8) +#define T_EXTEND (1UL << 9) +#define T_FAST (1UL << 10) +#define T_FORCE_CREATE (1UL << 11) +#define T_FORCE_UNIQUENESS (1UL << 12) +#define T_INFO (1UL << 13) +/** CHECK TABLE...MEDIUM (the default) */ +#define T_MEDIUM (1UL << 14) +/** CHECK TABLE...QUICK */ +#define T_QUICK (1UL << 15) +#define T_READONLY (1UL << 16) +#define T_REP (1UL << 17) +#define T_REP_BY_SORT (1UL << 18) +#define T_REP_PARALLEL (1UL << 19) +#define T_RETRY_WITHOUT_QUICK (1UL << 20) +#define T_SAFE_REPAIR (1UL << 21) +#define T_SILENT (1UL << 22) +#define T_SORT_INDEX (1UL << 23) +#define T_SORT_RECORDS (1UL << 24) +#define T_STATISTICS (1UL << 25) +#define T_UNPACK (1UL << 26) +#define T_UPDATE_STATE (1UL << 27) +#define T_VERBOSE (1UL << 28) +#define T_VERY_SILENT (1UL << 29) +#define T_WAIT_FOREVER (1UL << 30) +#define T_WRITE_LOOP (1UL << 31) +#define T_ZEROFILL (1ULL << 32) +#define T_ZEROFILL_KEEP_LSN (1ULL << 33) +/** If repair should not bump create_rename_lsn */ +#define T_NO_CREATE_RENAME_LSN (1ULL << 34) +#define T_CREATE_UNIQUE_BY_SORT (1ULL << 35) +#define T_SUPPRESS_ERR_HANDLING (1ULL << 36) +#define T_FORCE_SORT_MEMORY (1ULL << 37) + +#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL) + +#ifdef __cplusplus +} +#endif +#endif diff --git a/include/my_getopt.h b/include/my_getopt.h index 56662079ce4..18b4bf10698 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2002, 2012, Oracle and/or its affiliates. + Copyright (c) 2002, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/my_global.h b/include/my_global.h index 1a7aff4a41f..e9a472e686e 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -144,6 +144,7 @@ /* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */ #if defined(_AIX) && defined(_LARGE_FILE_API) #undef _LARGE_FILE_API +#undef __GNUG__ #endif /* @@ -264,6 +265,16 @@ #endif #endif + +#ifdef _AIX +/* + AIX includes inttypes.h from sys/types.h + Explicitly request format macros before the first inclusion of inttypes.h +*/ +#define __STDC_FORMAT_MACROS +#endif + + #if !defined(__WIN__) #ifndef _POSIX_PTHREAD_SEMANTICS #define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */ @@ -316,6 +327,13 @@ C_MODE_END #define _LONG_LONG 1 /* For AIX string library */ #endif +/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */ +#if defined(_AIX) && defined(_LARGE_FILE_API) +#undef _LARGE_FILE_API +#undef __GNUG__ +#endif + + #ifndef stdin #include <stdio.h> #endif @@ -341,12 +359,17 @@ C_MODE_END #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif + +/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */ +#if defined(_AIX) && defined(_LARGE_FILE_API) +#undef _LARGE_FILE_API +#undef __GNUG__ +#endif + + #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif -#ifdef HAVE_SYS_TIMEB_H -#include <sys/timeb.h> /* Avoid warnings on SCO */ -#endif #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif @@ -477,7 +500,7 @@ typedef unsigned short ushort; #endif #define swap_variables(t, a, b) do { t dummy; dummy= a; a= b; b= dummy; } while(0) -#define test(a) ((a) ? 1 : 0) +#define MY_TEST(a) ((a) ? 1 : 0) #define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0) #define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0) #define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1)) @@ -1217,11 +1240,10 @@ static inline double rint(double x) #define HAVE_EXTERNAL_CLIENT #endif /* EMBEDDED_LIBRARY */ -/* - Define default tmpdir if not already set. -*/ -#if !defined(DEFAULT_TMPDIR) -#define DEFAULT_TMPDIR P_tmpdir +/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */ +#if defined(_AIX) && defined(_LARGE_FILE_API) +#undef _LARGE_FILE_API +#undef __GNUG__ #endif #endif /* my_global_h */ diff --git a/include/my_handler_errors.h b/include/my_handler_errors.h index 17b4a73ff93..76b6b1aa60d 100644 --- a/include/my_handler_errors.h +++ b/include/my_handler_errors.h @@ -92,7 +92,8 @@ static const char *handler_error_messages[]= "Row in wrong partition", "Row is not visible by the current transaction", "Operation was interrupted by end user (probably kill command?)", - "Disk full" + "Disk full", + "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this" }; #endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */ diff --git a/include/my_net.h b/include/my_net.h index 06e5a382b48..1ebb71ead23 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* 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 diff --git a/include/my_pthread.h b/include/my_pthread.h index ebbd666be70..0be821586a1 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -1,5 +1,5 @@ -/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc, - 2010-2011 Oracle and/or its affiliates, 2009-2010 Monty Program Ab. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2013, Monty Program Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -96,7 +96,7 @@ int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *) int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr); int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - struct timespec *abstime); + const struct timespec *abstime); int pthread_cond_signal(pthread_cond_t *cond); int pthread_cond_broadcast(pthread_cond_t *cond); int pthread_cond_destroy(pthread_cond_t *cond); diff --git a/include/my_time.h b/include/my_time.h index 67aa9a27f7f..3c45d1d9235 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -74,8 +74,11 @@ extern uchar days_in_month[]; #define MYSQL_TIME_WARN_WARNINGS (MYSQL_TIME_WARN_TRUNCATED|MYSQL_TIME_WARN_OUT_OF_RANGE) #define MYSQL_TIME_WARN_NOTES (MYSQL_TIME_NOTE_TRUNCATED) -#define MYSQL_TIME_WARN_HAVE_WARNINGS(x) test((x) & MYSQL_TIME_WARN_WARNINGS) -#define MYSQL_TIME_WARN_HAVE_NOTES(x) test((x) & MYSQL_TIME_WARN_NOTES) +#define MYSQL_TIME_WARN_HAVE_WARNINGS(x) MY_TEST((x) & MYSQL_TIME_WARN_WARNINGS) +#define MYSQL_TIME_WARN_HAVE_NOTES(x) MY_TEST((x) & MYSQL_TIME_WARN_NOTES) + +/* Usefull constants */ +#define SECONDS_IN_24H 86400L /* Limits for the TIME data type */ #define TIME_MAX_HOUR 838 diff --git a/include/my_valgrind.h b/include/my_valgrind.h index 49da89ab78c..4531ec78f9a 100644 --- a/include/my_valgrind.h +++ b/include/my_valgrind.h @@ -13,10 +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 */ - -/* Some defines to make it easier to use valgrind */ -#include <m_string.h> /* bfill */ - #ifdef HAVE_valgrind #define IF_VALGRIND(A,B) A #else @@ -37,7 +33,7 @@ #endif /* HAVE_VALGRIND */ #ifndef DBUG_OFF -#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B) ; bfill(A, trash_tmp, C); MEM_UNDEFINED(A, trash_tmp); } while (0) +#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); memset(A, C, trash_tmp); MEM_UNDEFINED(A, trash_tmp); } while (0) #else #define TRASH_FILL(A,B,C) do{ const size_t trash_tmp __attribute__((unused)) = (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0) #endif diff --git a/include/myisam.h b/include/myisam.h index 7952b091d93..853fac20ae4 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2000, 2013, Oracle and/or its affiliates. Copyright (c) 2009, 2013, Monty Program Ab. This program is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ extern "C" { #include "my_compare.h" #include <myisamchk.h> #include <mysql/plugin.h> - +#include <my_check_opt.h> /* Limit max keys according to HA_MAX_POSSIBLE_KEY; See myisamchk.h for details */ @@ -68,8 +68,8 @@ extern "C" { #define mi_is_key_active(_keymap_,_keyno_) \ (((_keyno_) < MI_KEYMAP_BITS) ? \ - test((_keymap_) & (1ULL << (_keyno_))) : \ - test((_keymap_) & MI_KEYMAP_HIGH_MASK)) + MY_TEST((_keymap_) & (1ULL << (_keyno_))) : \ + MY_TEST((_keymap_) & MI_KEYMAP_HIGH_MASK)) #define mi_set_key_active(_keymap_,_keyno_) \ (_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \ (1ULL << (_keyno_)) : \ @@ -82,7 +82,7 @@ extern "C" { #else #define mi_is_key_active(_keymap_,_keyno_) \ - test((_keymap_) & (1ULL << (_keyno_))) + MY_TEST((_keymap_) & (1ULL << (_keyno_))) #define mi_set_key_active(_keymap_,_keyno_) \ (_keymap_)|= (1ULL << (_keyno_)) #define mi_clear_key_active(_keymap_,_keyno_) \ @@ -91,7 +91,7 @@ extern "C" { #endif #define mi_is_any_key_active(_keymap_) \ - test((_keymap_)) + MY_TEST((_keymap_)) #define mi_is_all_keys_active(_keymap_,_keys_) \ ((_keymap_) == mi_get_mask_all_keys_active(_keys_)) #define mi_set_all_keys_active(_keymap_,_keys_) \ @@ -312,7 +312,6 @@ typedef struct st_mi_bit_buff uint error; } MI_BIT_BUFF; - typedef struct st_sort_info { /* sync things */ diff --git a/include/myisamchk.h b/include/myisamchk.h index 0a30615c629..7abbcea3302 100644 --- a/include/myisamchk.h +++ b/include/myisamchk.h @@ -27,48 +27,6 @@ #ifndef _myisamchk_h #define _myisamchk_h -#define T_AUTO_INC 1 -#define T_AUTO_REPAIR 2 /* QQ to be removed */ -#define T_BACKUP_DATA 4 -#define T_CALC_CHECKSUM 8 -#define T_CHECK 16 -#define T_CHECK_ONLY_CHANGED 32 -#define T_CREATE_MISSING_KEYS 64 -#define T_DESCRIPT 128 -#define T_DONT_CHECK_CHECKSUM 256 -#define T_EXTEND 512 -#define T_FAST (1L << 10) -#define T_FORCE_CREATE (1L << 11) -#define T_FORCE_UNIQUENESS (1L << 12) -#define T_INFO (1L << 13) -#define T_MEDIUM (1L << 14) -#define T_QUICK (1L << 15) -#define T_READONLY (1L << 16) -#define T_REP (1L << 17) -#define T_REP_BY_SORT (1L << 18) -#define T_REP_PARALLEL (1L << 19) -#define T_RETRY_WITHOUT_QUICK (1L << 20) -#define T_SAFE_REPAIR (1L << 21) -#define T_SILENT (1L << 22) -#define T_SORT_INDEX (1L << 23) -#define T_SORT_RECORDS (1L << 24) -#define T_STATISTICS (1L << 25) -#define T_UNPACK (1L << 26) -#define T_UPDATE_STATE (1L << 27) -#define T_VERBOSE (1L << 28) -#define T_VERY_SILENT (1L << 29) -#define T_WAIT_FOREVER (1L << 30) -#define T_WRITE_LOOP ((ulong) 1L << 31) -#define T_ZEROFILL ((ulonglong) 1L << 32) -#define T_ZEROFILL_KEEP_LSN ((ulonglong) 1L << 33) -/** If repair should not bump create_rename_lsn */ -#define T_NO_CREATE_RENAME_LSN ((ulonglong) 1L << 34) -#define T_CREATE_UNIQUE_BY_SORT ((ulonglong) 1L << 35) -#define T_SUPPRESS_ERR_HANDLING ((ulonglong) 1L << 36) -#define T_FORCE_SORT_MEMORY ((ulonglong) 1L << 37) - -#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL) - /* Flags used by xxxxchk.c or/and ha_xxxx.cc that are NOT passed to xxxcheck.c follows: diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index aa678ceba83..8e8229d6630 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -1,5 +1,5 @@ -/* Copyright (c) 2005, 2011, Oracle and/or its affiliates - Copyright (C) 2009, 2011, Monty Program Ab +/* Copyright (c) 2005, 2013, Oracle and/or its affiliates + Copyright (C) 2009, 2013, Monty Program Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/mysql/plugin_audit.h b/include/mysql/plugin_audit.h index 99f5744cd35..31589f071f0 100644 --- a/include/mysql/plugin_audit.h +++ b/include/mysql/plugin_audit.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2013, 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 diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index f0d88ff8ede..a0682aae4c6 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -518,7 +518,7 @@ typedef struct st_mysql_cond mysql_cond_t; @c mysql_cond_timedwait is a drop-in replacement for @c pthread_cond_timedwait. */ -#ifdef HAVE_PSI_COND_INTERFACE +#if defined(HAVE_PSI_INTERFACE) || defined(SAFE_MUTEX) #define mysql_cond_timedwait(C, M, W) \ inline_mysql_cond_timedwait(C, M, W, __FILE__, __LINE__) #else @@ -1170,8 +1170,8 @@ static inline int inline_mysql_cond_wait( static inline int inline_mysql_cond_timedwait( mysql_cond_t *that, mysql_mutex_t *mutex, - struct timespec *abstime -#ifdef HAVE_PSI_COND_INTERFACE + const struct timespec *abstime +#if defined(HAVE_PSI_INTERFACE) || defined(SAFE_MUTEX) , const char *src_file, uint src_line #endif ) diff --git a/include/queues.h b/include/queues.h index 4fef72b149c..f341bbb8148 100644 --- a/include/queues.h +++ b/include/queues.h @@ -51,6 +51,7 @@ typedef struct st_queue { #define queue_first_element(queue) 1 #define queue_last_element(queue) (queue)->elements +#define queue_empty(queue) ((queue)->elements == 0) #define queue_top(queue) ((queue)->root[1]) #define queue_element(queue,index) ((queue)->root[index]) #define queue_end(queue) ((queue)->root[(queue)->elements]) diff --git a/include/welcome_copyright_notice.h b/include/welcome_copyright_notice.h index 302f623e377..875770edb89 100644 --- a/include/welcome_copyright_notice.h +++ b/include/welcome_copyright_notice.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. +/* Copyright (c) 2011, 2014, Oracle and/or its affiliates. Copyright (c) 2011, 2012, Monty Program Ab This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ #ifndef _welcome_copyright_notice_h_ #define _welcome_copyright_notice_h_ -#define COPYRIGHT_NOTICE_CURRENT_YEAR "2013" +#define COPYRIGHT_NOTICE_CURRENT_YEAR "2014" /* This define specifies copyright notice which is displayed by every MySQL diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index 43b0c6187b9..e3c932c88f0 100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -1,4 +1,5 @@ -# Copyright (c) 2006, 2012, Oracle and/or its affiliates. +# Copyright (c) 2006, 2013, Oracle and/or its affiliates. +# Copyright (c) 2009, 2013, SkySQL Ab. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,8 +17,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/libmysql - ${CMAKE_BINARY_DIR}/pcre - ${CMAKE_SOURCE_DIR}/pcre + ${PCRE_INCLUDES} ${CMAKE_SOURCE_DIR}/strings ${SSL_INCLUDE_DIRS} ${SSL_INTERNAL_INCLUDE_DIRS} @@ -26,8 +26,6 @@ ADD_DEFINITIONS(${SSL_DEFINES}) SET(CLIENT_API_FUNCTIONS_5_1 get_tty_password -handle_options -load_defaults mysql_thread_end mysql_thread_init myodbc_remove_escape @@ -131,6 +129,12 @@ mysql_server_init mysql_server_end mysql_set_character_set mysql_get_character_set_info +# These are documented in Paul DuBois' MySQL book, +# so we treat them as part of the de-facto API. +handle_options +load_defaults +free_defaults +my_print_help ) SET(CLIENT_API_FUNCTIONS_5_5 @@ -153,6 +157,8 @@ mysql_close_cont mysql_close_start mysql_commit_cont mysql_commit_start +mysql_dump_debug_info_cont +mysql_dump_debug_info_start mysql_fetch_row_cont mysql_fetch_row_start mysql_free_result_cont @@ -259,73 +265,76 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux") # for compatibility with distribution packages, so client shared library can # painlessly replace the one supplied by the distribution. - # Also list of exported symbols in distributions may differ from what is considered - # official API. Define CLIENT_API_EXTRA for the set of symbols, that required to - # be exported on different platforms. + # Also list of exported symbols in distributions may differ from what is + # considered official API. Define CLIENT_API_5_1_EXTRA for the set of + # symbols, that required to be exported on different platforms. - IF(RPM) - # Fedora & Co declared following functions as part of API - SET(CLIENT_API_EXTRA - mysql_default_charset_info - mysql_get_charset - mysql_get_charset_by_csname - mysql_net_realloc - mysql_client_errors + # Fedora & Co declared following functions as part of API + SET(CLIENT_API_5_1_EXTRA + # why does Fedora export these? + _fini + _init + my_init - # Also export the non-renamed variants - # (in case someone wants to rebuild mysqli-php or something similar) - # See MDEV-4127 - default_charset_info - get_charset - get_charset_by_csname - net_realloc - client_errors - THR_KEY_mysys - ) - - # Add special script to fix symbols renames by Fedora - SET(CLIENT_SOURCES_EXTRA rpm_support.cc) - SET(VERSION_SCRIPT_TEMPLATE - ${CMAKE_CURRENT_SOURCE_DIR}/libmysql_rpm_version.in) - ELSEIF(DEB) - # libmyodbc on Ubuntu is using functions below - # If we don't export them, linker would just remove - # them (they are not used inside libmysqlclient) - SET(CLIENT_API_EXTRA - strfill - init_dynamic_string - ) - # MySQL supplied with Ubuntu does not have versioning, bug Debian does. - IF(DEB MATCHES "debian") - SET(VERSION_SCRIPT_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/libmysql.ver.in) - ENDIF() - ENDIF() + # mysql-connector-odbc requires these + mysql_default_charset_info + mysql_get_charset + mysql_get_charset_by_csname + mysql_net_realloc - IF(VERSION_SCRIPT_TEMPLATE) - # Generate version script. - # Create semicolon separated lists of functions to export from - # Since RPM packages use separate versioning for 5.1 API - # and 5.5 API (libmysqlclient_16 vs libmysqlclient_18), - # we need 2 lists. - SET (CLIENT_API_5_1_LIST) - FOREACH (f ${CLIENT_API_FUNCTIONS_5_1}) - SET(CLIENT_API_5_1_LIST "${CLIENT_API_5_1_LIST}\n${f};") - ENDFOREACH() - - SET (CLIENT_API_5_5_LIST) - FOREACH (f ${CLIENT_API_FUNCTIONS_5_5}) - SET(CLIENT_API_5_5_LIST "${CLIENT_API_5_5_LIST}\n${f};") - ENDFOREACH() + # PHP's mysqli.so requires this (via the ER() macro) + mysql_client_errors + + # Also export the non-renamed variants + # (in case someone wants to rebuild mysqli-php or something similar) + # See MDEV-4127 + default_charset_info + get_charset + get_charset_by_csname + net_realloc + client_errors + + # pure-ftpd requires this + my_make_scrambled_password + + # hydra requires this + scramble + + # ODB requires this: https://bugzilla.redhat.com/show_bug.cgi?id=846602 + THR_KEY_mysys + + # DBD::mysql requires this + is_prefix + ) + + # Linker script to version symbols in Fedora- and Debian- compatible way, MDEV-5529 + SET(VERSION_SCRIPT_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/libmysql_versions.ld.in) + + # Generate version script. + # Create semicolon separated lists of functions to export from + # Since RPM packages use separate versioning for 5.1 API + # and 5.5 API (libmysqlclient_16 vs libmysqlclient_18), + # we need 2 lists. + SET (CLIENT_API_5_1_LIST) + SET (CLIENT_API_5_1_ALIASES) + FOREACH (f ${CLIENT_API_FUNCTIONS_5_1} ${CLIENT_API_5_1_EXTRA}) + SET(CLIENT_API_5_1_LIST "${CLIENT_API_5_1_LIST}\t${f};\n") + SET(CLIENT_API_5_1_ALIASES "${CLIENT_API_5_1_ALIASES}\"${f}@libmysqlclient_16\" = ${f};\n") + ENDFOREACH() + + SET (CLIENT_API_5_5_LIST) + FOREACH (f ${CLIENT_API_FUNCTIONS_5_5}) + SET(CLIENT_API_5_5_LIST "${CLIENT_API_5_5_LIST}\t${f};\n") + ENDFOREACH() + + CONFIGURE_FILE( + ${VERSION_SCRIPT_TEMPLATE} + ${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld + @ONLY@ + ) + SET(VERSION_SCRIPT_LINK_FLAGS + "-Wl,${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld") - CONFIGURE_FILE( - ${VERSION_SCRIPT_TEMPLATE} - ${CMAKE_CURRENT_BINARY_DIR}/libmysql.version - @ONLY@ - ) - SET(VERSION_SCRIPT_LINK_FLAGS - "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/libmysql.version") - ENDIF() - ENDIF() @@ -353,8 +362,10 @@ SET(LIBS clientlib dbug strings vio mysys mysys_ssl ${ZLIB_LIBRARY} ${SSL_LIBRAR MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development) # Visual Studio users need debug static library for debug projects +INSTALL_DEBUG_SYMBOLS(clientlib) IF(MSVC) INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug) + INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug) ENDIF() IF(UNIX) @@ -373,7 +384,7 @@ IF(UNIX) ENDIF() IF(NOT DISABLE_SHARED) - MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_EXTRA} COMPONENT SharedLibraries) + MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_5_1_EXTRA} COMPONENT SharedLibraries) IF(UNIX) # libtool compatability IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) @@ -390,9 +401,6 @@ IF(NOT DISABLE_SHARED) SOVERSION "${SHARED_LIB_MAJOR_VERSION}") IF(LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_LINK_FLAGS) GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS) - IF(NOT libmysql_link_flag) - SET(libmysql_link_flags) - ENDIF() SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED} ${VERSION_SCRIPT_LINK_FLAGS}") ENDIF() diff --git a/libmysql/conf_to_src.c b/libmysql/conf_to_src.c index 04a6a727029..a5a7d23db0b 100644 --- a/libmysql/conf_to_src.c +++ b/libmysql/conf_to_src.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2004 MySQL AB +/* Copyright (c) 2000, 2011, 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 diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 78de4b8867f..3d8a2bebc75 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates - Copyright (c) 2009, 2012, Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates + Copyright (c) 2009, 2013, Monty Program Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1273,6 +1273,7 @@ static my_bool setup_one_fetch_function(MYSQL_BIND *, MYSQL_FIELD *field); #define RESET_LONG_DATA 2 #define RESET_STORE_RESULT 4 #define RESET_CLEAR_ERROR 8 +#define RESET_ALL_BUFFERS 16 static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags); @@ -2083,8 +2084,8 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length) buff[4]= (char) stmt->flags; int4store(buff+5, 1); /* iteration count */ - res= test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), - (uchar*) packet, length, 1, stmt) || + res= MY_TEST(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), + (uchar*) packet, length, 1, stmt) || (*mysql->methods->read_query_result)(mysql)); stmt->affected_rows= mysql->affected_rows; stmt->server_status= mysql->server_status; @@ -2571,7 +2572,7 @@ int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt) reinit_result_set_metadata(stmt); prepare_to_fetch_result(stmt); } - DBUG_RETURN(test(stmt->last_errno)); + DBUG_RETURN(MY_TEST(stmt->last_errno)); } @@ -3187,14 +3188,14 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, { double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err); float fdata= (float) data; - *param->error= (fdata != data) | test(err); + *param->error= (fdata != data) | MY_TEST(err); floatstore(buffer, fdata); break; } case MYSQL_TYPE_DOUBLE: { double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err); - *param->error= test(err); + *param->error= MY_TEST(err); doublestore(buffer, data); break; } @@ -3204,7 +3205,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, MYSQL_TIME_STATUS status; str_to_time(value, length, tm, 0, &status); err= status.warnings; - *param->error= test(err); + *param->error= MY_TEST(err); break; } case MYSQL_TYPE_DATE: @@ -3215,8 +3216,8 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, MYSQL_TIME_STATUS status; (void) str_to_datetime(value, length, tm, 0, &status); err= status.warnings; - *param->error= test(err) && (param->buffer_type == MYSQL_TYPE_DATE && - tm->time_type != MYSQL_TIMESTAMP_DATE); + *param->error= MY_TEST(err) && (param->buffer_type == MYSQL_TYPE_DATE && + tm->time_type != MYSQL_TIMESTAMP_DATE); break; } case MYSQL_TYPE_TINY_BLOB: @@ -3338,7 +3339,7 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field, { int error; value= number_to_datetime(value, 0, (MYSQL_TIME *) buffer, 0, &error); - *param->error= test(error); + *param->error= MY_TEST(error); break; } default: @@ -3686,7 +3687,7 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field, static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row) { - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); + my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG); uchar data= **row; *(uchar *)param->buffer= data; *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX8; @@ -3696,7 +3697,7 @@ static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field, static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row) { - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); + my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG); ushort data= (ushort) sint2korr(*row); shortstore(param->buffer, data); *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX16; @@ -3707,7 +3708,7 @@ static void fetch_result_int32(MYSQL_BIND *param, MYSQL_FIELD *field __attribute__((unused)), uchar **row) { - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); + my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG); uint32 data= (uint32) sint4korr(*row); longstore(param->buffer, data); *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX32; @@ -3718,7 +3719,7 @@ static void fetch_result_int64(MYSQL_BIND *param, MYSQL_FIELD *field __attribute__((unused)), uchar **row) { - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); + my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG); ulonglong data= (ulonglong) sint8korr(*row); *param->error= param->is_unsigned != field_is_unsigned && data > LONGLONG_MAX; longlongstore(param->buffer, data); @@ -4615,6 +4616,14 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags) *mysql->unbuffered_fetch_owner= TRUE; mysql->status= MYSQL_STATUS_READY; } + if (flags & RESET_ALL_BUFFERS) + { + /* mysql_stmt_next_result will flush all pending + result sets + */ + while (mysql_more_results(mysql) && + mysql_stmt_next_result(stmt) == 0); + } } if (flags & RESET_SERVER_SIDE) { @@ -4679,27 +4688,18 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt) { mysql->stmts= list_delete(mysql->stmts, &stmt->list); /* - Clear NET error state: if the following commands come through - successfully, connection will still be usable for other commands. + Clear NET error state: if the following commands come through + successfully, connection will still be usable for other commands. */ net_clear_error(&mysql->net); + if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE) { uchar buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */ - if (mysql->unbuffered_fetch_owner == &stmt->unbuffered_fetch_cancelled) - mysql->unbuffered_fetch_owner= 0; - if (mysql->status != MYSQL_STATUS_READY) - { - /* - Flush result set of the connection. If it does not belong - to this statement, set a warning. - */ - (*mysql->methods->flush_use_result)(mysql, TRUE); - if (mysql->unbuffered_fetch_owner) - *mysql->unbuffered_fetch_owner= TRUE; - mysql->status= MYSQL_STATUS_READY; - } + if ((rc= reset_stmt_handle(stmt, RESET_ALL_BUFFERS | RESET_CLEAR_ERROR))) + return rc; + int4store(buff, stmt->stmt_id); if ((rc= stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt))) { @@ -4711,7 +4711,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt) my_free(stmt->extension); my_free(stmt); - DBUG_RETURN(test(rc)); + DBUG_RETURN(MY_TEST(rc)); } /* @@ -4731,7 +4731,7 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt) /* Reset the client and server sides of the prepared statement */ DBUG_RETURN(reset_stmt_handle(stmt, RESET_SERVER_SIDE | RESET_LONG_DATA | - RESET_CLEAR_ERROR)); + RESET_ALL_BUFFERS | RESET_CLEAR_ERROR)); } /* @@ -4843,7 +4843,6 @@ int STDCALL mysql_next_result(MYSQL *mysql) DBUG_RETURN(-1); /* No more results */ } - int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt) { MYSQL *mysql= stmt->mysql; diff --git a/libmysql/libmysql.ver.in b/libmysql/libmysql.ver.in deleted file mode 100644 index 20eb0fd41bb..00000000000 --- a/libmysql/libmysql.ver.in +++ /dev/null @@ -1 +0,0 @@ -libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; diff --git a/libmysql/libmysql_rpm_version.in b/libmysql/libmysql_rpm_version.in deleted file mode 100644 index ff0707cdb75..00000000000 --- a/libmysql/libmysql_rpm_version.in +++ /dev/null @@ -1,62 +0,0 @@ -# This version script is heavily inspired by Fedora's and Mageia's version scripts for -# MySQL client shared library. It is used in MariaDB for building RPMs. - -libmysqlclient_16 { - global: -@CLIENT_API_5_1_LIST@ - -# some stuff from Mageia, I have no idea why it is there -# But too afraid to throw anything away - _fini; - _init; - my_init; - my_progname; - myodbc_remove_escape; - -# These are documented in Paul DuBois' MySQL book, so we treat them as part -# of the de-facto API. - free_defaults; - handle_options; - load_defaults; - my_print_help; -# pure-ftpd requires this - my_make_scrambled_password; -# fedora18 export - THR_KEY_mysys; -# hydra requires this - scramble; -# DBD::mysql requires this - is_prefix; - local: - *; -}; - -libmysqlclient_18 { - global: - @CLIENT_API_5_5_LIST@ -# -# Ideally the following symbols wouldn't be exported, but various applications -# require them. Fedora limits the namespace damage by prefixing mysql_ -# (see mysql-dubious-exports.patch), which means the symbols are not present -# in libmysqlclient_16. -# -# MariaDB does not do the Fedora-style function renaming via #define in headers, -# however it exports mysql_ prefixed symbols in addition to the "normal" ones. -# -# To ensure successful recompilation of affected projects, as well as drop-in replacement -# for MySQL libraries, provided by distribution, both original symbols and their mysql_ -# prefixed counterparts have to be exported. - -# mysql-connector-odbc requires these - mysql_default_charset_info; - mysql_get_charset; - mysql_get_charset_by_csname; - mysql_net_realloc; - default_charset_info; - get_charset; - get_charset_by_csname; - net_realloc; -# PHP's mysqli.so requires this (via the ER() macro) - mysql_client_errors; - client_errors; -}; diff --git a/libmysql/libmysql_versions.ld.in b/libmysql/libmysql_versions.ld.in new file mode 100644 index 00000000000..8d97da5b2eb --- /dev/null +++ b/libmysql/libmysql_versions.ld.in @@ -0,0 +1,45 @@ +/* + This version script is heavily inspired by Fedora's and Mageia's version + scripts for MySQL client shared library. + But it was modified to support Debian-compatible versioning too. + + In RedHat universe, symbols from old libmysqlclient.so.16 + keep their libmysqlclient_16 version. New symbols added in + libmysqlclient.so.18 get the new libmysqlclient_18 version. + + In Debian all symbols in libmysqlclient.so.18 have libmysqlclient_18 version, + including symbols that existed in libmysqlclient.so.16 + + We solve this by putting all symbols into libmysqlclient_18 version node, + but creating aliases for old symbols in the libmysqlclient_16 version node. +*/ + +@CLIENT_API_5_1_ALIASES@ + +/* + On Fedora the following symbols are exported, but renamed into a mysql_ + namespace. We export them as aliases, but keep original symbols too. See + MDEV-4127. +*/ +mysql_default_charset_info = default_charset_info; +mysql_get_charset = get_charset; +mysql_get_charset_by_csname = get_charset_by_csname; +mysql_net_realloc = net_realloc; +mysql_client_errors = client_errors; + +VERSION { + +libmysqlclient_18 { + global: +@CLIENT_API_5_1_LIST@ +@CLIENT_API_5_5_LIST@ + + local: + *; +}; + +libmysqlclient_16 { + /* empty here. aliases are added above */ +}; + +} diff --git a/libmysql/rpm_support.cc b/libmysql/rpm_support.cc deleted file mode 100644 index 8c9a1e8683d..00000000000 --- a/libmysql/rpm_support.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* - Provide aliases for several symbols, to support drop-in replacement for - MariaDB on Fedora and several derives distributions. - - These distributions redefine several symbols (in a way that is no compatible - with either MySQL or MariaDB) and export it from the client library ( as seen - e.g from this patch) -http://lists.fedoraproject.org/pipermail/scm-commits/2010-December/537257.html - - MariaDB handles compatibility distribution by providing the same symbols from - the client library if it is built with -DRPM - -*/ -#include <errmsg.h> -#include <my_sys.h> -#include <mysql.h> -extern "C" { - -CHARSET_INFO *mysql_default_charset_info = default_charset_info; - -CHARSET_INFO *mysql_get_charset(uint cs_number, myf flags) -{ - return get_charset(cs_number, flags); -} - -CHARSET_INFO *mysql_get_charset_by_csname(const char *cs_name, - uint cs_flags, myf my_flags) -{ - return get_charset_by_csname(cs_name, cs_flags, my_flags); -} - - -my_bool mysql_net_realloc(NET *net, size_t length) -{ - return net_realloc(net,length); -} - -const char **mysql_client_errors = client_errors; - -} /*extern "C" */ - diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index 3bcaab597b7..d0c3fafdf69 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -22,8 +22,7 @@ ${CMAKE_SOURCE_DIR}/libmysql ${CMAKE_SOURCE_DIR}/libmysqld ${CMAKE_SOURCE_DIR}/sql ${CMAKE_BINARY_DIR}/sql -${CMAKE_BINARY_DIR}/pcre -${CMAKE_SOURCE_DIR}/pcre +${PCRE_INCLUDES} ${ZLIB_INCLUDE_DIR} ${SSL_INCLUDE_DIRS} ${SSL_INTERNAL_INCLUDE_DIRS} diff --git a/libmysqld/examples/CMakeLists.txt b/libmysqld/examples/CMakeLists.txt index cf23fdc4a6a..d47638ad2f9 100644 --- a/libmysqld/examples/CMakeLists.txt +++ b/libmysqld/examples/CMakeLists.txt @@ -15,8 +15,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/libmysqld/include - ${CMAKE_BINARY_DIR}/pcre - ${CMAKE_SOURCE_DIR}/pcre + ${PCRE_INCLUDES} ${CMAKE_SOURCE_DIR}/sql ${MY_READLINE_INCLUDE_DIR} ) diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 86b3bc6a283..1c043c6d03b 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -332,8 +332,8 @@ static int emb_stmt_execute(MYSQL_STMT *stmt) thd->client_param_count= stmt->param_count; thd->client_params= stmt->params; - res= test(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0, - header, sizeof(header), 1, stmt) || + res= MY_TEST(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0, + header, sizeof(header), 1, stmt) || emb_read_query_result(stmt->mysql)); stmt->affected_rows= stmt->mysql->affected_rows; stmt->insert_id= stmt->mysql->insert_id; @@ -566,7 +566,7 @@ int init_embedded_server(int argc, char **argv, char **groups) opt_mysql_tmpdir=getenv("TMP"); #endif if (!opt_mysql_tmpdir || !opt_mysql_tmpdir[0]) - opt_mysql_tmpdir=(char*) DEFAULT_TMPDIR; /* purecov: inspected */ + opt_mysql_tmpdir= const_cast<char*>(DEFAULT_TMPDIR); /* purecov: inspected*/ init_ssl(); umask(((~my_umask) & 0666)); diff --git a/libservices/logger_service.c b/libservices/logger_service.c index c45e978413c..615e595c6bc 100644 --- a/libservices/logger_service.c +++ b/libservices/logger_service.c @@ -15,7 +15,6 @@ #include <service_versions.h> - /* file reserved for the future use */ -SERVICE_VERSION *logger_service= (void *) VERSION_logger; +SERVICE_VERSION logger_service= (void *) VERSION_logger; diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt index 16eb2a6f166..2948fb88069 100644 --- a/mysql-test/CMakeLists.txt +++ b/mysql-test/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2013, 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 @@ -74,7 +74,7 @@ ENDIF() IF(WITH_EMBEDDED_SERVER) SET(TEST_EMBEDDED ${MTR_FORCE} --comment=embedded --timer --embedded-server - --skip-rpl --skip-ndbcluster $(EXP)) + --skip-rpl --skip-ndbcluster ${EXP}) ELSE() SET(TEST_EMBEDDED echo "Can not test embedded, not compiled in") ENDIF() diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index e4c839ce705..ff4bc960acb 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -15,6 +15,7 @@ main.wait_timeout @solaris # Bug#11758972 2010-04-26 alik wait_tim rpl.rpl_innodb_bug28430 # Bug#11754425 rpl.rpl_row_sp011 @solaris # Bug#11753919 2011-07-25 sven Several test cases fail on Solaris with error Thread stack overrun +rpl.rpl_spec_variables @solaris # Bug #17337114 2013-08-20 Luis Soares failing on pb2 with timeout for 'CHECK WARNINGS' sys_vars.max_sp_recursion_depth_func @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun sys_vars.wait_timeout_func # Bug#11750645 2010-04-26 alik wait_timeout_func fails diff --git a/mysql-test/collections/default.weekly b/mysql-test/collections/default.weekly index 40f0548f374..a03e2593cfe 100755 --- a/mysql-test/collections/default.weekly +++ b/mysql-test/collections/default.weekly @@ -5,3 +5,6 @@ perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-weekly.list perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-weekly.list perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-weekly.list + +# Run innodb compression tests +perl mysql-test-run.pl --force --debug-server --comment=innodb_compression --vardir=var-innodb-zip --big-test --testcase-timeout=60 --parallel=auto --experimental=collections/default.experimental --suite=innodb_zip diff --git a/mysql-test/extra/rpl_tests/rpl_ddl.test b/mysql-test/extra/rpl_tests/rpl_ddl.test index 3b0348cc29f..32fc10479b8 100644 --- a/mysql-test/extra/rpl_tests/rpl_ddl.test +++ b/mysql-test/extra/rpl_tests/rpl_ddl.test @@ -608,6 +608,7 @@ use test; --echo --echo -------- switch to master ------- connection master; +DROP TEMPORARY TABLE mysqltest1.t22; DROP DATABASE mysqltest1; # mysqltest2 was alreday DROPPED some tests before. DROP DATABASE mysqltest3; diff --git a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc index cea8ac56931..a7ee54658f8 100644 --- a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc +++ b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc @@ -187,10 +187,9 @@ if (`SELECT HEX(@commands) = HEX('configure')`) } # -# Drops tables and synchronizes master and slave. Note that temporary -# tables are not explitcily dropped as they will be dropped while -# closing the connection. +# Drops tables and synchronizes master and slave. # + if (`SELECT HEX(@commands) = HEX('clean')`) { connection master; @@ -207,10 +206,15 @@ if (`SELECT HEX(@commands) = HEX('clean')`) DROP TABLE IF EXISTS nt_error_2; + DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1; + DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1; + --let $n= $tot_table while ($n) { --eval DROP TABLE IF EXISTS nt_$n + --eval DROP TEMPORARY TABLE IF EXISTS tt_tmp_$n + --eval DROP TEMPORARY TABLE IF EXISTS nt_tmp_$n --dec $n } diff --git a/mysql-test/extra/rpl_tests/rpl_innodb.test b/mysql-test/extra/rpl_tests/rpl_innodb.test index c0ec5299cfd..865c97cf95d 100644 --- a/mysql-test/extra/rpl_tests/rpl_innodb.test +++ b/mysql-test/extra/rpl_tests/rpl_innodb.test @@ -113,7 +113,7 @@ FLUSH LOGS; --echo -------- switch to master -------- connection master; FLUSH LOGS; - +DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2; DROP DATABASE mysqltest1; --echo End of 5.1 tests diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index deff9d653e0..01e8497e4de 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -18,8 +18,12 @@ start slave; --source include/wait_for_slave_to_start.inc let $VERSION=`select version()`; - +# Lets run this test in STRICT MODE (DROP TABLE is not DROP TABLE IF EXISTS) +connection slave; +set @save_slave_ddl_exec_mode=@@global.slave_ddl_exec_mode; +set @@global.slave_ddl_exec_mode=STRICT; connection master; + eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type; insert into t1 values (NULL); drop table t1; @@ -141,3 +145,5 @@ drop table t1; # End of 4.1 tests sync_slave_with_master; +set @@global.slave_ddl_exec_mode=@save_slave_ddl_exec_mode; +connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_reset_slave.test b/mysql-test/extra/rpl_tests/rpl_reset_slave.test index 17d949a7790..e7a78f36efc 100644 --- a/mysql-test/extra/rpl_tests/rpl_reset_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_reset_slave.test @@ -41,6 +41,9 @@ reset slave; source include/start_slave.inc; sync_with_master; show status like 'slave_open_temp_tables'; +connection master; +drop temporary table if exists t1; +sync_slave_with_master; # #Bug#34654 RESET SLAVE does not clear LAST_IO_Err* diff --git a/mysql-test/extra/rpl_tests/rpl_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_stop_slave.test index b226f4f22f1..0f09faa0301 100644 --- a/mysql-test/extra/rpl_tests/rpl_stop_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_stop_slave.test @@ -59,3 +59,6 @@ source include/wait_for_slave_sql_to_stop.inc; connection slave; START SLAVE SQL_THREAD; source include/wait_for_slave_sql_to_start.inc; + +connection master; +sync_slave_with_master; diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index bdb6f48f095..e72ebba8527 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -751,7 +751,7 @@ call p_verify_status_increment(4, 4, 4, 4); --echo # Sic: no table is created. create table if not exists t2 (a int) select 6 union select 7; --echo # Sic: first commits the statement, and then the transaction. -call p_verify_status_increment(2, 0, 2, 0); +call p_verify_status_increment(0, 0, 0, 0); create table t3 select a from t2; call p_verify_status_increment(2, 0, 4, 4); alter table t3 add column (b int); diff --git a/mysql-test/include/ctype_filesort2.inc b/mysql-test/include/ctype_filesort2.inc index 7b09eb482a5..7b576034136 100644 --- a/mysql-test/include/ctype_filesort2.inc +++ b/mysql-test/include/ctype_filesort2.inc @@ -14,3 +14,12 @@ SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; ALTER TABLE t1 ADD KEY(a); SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; DROP TABLE IF EXISTS t1; +--echo # +--echo # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +--echo # OUT-OF-ORDER RESULTS +--echo # +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +DROP TABLE t1; diff --git a/mysql-test/include/have_innodb.combinations b/mysql-test/include/have_innodb.combinations index 3c5cfa7bd5a..f647f15ddb6 100644 --- a/mysql-test/include/have_innodb.combinations +++ b/mysql-test/include/have_innodb.combinations @@ -24,7 +24,7 @@ innodb-sys-foreign innodb-sys-foreign-col innodb-metrics -[innodb] +[xtradb] innodb innodb-cmpmem innodb-trx diff --git a/mysql-test/include/have_metadata_lock_info.inc b/mysql-test/include/have_metadata_lock_info.inc new file mode 100644 index 00000000000..51fae1c62f0 --- /dev/null +++ b/mysql-test/include/have_metadata_lock_info.inc @@ -0,0 +1,4 @@ +if (!`SELECT count(*) FROM information_schema.plugins WHERE + (PLUGIN_STATUS = 'ACTIVE') AND PLUGIN_NAME = 'METADATA_LOCK_INFO'`){ + skip Need archive METADATA_LOCK_INFO plugin; +} diff --git a/mysql-test/include/have_metadata_lock_info.opt b/mysql-test/include/have_metadata_lock_info.opt new file mode 100644 index 00000000000..677c4ec01be --- /dev/null +++ b/mysql-test/include/have_metadata_lock_info.opt @@ -0,0 +1,2 @@ +--loose-metadata-lock-info +--plugin-load-add=$METADATA_LOCK_INFO_SO diff --git a/mysql-test/include/index_merge_ror_cpk.inc b/mysql-test/include/index_merge_ror_cpk.inc index 3912aa34026..df42745b4fc 100644 --- a/mysql-test/include/index_merge_ror_cpk.inc +++ b/mysql-test/include/index_merge_ror_cpk.inc @@ -79,8 +79,11 @@ select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1; # Verify that CPK is always used for index intersection scans # (this is because it is used as a filter, not for retrieval) explain select * from t1 where badkey=1 and key1=10; +set @tmp_index_merge_ror_cpk=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; --replace_column 9 ROWS explain select * from t1 where pk1 < 7500 and key1 = 10; +set optimizer_switch=@tmp_index_merge_ror_cpk; # Verify that keys with 'tails' of PK members are ok. explain select * from t1 where pktail1ok=1 and key1=10; diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 0a5b63b4280..c837eb7a7ad 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -633,7 +633,7 @@ drop table t1; drop table bug29807; --disable_query_log call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal"); -call mtr.add_suppression("InnoDB: Cannot open table test\/bug29807 from"); +call mtr.add_suppression("InnoDB: Cannot open table test/bug29807 from"); --enable_query_log diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index de5567e91bd..e34e32ad1a6 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -1,4 +1,5 @@ --- Copyright (c) 2008, 2011, Oracle and/or its affiliates +-- Copyright (c) 2008, 2013, Oracle and/or its affiliates +-- Copyright (c) 2009, 2013, SkySQL Ab -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -57,6 +58,16 @@ BEGIN WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; + -- Dump all events, there should be none + SELECT * FROM INFORMATION_SCHEMA.EVENTS; + -- Dump all triggers except mtr internals, there should be none + SELECT * FROM INFORMATION_SCHEMA.TRIGGERS + WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); + -- Dump all created procedures, there should be none + SELECT * FROM INFORMATION_SCHEMA.ROUTINES; + + SHOW STATUS LIKE 'slave_open_temp_tables'; + -- Checksum system tables to make sure they have been properly -- restored after test checksum table @@ -82,5 +93,8 @@ BEGIN -- verify that no plugin changed its disabled/enabled state SELECT * FROM INFORMATION_SCHEMA.PLUGINS; + select * from information_schema.session_variables + where variable_name = 'debug_sync'; + END|| diff --git a/mysql-test/include/save_master_gtid.inc b/mysql-test/include/save_master_gtid.inc new file mode 100644 index 00000000000..4fd0d3266a2 --- /dev/null +++ b/mysql-test/include/save_master_gtid.inc @@ -0,0 +1,28 @@ +# ==== Purpose ==== +# +# Save the current binlog GTID position on the master, to be used +# with include/sync_with_master_gtid.inc. +# +# +# ==== Usage ==== +# +# [--let $rpl_debug= 1] +# --source include/save_master_gtid.inc +# +# Parameters: +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= save_master_gtid.inc +--source include/begin_include_file.inc + +--let $master_pos= `SELECT @@gtid_binlog_pos` + +if ($rpl_debug) +{ + --echo save_master_gtid saved master_pos='$master_pos' +} + +--let $include_filename= save_master_gtid.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/search_pattern_in_file.inc b/mysql-test/include/search_pattern_in_file.inc new file mode 100644 index 00000000000..c047b5bc499 --- /dev/null +++ b/mysql-test/include/search_pattern_in_file.inc @@ -0,0 +1,66 @@ +# Purpose: +# Simple search with Perl for a pattern in some file. +# +# The advantages compared to thinkable auxiliary constructs using the +# mysqltest language and SQL are: +# 1. We do not need a running MySQL server. +# 2. SQL causes "noise" during debugging and increases the size of logs. +# Perl code does not disturb at all. +# +# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set +# before sourcing this routine. +# +# In case of +# - SEARCH_FILE and/or SEARCH_PATTERN is not set +# - SEARCH_FILE cannot be opened +# - SEARCH_FILE does not contain SEARCH_PATTERN +# the test will abort immediate. +# MTR will report something like +# .... +# worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009 +# main.1st [ pass ] 3 +# innodb.innodb_page_size [ fail ] +# Test ended at 2011-11-11 18:15:58 +# +# CURRENT_TEST: innodb.innodb_page_size +# # ERROR: The file '<name>' does not contain the expected pattern <pattern> +# mysqltest: In included file "./include/search_pattern_in_file.inc": +# included from ./include/search_pattern_in_file.inc at line 36: +# At line 25: command "perl" failed with error 255. my_errno=175 +# +# The result from queries just before the failure was: +# ... +# - saving '<some path>' to '<some path>' +# main.1st [ pass ] 2 +# +# Typical use case (check invalid server startup options): +# let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err; +# --error 0,1 +# --remove_file $error_log +# let SEARCH_FILE= $error_log; +# # Stop the server +# let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect; +# --exec echo "wait" > $restart_file +# --shutdown_server 10 +# --source include/wait_until_disconnected.inc +# +# --error 1 +# --exec $MYSQLD_CMD <whatever wrong setting> > $error_log 2>&1 +# # The server restart aborts +# let SEARCH_PATTERN= \[ERROR\] Aborting; +# --source include/search_pattern_in_file.inc +# +# Created: 2011-11-11 mleich +# + +perl; + use strict; + my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set"; + my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set"; + open(FILE, "$search_file") or die("Unable to open '$search_file': $!\n"); + read(FILE, my $file_content, 50000, 0); + close(FILE); + if ( not $file_content =~ m{$search_pattern} ) { + die("# ERROR: The file '$search_file' does not contain the expected pattern $search_pattern\n->$file_content<-\n"); + } +EOF diff --git a/mysql-test/include/sync_with_master_gtid.inc b/mysql-test/include/sync_with_master_gtid.inc new file mode 100644 index 00000000000..97ada8eea29 --- /dev/null +++ b/mysql-test/include/sync_with_master_gtid.inc @@ -0,0 +1,48 @@ +# ==== Purpose ==== +# +# Wait until the slave has reached a certain GTID position. +# Similar to --sync_with_master, but using GTID instead of old-style +# binlog file/offset coordinates. +# +# +# ==== Usage ==== +# +# --let $master_pos= `SELECT @@GLOBAL.gtid_binlog_pos` +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/sync_with_master_gtid.inc +# +# Syncs slave to the specified GTID position. +# +# Must be called on the slave. +# +# Parameters: +# $master_pos +# The GTID position to sync to. Typically obtained from +# @@GLOBAL.gtid_binlog_pos on the master. +# +# $slave_timeout +# Timeout in seconds. The default is 2 minutes. +# +# $rpl_debug +# See include/rpl_init.inc + +--let $include_filename= sync_with_master_gtid.inc +--source include/begin_include_file.inc + +let $_slave_timeout= $slave_timeout; +if (!$_slave_timeout) +{ + let $_slave_timeout= 120; +} + +--let $_result= `SELECT master_gtid_wait('$master_pos', $_slave_timeout)` +if ($_result == -1) +{ + --let $_current_gtid_pos= `SELECT @@GLOBAL.gtid_slave_pos` + --echo Timeout in master_gtid_wait('$master_pos', $_slave_timeout), current slave GTID position is: $_current_gtid_pos. + --die Failed to sync with master +} + +--let $include_filename= sync_with_master_gtid.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/type_hrtime.inc b/mysql-test/include/type_hrtime.inc index cd631f25632..5d847d72195 100644 --- a/mysql-test/include/type_hrtime.inc +++ b/mysql-test/include/type_hrtime.inc @@ -1,6 +1,8 @@ --source include/have_innodb.inc +SET timestamp=UNIX_TIMESTAMP('2001-02-03 10:20:30'); + --disable_warnings drop table if exists t1, t2, t3; --enable_warnings @@ -126,3 +128,4 @@ select * from t2; drop view v1; drop table t1, t2; +SET timestamp=DEFAULT; diff --git a/mysql-test/lib/My/SafeProcess/safe_process.cc b/mysql-test/lib/My/SafeProcess/safe_process.cc index 007acf77617..f19ca622278 100644 --- a/mysql-test/lib/My/SafeProcess/safe_process.cc +++ b/mysql-test/lib/My/SafeProcess/safe_process.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2011, Oracle and/or its affiliates +/* Copyright (c) 2008, 2012, Oracle and/or its affiliates This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysql-test/lib/My/SysInfo.pm b/mysql-test/lib/My/SysInfo.pm index 36c50ab91d1..4cca116620e 100644 --- a/mysql-test/lib/My/SysInfo.pm +++ b/mysql-test/lib/My/SysInfo.pm @@ -1,6 +1,5 @@ # -*- cperl -*- -# Copyright (c) 2013 MySQL AB, 2008 Sun Microsystems, Inc. -# Use is subject to license terms. +# Copyright (c) 2008, 2013, 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 diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index e6bd18fc363..59216f41cff 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -337,15 +337,20 @@ sub parse_disabled { # sub collect_default_suites(@) { - my @dirs = my_find_dir(dirname($::glob_mysql_test_dir), - [ @plugin_suitedirs ], '*'); - for my $d (@dirs) { - next unless -f "$d/suite.pm"; - my $sname= basename($d); + use File::Find; + my @dirs; + find(sub { + push @dirs, [$File::Find::topdir, $File::Find::name] + if -d and -f "$File::Find::name/suite.pm"; + }, my_find_dir(dirname($::glob_mysql_test_dir), \@plugin_suitedirs)); + + for (@dirs) { + my ($plugin_root, $dir) = @$_; + my $sname= substr $dir, 1 + length $plugin_root; # ignore overlays here, otherwise we'd need accurate # duplicate detection with overlay support for the default suite list next if $sname eq 'main' or -d "$::glob_mysql_test_dir/suite/$sname"; - my $s = load_suite_object($sname, $d); + my $s = load_suite_object($sname, $dir); push @_, $sname if $s->is_default(); } return @_; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index b00ddd5f2fc..689320f7cd4 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -174,6 +174,7 @@ my @DEFAULT_SUITES= qw( heap- innodb- innodb_fts- + innodb_zip- maria- multi_source- optimizer_unfixed_bugs- @@ -4265,11 +4266,18 @@ sub run_testcase ($$) { # foreach my $option ($config->options_in_group("ENV")) { - # Save old value to restore it before next time - $old_env{$option->name()}= $ENV{$option->name()}; + my ($name, $val)= ($option->name(), $option->value()); - mtr_verbose($option->name(), "=",$option->value()); - $ENV{$option->name()}= $option->value(); + # Save old value to restore it before next time + $old_env{$name}= $ENV{$name}; + + unless (defined $val) { + mtr_warning("Uninitialized value for ", $name, + ", group [ENV], file ", $current_config_name); + } else { + mtr_verbose($name, "=", $val); + $ENV{$name}= $val; + } } } @@ -6181,6 +6189,13 @@ sub valgrind_arguments { mtr_add_arg($args, "--num-callers=16"); mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir) if -f "$glob_mysql_test_dir/valgrind.supp"; + + # Ensure the jemalloc works with mysqld + if ($mysqld_variables{'version-malloc-library'} ne "system" && + $$exe =~ /mysqld/) + { + mtr_add_arg($args, "--soname-synonyms=somalloc=NONE" ); + } } # Add valgrind options, can be overriden by user @@ -6311,7 +6326,20 @@ sub usage ($) { $0 [ OPTIONS ] [ TESTCASE ] -Options to control what engine/variation to run +Where test case can be specified as: + +testcase[.test] Runs the test case named 'testcase' from all suits +path-to-testcase +[suite.]testcase[,combination] + +Examples: + +alias +main.alias 'main' is the name of the suite for the 't' directory. +rpl.rpl_invoked_features,mix,xtradb_plugin +suite/rpl/t/rpl.rpl_invoked_features + +Options to control what engine/variation to run: embedded-server Use the embedded server, i.e. no mysqld daemons ps-protocol Use the binary protocol between client and server diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index f714e6646de..207f6166fe0 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1354,7 +1354,7 @@ CREATE TABLE t1 ( id INT(11) NOT NULL, x_param INT(11) DEFAULT NULL, PRIMARY KEY (id) -); +) ENGINE=MYISAM; ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT, ADD COLUMN IF NOT EXISTS lol INT AFTER id; Warnings: @@ -1390,6 +1390,77 @@ t1 CREATE TABLE `t1` ( KEY `x_param1` (`x_param`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +CREATE TABLE t1 ( +id INT(11) NOT NULL, +x_param INT(11) DEFAULT NULL, +PRIMARY KEY (id) +) ENGINE=INNODB; +CREATE TABLE t2 ( +id INT(11) NOT NULL) ENGINE=INNODB; +ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT, +ADD COLUMN IF NOT EXISTS lol INT AFTER id; +Warnings: +Note 1060 Duplicate column name 'id' +ALTER TABLE t1 ADD COLUMN IF NOT EXISTS lol INT AFTER id; +Warnings: +Note 1060 Duplicate column name 'lol' +ALTER TABLE t1 DROP COLUMN IF EXISTS lol; +ALTER TABLE t1 DROP COLUMN IF EXISTS lol; +Warnings: +Note 1091 Can't DROP 'lol'; check that column/key exists +ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); +ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); +Warnings: +Note 1061 Duplicate key name 'x_param' +ALTER TABLE t1 MODIFY IF EXISTS lol INT; +Warnings: +Note 1054 Unknown column 'lol' in 't1' +DROP INDEX IF EXISTS x_param ON t1; +DROP INDEX IF EXISTS x_param ON t1; +Warnings: +Note 1091 Can't DROP 'x_param'; check that column/key exists +CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); +CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); +Warnings: +Note 1061 Duplicate key name 'x_param1' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `x_param` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `x_param1` (`x_param`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS fk(id) REFERENCES t1(id); +ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS fk(id) REFERENCES t1(id); +Warnings: +Note 1061 Duplicate key name 'fk' +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk; +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk; +Warnings: +Note 1091 Can't DROP 'fk'; check that column/key exists +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL, + KEY `fk` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t2 ADD FOREIGN KEY (id) REFERENCES t1(id); +ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS t2_ibfk_1(id) REFERENCES t1(id); +Warnings: +Note 1061 Duplicate key name 't2_ibfk_1' +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1; +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1; +Warnings: +Note 1091 Can't DROP 't2_ibfk_1'; check that column/key exists +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL, + KEY `id` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t2; +DROP TABLE t1; # # Bug#11938817 ALTER BEHAVIOR DIFFERENT THEN DOCUMENTED # diff --git a/mysql-test/r/alter_table_autoinc-5574.result b/mysql-test/r/alter_table_autoinc-5574.result new file mode 100644 index 00000000000..9476313c773 --- /dev/null +++ b/mysql-test/r/alter_table_autoinc-5574.result @@ -0,0 +1,11 @@ +create table t1(a int(10)unsigned not null auto_increment primary key, +b varchar(255) not null) engine=innodb default charset=utf8; +insert into t1 values(1,'aaa'),(2,'bbb'); +alter table t1 auto_increment=1; +insert into t1 values(NULL, 'ccc'); +select * from t1; +a b +1 aaa +2 bbb +3 ccc +drop table t1; diff --git a/mysql-test/r/alter_table_trans.result b/mysql-test/r/alter_table_trans.result index 6e034e47e76..a2547708ada 100644 --- a/mysql-test/r/alter_table_trans.result +++ b/mysql-test/r/alter_table_trans.result @@ -4,3 +4,15 @@ ALTER TABLE t1 RENAME TO t2, DISABLE KEYS; Warnings: Note 1031 Storage engine InnoDB of the table `test`.`t1` doesn't have this option DROP TABLE t2; +CREATE TABLE t1 ( +col4 text NOT NULL, +col2 int(11) NOT NULL DEFAULT '0', +col3 int(11) DEFAULT NULL, +extra int(11) DEFAULT NULL, +KEY idx (col4(10)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +insert t1 values (repeat('1', 8193),3,1,1); +insert t1 values (repeat('3', 8193),3,1,1); +ALTER TABLE t1 ADD PRIMARY KEY (col4(10)) , ADD UNIQUE KEY uidx (col3); +ERROR 23000: Duplicate entry '1' for key 'uidx' +DROP TABLE t1; diff --git a/mysql-test/r/assign_key_cache-5405.result b/mysql-test/r/assign_key_cache-5405.result new file mode 100644 index 00000000000..4a0fc58cd4f --- /dev/null +++ b/mysql-test/r/assign_key_cache-5405.result @@ -0,0 +1,14 @@ +create table t1 (f int, key(f)) engine=myisam; +set global kc1.key_buffer_size = 65536; +set debug_sync='assign_key_cache_op_unlock wait_for op_locked'; +cache index t1 in kc1; +set debug_sync='assign_key_cache_op_lock signal op_locked wait_for assigned'; +cache index t1 in kc1; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +set debug_sync='now signal assigned'; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +drop table t1; +set global kc1.key_buffer_size = 0; +set debug_sync='reset'; diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 5e933914f5d..8ae61881c07 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -1,3 +1,4 @@ +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); select CAST(1-2 AS UNSIGNED); CAST(1-2 AS UNSIGNED) 18446744073709551615 @@ -62,7 +63,7 @@ cast(12.444 as double) 12.444 select cast(cast("20:01:01" as time) as datetime); cast(cast("20:01:01" as time) as datetime) -0000-00-00 20:01:01 +2001-02-03 20:01:01 select cast(cast("8:46:06.23434" AS time) as decimal(32,10)); cast(cast("8:46:06.23434" AS time) as decimal(32,10)) 84606.0000000000 @@ -764,7 +765,7 @@ cast(cast("2101-00-01 02:03:04" as datetime) as time) 02:03:04 SELECT CAST(CAST('20:05:05' AS TIME) as date); CAST(CAST('20:05:05' AS TIME) as date) -0000-00-00 +2001-02-03 set sql_mode= TRADITIONAL; select cast("2101-00-01 02:03:04" as datetime); cast("2101-00-01 02:03:04" as datetime) @@ -778,9 +779,7 @@ Warnings: Warning 1292 Incorrect datetime value: '2101-00-01 02:03:04' SELECT CAST(CAST('20:05:05' AS TIME) as date); CAST(CAST('20:05:05' AS TIME) as date) -NULL -Warnings: -Warning 1292 Incorrect datetime value: '20:05:05' +2001-02-03 set sql_mode=DEFAULT; create table t1 (f1 time, f2 date, f3 datetime); insert into t1 values ('11:22:33','2011-12-13','2011-12-13 11:22:33'); @@ -790,9 +789,7 @@ cast(f1 as unsigned) cast(f2 as unsigned) cast(f3 as unsigned) drop table t1; SELECT CAST(TIME('10:20:30') AS DATE) + INTERVAL 1 DAY; CAST(TIME('10:20:30') AS DATE) + INTERVAL 1 DAY -NULL -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00' +2001-02-04 SET SQL_MODE=ALLOW_INVALID_DATES; SELECT DATE("foo"); DATE("foo") diff --git a/mysql-test/r/comments.result b/mysql-test/r/comments.result index ce817b5012f..c13eb510326 100644 --- a/mysql-test/r/comments.result +++ b/mysql-test/r/comments.result @@ -35,6 +35,12 @@ select 1 /*M!50000 +1 */; select 1 /*M!50300 +1 */; 1 +1 2 +select 2 /*M!99999 +1 */; +2 +1 +3 +select 2 /*M!100000 +1 */; +2 +1 +3 select 2 /*M!999999 +1 */; 2 2 diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index 3583e8ed396..1e173221b15 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -830,7 +830,7 @@ create table if not exists t2 (a int) select 6 union select 7; Warnings: Note 1050 Table 't2' already exists # Sic: first commits the statement, and then the transaction. -call p_verify_status_increment(2, 0, 2, 0); +call p_verify_status_increment(0, 0, 0, 0); SUCCESS create table t3 select a from t2; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 7eba25d8ea3..41a2200c13f 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -2602,6 +2602,8 @@ create table t1 (a int, b int) select 2,2; ERROR 42S01: Table 't1' already exists create table t1 like t2; ERROR 42S01: Table 't1' already exists +create or replace table t1 (a int, b int) select 2,2; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction select * from t1; a b 1 1 diff --git a/mysql-test/r/create_or_replace.result b/mysql-test/r/create_or_replace.result new file mode 100644 index 00000000000..8f6ca01d34b --- /dev/null +++ b/mysql-test/r/create_or_replace.result @@ -0,0 +1,362 @@ +drop table if exists t1,t2,t3; +CREATE TABLE t2 (a int); +INSERT INTO t2 VALUES(1),(2),(3); +# +# Check first syntax and wrong usage +# +CREATE OR REPLACE TABLE IF NOT EXISTS t1 (a int); +ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS +create or replace trigger trg before insert on t1 for each row set @a:=1; +ERROR HY000: Incorrect usage of OR REPLACE and TRIGGERS / SP / EVENT +create or replace table mysql.general_log (a int); +ERROR HY000: You cannot 'CREATE OR REPLACE' a log table if logging is enabled +create or replace table mysql.slow_log (a int); +ERROR HY000: You cannot 'CREATE OR REPLACE' a log table if logging is enabled +# +# Usage when table doesn't exist +# +CREATE OR REPLACE TABLE t1 (a int); +CREATE TABLE t1 (a int); +ERROR 42S01: Table 't1' already exists +DROP TABLE t1; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int); +CREATE TEMPORARY TABLE t1 (a int, b int, c int); +ERROR 42S01: Table 't1' already exists +DROP TEMPORARY TABLE t1; +# +# Testing with temporary tables +# +CREATE OR REPLACE TABLE t1 (a int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TEMPORARY TABLE t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +create temporary table t1 (i int) engine=InnoDB; +create or replace temporary table t1 (a int, b int) engine=InnoDB; +create or replace temporary table t1 (j int); +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `j` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int) engine= innodb; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int) engine= innodb; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int) engine=myisam; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TEMPORARY TABLE t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE OR REPLACE TABLE t2 (a int); +ERROR HY000: Table 't2' was not locked with LOCK TABLES +DROP TABLE t1; +UNLOCK TABLES; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int) SELECT * from t2; +SELECT * FROM t1; +a +1 +2 +3 +CREATE OR REPLACE TEMPORARY TABLE t1 (b int) SELECT * from t2; +SELECT * FROM t1; +b a +NULL 1 +NULL 2 +NULL 3 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 AS SELECT a FROM t2; +CREATE TEMPORARY TABLE IF NOT EXISTS t1(a int, b int) SELECT 1,2 FROM t2; +Warnings: +Note 1050 Table 't1' already exists +DROP TABLE t1; +CREATE TABLE t1 (a int); +CREATE OR REPLACE TABLE t1 AS SELECT 1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `1` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +create table t1 (a int); +create or replace table t1 as select * from t1; +ERROR HY000: Table 't1' is specified twice, both as a target for 'CREATE' and as a separate source for data +create or replace table t1 as select a from (select a from t1) as t3; +ERROR HY000: Table 't1' is specified twice, both as a target for 'CREATE' and as a separate source for data +create or replace table t1 as select a from t2 where t2.a in (select a from t1); +ERROR HY000: Table 't1' is specified twice, both as a target for 'CREATE' and as a separate source for data +drop table t1; +# +# Testing with normal tables +# +CREATE OR REPLACE TABLE t1 (a int); +CREATE OR REPLACE TABLE t1 (a int, b int); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a int) SELECT * from t2; +SELECT * FROM t1; +a +1 +2 +3 +TRUNCATE TABLE t1; +CREATE TABLE IF NOT EXISTS t1 (a int) SELECT * from t2; +Warnings: +Note 1050 Table 't1' already exists +SELECT * FROM t1; +a +DROP TABLE t1; +CREATE TABLE t1 (i int); +CREATE OR REPLACE TABLE t1 AS SELECT 1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `1` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write,t2 write; +CREATE OR REPLACE TABLE t1 (a int, b int); +SELECT * FROM t1; +a b +INSERT INTO t1 values(1,1); +CREATE OR REPLACE TABLE t1 (a int, b int, c int); +INSERT INTO t1 values(1,1,1); +CREATE OR REPLACE TABLE t3 (a int); +ERROR HY000: Table 't3' was not locked with LOCK TABLES +UNLOCK TABLES; +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write,t2 write; +CREATE OR REPLACE TABLE t1 (a int, b int) select a,1 from t2; +SELECT * FROM t2; +a +1 +2 +3 +SELECT * FROM t1; +b a 1 +NULL 1 1 +NULL 2 1 +NULL 3 1 +SELECT * FROM t1; +b a 1 +NULL 1 1 +NULL 2 1 +NULL 3 1 +INSERT INTO t1 values(1,1,1); +CREATE OR REPLACE TABLE t1 (a int, b int, c int, d int); +INSERT INTO t1 values(1,1,1,1); +CREATE OR REPLACE TABLE t3 (a int); +ERROR HY000: Table 't3' was not locked with LOCK TABLES +UNLOCK TABLES; +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write,t2 write, t1 as t1_read read; +CREATE OR REPLACE TABLE t1 (a int, b int) select a,1 from t2; +SELECT * FROM t1; +b a 1 +NULL 1 1 +NULL 2 1 +NULL 3 1 +SELECT * FROM t2; +a +1 +2 +3 +SELECT * FROM t1 as t1_read; +ERROR HY000: Table 't1_read' was not locked with LOCK TABLES +DROP TABLE t1; +UNLOCK TABLES; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLE t1 WRITE; +CREATE OR REPLACE TABLE t1 AS SELECT 1; +SELECT * from t1; +1 +1 +SELECT * from t2; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +DROP TABLE t1; +# +# Test also with InnoDB (transactional engine) +# +create table t1 (i int) engine=innodb; +lock table t1 write; +create or replace table t1 (j int); +unlock tables; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `j` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (i int) engine=InnoDB; +lock table t1 write, t2 write; +create or replace table t1 (j int) engine=innodb; +unlock tables; +drop table t1; +create table t1 (i int) engine=InnoDB; +create table t3 (i int) engine=InnoDB; +insert into t3 values(1),(2),(3); +lock table t1 write, t2 write, t3 write; +create or replace table t1 (a int, i int) engine=innodb select t2.a,t3.i from t2,t3; +unlock tables; +select * from t1 order by a,i; +a i +1 1 +1 2 +1 3 +2 1 +2 2 +2 3 +3 1 +3 2 +3 3 +drop table t1,t3; +# +# Testing CREATE .. LIKE +# +create or replace table t1 like t2; +create or replace table t1 like t2; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (b int); +lock tables t1 write, t2 read; +create or replace table t1 like t2; +SELECT * FROM t1; +a +INSERT INTO t1 values(1); +CREATE OR REPLACE TABLE t1 like t2; +INSERT INTO t1 values(2); +unlock tables; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create or replace table t1 like t2; +create or replace table t1 like t1; +ERROR 42000: Not unique table/alias: 't1' +drop table t1; +CREATE TEMPORARY TABLE t1 like t2; +CREATE OR REPLACE TABLE t1 like t1; +ERROR 42000: Not unique table/alias: 't1' +CREATE OR REPLACE TABLE t1 like t1; +ERROR 42000: Not unique table/alias: 't1' +drop table t1; +CREATE TEMPORARY TABLE t1 like t2; +CREATE OR REPLACE TEMPORARY TABLE t3 like t1; +CREATE OR REPLACE TEMPORARY TABLE t3 like t3; +ERROR 42000: Not unique table/alias: 't3' +drop table t1,t3; +# +# Test with prepared statements +# +prepare stmt1 from 'create or replace table t1 select * from t2'; +execute stmt1; +select * from t1; +a +1 +2 +3 +execute stmt1; +select * from t1; +a +1 +2 +3 +drop table t1; +execute stmt1; +select * from t1; +a +1 +2 +3 +deallocate prepare stmt1; +drop table t1; +# +# Test with views +# +create view t1 as select 1; +create table if not exists t1 (a int); +Warnings: +Note 1050 Table 't1' already exists +create or replace table t1 (a int); +ERROR 42S02: 'test.t1' is a view +drop table t1; +ERROR 42S02: 'test.t1' is a view +drop view t1; +# +# MDEV-5602 CREATE OR REPLACE obtains stricter locks than the +# connection had before +# +create table t1 (a int); +lock table t1 write, t2 read; +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE MDL_EXPLICIT Global read lock +# MDL_SHARED_NO_READ_WRITE MDL_EXPLICIT Table metadata lock test t1 +# MDL_INTENTION_EXCLUSIVE MDL_EXPLICIT Schema metadata lock test +# MDL_SHARED_READ MDL_EXPLICIT Table metadata lock test t2 +create or replace table t1 (i int); +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE MDL_EXPLICIT Global read lock +# MDL_SHARED_NO_READ_WRITE MDL_EXPLICIT Table metadata lock test t1 +# MDL_INTENTION_EXCLUSIVE MDL_EXPLICIT Schema metadata lock test +# MDL_SHARED_READ MDL_EXPLICIT Table metadata lock test t2 +create or replace table t1 like t2; +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE MDL_EXPLICIT Global read lock +# MDL_SHARED_NO_READ_WRITE MDL_EXPLICIT Table metadata lock test t1 +# MDL_INTENTION_EXCLUSIVE MDL_EXPLICIT Schema metadata lock test +# MDL_SHARED_READ MDL_EXPLICIT Table metadata lock test t2 +create or replace table t1 select 1 as f1; +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE MDL_EXPLICIT Global read lock +# MDL_SHARED_NO_READ_WRITE MDL_EXPLICIT Table metadata lock test t1 +# MDL_INTENTION_EXCLUSIVE MDL_EXPLICIT Schema metadata lock test +# MDL_SHARED_READ MDL_EXPLICIT Table metadata lock test t2 +drop table t1; +unlock tables; +DROP TABLE t2; diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result index 6925da6b206..5c75bc098e3 100644 --- a/mysql-test/r/ctype_utf16.result +++ b/mysql-test/r/ctype_utf16.result @@ -671,6 +671,21 @@ FF9D EFBE9D D800DF84 F0908E84 DBC0DC00 F4808080 DROP TABLE IF EXISTS t1; +# +# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +# OUT-OF-ORDER RESULTS +# +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +n +a a +a b +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +n +a b +a a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf16_bin diff --git a/mysql-test/r/ctype_utf16le.result b/mysql-test/r/ctype_utf16le.result index 8f63dda2adc..baf3f4bb0f8 100644 --- a/mysql-test/r/ctype_utf16le.result +++ b/mysql-test/r/ctype_utf16le.result @@ -714,6 +714,21 @@ HEX(a) HEX(CONVERT(a USING utf8mb4)) 00D884DF F0908E84 C0DB00DC F4808080 DROP TABLE IF EXISTS t1; +# +# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +# OUT-OF-ORDER RESULTS +# +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +n +a a +a b +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +n +a b +a a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf16le_bin diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index e0bede76fb7..b67de4d0051 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -670,6 +670,21 @@ HEX(a) HEX(CONVERT(a USING utf8mb4)) 00010384 F0908E84 00100000 F4808080 DROP TABLE IF EXISTS t1; +# +# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +# OUT-OF-ORDER RESULTS +# +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +n +a a +a b +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +n +a b +a a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf32_bin diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result index 73ceae39295..55d5c6eed86 100644 --- a/mysql-test/r/ctype_utf8mb4.result +++ b/mysql-test/r/ctype_utf8mb4.result @@ -1149,6 +1149,21 @@ EFBE9D EFBE9D F0908E84 F0908E84 F4808080 F4808080 DROP TABLE IF EXISTS t1; +# +# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +# OUT-OF-ORDER RESULTS +# +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +n +a a +a b +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +n +a b +a a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8mb4_bin diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 699d3279e3e..3a3b69f1fc7 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -479,6 +479,28 @@ SELECT * FROM WHERE tmp.a; a b 100 200 +# +# MDEV-5356: Server crashes in Item_equal::contains on 2nd +# execution of a PS +# +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,2),(3,4); +CREATE TABLE t2 (c INT); +INSERT INTO t2 VALUES (5),(6); +CREATE TABLE t3 (d INT); +INSERT INTO t3 VALUES (7),(8); +CREATE PROCEDURE pr() +UPDATE t3, +(SELECT c FROM +(SELECT 1 FROM t1 WHERE a=72 AND NOT b) sq, +t2 +) sq2 +SET d=sq2.c; +CALL pr(); +CALL pr(); +CALL pr(); +drop procedure pr; +drop table t1,t2,t3; # End of 5.3 tests # # Bug#58730 Assertion failed: table->key_read == 0 in close_thread_table, diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result index 2b041448d3b..80d2d64dced 100644 --- a/mysql-test/r/derived_view.result +++ b/mysql-test/r/derived_view.result @@ -2253,9 +2253,118 @@ EXPLAIN EXTENDED SELECT a FROM v1 WHERE a > 100 ORDER BY b; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: -Note 1003 select 4 AS `a` from dual where (4 > 100) order by 1 +Note 1003 select 4 AS `a` from dual where 0 order by 1 DROP VIEW v1; DROP TABLE t1; +CREATE TABLE IF NOT EXISTS `galleries` ( +`id` int(11) NOT NULL AUTO_INCREMENT, +`name` varchar(100) NOT NULL, +`year` int(11) DEFAULT NULL, +PRIMARY KEY (`id`), +UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +Warnings: +Warning 1286 Unknown storage engine 'InnoDB' +Warning 1266 Using storage engine MyISAM for table 'galleries' +CREATE TABLE IF NOT EXISTS `pictures` ( +`id` int(11) NOT NULL AUTO_INCREMENT, +`name` varchar(100) NOT NULL, +`width` float DEFAULT NULL, +`height` float DEFAULT NULL, +`year` int(4) DEFAULT NULL, +`technique` varchar(50) DEFAULT NULL, +`comment` varchar(2000) DEFAULT NULL, +`gallery_id` int(11) NOT NULL, +`type` int(11) NOT NULL, +PRIMARY KEY (`id`), +KEY `gallery_id` (`gallery_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; +Warnings: +Warning 1286 Unknown storage engine 'InnoDB' +Warning 1266 Using storage engine MyISAM for table 'pictures' +ALTER TABLE `pictures` +ADD CONSTRAINT `pictures_ibfk_1` FOREIGN KEY (`gallery_id`) REFERENCES `galleries` (`id`); +INSERT INTO `galleries` (`id`, `name`, `year`) VALUES +(1, 'Quand le noir et blanc invite le taupe', 2013), +(2, 'Une touche de couleur', 2012), +(3, 'Éclats', 2011), +(4, 'Gris béton', 2010), +(5, 'Expression du spalter', 2010), +(6, 'Zénitude', 2009), +(7, 'La force du rouge', 2008), +(8, 'Sphères', NULL), +(9, 'Centre', 2009), +(10, 'Nébuleuse', NULL); +INSERT INTO `pictures` (`id`, `name`, `width`, `height`, `year`, `technique`, `comment`, `gallery_id`, `type`) VALUES +(1, 'Éclaircie', 72.5, 100, NULL, NULL, NULL, 1, 1), +(2, 'Architecture', 81, 100, NULL, NULL, NULL, 1, 1), +(3, 'Nouveau souffle', 72.5, 100, NULL, NULL, NULL, 1, 1), +(4, 'Échanges (2)', 89, 116, NULL, NULL, NULL, 1, 1), +(5, 'Échanges', 89, 116, NULL, NULL, NULL, 1, 1), +(6, 'Fenêtre de vie', 81, 116, NULL, NULL, NULL, 1, 1), +(7, 'Architecture', 81, 100, NULL, NULL, NULL, 1, 1), +(8, 'Nouveau souffle (2)', 72.5, 100, NULL, NULL, NULL, 1, 1), +(9, 'Fluidité', 89, 116, NULL, NULL, NULL, 1, 1), +(10, 'Nouveau Monde', 89, 125, NULL, NULL, NULL, 1, 1), +(11, 'Mirage', 73, 100, NULL, NULL, NULL, 1, 1), +(12, 'Équilibre', 72.5, 116, NULL, NULL, NULL, 2, 1), +(13, 'Fusion', 72.5, 116, NULL, NULL, NULL, 2, 1), +(14, 'Étincelles', NULL, NULL, NULL, NULL, NULL, 3, 1), +(15, 'Régénérescence', NULL, NULL, NULL, NULL, NULL, 3, 1), +(16, 'Chaleur', 80, 80, NULL, NULL, NULL, 4, 1), +(17, 'Création', 90, 90, NULL, NULL, NULL, 4, 1), +(18, 'Horizon', 92, 73, NULL, NULL, NULL, 4, 1), +(19, 'Labyrinthe', 81, 100, NULL, NULL, NULL, 4, 1), +(20, 'Miroir', 80, 116, NULL, NULL, NULL, 5, 1), +(21, 'Libération', 81, 116, NULL, NULL, NULL, 5, 1), +(22, 'Éclats', 81, 116, NULL, NULL, NULL, 5, 1), +(23, 'Zénitude', 116, 89, NULL, NULL, NULL, 6, 1), +(24, 'Écritures lointaines', 90, 90, NULL, NULL, NULL, 7, 1), +(25, 'Émergence', 80, 80, NULL, NULL, NULL, 7, 1), +(26, 'Liberté', 50, 50, NULL, NULL, NULL, 7, 1), +(27, 'Silhouettes amérindiennes', 701, 70, NULL, NULL, NULL, 7, 1), +(28, 'Puissance', 81, 100, NULL, NULL, NULL, 8, 1), +(29, 'Source', 73, 116, NULL, NULL, NULL, 8, 1), +(30, 'Comme une ville qui prend vie', 50, 100, 2008, NULL, NULL, 9, 1), +(31, 'Suspension azur', 80, 80, NULL, NULL, NULL, 9, 1), +(32, 'Nébuleuse', 70, 70, NULL, NULL, NULL, 10, 1), +(33, 'Å’uvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(34, 'Å’uvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(35, 'Å’uvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(36, 'Å’uvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(37, 'Å’uvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(38, 'Å’uvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2); +explain +SELECT g.id AS gallery_id, +g.name AS gallery_name, +p.id AS picture_id, +p.name AS picture_name, +g.p_random AS r1, +g.p_random AS r2, +g.p_random AS r3 +FROM +( +SELECT gal.id, +gal.name, +( +SELECT pi.id +FROM pictures pi +WHERE pi.gallery_id = gal.id +ORDER BY RAND() +LIMIT 1 +) AS p_random +FROM galleries gal +) g +LEFT JOIN pictures p +ON p.id = g.p_random +ORDER BY gallery_name ASC +; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using filesort +1 PRIMARY p eq_ref PRIMARY PRIMARY 4 g.p_random 1 Using where +2 DERIVED gal ALL NULL NULL NULL NULL 10 +3 DEPENDENT SUBQUERY pi ref gallery_id gallery_id 4 test.gal.id 4 Using temporary; Using filesort +drop table galleries, pictures; # # end of 5.3 tests # diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 019099bde14..6f68483f684 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -999,4 +999,44 @@ c 11112222 33334444 DROP TABLE t1; +# +# Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN. +# Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK +# +SET @tmp_table_size_save= @@tmp_table_size; +SET @@tmp_table_size= 1024; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +INSERT INTO t1 SELECT a+8 FROM t1; +INSERT INTO t1 SELECT a+16 FROM t1; +INSERT INTO t1 SELECT a+32 FROM t1; +INSERT INTO t1 SELECT a+64 FROM t1; +INSERT INTO t1 VALUE(NULL); +SELECT COUNT(DISTINCT a) FROM t1; +COUNT(DISTINCT a) +128 +SELECT COUNT(DISTINCT (a+0)) FROM t1; +COUNT(DISTINCT (a+0)) +128 +DROP TABLE t1; +create table tb( +id int auto_increment primary key, +v varchar(32)) +engine=myisam charset=gbk; +insert into tb(v) values("aaa"); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +update tb set v=concat(v, id); +select count(distinct case when id<=64 then id end) from tb; +count(distinct case when id<=64 then id end) +64 +select count(distinct case when id<=63 then id end) from tb; +count(distinct case when id<=63 then id end) +63 +drop table tb; +SET @@tmp_table_size= @tmp_table_size_save; End of 5.5 tests diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result index efe519fe3f9..ca2130cd700 100644 --- a/mysql-test/r/dyncol.result +++ b/mysql-test/r/dyncol.result @@ -697,14 +697,14 @@ column_get(column_create(1, 0), 1 as datetime) select column_get(column_create(1, "2001021"), 1 as datetime); column_get(column_create(1, "2001021"), 1 as datetime) 2020-01-02 01:00:00 +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); select column_get(column_create(1, "8:46:06.23434" AS time), 1 as datetime); column_get(column_create(1, "8:46:06.23434" AS time), 1 as datetime) -0000-00-00 08:46:06 +2001-02-03 08:46:06 select column_get(column_create(1, "-808:46:06.23434" AS time), 1 as datetime); column_get(column_create(1, "-808:46:06.23434" AS time), 1 as datetime) -NULL -Warnings: -Warning 1292 Truncated incorrect datetime value: '-808:46:06' +2000-12-31 07:13:53 +SET timestamp=DEFAULT; set @@sql_mode="allow_invalid_dates"; select column_get(column_create(1, "2011-02-30 18:46:06.23434" AS CHAR), 1 as datetime); column_get(column_create(1, "2011-02-30 18:46:06.23434" AS CHAR), 1 as datetime) diff --git a/mysql-test/r/error_simulation.result b/mysql-test/r/error_simulation.result index 88a9d114bc6..006c51d1880 100644 --- a/mysql-test/r/error_simulation.result +++ b/mysql-test/r/error_simulation.result @@ -94,7 +94,7 @@ INSERT INTO t1 VALUES (1),(2); INSERT INTO t2 VALUES (1),(2); SET SESSION debug_dbug="+d,bug11747970_raise_error"; INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); -ERROR HY000: Unknown error +ERROR 70100: Query execution was interrupted SET SESSION debug_dbug = DEFAULT; DROP TABLE t1,t2; # diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result index 37951c30787..084587079ba 100644 --- a/mysql-test/r/events_trans.result +++ b/mysql-test/r/events_trans.result @@ -135,3 +135,4 @@ SELECT * FROM t2; a ROLLBACK WORK TO SAVEPOINT A; DROP TABLE t1, t2; +DROP EVENT e1; diff --git a/mysql-test/r/flush-innodb-notembedded.result b/mysql-test/r/flush-innodb-notembedded.result new file mode 100644 index 00000000000..817d57d9d79 --- /dev/null +++ b/mysql-test/r/flush-innodb-notembedded.result @@ -0,0 +1,34 @@ +# Test 7: Check privileges required. +# +CREATE DATABASE db1; +CREATE TABLE db1.t1 (a INT) engine= InnoDB; +GRANT RELOAD, SELECT, LOCK TABLES ON *.* TO user1@localhost; +GRANT CREATE, DROP ON *.* TO user2@localhost; +GRANT RELOAD, SELECT ON *.* TO user3@localhost; +GRANT SELECT, LOCK TABLES ON *.* TO user4@localhost; +GRANT RELOAD, LOCK TABLES ON *.* TO user5@localhost; +# Connection con1 as user1 +FLUSH TABLE db1.t1 FOR EXPORT; +UNLOCK TABLES; +# Connection default +# Connection con1 as user2 +FLUSH TABLE db1.t1 FOR EXPORT; +ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation +# Connection default +# Connection con1 as user3 +FLUSH TABLE db1.t1 FOR EXPORT; +ERROR 42000: Access denied for user 'user3'@'localhost' to database 'db1' +# Connection default +# Connection con1 as user4 +FLUSH TABLE db1.t1 FOR EXPORT; +ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation +# Connection default +# Connection con1 as user5 +FLUSH TABLE db1.t1 FOR EXPORT; +ERROR 42000: SELECT command denied to user 'user5'@'localhost' for table 't1' +# Connection default +DROP USER user1@localhost, user2@localhost, user3@localhost, +user4@localhost, user5@localhost; +DROP TABLE db1.t1; +DROP DATABASE db1; +# End of 5.6 tests diff --git a/mysql-test/r/flush-innodb.result b/mysql-test/r/flush-innodb.result index cea4f81e2a2..6a97d33225e 100644 --- a/mysql-test/r/flush-innodb.result +++ b/mysql-test/r/flush-innodb.result @@ -3,3 +3,297 @@ UNLOCK TABLES; CREATE TABLE t1 ( m MEDIUMTEXT ) ENGINE=InnoDB; INSERT INTO t1 VALUES ( REPEAT('i',1048576) ); DROP TABLE t1; + +# +# WL#6168: FLUSH TABLES ... FOR EXPORT -- parser +# + +# Requires innodb_file_per_table +SET @old_innodb_file_per_table= @@GLOBAL.innodb_file_per_table; +SET GLOBAL innodb_file_per_table= 1; +# new "EXPORT" keyword is a valid user variable name: +SET @export = 10; +# new "EXPORT" keyword is a valid SP parameter name: +CREATE PROCEDURE p1(export INT) BEGIN END; +DROP PROCEDURE p1; +# new "EXPORT" keyword is a valid local variable name: +CREATE PROCEDURE p1() +BEGIN +DECLARE export INT; +END| +DROP PROCEDURE p1; +# new "EXPORT" keyword is a valid SP name: +CREATE PROCEDURE export() BEGIN END; +DROP PROCEDURE export; +# new FLUSH TABLES ... FOR EXPORT syntax: +FLUSH TABLES FOR EXPORT; +ERROR 42000: No tables used near 'FOR EXPORT' at line 1 +FLUSH TABLES WITH EXPORT; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXPORT' at line 1 +CREATE TABLE t1 (i INT) engine=InnoDB; +CREATE TABLE t2 LIKE t1; +FLUSH TABLES t1,t2 WITH EXPORT; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXPORT' at line 1 +FLUSH TABLES t1, t2 FOR EXPORT; +UNLOCK TABLES; +# case check +FLUSH TABLES t1, t2 for ExPoRt; +UNLOCK TABLES; +# With LOCAL keyword +FLUSH LOCAL TABLES t1, t2 FOR EXPORT; +UNLOCK TABLES; +# Tables with fully qualified names +FLUSH LOCAL TABLES test.t1, test.t2 for ExPoRt; +UNLOCK TABLES; +DROP TABLES t1, t2; +# new "EXPORT" keyword is a valid table name: +CREATE TABLE export (i INT) engine=InnoDB; +# it's ok to lock the "export" table for export: +FLUSH TABLE export FOR EXPORT; +UNLOCK TABLES; +DROP TABLE export; +# +# WL#6169 FLUSH TABLES ... FOR EXPORT -- runtime +# +# Test 1: Views, temporary tables, non-existent tables +# +CREATE VIEW v1 AS SELECT 1; +CREATE TEMPORARY TABLE t1 (a INT); +FLUSH TABLES v1 FOR EXPORT; +ERROR HY000: 'test.v1' is not BASE TABLE +FLUSH TABLES t1 FOR EXPORT; +ERROR 42S02: Table 'test.t1' doesn't exist +FLUSH TABLES non_existent FOR EXPORT; +ERROR 42S02: Table 'test.non_existent' doesn't exist +DROP TEMPORARY TABLE t1; +DROP VIEW v1; +# Test 2: Blocked by update transactions, blocks updates. +# +CREATE TABLE t1 (a INT PRIMARY KEY, b INT) engine= InnoDB; +CREATE TABLE t2 (a INT) engine= InnoDB; +# Connection con1 +START TRANSACTION; +INSERT INTO t1 VALUES (1, 1); +# Connection default +# Should be blocked +# Sending: +FLUSH TABLES t1 FOR EXPORT; +# Connection con1 +COMMIT; +# Connection default +# Reaping: FLUSH TABLES t1 FOR EXPORT +# Connection con1 +# Should not be blocked +INSERT INTO t2 VALUES (1); +# Should be blocked +# Sending: +INSERT INTO t1 VALUES (2, 2); +# Connection default +UNLOCK TABLES; +# Connection con1 +# Reaping: INSERT INTO t1 VALUES (2, 2); +# Test 3: Read operations should not be affected. +# +START TRANSACTION; +SELECT * FROM t1; +a b +1 1 +2 2 +# Connection default +# Should not be blocked +FLUSH TABLES t1 FOR EXPORT; +# Connection con1 +COMMIT; +# Should not be blocked +SELECT * FROM t1; +a b +1 1 +2 2 +# Connection default +UNLOCK TABLES; +# Test 4: Blocked by DDL, blocks DDL. +# +START TRANSACTION; +SELECT * FROM t1; +a b +1 1 +2 2 +# Connection con2 +# Sending: +ALTER TABLE t1 ADD INDEX i1(b); +# Connection con1 +# Should be blocked +FLUSH TABLE t1 FOR EXPORT; +# Connection default +COMMIT; +# Connection con2 +# Reaping ALTER TABLE ... +# Connection con1 +# Reaping FLUSH TABLE t1 FOR EXPORT +UNLOCK TABLES; +# Connection default +FLUSH TABLE t1 FOR EXPORT; +# Connection con2 +# Should be blocked +DROP TABLE t1; +# Connection default +UNLOCK TABLES; +# Connection con2 +# Reaping DROP TABLE t1 +# Connection default +DROP TABLE t2; +# Test 5: Compatibilty with FLUSH TABLES WITH READ LOCK +# +CREATE TABLE t1(a INT) engine= InnoDB; +FLUSH TABLES WITH READ LOCK; +# Connection con1 +# This should not block +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; +# Connection default +UNLOCK TABLES; +DROP TABLE t1; +# Test 6: Unsupported storage engines. +# +CREATE TABLE t1(a INT) engine= MEMORY; +FLUSH TABLE t1 FOR EXPORT; +ERROR HY000: Storage engine MEMORY of the table `test`.`t1` doesn't have this option +DROP TABLE t1; +# Connection con1 +# Connection defalt +# Test 7: Check privileges required. +# in flush-innodb-notembedded.test +# Test 8: FLUSH TABLE <table_list> FOR EXPORT is incompatible +# with itself (to avoid race conditions in metadata +# file handling). +# +CREATE TABLE t1 (a INT) engine= InnoDB; +CREATE TABLE t2 (a INT) engine= InnoDB; +# Connection con1 +FLUSH TABLE t1 FOR EXPORT; +# Connection default +# This should not block +FLUSH TABLE t2 FOR EXPORT; +UNLOCK TABLES; +# This should block +# Sending: +FLUSH TABLE t1 FOR EXPORT; +# Connection con1 +UNLOCK TABLES; +# Connection default +# Reaping: FLUSH TABLE t1 FOR EXPORT +UNLOCK TABLES; +# Test 9: LOCK TABLES ... READ is not affected +# +LOCK TABLE t1 READ; +# Connection con1 +# Should not block +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; +# Connection default +UNLOCK TABLES; +FLUSH TABLE t1 FOR EXPORT; +# Connection con1 +# Should not block +LOCK TABLE t1 READ; +UNLOCK TABLES; +# Connection default +UNLOCK TABLES; +# Connection con1 +# Connection default +DROP TABLE t1, t2; +# Test 10: Lock is released if transaction is started after doing +# 'flush table..' in same session +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +FLUSH TABLE t1 FOR EXPORT; +# error as active locks already exist +FLUSH TABLE t1 FOR EXPORT; +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +# active locks will be released due to start transaction +START TRANSACTION; +# passes as start transaction released ealier locks +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; +DROP TABLE t1; +# Test 11: Test 'flush table with fully qualified table names +# and with syntax local/NO_WRITE_TO_BINLOG +# Connection con1 +# Connection default +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +INSERT INTO t1 VALUES (100),(200); +FLUSH LOCAL TABLES test.t1 FOR EXPORT; +# Connection con1 +# Should be blocked +# Sending: +FLUSH LOCAL TABLES t1 FOR EXPORT; +# Connection default +UNLOCK TABLE; +# Connection con1 +# Reaping: FLUSH LOCAL TABLES t1 FOR EXPORT +SELECT * FROM t1 ORDER BY i; +i +100 +200 +# Connection default +# Should be blocked +# Sending: +FLUSH NO_WRITE_TO_BINLOG TABLES test.t1 FOR EXPORT; +# Connection con1 +UNLOCK TABLES; +# Connection default +# Reaping: FLUSH NO_WRITE_TO_BINLOG TABLES test.t1 FOR EXPORT +SELECT * FROM t1 ORDER BY i; +i +100 +200 +UNLOCK TABLE; +DROP TABLE t1; +# Test 12: Active transaction get committed if user execute +# "FLUSH TABLE ... FOR EXPORT" or "LOCK TABLE.." +# Connection default +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +INSERT INTO t1 VALUES (100),(200); +START TRANSACTION; +INSERT INTO t1 VALUES (300); +# 'flush table..' commit active transaction from same session +FLUSH LOCAL TABLES test.t1 FOR EXPORT; +ROLLBACK; +SELECT * FROM t1 ORDER BY i; +i +100 +200 +300 +START TRANSACTION; +INSERT INTO t1 VALUES (400); +# 'lock table ..' commit active transaction from same session +LOCK TABLES test.t1 READ; +ROLLBACK; +SELECT * FROM t1 ORDER BY i; +i +100 +200 +300 +400 +UNLOCK TABLES; +DROP TABLE t1; +# Test 13: Verify "FLUSH TABLE ... FOR EXPORT" and "LOCK TABLE.." +# in same session +# Connection default +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +# Lock table +LOCK TABLES test.t1 WRITE; +# 'lock table ..' completes even if table lock is acquired +# in same session using 'lock table'. Previous locks are released. +LOCK TABLES test.t1 READ; +# 'flush table ..' gives error if table lock is acquired +# in same session using 'lock table ..' +FLUSH TABLES test.t1 FOR EXPORT; +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +# 'lock table ..' completes even if table lock is acquired +# in same session using 'flush table'. Previous locks are released. +LOCK TABLES test.t1 WRITE; +UNLOCK TABLES; +DROP TABLE t1; +# Reset innodb_file_per_table +SET GLOBAL innodb_file_per_table= @old_innodb_file_per_table; +# End of 5.6 tests diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result index c2f1e5bf273..011dec4d555 100644 --- a/mysql-test/r/func_compress.result +++ b/mysql-test/r/func_compress.result @@ -102,7 +102,6 @@ a foo Warnings: Warning 1259 ZLIB: Input data corrupted -Warning 1259 ZLIB: Input data corrupted explain select *, uncompress(a) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 8e50c045775..8e2bdeae93c 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1458,6 +1458,8 @@ DROP TABLE derived1; DROP TABLE D; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,1), (1,2), (1,3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (3),(4); SET SQL_MODE='ONLY_FULL_GROUP_BY'; SELECT COUNT(*) FROM t1; COUNT(*) @@ -1473,12 +1475,19 @@ COUNT(*) SELECT COUNT(*), (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a) FROM t1 outr; ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT COUNT(*) FROM t1 outr, (SELECT b, count(*) FROM t2) as t3; +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT COUNT(*) FROM t1 outr where (1,1) in (SELECT a, count(*) FROM t2); +COUNT(*) +0 SELECT COUNT(*) FROM t1 a JOIN t1 outr ON a.a= (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a); COUNT(*) 0 +SELECT * FROM (SELECT a FROM t1 GROUP BY a) sq JOIN t2 ON a = b; +a b SET SQL_MODE=default; -DROP TABLE t1; +DROP TABLE t1,t2; End of 5.0 tests # # BUG#47280 - strange results from count(*) with order by multiple diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index a033c91bc05..1d1300a96db 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -264,6 +264,13 @@ INET_NTOA(0) SELECT '1' IN ('1', INET_NTOA(0)); '1' IN ('1', INET_NTOA(0)) 1 +SELECT NAME_CONST('a', -(1 OR 2)) OR 1; +ERROR HY000: Incorrect arguments to NAME_CONST +SELECT NAME_CONST('a', -(1 AND 2)) AND 1; +ERROR HY000: Incorrect arguments to NAME_CONST +SELECT NAME_CONST('a', -(1)) OR 1; +NAME_CONST('a', -(1)) OR 1 +1 # # Bug #52165: Assertion failed: file .\dtoa.c, line 465 # @@ -561,6 +568,3 @@ ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # # End of 5.5 tests # -# -# End of tests -# diff --git a/mysql-test/r/func_regexp.result b/mysql-test/r/func_regexp.result index 78b8e5d908a..f405a2297cb 100644 --- a/mysql-test/r/func_regexp.result +++ b/mysql-test/r/func_regexp.result @@ -52,7 +52,7 @@ explain extended select * from t1 where xxx regexp('is a test of some long text id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 Warnings: -Note 1003 select 'this is a test of some long text to see what happens' AS `xxx` from dual where ('this is a test of some long text to see what happens' regexp 'is a test of some long text to') +Note 1003 select 'this is a test of some long text to see what happens' AS `xxx` from dual where 1 select * from t1 where xxx regexp('is a test of some long text to '); xxx this is a test of some long text to see what happens diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index a5280f13ada..c9d7b6636c4 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1153,7 +1153,6 @@ str num notnumber 0 Warnings: Warning 1292 Truncated incorrect DOUBLE value: 'notnumber' -Warning 1292 Truncated incorrect DOUBLE value: 'notnumber' SELECT * FROM t1, t2 WHERE num=substring(str from 1 for 6); str num notnumber 0 diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 5b8c09cb32e..a548d5c18f1 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1719,6 +1719,8 @@ create table t1(a time); insert into t1 values ('00:00:00'),('00:01:00'); select 1 from t1 where 1 < some (select cast(a as datetime) from t1); 1 +1 +1 drop table t1; select time('10:10:10') > 10; time('10:10:10') > 10 @@ -1853,9 +1855,11 @@ Warnings: Warning 1292 Incorrect datetime value: '0' Warning 1292 Incorrect datetime value: '0' drop table t1; +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); select convert_tz(timediff('0000-00-00 00:00:00', cast('2008-03-26 07:09:06' as datetime)), 'UTC', 'Europe/Moscow'); convert_tz(timediff('0000-00-00 00:00:00', cast('2008-03-26 07:09:06' as datetime)), 'UTC', 'Europe/Moscow') NULL +SET timestamp=DEFAULT; create table t1 (f1 integer, f2 date); insert into t1 values (1,'2011-05-05'),(2,'2011-05-05'),(3,'2011-05-05'),(4,'2011-05-05'),(5,'2011-05-05'),(6, '2011-05-06'); select * from t1 where 1 and concat(f2)=MAKEDATE(2011, 125); @@ -2330,6 +2334,7 @@ SELECT * FROM t1; TIMESTAMP('2001-01-01 00:00:00','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1','10:10:10') TIMESTAMP('2001-01-01 00:00:00.12','10:10:10') TIMESTAMP('2001-01-01 00:00:00.123','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1234','10:10:10') TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10') TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10') 2001-01-01 10:10:10 2001-01-01 10:10:10.1 2001-01-01 10:10:10.12 2001-01-01 10:10:10.123 2001-01-01 10:10:10.1234 2001-01-01 10:10:10.12345 2001-01-01 10:10:10.123456 2001-01-01 10:10:10.123456 DROP TABLE t1; +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); CREATE TABLE t1 AS SELECT TIMESTAMP('00:00:00','10:10:10'), TIMESTAMP(TIME('00:00:00'),'10:10:10'); @@ -2339,8 +2344,9 @@ TIMESTAMP('00:00:00','10:10:10') datetime YES NULL TIMESTAMP(TIME('00:00:00'),'10:10:10') datetime YES NULL SELECT * FROM t1; TIMESTAMP('00:00:00','10:10:10') TIMESTAMP(TIME('00:00:00'),'10:10:10') -NULL NULL +NULL 2001-02-03 10:10:10 DROP TABLE t1; +SET timestamp=DEFAULT; # # MDEV-4869 Wrong result of MAKETIME(0, 0, -0.1) # @@ -2350,6 +2356,7 @@ NULL # # MDEV-4857 Wrong result of HOUR('1 00:00:00') # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT HOUR('1 02:00:00'), HOUR('26:00:00'); HOUR('1 02:00:00') HOUR('26:00:00') 26 26 @@ -2361,7 +2368,7 @@ HOUR(TIME('1 02:00:00')) HOUR(TIME('26:00:00')) 26 26 SELECT DAY(TIME('1 02:00:00')), DAY(TIME('26:00:00')); DAY(TIME('1 02:00:00')) DAY(TIME('26:00:00')) -0 0 +4 4 SELECT EXTRACT(HOUR FROM '1 02:00:00'), EXTRACT(HOUR FROM '26:00:00'); EXTRACT(HOUR FROM '1 02:00:00') EXTRACT(HOUR FROM '26:00:00') 2 2 @@ -2374,6 +2381,39 @@ EXTRACT(HOUR FROM TIME('1 02:00:00')) EXTRACT(HOUR FROM TIME('26:00:00')) SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00')); EXTRACT(DAY FROM TIME('1 02:00:00')) EXTRACT(DAY FROM TIME('26:00:00')) 1 1 +SET timestamp=DEFAULT; +# +# MDEV-5458 RQG hits 'sql/tztime.cc:799: my_time_t sec_since_epoch(int, int, int, int, int, int): Assertion `mon > 0 && mon < 13' failed.' +# +SET TIMESTAMP=UNIX_TIMESTAMP('2014-01-22 18:19:20'); +CREATE TABLE t1 (t TIME); +INSERT INTO t1 VALUES ('03:22:30'),('18:30:05'); +SELECT CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') FROM t1; +CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') +2014-02-26 06:59:59 +2014-02-26 06:59:59 +Warnings: +Warning 1292 Truncated incorrect time value: '1296:00:00' +Warning 1292 Truncated incorrect time value: '1296:00:00' +SELECT GREATEST(t, CURRENT_DATE()) FROM t1; +GREATEST(t, CURRENT_DATE()) +838:59:59 +838:59:59 +Warnings: +Warning 1292 Truncated incorrect time value: '1296:00:00' +Warning 1292 Truncated incorrect time value: '1296:00:00' +DROP TABLE t1; +SET TIMESTAMP=DEFAULT; +# +# MDEV-5504 Server crashes in String::length on SELECT with MONTHNAME, GROUP BY, ROLLUP +# +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (1),(2); +SELECT 1 FROM t1 GROUP BY MONTHNAME(0) WITH ROLLUP; +1 +1 +1 +DROP TABLE t1; # # MDEV-4838 Wrong metadata for DATE_ADD('string', INVERVAL) # @@ -2382,3 +2422,62 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is def DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE) 254 19 19 Y 0 0 8 DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE) 2011-01-02 12:14:14 +# +# MDEV-5450 Assertion `cached_field_ type == MYSQL_TYPE_STRING || ltime.time_type == MYSQL_TIMESTAMP_NONE || mysql_type_to_time_type(cached_field_type) == ltime.time_type' fails with IF, ISNULL, ADDDATE +# +CREATE TABLE t1 (a DATETIME, b DATE); +INSERT INTO t1 VALUES (NULL, '2012-12-21'); +SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDDATE(IFNULL(a,b),0),1) +2012-12-21 00:00:00 +SELECT CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) FROM t1; +CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) +2012-12-21 00:00:00 +SELECT CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) FROM t1; +CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) +2012-12-21 00:00:00 +SELECT CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) +2012-12-21 00:00:00 +SELECT IF(1,ADDTIME(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDTIME(IFNULL(a,b),0),1) +2012-12-21 00:00:00 +SELECT CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) FROM t1; +CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) +2012-12-21 00:00:00 +SELECT CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) FROM t1; +CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) +2012-12-21 00:00:00 +SELECT CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) +2012-12-21 00:00:00 +DROP TABLE t1; +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); +CREATE TABLE t1 (a DATETIME, b TIME); +INSERT INTO t1 VALUES (NULL, '00:20:12'); +SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDDATE(IFNULL(a,b),0),1) +2001-02-03 00:20:12 +SELECT CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) FROM t1; +CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) +2001-02-03 00:20:12 +SELECT CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) FROM t1; +CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) +2001-02-03 00:20:12 +SELECT CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) +2001-02-03 00:20:12 +SELECT IF(1,ADDTIME(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDTIME(IFNULL(a,b),0),1) +2001-02-03 00:20:12 +SELECT CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) FROM t1; +CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) +2001-02-03 00:20:12 +SELECT CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) FROM t1; +CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) +2001-02-03 00:20:12 +SELECT CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) +2001-02-03 00:20:12 +DROP TABLE t1; +SET timestamp=DEFAULT; diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result index 3b07be3930a..71eed65b2ea 100644 --- a/mysql-test/r/gis-precise.result +++ b/mysql-test/r/gis-precise.result @@ -452,3 +452,6 @@ ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0, 0.0 -3.0 ))' ), 136 +select astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1)); +astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1)) +GEOMETRYCOLLECTION EMPTY diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index fa7b93092d9..9acdb1a87c2 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -1574,6 +1574,27 @@ SELECT 1 FROM g1 WHERE a >= ANY 1 DROP TABLE g1; # +# Bug#16451878 GEOMETRY QUERY CRASHES SERVER +# +# should not crash +SELECT ASTEXT(0x0100000000030000000100000000000010); +ASTEXT(0x0100000000030000000100000000000010) +NULL +#should not crash +SELECT ENVELOPE(0x0100000000030000000100000000000010); +ENVELOPE(0x0100000000030000000100000000000010) +NULL +#should not crash +SELECT +GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1); +GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1) +NULL +#should not crash +SELECT +GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1); +GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1) +NULL +# # MDEV-3819 missing constraints for spatial column types # create table t1 (pt point); diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index eaeb2a32b29..dfe28f0e05a 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1957,12 +1957,12 @@ UNIQUE INDEX idx (col1)); INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10), (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); EXPLAIN SELECT col1 AS field1, col1 AS field2 -FROM t1 GROUP BY field1, field2;; +FROM t1 GROUP BY field1, field2+0;; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL idx 5 NULL 20 Using index; Using temporary; Using filesort FLUSH STATUS; SELECT col1 AS field1, col1 AS field2 -FROM t1 GROUP BY field1, field2;; +FROM t1 GROUP BY field1, field2+0;; field1 field2 1 1 2 2 @@ -2054,8 +2054,12 @@ field1 field2 explain select col1 f1, col1 f2 from t1 order by f2, f1; id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL idx 5 NULL 20 Using index +explain +select col1 f1, col1 f2 from t1 order by f2, f1+0; +id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL idx 5 NULL 20 Using index; Using filesort -select col1 f1, col1 f2 from t1 order by f2, f1; +select col1 f1, col1 f2 from t1 order by f2, f1+0; f1 f2 1 1 2 2 @@ -2080,7 +2084,7 @@ f1 f2 explain select col1 f1, col1 f2 from t1 group by f2 order by f2, f1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL idx 5 NULL 20 Using index; Using temporary; Using filesort +1 SIMPLE t1 index NULL idx 5 NULL 20 Using index select col1 f1, col1 f2 from t1 group by f2 order by f2, f1; f1 f2 1 1 @@ -2106,7 +2110,7 @@ f1 f2 explain select col1 f1, col1 f2 from t1 group by f1, f2 order by f2, f1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL idx 5 NULL 20 Using index; Using temporary; Using filesort +1 SIMPLE t1 index NULL idx 5 NULL 20 Using index select col1 f1, col1 f2 from t1 group by f1, f2 order by f2, f1; f1 f2 1 1 @@ -2137,10 +2141,10 @@ INSERT INTO t2(col1, col2) VALUES (1,20),(2,19),(3,18),(4,17),(5,16),(6,15),(7,14),(8,13),(9,12),(10,11), (11,10),(12,9),(13,8),(14,7),(15,6),(16,5),(17,4),(18,3),(19,2),(20,1); explain -select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3; +select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3+0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL idx 10 NULL 20 Using index; Using temporary; Using filesort -select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3; +select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3+0; f1 f2 f3 1 20 1 2 19 2 @@ -2163,10 +2167,10 @@ f1 f2 f3 19 2 19 20 1 20 explain -select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3; +select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3+0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL idx 10 NULL 20 Using index; Using filesort -select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3; +select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3+0; f1 f2 f3 1 20 1 2 19 2 @@ -2470,32 +2474,6 @@ v 2v,2v NULL 1c,2v,2v DROP TABLE t1,t2; # -# Test of MDEV-4002 -# -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY, -d1 DOUBLE, -d2 DOUBLE, -i INT NOT NULL DEFAULT '0', -KEY (i) -) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1,1.0,1.1,1),(2,2.0,2.2,2); -PREPARE stmt FROM " -SELECT DISTINCT i, GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) -FROM t1 a1 NATURAL JOIN t1 a2 GROUP BY i WITH ROLLUP -"; -EXECUTE stmt; -i GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) -1 11.1 -2 22.2 -NULL 11.1,22.2 -EXECUTE stmt; -i GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) -1 11.1 -2 22.2 -NULL 11.1,22.2 -DROP TABLE t1; -# # Bug #58782 # Missing rows with SELECT .. WHERE .. IN subquery # with full GROUP BY and no aggr diff --git a/mysql-test/r/group_by_innodb.result b/mysql-test/r/group_by_innodb.result index d165834cbe3..4b5d9990c51 100644 --- a/mysql-test/r/group_by_innodb.result +++ b/mysql-test/r/group_by_innodb.result @@ -1,3 +1,4 @@ +set @save_ext_key_optimizer_switch=@@optimizer_switch; # # MDEV-3992 Server crash or valgrind errors in test_if_skip_sort_order/test_if_cheaper_ordering # on GROUP BY with indexes on InnoDB table @@ -7,13 +8,14 @@ pk INT PRIMARY KEY, a VARCHAR(1) NOT NULL, KEY (pk) ) ENGINE=InnoDB; +set optimizer_switch='extended_keys=on'; INSERT INTO t1 VALUES (1,'a'),(2,'b'); EXPLAIN SELECT COUNT(*), pk field1, pk AS field2 FROM t1 WHERE a = 'r' OR pk = 183 GROUP BY field1, field2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index PRIMARY,pk pk 4 NULL 2 Using where +1 SIMPLE t1 index PRIMARY,pk PRIMARY 4 NULL 2 Using where SELECT COUNT(*), pk field1, pk AS field2 FROM t1 WHERE a = 'r' OR pk = 183 GROUP BY field1, field2; @@ -22,9 +24,36 @@ EXPLAIN SELECT COUNT(*), pk field1 FROM t1 WHERE a = 'r' OR pk = 183 GROUP BY field1, field1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index PRIMARY,pk pk 4 NULL 2 Using where +1 SIMPLE t1 index PRIMARY,pk PRIMARY 4 NULL 2 Using where SELECT COUNT(*), pk field1 FROM t1 WHERE a = 'r' OR pk = 183 GROUP BY field1, field1; COUNT(*) field1 drop table t1; +set optimizer_switch=@save_ext_key_optimizer_switch; +# +# MDEV-4002 Server crash or valgrind errors in Item_func_group_concat::setup and Item_func_group_concat::add +# +CREATE TABLE t1 ( +pk INT NOT NULL PRIMARY KEY, +d1 DOUBLE, +d2 DOUBLE, +i INT NOT NULL DEFAULT '0', +KEY (i) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1.0,1.1,1),(2,2.0,2.2,2); +PREPARE stmt FROM " +SELECT DISTINCT i, GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) +FROM t1 a1 NATURAL JOIN t1 a2 GROUP BY i WITH ROLLUP +"; +EXECUTE stmt; +i GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) +1 11.1 +2 22.2 +NULL 11.1,22.2 +EXECUTE stmt; +i GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) +1 11.1 +2 22.2 +NULL 11.1,22.2 +DROP TABLE t1; End of 5.5 tests diff --git a/mysql-test/r/group_by_null.result b/mysql-test/r/group_by_null.result new file mode 100644 index 00000000000..01053514cb0 --- /dev/null +++ b/mysql-test/r/group_by_null.result @@ -0,0 +1,6 @@ +create table t1 (a int); +insert into t1 values (1),(2); +select max('foo') from t1 group by values(a), extractvalue('bar','qux') order by "v"; +max('foo') +foo +drop table t1; diff --git a/mysql-test/r/index_intersect_innodb.result b/mysql-test/r/index_intersect_innodb.result index d28b3a0bf92..33f2247e5d1 100644 --- a/mysql-test/r/index_intersect_innodb.result +++ b/mysql-test/r/index_intersect_innodb.result @@ -463,29 +463,29 @@ EXPLAIN SELECT * FROM City WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country 4,3 NULL # Using sort_intersect(PRIMARY,Country); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country 4,7 NULL # Using sort_intersect(PRIMARY,Country); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000 AND Country BETWEEN 'S' AND 'Z'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000 AND Country BETWEEN 'S' AND 'Z' ; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where SELECT * FROM City USE INDEX () WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%'; ID Name Country Population @@ -739,13 +739,13 @@ EXPLAIN SELECT * FROM City WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000 AND Country BETWEEN 'S' AND 'Z'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where SELECT * FROM City WHERE Name LIKE 'C%' AND Population > 1000000; ID Name Country Population @@ -1033,7 +1033,7 @@ EXPLAIN SELECT * FROM t1 WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index_merge PRIMARY,f4 PRIMARY,f4 4,35 NULL # Using sort_intersect(PRIMARY,f4); Using where +1 SIMPLE t1 index_merge PRIMARY,f4 PRIMARY,f4 4,39 NULL # Using sort_intersect(PRIMARY,f4); Using where SELECT * FROM t1 WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ; f1 f4 f5 diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result index b93d15f7bef..5202c79f3c7 100644 --- a/mysql-test/r/index_merge_innodb.result +++ b/mysql-test/r/index_merge_innodb.result @@ -580,9 +580,12 @@ pk1 pk2 explain select * from t1 where badkey=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref key1 key1 4 const 100 Using where +set @tmp_index_merge_ror_cpk=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; explain select * from t1 where pk1 < 7500 and key1 = 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL ROWS Using intersect(key1,PRIMARY); Using where +set optimizer_switch=@tmp_index_merge_ror_cpk; explain select * from t1 where pktail1ok=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge key1,pktail1ok key1,pktail1ok 4,4 NULL 1 Using intersect(key1,pktail1ok); Using where diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result index 2fa2d5bcce1..2c0dc77399f 100644 --- a/mysql-test/r/index_merge_myisam.result +++ b/mysql-test/r/index_merge_myisam.result @@ -1415,9 +1415,12 @@ pk1 pk2 explain select * from t1 where badkey=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref key1 key1 4 const 91 Using where +set @tmp_index_merge_ror_cpk=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; explain select * from t1 where pk1 < 7500 and key1 = 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref PRIMARY,key1 key1 4 const ROWS Using where +set optimizer_switch=@tmp_index_merge_ror_cpk; explain select * from t1 where pktail1ok=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref key1,pktail1ok pktail1ok 4 const 76 Using where diff --git a/mysql-test/r/information_schema-big.result b/mysql-test/r/information_schema-big.result index fd98d4e6dc6..45898c77989 100644 --- a/mysql-test/r/information_schema-big.result +++ b/mysql-test/r/information_schema-big.result @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5; DROP VIEW IF EXISTS v1; # -# Bug#18925: subqueries with MIN/MAX functions on INFORMARTION_SCHEMA +# Bug#18925: subqueries with MIN/MAX functions on INFORMATION_SCHEMA # SELECT t.table_name, c1.column_name FROM information_schema.tables t @@ -58,8 +58,8 @@ USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA XTRADB_INTERNAL_HASH_TABLES INTERNAL_HASH_TABLE_NAME -XTRADB_RSEG rseg_id XTRADB_READ_VIEW READ_VIEW_UNDO_NUMBER +XTRADB_RSEG rseg_id SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -115,5 +115,5 @@ USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA XTRADB_INTERNAL_HASH_TABLES INTERNAL_HASH_TABLE_NAME -XTRADB_RSEG rseg_id XTRADB_READ_VIEW READ_VIEW_UNDO_NUMBER +XTRADB_RSEG rseg_id diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 652d8e19829..b0e2898780d 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1945,3 +1945,45 @@ drop database mysqltest; # # End of 5.5 tests # +# +# MDEV-5723: mysqldump -uroot unusable for multi-database operations, checks all databases +# +drop database if exists db1; +create database db1; +use db1; +create table t1 (a int); +create table t2 (a int); +create table t3 (a int); +create database mysqltest; +use mysqltest; +create table t1 (a int); +create table t2 (a int); +create table t3 (a int); +flush tables; +flush status; +SELECT +LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA +FROM +INFORMATION_SCHEMA.FILES +WHERE +FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL AND +LOGFILE_GROUP_NAME IN (SELECT DISTINCT LOGFILE_GROUP_NAME +FROM INFORMATION_SCHEMA.FILES +WHERE +FILE_TYPE = 'DATAFILE' AND +TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME +FROM INFORMATION_SCHEMA.PARTITIONS +WHERE TABLE_SCHEMA IN ('db1') +) +) +GROUP BY +LOGFILE_GROUP_NAME, FILE_NAME, ENGINE +ORDER BY +LOGFILE_GROUP_NAME; +LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE EXTRA +# This must have Opened_tables=3, not 6. +show status like 'Opened_tables'; +Variable_name Value +Opened_tables 3 +drop database mysqltest; +drop database db1; diff --git a/mysql-test/r/information_schema_all_engines.result b/mysql-test/r/information_schema_all_engines.result index 7ced16404a6..7e6cfd176a4 100644 --- a/mysql-test/r/information_schema_all_engines.result +++ b/mysql-test/r/information_schema_all_engines.result @@ -55,9 +55,6 @@ TRIGGERS USER_PRIVILEGES USER_STATISTICS VIEWS -XTRADB_INTERNAL_HASH_TABLES -XTRADB_READ_VIEW -XTRADB_RSEG SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -127,9 +124,6 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -XTRADB_INTERNAL_HASH_TABLES INTERNAL_HASH_TABLE_NAME -XTRADB_READ_VIEW READ_VIEW_UNDO_NUMBER -XTRADB_RSEG rseg_id SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -199,9 +193,6 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -XTRADB_INTERNAL_HASH_TABLES INTERNAL_HASH_TABLE_NAME -XTRADB_READ_VIEW READ_VIEW_UNDO_NUMBER -XTRADB_RSEG rseg_id select 1 as "must be 1" from information_schema.tables where "ACCOUNTS"= (select cast(table_name as char) from information_schema.tables order by table_name limit 1) limit 1; @@ -276,9 +267,6 @@ TRIGGERS information_schema.TRIGGERS 1 USER_PRIVILEGES information_schema.USER_PRIVILEGES 1 USER_STATISTICS information_schema.USER_STATISTICS 1 VIEWS information_schema.VIEWS 1 -XTRADB_INTERNAL_HASH_TABLES information_schema.XTRADB_INTERNAL_HASH_TABLES 1 -XTRADB_READ_VIEW information_schema.XTRADB_READ_VIEW 1 -XTRADB_RSEG information_schema.XTRADB_RSEG 1 +---------------------------------------+ +---------------------------------------+ +---------------------------------------+ @@ -338,9 +326,6 @@ Database: information_schema | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| XTRADB_INTERNAL_HASH_TABLES | -| XTRADB_READ_VIEW | -| XTRADB_RSEG | +---------------------------------------+ +---------------------------------------+ +---------------------------------------+ @@ -400,9 +385,6 @@ Database: INFORMATION_SCHEMA | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| XTRADB_INTERNAL_HASH_TABLES | -| XTRADB_READ_VIEW | -| XTRADB_RSEG | +--------------------+ +--------------------+ +--------------------+ @@ -411,5 +393,5 @@ Wildcard: inf_rmation_schema | information_schema | SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA; table_schema count(*) -information_schema 57 +information_schema 54 mysql 30 diff --git a/mysql-test/r/innodb_ext_key.result b/mysql-test/r/innodb_ext_key.result index e4e7e44ce7c..9140f306f77 100644 --- a/mysql-test/r/innodb_ext_key.result +++ b/mysql-test/r/innodb_ext_key.result @@ -327,7 +327,7 @@ from lineitem use index (i_l_shipdate, i_l_receiptdate) where l_shipdate='1992-07-01' and l_orderkey=130 or l_receiptdate='1992-07-01' and l_orderkey=5603; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 8,8 NULL 2 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where +1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 8,8 NULL 2 Using union(i_l_shipdate,i_l_receiptdate); Using where flush status; select l_orderkey, l_linenumber from lineitem use index (i_l_shipdate, i_l_receiptdate) @@ -991,6 +991,54 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref page_timestamp page_timestamp 4 const 10 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.rev_text_id 1 DROP TABLE t1,t2,t3; +# +# MDEV-5424 SELECT using ORDER BY DESC and LIMIT produces unexpected +# results (InnoDB/XtraDB) +# +create table t1 (a bigint not null unique auto_increment, b varchar(10), primary key (a), key (b(2))) engine = myisam default character set utf8; +create table t2 (a bigint not null unique auto_increment, b varchar(10), primary key (a), key (b(2))) engine = innodb default character set utf8; +insert into t1 (b) values (null), (null), (null); +insert into t2 (b) values (null), (null), (null); +set optimizer_switch='extended_keys=on'; +explain select a from t1 where b is null order by a desc limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref b b 9 const 2 Using where; Using filesort +select a from t1 where b is null order by a desc limit 2; +a +3 +2 +explain select a from t2 where b is null order by a desc limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range b b 9 NULL 3 Using where; Using filesort +select a from t2 where b is null order by a desc limit 2; +a +3 +2 +set optimizer_switch='extended_keys=off'; +explain select a from t2 where b is null order by a desc limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range b b 9 NULL 3 Using where; Using filesort +select a from t2 where b is null order by a desc limit 2; +a +3 +2 +explain select a from t2 where b is null order by a desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index b PRIMARY 8 NULL 3 Using where +select a from t2 where b is null order by a desc; +a +3 +2 +1 +explain select a from t2 where b is null order by a desc,a,a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index b PRIMARY 8 NULL 3 Using where +select a from t2 where b is null order by a desc,a,a; +a +3 +2 +1 +drop table t1, t2; set optimizer_switch=@save_optimizer_switch; set optimizer_switch=@save_ext_key_optimizer_switch; SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result index 5e9e6d647f8..fb467494525 100644 --- a/mysql-test/r/innodb_icp.result +++ b/mysql-test/r/innodb_icp.result @@ -910,5 +910,30 @@ OR a = c ORDER BY e; a b c d e DROP TABLE t1,t2,t3; +# +# MDEV-5337: Wrong result in mariadb 5.5.32 with ORDER BY + LIMIT when index_condition_pushdown=on +# MDEV-5512: Wrong result (WHERE clause ignored) with multiple clauses using Percona-XtraDB engine +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (pk int primary key, +key1 char(32), +key2 char(32), +key(key1), +key(key2) +) engine=innodb; +insert into t2 select +A.a+10*B.a+100*C.a, +concat('rare-', A.a+10*B.a), +concat('rare-', A.a+10*B.a) +from +t1 A, t1 B, t1 C; +update t2 set key1='frequent-val' where pk between 100 and 350; +select * from t2 ignore key(PRIMARY) +where key1='frequent-val' and key2 between 'rare-400' and 'rare-450' order by pk limit 2; +pk key1 key2 +141 frequent-val rare-41 +142 frequent-val rare-42 +drop table t1, t2; set optimizer_switch=@innodb_icp_tmp; set storage_engine= @save_storage_engine; diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index a722ab8d97f..82f3977e231 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -697,3 +697,23 @@ ERROR 42000: Column 'a' specified twice INSERT IGNORE t1 (a, a) SELECT 1,1 UNION SELECT 2,2; ERROR 42000: Column 'a' specified twice DROP TABLE t1; +# +# MDEV-5168: Ensure that we can disable duplicate key warnings +# from INSERT IGNORE +# +create table t1 (f1 int unique, f2 int unique); +insert into t1 values (1,12); +insert into t1 values (2,13); +insert into t1 values (1,12); +ERROR 23000: Duplicate entry '1' for key 'f1' +insert ignore into t1 values (1,12); +Warnings: +Warning 1062 Duplicate entry '1' for key 'f1' +set @@old_mode="NO_DUP_KEY_WARNINGS_WITH_IGNORE"; +insert ignore into t1 values (1,12); +insert ignore into t1 values (1,12) on duplicate key update f2=13; +set @@old_mode=""; +insert ignore into t1 values (1,12); +Warnings: +Warning 1062 Duplicate entry '1' for key 'f1' +DROP TABLE t1; diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index 0f798f7ba1a..e7292e8ddce 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -1538,3 +1538,14 @@ a 3 4 DROP TABLE t1,t2; +# +# MDEV-5635: join of a const table with non-const tables +# +CREATE TABLE t1 (a varchar(3) NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo'); +CREATE TABLE t2 (b varchar(3), c varchar(3), INDEX(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('bar', 'bar'),( 'qux', 'qux'); +SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2 +WHERE t2_2.c = t2_1.c AND t2_2.b = t2_1.b AND ( a IS NULL OR t2_1.c = a ); +a b c b c +DROP TABLE t1,t2; diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 4a806e0831c..e303c288552 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -1311,7 +1311,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00 Warnings: -Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where ((coalesce(1,NULL),3) in ((1,3),(2,2))) +Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where 1 SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2 WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2)); f1 f2 f3 f1 f2 diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result index 6a543f920e4..88f2fd7c630 100644 --- a/mysql-test/r/join_outer_jcl6.result +++ b/mysql-test/r/join_outer_jcl6.result @@ -1322,7 +1322,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00 Warnings: -Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where ((coalesce(1,NULL),3) in ((1,3),(2,2))) +Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where 1 SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2 WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2)); f1 f2 f3 f1 f2 diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result index 58b976413de..f75eed41d9f 100644 --- a/mysql-test/r/lowercase_table2.result +++ b/mysql-test/r/lowercase_table2.result @@ -274,7 +274,7 @@ Database Table In_use Name_locked test t_bug44738_uppercase 0 0 # So attempt to create table with the same name should fail. create table t_bug44738_UPPERCASE (i int); -ERROR HY000: Can't find file: './test/t_bug44738_uppercase.MYI' (errno: 2 "No such file or directory") +ERROR 42S01: Table 't_bug44738_uppercase' already exists # And should succeed after FLUSH TABLES. flush tables; create table t_bug44738_UPPERCASE (i int); diff --git a/mysql-test/r/lowercase_view.result b/mysql-test/r/lowercase_view.result index 33c87ec101c..f43c39c4fc1 100644 --- a/mysql-test/r/lowercase_view.result +++ b/mysql-test/r/lowercase_view.result @@ -20,13 +20,13 @@ ERROR HY000: The definition of table 'v1Aa' prevents operation UPDATE on table ' update v2Aa set col1 = (select max(col1) from t1Aa); ERROR HY000: The definition of table 'v2Aa' prevents operation UPDATE on table 'v2Aa'. update v2aA set col1 = (select max(col1) from v2Aa); -ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause +ERROR HY000: Table 'v2aA' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from v1aA) where v2aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 'v2aA'. update t1aA,t2Aa set t1Aa.col1 = (select max(col1) from v1Aa) where t1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1Aa' prevents operation UPDATE on table 't1aA'. update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from v1aA) where v1Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 'v1aA' for update in FROM clause +ERROR HY000: Table 'v1aA' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2Aa,v2Aa set v2aA.col1 = (select max(col1) from v1aA) where v2Aa.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 't2Aa'. update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from v1Aa) where t1Aa.col1 = t2aA.col1; @@ -36,17 +36,17 @@ ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table ' update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from t1aA) where v2aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 'v2aA'. update t1Aa,t2Aa set t1aA.col1 = (select max(col1) from t1Aa) where t1aA.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't1Aa' for update in FROM clause +ERROR HY000: Table 't1Aa' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from t1Aa) where v1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 'v1aA'. update t2Aa,v2Aa set v2aA.col1 = (select max(col1) from t1aA) where v2Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't2Aa' for update in FROM clause +ERROR HY000: Table 't2Aa' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from t1Aa) where t1aA.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't2Aa' for update in FROM clause +ERROR HY000: Table 't2Aa' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2Aa,v1Aa set v1aA.col1 = (select max(col1) from t1Aa) where v1Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't2Aa' for update in FROM clause +ERROR HY000: Table 't2Aa' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from v2aA) where v2Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause +ERROR HY000: Table 'v2aA' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1aA,t2Aa set t1Aa.col1 = (select max(col1) from v2aA) where t1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 't1aA'. update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from v2Aa) where v1aA.col1 = t2aA.col1; @@ -64,27 +64,27 @@ ERROR HY000: The definition of table 'v3aA' prevents operation UPDATE on table ' update v3aA set v3Aa.col1 = (select max(col1) from v2aA); ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 'v3aA'. update v3aA set v3Aa.col1 = (select max(col1) from v3aA); -ERROR HY000: You can't specify target table 'v3aA' for update in FROM clause +ERROR HY000: Table 'v3aA' is specified twice, both as a target for 'UPDATE' and as a separate source for data delete from v2Aa where col1 = (select max(col1) from v1Aa); ERROR HY000: The definition of table 'v1Aa' prevents operation DELETE on table 'v2Aa'. delete from v2aA where col1 = (select max(col1) from t1Aa); ERROR HY000: The definition of table 'v2aA' prevents operation DELETE on table 'v2aA'. delete from v2Aa where col1 = (select max(col1) from v2aA); -ERROR HY000: You can't specify target table 'v2Aa' for update in FROM clause +ERROR HY000: Table 'v2Aa' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v2Aa from v2aA,t2Aa where (select max(col1) from v1aA) > 0 and v2Aa.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1aA' prevents operation DELETE on table 'v2aA'. delete t1aA from t1Aa,t2Aa where (select max(col1) from v1Aa) > 0 and t1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1Aa' prevents operation DELETE on table 't1Aa'. delete v1aA from v1Aa,t2Aa where (select max(col1) from v1aA) > 0 and v1Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 'v1Aa' for update in FROM clause +ERROR HY000: Table 'v1Aa' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v2aA from v2Aa,t2Aa where (select max(col1) from t1Aa) > 0 and v2aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v2Aa' prevents operation DELETE on table 'v2Aa'. delete t1aA from t1Aa,t2Aa where (select max(col1) from t1aA) > 0 and t1Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't1Aa' for update in FROM clause +ERROR HY000: Table 't1Aa' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v1aA from v1Aa,t2Aa where (select max(col1) from t1aA) > 0 and v1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1Aa' prevents operation DELETE on table 'v1Aa'. delete v2Aa from v2aA,t2Aa where (select max(col1) from v2Aa) > 0 and v2aA.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause +ERROR HY000: Table 'v2aA' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t1Aa from t1aA,t2Aa where (select max(col1) from v2Aa) > 0 and t1Aa.col1 = t2aA.col1; ERROR HY000: The definition of table 'v2Aa' prevents operation DELETE on table 't1aA'. delete v1Aa from v1aA,t2Aa where (select max(col1) from v2aA) > 0 and v1Aa.col1 = t2aA.col1; @@ -98,15 +98,15 @@ ERROR HY000: The definition of table 'v1aA' prevents operation INSERT on table ' insert into v2Aa values ((select max(col1) from t1Aa)); ERROR HY000: The definition of table 'v2Aa' prevents operation INSERT on table 'v2Aa'. insert into t1aA values ((select max(col1) from t1Aa)); -ERROR HY000: You can't specify target table 't1aA' for update in FROM clause +ERROR HY000: Table 't1aA' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into v2aA values ((select max(col1) from t1aA)); ERROR HY000: The definition of table 'v2aA' prevents operation INSERT on table 'v2aA'. insert into v2Aa values ((select max(col1) from v2aA)); -ERROR HY000: You can't specify target table 'v2Aa' for update in FROM clause +ERROR HY000: Table 'v2Aa' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into t1Aa values ((select max(col1) from v2Aa)); ERROR HY000: The definition of table 'v2Aa' prevents operation INSERT on table 't1Aa'. insert into v2aA values ((select max(col1) from v2Aa)); -ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause +ERROR HY000: Table 'v2aA' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into v3Aa (col1) values ((select max(col1) from v1Aa)); ERROR HY000: The definition of table 'v1Aa' prevents operation INSERT on table 'v3Aa'. insert into v3aA (col1) values ((select max(col1) from t1aA)); diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 0feb1cdce98..89aaf48219e 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -3657,85 +3657,85 @@ insert into tmp (b) values (1); insert into t1 (a) values (1); insert into t3 (b) values (1); insert into m1 (a) values ((select max(a) from m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t3, m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t3, m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t3, t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t3, t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from tmp, m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from tmp, m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from tmp, t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from tmp, t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from v1)); ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'm1'. insert into m1 (a) values ((select max(a) from tmp, v1)); ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'm1'. update m1 set a = ((select max(a) from m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t3, m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t3, m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t3, t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t3, t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from tmp, m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from tmp, m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from tmp, t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from tmp, t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from v1)); ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'm1'. update m1 set a = ((select max(a) from tmp, v1)); ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'm1'. delete from m1 where a = (select max(a) from m1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from m2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t3, m1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t3, m2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t3, t1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t3, t2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from tmp, m1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from tmp, m2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from tmp, t1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from tmp, t2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from v1); ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'm1'. delete from m1 where a = (select max(a) from tmp, v1); diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index f49998da5f4..ff0aa828636 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -439,9 +439,9 @@ drop table t1, t2, t3; create table t1 (col1 int); create table t2 (col1 int); update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data drop table t1,t2; create table t1 ( aclid bigint not null primary key, @@ -457,7 +457,7 @@ drop table t1, t2; create table t1(a int); create table t2(a int); delete from t1,t2 using t1,t2 where t1.a=(select a from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data drop table t1, t2; create table t1 ( c char(8) not null ) engine=innodb; insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); diff --git a/mysql-test/r/myisam_optimize.result b/mysql-test/r/myisam_optimize.result index 5c9dee9a9ca..ae0c5b59d06 100644 --- a/mysql-test/r/myisam_optimize.result +++ b/mysql-test/r/myisam_optimize.result @@ -21,3 +21,4 @@ a left(b,10) 3 CCCCCCCCCC 4 CCCCCCCCCC drop table t1; +set debug_sync='reset'; diff --git a/mysql-test/r/mysql_tzinfo_to_sql_symlink.result b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result index 1aaaa38895d..484f71a4c2e 100644 --- a/mysql-test/r/mysql_tzinfo_to_sql_symlink.result +++ b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result @@ -2,6 +2,7 @@ # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above # SET SESSION wsrep_replicate_myisam=ON; +# Verbose run TRUNCATE TABLE time_zone; TRUNCATE TABLE time_zone_name; TRUNCATE TABLE time_zone_transition; @@ -12,12 +13,51 @@ INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id); INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES (@time_zone_id, 0, 0, 0, 'GMT') ; +Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/garbage' as time zone. Skipping it. +Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/ignored.tab' as time zone. Skipping it. INSERT INTO time_zone (Use_leap_seconds) VALUES ('N'); SET @time_zone_id= LAST_INSERT_ID(); INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('posix/GMT', @time_zone_id); INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES (@time_zone_id, 0, 0, 0, 'GMT') ; +Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it. +Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/ignored.tab' as time zone. Skipping it. Warning: Skipping directory 'MYSQLTEST_VARDIR/zoneinfo/posix/posix': to avoid infinite symlink recursion. ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; +# Silent run +TRUNCATE TABLE time_zone; +TRUNCATE TABLE time_zone_name; +TRUNCATE TABLE time_zone_transition; +TRUNCATE TABLE time_zone_transition_type; +INSERT INTO time_zone (Use_leap_seconds) VALUES ('N'); +SET @time_zone_id= LAST_INSERT_ID(); +INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id); +INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES + (@time_zone_id, 0, 0, 0, 'GMT') +; +Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/garbage' as time zone. Skipping it. +INSERT INTO time_zone (Use_leap_seconds) VALUES ('N'); +SET @time_zone_id= LAST_INSERT_ID(); +INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('posix/GMT', @time_zone_id); +INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES + (@time_zone_id, 0, 0, 0, 'GMT') +; +Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it. +ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; +ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; +# +# Testing with explicit timezonefile +# +INSERT INTO time_zone (Use_leap_seconds) VALUES ('N'); +SET @time_zone_id= LAST_INSERT_ID(); +INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('XXX', @time_zone_id); +INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES + (@time_zone_id, 0, 0, 0, 'GMT') +; +# +# Testing --leap +# +TRUNCATE TABLE time_zone_leap_second; +ALTER TABLE time_zone_leap_second ORDER BY Transition_time; diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index 06efaf65f5e..cf4f54658b4 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -126,6 +126,9 @@ test Phase 3/3: Running 'mysql_fix_privilege_tables'... OK DROP USER mysqltest1@'%'; +Version check failed. Got the following error when calling the 'mysql' command line client +ERROR 1045 (28000): Access denied for user 'mysqltest1'@'localhost' (using password: YES) +FATAL ERROR: Upgrade failed Run mysql_upgrade with a non existing server socket mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect FATAL ERROR: Upgrade failed diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index 6999c49ff9a..58271e8d73a 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -468,8 +468,12 @@ The following options may be given as the first argument: --net-write-timeout=# Number of seconds to wait for a block to be written to a connection before aborting the write - --old Use compatible behavior + --old Use compatible behavior from previous MariaDB version. + See also --old-mode --old-alter-table Use old, non-optimized alter table + --old-mode=name Used to emulate old behavior from earlier MariaDB or + MySQL versions. Syntax: old_mode=mode[,mode[,mode...]]. + See the manual for the complete list of valid old modes --old-passwords Use old password encryption method (needed for 4.0 and older clients) --old-style-user-limits @@ -856,13 +860,30 @@ The following options may be given as the first argument: --skip-slave-start If set, slave is not autostarted. --slave-compressed-protocol Use compression on master/slave protocol + --slave-ddl-exec-mode=name + Modes for how replication events should be executed. + Legal values are STRICT and IDEMPOTENT (default). In + IDEMPOTENT mode, replication will not stop for DDL + operations that are idempotent. This means that CREATE + TABLE is treated CREATE TABLE OR REPLACE and DROP TABLE + is threated as DROP TABLE IF EXISTS. + --slave-domain-parallel-threads=# + Maximum number of parallel threads to use on slave for + events in a single replication domain. When using + multiple domains, this can be used to limit a single + domain from grabbing all threads and thus stalling other + domains. The default of 0 means to allow a domain to grab + as many threads as it wants, up to the value of + slave_parallel_threads. --slave-exec-mode=name Modes for how replication events should be executed. Legal values are STRICT (default) and IDEMPOTENT. In IDEMPOTENT mode, replication will not stop for operations - that are idempotent. In STRICT mode, replication will - stop on any unexpected difference between the master and - the slave + that are idempotent. For example, in row based + replication attempts to delete rows that doesn't exist + will be ignored.In STRICT mode, replication will stop on + any unexpected difference between the master and the + slave --slave-load-tmpdir=name The location where the slave should put its temporary files when replicating a LOAD DATA INFILE command @@ -1093,7 +1114,7 @@ auto-increment-increment 1 auto-increment-offset 1 autocommit TRUE automatic-sp-privileges TRUE -back-log 50 +back-log 150 big-tables FALSE bind-address (No default value) binlog-annotate-row-events FALSE @@ -1238,12 +1259,13 @@ net-retry-count 10 net-write-timeout 60 old FALSE old-alter-table FALSE +old-mode old-passwords FALSE old-style-user-limits FALSE optimizer-prune-level 1 optimizer-search-depth 62 optimizer-selectivity-sampling-limit 100 -optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on +optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on optimizer-use-condition-selectivity 1 performance-schema TRUE performance-schema-accounts-size 10 @@ -1294,7 +1316,8 @@ port 3306 port-open-timeout 0 preload-buffer-size 32768 profiling-history-size 15 -progress-report-time 56 +progress-report-time 5 +protocol-version 10 query-alloc-block-size 8192 query-cache-limit 1048576 query-cache-min-res-unit 4096 @@ -1333,6 +1356,8 @@ skip-networking FALSE skip-show-database FALSE skip-slave-start FALSE slave-compressed-protocol FALSE +slave-ddl-exec-mode IDEMPOTENT +slave-domain-parallel-threads 0 slave-exec-mode STRICT slave-max-allowed-packet 1073741824 slave-net-timeout 3600 diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index a473279ce40..c67a7a00425 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -5265,6 +5265,20 @@ slow_log CREATE TABLE `slow_log` ( SET @@global.log_output= @old_log_output_state; SET @@global.slow_query_log= @old_slow_query_log_state; SET @@global.general_log= @old_general_log_state; +# MDEV-5481 mysqldump fails to dump geometry types properly +create table t1 (g GEOMETRY) CHARSET koi8r; +create table t2 (g GEOMETRY) CHARSET koi8r; +insert into t1 values (point(1,1)), (point(2,2)); +################################################## +\0\0\0\0\0\0\0\0\0\0\0\0\0ð?\0\0\0\0\0\0ð? +\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ +################################################## +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET koi8r; +select astext(g) from t2; +astext(g) +POINT(1 1) +POINT(2 2) +drop table t1, t2; # # End of 5.1 tests # diff --git a/mysql-test/r/not_embedded_server.result b/mysql-test/r/not_embedded_server.result index eccf6151d33..33c8bfdb5d6 100644 --- a/mysql-test/r/not_embedded_server.result +++ b/mysql-test/r/not_embedded_server.result @@ -6,6 +6,7 @@ slave_skip_errors OFF # Bug#58026: massive recursion and crash in regular expression handling # SELECT '1' RLIKE RPAD('1', 10000, '('); +Got one of the listed errors # # WL#4284: Transactional DDL locking # diff --git a/mysql-test/r/old-mode.result b/mysql-test/r/old-mode.result index eec08d4d5c8..b7e1ee26391 100644 --- a/mysql-test/r/old-mode.result +++ b/mysql-test/r/old-mode.result @@ -19,3 +19,84 @@ drop table t1,t2; SHOW PROCESSLIST; Id User Host db Command Time State Info <Id> root <Host> test Query <Time> <State> SHOW PROCESSLIST +# +# MDEV-5372 Make "CAST(time_expr AS DATETIME)" compatible with the SQL Standard) +# +set @@old_mode=zero_date_time_cast; +SELECT CAST(TIME'-10:30:30' AS DATETIME); +CAST(TIME'-10:30:30' AS DATETIME) +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '-10:30:30' +SELECT CAST(TIME'10:20:30' AS DATETIME); +CAST(TIME'10:20:30' AS DATETIME) +0000-00-00 10:20:30 +SELECT CAST(TIME'830:20:30' AS DATETIME); +CAST(TIME'830:20:30' AS DATETIME) +0000-01-03 14:20:30 +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 VALUES (TIME'-10:20:30'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES (TIME'10:20:30'); +INSERT INTO t1 VALUES (TIME'830:20:30'); +SELECT * FROM t1; +a +0000-00-00 00:00:00 +0000-00-00 10:20:30 +0000-01-03 14:20:30 +DROP TABLE t1; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES (TIME'-10:20:30'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES (TIME'10:20:30'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES (TIME'830:20:30'); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +SELECT * FROM t1; +a +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +DROP TABLE t1; +CREATE TABLE t1 (a TIME); +INSERT INTO t1 VALUES (TIME'-10:20:30'); +INSERT INTO t1 VALUES (TIME'10:20:30'); +INSERT INTO t1 VALUES (TIME'830:20:30'); +SELECT a, CAST(a AS DATETIME), TO_DAYS(a) FROM t1; +a CAST(a AS DATETIME) TO_DAYS(a) +-10:20:30 NULL NULL +10:20:30 0000-00-00 10:20:30 NULL +830:20:30 0000-01-03 14:20:30 NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '-10:20:30' +Warning 1264 Out of range value for column 'a' at row 1 +Warning 1264 Out of range value for column 'a' at row 2 +Warning 1264 Out of range value for column 'a' at row 3 +DROP TABLE t1; +SELECT TO_DAYS(TIME'-10:20:30'); +TO_DAYS(TIME'-10:20:30') +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '-10:20:30' +SELECT TO_DAYS(TIME'10:20:30'); +TO_DAYS(TIME'10:20:30') +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '10:20:30' +SELECT TO_DAYS(TIME'830:20:30'); +TO_DAYS(TIME'830:20:30') +3 +CREATE TABLE t1 (a DATETIME, b TIME); +INSERT INTO t1 VALUES (NULL, '00:20:12'); +INSERT INTO t1 VALUES (NULL, '-00:20:12'); +SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDDATE(IFNULL(a,b),0),1) +0000-00-00 00:20:12 +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '-00:20:12' +DROP TABLE t1; diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index a8e610a561a..a8e5cbb295c 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -357,6 +357,12 @@ id select_type table type possible_keys key key_len ref rows Extra explain select * from t1 where a = 1 order by b desc; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 4 const 5 Using where; Using index +explain select * from t1 where a = 2 and b > 0 order by a desc,b desc,b,a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index +explain select * from t1 where a = 2 and b < 2 order by a desc,a,b desc,a,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 9 NULL 2 Using where; Using index select * from t1 where a = 1 order by b desc; a b c 1 3 b @@ -2905,4 +2911,28 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL PRIMARY 4 NULL 8 Using index 1 SIMPLE t2 ref i_a i_a 5 test.t1.a 2 Using index DROP TABLE t1,t2; +# +# MDEV-4974 memory leak in 5.5.32-MariaDB-1~wheezy-log +# +set sort_buffer_size=default; +set max_sort_length=default; +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (b int, +col1 varchar(255), +col2 varchar(255) +) character set utf8; +insert into t2 select +A.a+10*B.a, +concat('wow-wow-col1-value-', A.a+10*B.a+100*C.a), +concat('wow-wow-col2-value-', A.a+10*B.a+100*C.a) +from +t1 A, t1 B, t1 C where C.a < 8; +create table t3 as +select distinct A.col1 as XX, B.col1 as YY +from +t2 A, t2 B +where A.b = B.b +order by A.col2, B.col2 limit 10, 1000000; +drop table t1,t2,t3; End of 5.5 tests diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index e57715d1eb6..5ea037df759 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -2534,6 +2534,73 @@ i 3 4 DROP TABLE t1; +# +# MDEV-5177: ha_partition and innodb index intersection produce fewer rows (MySQL Bug#70703) +# +create table t1 ( +a int not null, +b int not null, +pk int not null, +primary key (pk), +key(a), +key(b) +) partition by hash(pk) partitions 10; +insert into t1 values (1,2,4); +insert into t1 values (1,0,17); +insert into t1 values (1,2,25); +insert into t1 values (10,20,122); +insert into t1 values (10,20,123); +create table t2 (a int); +insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +insert into t1 select 1,2, 200 + A.a + 10*B.a + 100*C.a from t2 A, t2 B, t2 C; +insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a, +10+A.a + 10*B.a + 100*C.a + 1000*D.a, +2000 + A.a + 10*B.a + 100*C.a + 1000*D.a +from t2 A, t2 B, t2 C ,t2 D; +explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref PRIMARY,a,b b 4 const 982 Using where +create temporary table t3 as +select * from t1 where a=1 and b=2 and pk between 1 and 999 ; +select count(*) from t3; +count(*) +802 +drop table t3; +create temporary table t3 as +select * from t1 ignore index(a,b) where a=1 and b=2 and pk between 1 and 999 ; +select count(*) from t3; +count(*) +802 +drop table t3; +drop table t1,t2; +# +# MDEV-5555: Incorrect index_merge on BTREE indices +# +CREATE TABLE t1 ( +id bigint(20) unsigned NOT NULL, +id2 bigint(20) unsigned NOT NULL, +dob date DEFAULT NULL, +address char(100) DEFAULT NULL, +city char(35) DEFAULT NULL, +hours_worked_per_week smallint(5) unsigned DEFAULT NULL, +weeks_worked_last_year tinyint(3) unsigned DEFAULT NULL, +KEY dob (dob), +KEY address (address), +KEY city (city), +KEY hours_worked_per_week (hours_worked_per_week), +KEY weeks_worked_last_year (weeks_worked_last_year) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +PARTITION BY KEY (id) PARTITIONS 5; +# Insert some rows +select * from t1 where hours_worked_per_week = 40 and weeks_worked_last_year = 52 and dob < '1949-11-21'; +id id2 dob address city hours_worked_per_week weeks_worked_last_year +16 16 1949-11-07 address16 city16 40 52 +50 50 1923-09-08 address50 city50 40 52 +select * from t1 IGNORE INDEX(dob, weeks_worked_last_year, hours_worked_per_week) where hours_worked_per_week = 40 and weeks_worked_last_year = 52 and dob < '1949-11-21'; +id id2 dob address city hours_worked_per_week weeks_worked_last_year +16 16 1949-11-07 address16 city16 40 52 +50 50 1923-09-08 address50 city50 40 52 +drop table t1; CREATE TABLE t1 ( d DATE NOT NULL) PARTITION BY RANGE( YEAR(d) ) ( PARTITION p0 VALUES LESS THAN (1960), diff --git a/mysql-test/r/partition_debug_sync.result b/mysql-test/r/partition_debug_sync.result index c30651c1c0d..7abe0163a98 100644 --- a/mysql-test/r/partition_debug_sync.result +++ b/mysql-test/r/partition_debug_sync.result @@ -84,4 +84,5 @@ SELECT 1; # Con1 UNLOCK TABLES; # Default +SET DEBUG_SYNC = 'RESET'; DROP TABLE t1, t2; diff --git a/mysql-test/r/partition_exchange.result b/mysql-test/r/partition_exchange.result index 36499004869..fec08e99c72 100644 --- a/mysql-test/r/partition_exchange.result +++ b/mysql-test/r/partition_exchange.result @@ -1088,7 +1088,7 @@ ALTER TABLE t PARTITION BY RANGE (UNIX_TIMESTAMP(event_time) DIV 1) (PARTITION p0 VALUES LESS THAN (123456789), PARTITION pMAX VALUES LESS THAN MAXVALUE); ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE general_log; -ERROR HY000: Incorrect usage of PARTITION and log table +ERROR HY000: You cannot 'ALTER PARTITION' a log table if logging is enabled ALTER TABLE general_log ENGINE = CSV; SET @@global.general_log = @old_general_log_state; DROP TABLE t; diff --git a/mysql-test/r/partition_order.result b/mysql-test/r/partition_order.result index 78ff7cd3121..06c1b63a382 100644 --- a/mysql-test/r/partition_order.result +++ b/mysql-test/r/partition_order.result @@ -752,8 +752,8 @@ select * from t1 force index (b) where b < 10 ORDER BY b DESC; a b 6 6 4 5 -2 4 30 4 +2 4 3 3 35 2 7 1 diff --git a/mysql-test/r/perror.result b/mysql-test/r/perror.result index 74842b77ba1..30a56840b1b 100644 --- a/mysql-test/r/perror.result +++ b/mysql-test/r/perror.result @@ -1,6 +1,6 @@ Illegal error code: 10000 MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d -MySQL error code 1076 (ER_READY): %s: ready for connections. -Version: '%s' socket: '%s' port: %d +MySQL error code 1408 (ER_STARTUP): %s: ready for connections. +Version: '%s' socket: '%s' port: %d %s MySQL error code 1459 (ER_TABLE_NEEDS_UPGRADE): Table upgrade required. Please do "REPAIR TABLE `%-.32s`" or dump/reload to fix it! MySQL error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %lu) diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result index d304f094987..54693eaee56 100644 --- a/mysql-test/r/plugin.result +++ b/mysql-test/r/plugin.result @@ -127,7 +127,7 @@ drop table t1; SET @OLD_SQL_MODE=@@SQL_MODE; SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS'; #illegal value fixed -CREATE TABLE t1 (a int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS; +CREATE TABLE t1 (a int, b int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS; Warnings: Warning 1912 Incorrect value '10000000000000000000' for option 'ULL' Warning 1912 Incorrect value 'ttt' for option 'one_or_two' @@ -135,7 +135,8 @@ Warning 1912 Incorrect value 'SSS' for option 'YESNO' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000000000000000000 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5' #alter table alter table t1 ULL=10000000; @@ -144,7 +145,8 @@ Note 1105 EXAMPLE DEBUG: ULL 4294967290 -> 10000000 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5' `ULL`=10000000 alter table t1 change a a int complex='c,c,c'; Warnings: @@ -152,15 +154,15 @@ Note 1105 EXAMPLE DEBUG: Field `a` COMPLEX '(null)' -> 'c,c,c' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL `complex`='c,c,c' + `a` int(11) DEFAULT NULL `complex`='c,c,c', + `b` int(11) DEFAULT NULL ) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5' `ULL`=10000000 alter table t1 one_or_two=two; -Warnings: -Note 1105 EXAMPLE DEBUG: Field `a` COMPLEX 'c,c,c' -> 'c,c,c' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL `complex`='c,c,c' + `a` int(11) DEFAULT NULL `complex`='c,c,c', + `b` int(11) DEFAULT NULL ) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `YESNO`=SSS `VAROPT`='5' `ULL`=10000000 `one_or_two`=two drop table t1; #illegal value error @@ -204,8 +206,6 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `varopt`=15 alter table t1 varopt=default; -Warnings: -Note 1105 EXAMPLE DEBUG: Field `a` COMPLEX '(null)' -> '(null)' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result index 3a55055acce..0d3948dd313 100644 --- a/mysql-test/r/plugin_auth.result +++ b/mysql-test/r/plugin_auth.result @@ -300,7 +300,6 @@ FLUSH PRIVILEGES; mysqld is alive # Executing 'mysqldump' # Executing 'mysql_upgrade' -The --upgrade-system-tables option was used, databases won't be touched. # # Bug #59657: Move the client authentication_pam plugin into the # server repository diff --git a/mysql-test/r/plugin_vars.result b/mysql-test/r/plugin_vars.result new file mode 100644 index 00000000000..869e0cf9a2a --- /dev/null +++ b/mysql-test/r/plugin_vars.result @@ -0,0 +1,22 @@ +# +# MDEV-5345 - Deadlock between mysql_change_user(), SHOW VARIABLES and +# INSTALL PLUGIN +# +CREATE PROCEDURE p_install(x INT) +BEGIN +DECLARE CONTINUE HANDLER FOR 1126 BEGIN END; +WHILE x DO +SET x= x - 1; +INSTALL PLUGIN no_such_plugin SONAME 'no_such_object'; +END WHILE; +END| +CREATE PROCEDURE p_show_vars(x INT) +WHILE x DO +SET x= x - 1; +SHOW VARIABLES; +END WHILE| +CALL p_install(100); +CALL p_show_vars(100); +USE test; +DROP PROCEDURE p_install; +DROP PROCEDURE p_show_vars; diff --git a/mysql-test/r/processlist.result b/mysql-test/r/processlist.result index fc03f920533..127fa96b84b 100644 --- a/mysql-test/r/processlist.result +++ b/mysql-test/r/processlist.result @@ -13,3 +13,4 @@ sleep(5) select command, time < 5 from information_schema.processlist where id != connection_id(); command time < 5 Sleep 1 +set debug_sync='reset'; diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index bfec91192a9..ec680b112a3 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -4019,4 +4019,36 @@ c1 NULL 2 DROP TABLE t1,t2; +# +# MDEV-5369: Wrong result (0 instead of NULL) on 2nd execution of +# PS with LEFT JOIN, TEMPTABLE view +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0),(8); +CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM; +CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; +SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk; +SUM(pk) +NULL +PREPARE stmt FROM "SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk"; +EXECUTE stmt; +SUM(pk) +NULL +EXECUTE stmt; +SUM(pk) +NULL +DEALLOCATE PREPARE stmt; +DROP VIEW v2; +DROP TABLE t1, t2; +# End of 5.3 tests +# +# MDEV-5505: Assertion `! is_set()' fails on PREPARE SELECT +# with out of range in GROUP BY +# +CREATE TABLE t1 (a INT); +PREPARE stmt FROM "SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1"; +ERROR 22003: BIGINT UNSIGNED value is out of range in '(18446744073709551615 + 1)' +SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1; +ERROR 22003: BIGINT UNSIGNED value is out of range in '(18446744073709551615 + 1)' +drop table t1; # End of 5.3 tests diff --git a/mysql-test/r/ps_ddl.result b/mysql-test/r/ps_ddl.result index 8284e974574..dec0d12c455 100644 --- a/mysql-test/r/ps_ddl.result +++ b/mysql-test/r/ps_ddl.result @@ -1930,7 +1930,7 @@ SUCCESS execute stmt; ERROR 42S01: Table 't2' already exists -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); SUCCESS execute stmt; @@ -1946,7 +1946,7 @@ SUCCESS execute stmt; ERROR 42S01: Table 't2' already exists -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); SUCCESS drop temporary table t2; @@ -1964,7 +1964,7 @@ drop table t2; create view t2 as select 1; execute stmt; Got one of the listed errors -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); SUCCESS execute stmt; diff --git a/mysql-test/r/quick_select_4161.result b/mysql-test/r/quick_select_4161.result index 862be6055ce..18ac4362a84 100644 --- a/mysql-test/r/quick_select_4161.result +++ b/mysql-test/r/quick_select_4161.result @@ -29,3 +29,4 @@ kill %connection%; set debug_sync='now signal done'; Got one of the listed errors drop table t1; +set debug_sync='reset'; diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index e169dcb40b0..c0c67bd3e33 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -2046,3 +2046,34 @@ f1 f2 f3 f4 10 0 0 0 DROP TABLE t1; DROP VIEW v3; +# +# MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2(a int); +insert into t2 select A.a + B.a* 10 + C.a * 100 from t1 A, t1 B, t1 C; +alter table t2 add key(a); +# Should have "range checked for each table" for second table: +explain select * from t1, t2 where t2.a < t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL a NULL NULL NULL 1000 Range checked for each record (index map: 0x1) +# Should have "range checked for each table" for second table: +explain select * from t1, t2 where t1.a > t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL a NULL NULL NULL 1000 Range checked for each record (index map: 0x1) +create table t3 (a int primary key, b int); +insert into t3 select a,a from t1; +# The second table should use 'range': +explain select * from t3, t2 where t2.a < t3.b and t3.a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +1 SIMPLE t2 range a a 5 NULL 1 Using where; Using index +# The second table should use 'range': +explain select * from t3, t2 where t3.b > t2.a and t3.a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +1 SIMPLE t2 range a a 5 NULL 1 Using where; Using index +drop table t1,t2,t3; diff --git a/mysql-test/r/range_mrr_icp.result b/mysql-test/r/range_mrr_icp.result index 0d6bfc2467b..0122fb15193 100644 --- a/mysql-test/r/range_mrr_icp.result +++ b/mysql-test/r/range_mrr_icp.result @@ -2048,4 +2048,35 @@ f1 f2 f3 f4 10 0 0 0 DROP TABLE t1; DROP VIEW v3; +# +# MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2(a int); +insert into t2 select A.a + B.a* 10 + C.a * 100 from t1 A, t1 B, t1 C; +alter table t2 add key(a); +# Should have "range checked for each table" for second table: +explain select * from t1, t2 where t2.a < t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL a NULL NULL NULL 1000 Range checked for each record (index map: 0x1) +# Should have "range checked for each table" for second table: +explain select * from t1, t2 where t1.a > t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL a NULL NULL NULL 1000 Range checked for each record (index map: 0x1) +create table t3 (a int primary key, b int); +insert into t3 select a,a from t1; +# The second table should use 'range': +explain select * from t3, t2 where t2.a < t3.b and t3.a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +1 SIMPLE t2 range a a 5 NULL 1 Using where; Using index +# The second table should use 'range': +explain select * from t3, t2 where t3.b > t2.a and t3.a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +1 SIMPLE t2 range a a 5 NULL 1 Using where; Using index +drop table t1,t2,t3; set optimizer_switch=@mrr_icp_extra_tmp; diff --git a/mysql-test/r/range_vs_index_merge.result b/mysql-test/r/range_vs_index_merge.result index 424b1009a97..1b12a9f5512 100644 --- a/mysql-test/r/range_vs_index_merge.result +++ b/mysql-test/r/range_vs_index_merge.result @@ -797,6 +797,8 @@ EXPLAIN SELECT * FROM City WHERE Name LIKE 'Pa%'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE City range Name Name 35 NULL 41 Using index condition +set @tmp_range_vs_index_merge=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; EXPLAIN SELECT * FROM City WHERE ((Population > 101000 AND Population < 102000) OR @@ -985,6 +987,7 @@ ID Name Country Population 3798 Phoenix USA 1321045 DROP INDEX Population ON City; DROP INDEX Name ON City; +set optimizer_switch=@tmp_range_vs_index_merge; EXPLAIN SELECT * FROM City WHERE Country='USA' AND Population BETWEEN 101000 AND 102000 OR diff --git a/mysql-test/r/range_vs_index_merge_innodb.result b/mysql-test/r/range_vs_index_merge_innodb.result index 67e341192da..8428936d25f 100644 --- a/mysql-test/r/range_vs_index_merge_innodb.result +++ b/mysql-test/r/range_vs_index_merge_innodb.result @@ -65,7 +65,7 @@ Country IN ('CAN', 'ARG') AND ID < 3800 OR Country < 'U' AND Name LIKE 'Zhu%' OR ID BETWEEN 3800 AND 3810; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,3,4 NULL 125 Using sort_union(Name,Country,PRIMARY); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,7,4 NULL 123 Using sort_union(Name,Country,PRIMARY); Using where EXPLAIN SELECT * FROM City WHERE (Population > 101000 AND Population < 115000); @@ -362,7 +362,7 @@ WHERE ((ID < 800) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG'))) OR ((ID BETWEEN 900 AND 1500) AND (Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000))); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,3,4 NULL 681 Using sort_union(Name,Country,PRIMARY); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 39,3,4 NULL 680 Using sort_union(Name,Country,PRIMARY); Using where EXPLAIN SELECT * FROM City WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG'))) @@ -798,6 +798,8 @@ EXPLAIN SELECT * FROM City WHERE Name LIKE 'Pa%'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE City range Name Name 35 NULL 71 Using index condition +set @tmp_range_vs_index_merge=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; EXPLAIN SELECT * FROM City WHERE ((Population > 101000 AND Population < 102000) OR @@ -986,6 +988,7 @@ ID Name Country Population 3798 Phoenix USA 1321045 DROP INDEX Population ON City; DROP INDEX Name ON City; +set optimizer_switch=@tmp_range_vs_index_merge; EXPLAIN SELECT * FROM City WHERE Country='USA' AND Population BETWEEN 101000 AND 102000 OR diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result index 241c32b4b40..c5faa27085e 100644 --- a/mysql-test/r/repair.result +++ b/mysql-test/r/repair.result @@ -130,26 +130,25 @@ test.t1 check error Table upgrade required. Please do "REPAIR TABLE `t1`" or dum # REPAIR old table USE_FRM should fail REPAIR TABLE t1 USE_FRM; Table Op Msg_type Msg_text -t1 repair error Failed repairing incompatible .frm file +test.t1 repair warning Number of rows changed from 0 to 1 +test.t1 repair status OK # Run REPAIR TABLE to upgrade .frm file REPAIR TABLE t1; Table Op Msg_type Msg_text test.t1 repair status OK SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MyISAM 10 Fixed 2 7 14 1970324836974591 1024 0 NULL # # NULL latin1_swedish_ci NULL +t1 MyISAM 10 Fixed 1 7 7 1970324836974591 1024 0 NULL # # NULL latin1_swedish_ci NULL SELECT * FROM t1; id 1 -2 REPAIR TABLE t1 USE_FRM; Table Op Msg_type Msg_text -test.t1 repair warning Number of rows changed from 0 to 2 +test.t1 repair warning Number of rows changed from 0 to 1 test.t1 repair status OK SELECT * FROM t1; id 1 -2 DROP TABLE t1; DROP TABLE IF EXISTS tt1; CREATE TEMPORARY TABLE tt1 (c1 INT); @@ -183,3 +182,28 @@ test.t1 repair status OK test.t2 repair status OK set @@autocommit= default; drop tables t1, t2; +# +# Check that we have decent error messages when using crashed +# .frm file from MySQL 3.23 +# +# Test with a saved table from 3.23 +select count(*) from t1; +ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM +check table t1; +Table Op Msg_type Msg_text +test.t1 check Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM +test.t1 check error Corrupt +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM +test.t1 repair error Corrupt +repair table t1 use_frm; +Table Op Msg_type Msg_text +test.t1 repair status OK +select count(*) from t1; +count(*) +0 +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; diff --git a/mysql-test/r/repair_symlink-5543.result b/mysql-test/r/repair_symlink-5543.result new file mode 100644 index 00000000000..051c9ca3472 --- /dev/null +++ b/mysql-test/r/repair_symlink-5543.result @@ -0,0 +1,14 @@ +create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR'; +insert t1 values (1); +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair error Can't create new tempfile: 'MYSQL_TMP_DIR/t1.TMD' +test.t1 repair status Operation failed +drop table t1; +create table t2 (a int) engine=aria data directory='MYSQL_TMP_DIR'; +insert t2 values (1); +repair table t2; +Table Op Msg_type Msg_text +test.t2 repair error Can't create new tempfile: 'MYSQL_TMP_DIR/t2.TMD' +test.t2 repair status Operation failed +drop table t2; diff --git a/mysql-test/r/rpl_mysqldump_slave.result b/mysql-test/r/rpl_mysqldump_slave.result index 1b13ebb79c1..4b29ff99f61 100644 --- a/mysql-test/r/rpl_mysqldump_slave.result +++ b/mysql-test/r/rpl_mysqldump_slave.result @@ -4,11 +4,18 @@ include/master-slave.inc # New --dump-slave, --apply-slave-statements functionality # use test; -CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; -STOP SLAVE; -CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; -START SLAVE; -STOP SLAVE; -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; -START SLAVE; +CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +STOP ALL SLAVES; +CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +START ALL SLAVES; +STOP ALL SLAVES; +CHANGE MASTER '' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +START ALL SLAVES; +start slave; +Warnings: +Note 1254 Slave is already running +CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +start slave; +Warnings: +Note 1254 Slave is already running include/rpl_end.inc diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 005dd52c449..9bcd0a90ecf 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -5321,7 +5321,7 @@ SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: -Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where (0 <> 0) +Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0 DROP TABLE t1; SELECT * FROM mysql.time_zone WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1) @@ -5344,7 +5344,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system idx NULL NULL NULL 1 100.00 1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index Warnings: -Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1) +Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where (`test`.`t2`.`c` = 8) SELECT * FROM t1 INNER JOIN t2 ON ( c = a ) WHERE 1 IS NULL OR b < 33 AND b = c; a b c @@ -5468,7 +5468,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or 0)) +Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6)) INSERT INTO t1 VALUES (3,1,6); SELECT * FROM t1, t2 WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL ); diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 7896f8a9f4e..ee6d309f005 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -280,3 +280,14 @@ SELECT FOUND_ROWS(); FOUND_ROWS() 1 DROP TABLE t1; +create table t1 (f1 int primary key, f2 tinyint) engine=myisam; +insert t1 values (10,3),(11,2),(12,3); +create table t2 (f3 int primary key) engine=myisam; +insert t2 values (11),(12),(13); +select f1 from t1,t2 where f1=f3 and f2=3 order by f1; +f1 +12 +select found_rows(); +found_rows() +1 +drop table t1, t2; diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result index 0113791b799..36babd0f390 100644 --- a/mysql-test/r/select_jcl6.result +++ b/mysql-test/r/select_jcl6.result @@ -5332,7 +5332,7 @@ SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: -Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where (0 <> 0) +Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0 DROP TABLE t1; SELECT * FROM mysql.time_zone WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1) @@ -5355,7 +5355,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system idx NULL NULL NULL 1 100.00 1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index Warnings: -Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1) +Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where (`test`.`t2`.`c` = 8) SELECT * FROM t1 INNER JOIN t2 ON ( c = a ) WHERE 1 IS NULL OR b < 33 AND b = c; a b c @@ -5479,7 +5479,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or 0)) +Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6)) INSERT INTO t1 VALUES (3,1,6); SELECT * FROM t1, t2 WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL ); diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result index 005dd52c449..9bcd0a90ecf 100644 --- a/mysql-test/r/select_pkeycache.result +++ b/mysql-test/r/select_pkeycache.result @@ -5321,7 +5321,7 @@ SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: -Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where (0 <> 0) +Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0 DROP TABLE t1; SELECT * FROM mysql.time_zone WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1) @@ -5344,7 +5344,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system idx NULL NULL NULL 1 100.00 1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index Warnings: -Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1) +Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where (`test`.`t2`.`c` = 8) SELECT * FROM t1 INNER JOIN t2 ON ( c = a ) WHERE 1 IS NULL OR b < 33 AND b = c; a b c @@ -5468,7 +5468,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or 0)) +Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6)) INSERT INTO t1 VALUES (3,1,6); SELECT * FROM t1, t2 WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL ); diff --git a/mysql-test/r/selectivity.result b/mysql-test/r/selectivity.result index 3704812eb04..c9fda1e0d0e 100644 --- a/mysql-test/r/selectivity.result +++ b/mysql-test/r/selectivity.result @@ -1166,6 +1166,23 @@ SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE SQL_MODE != ''; TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; # +# Bug mdev-5630: always true conjunctive condition +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables = 'preferably'; +set optimizer_use_condition_selectivity = 3; +CREATE TABLE t1 (a int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (10); +CREATE TABLE t2 (id int, flag char(1), INDEX(id)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (100,'0'),(101,'1'); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +SELECT * FROM t1, t2 WHERE id = a AND ( a = 16 OR flag AND a != 6 ); +a id flag +DROP TABLE t1,t2; +# # Bug mdev-4429: join with range condition whose selectivity == 0 # when optimizer_use_condition_selectivity=3 # diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result index a3b6049c4d0..e6f88bf0dc2 100644 --- a/mysql-test/r/selectivity_innodb.result +++ b/mysql-test/r/selectivity_innodb.result @@ -1174,6 +1174,23 @@ SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE SQL_MODE != ''; TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; # +# Bug mdev-5630: always true conjunctive condition +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables = 'preferably'; +set optimizer_use_condition_selectivity = 3; +CREATE TABLE t1 (a int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (10); +CREATE TABLE t2 (id int, flag char(1), INDEX(id)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (100,'0'),(101,'1'); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +SELECT * FROM t1, t2 WHERE id = a AND ( a = 16 OR flag AND a != 6 ); +a id flag +DROP TABLE t1,t2; +# # Bug mdev-4429: join with range condition whose selectivity == 0 # when optimizer_use_condition_selectivity=3 # diff --git a/mysql-test/r/show_explain.result b/mysql-test/r/show_explain.result index 5d7057a0937..a4d12ce05ce 100644 --- a/mysql-test/r/show_explain.result +++ b/mysql-test/r/show_explain.result @@ -1035,7 +1035,7 @@ INSERT INTO t3 VALUES explain SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system NULL NULL NULL NULL 1 Using filesort +1 SIMPLE t2 system NULL NULL NULL NULL 1 1 SIMPLE t1 index b b 6 NULL 107 Using where; Using index 1 SIMPLE t3 ref PRIMARY PRIMARY 5 test.t1.b 1 Using index set @show_explain_probe_select_id=1; diff --git a/mysql-test/r/sp-bugs.result b/mysql-test/r/sp-bugs.result index e34f8f9e63a..b45944a3795 100644 --- a/mysql-test/r/sp-bugs.result +++ b/mysql-test/r/sp-bugs.result @@ -229,3 +229,49 @@ testf_bug11763507 DROP PROCEDURE testp_bug11763507; DROP FUNCTION testf_bug11763507; #END OF BUG#11763507 test. +# +# MDEV-5531 double call procedure in one session +# +CREATE TABLE `t1` ( +`id` int(10) unsigned NOT NULL AUTO_INCREMENT, +`create_ts` int(10) unsigned DEFAULT '0', +PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; +CREATE PROCEDURE test_5531 (IN step TINYINT(1)) +BEGIN +DECLARE counts INT DEFAULT 0; +DECLARE cur1 CURSOR FOR +SELECT ct.id +FROM (SELECT NULL) AS z +JOIN ( +SELECT id +FROM `t1` + LIMIT 10 +) AS ct +JOIN (SELECT NULL) AS x ON( +EXISTS( +SELECT 1 +FROM `t1` + WHERE id=ct.id +LIMIT 1 +) +); +IF step=1 THEN +TRUNCATE t1; +REPEAT +INSERT INTO `t1` + (create_ts) VALUES +(UNIX_TIMESTAMP()); +SET counts=counts+1; +UNTIL counts>150 END REPEAT; +SET max_sp_recursion_depth=1; +CALL test_5531(2); +SET max_sp_recursion_depth=2; +CALL test_5531(2); +ELSEIF step=2 THEN +OPEN cur1; CLOSE cur1; +END IF; +END $$ +CALL test_5531(1); +DROP PROCEDURE test_5531; +DROP TABLE t1; diff --git a/mysql-test/r/ssl.result b/mysql-test/r/ssl.result index 88d81196dcf..868efcbdf31 100644 --- a/mysql-test/r/ssl.result +++ b/mysql-test/r/ssl.result @@ -3,10 +3,10 @@ Variable_name Value Ssl_cipher DHE-RSA-AES256-SHA SHOW STATUS LIKE 'Ssl_server_not_before'; Variable_name Value -Ssl_server_not_before Jan 29 11:56:49 2010 GMT +Ssl_server_not_before Feb 20 02:55:06 2010 GMT SHOW STATUS LIKE 'Ssl_server_not_after'; Variable_name Value -Ssl_server_not_after Jan 28 11:56:49 2015 GMT +Ssl_server_not_after Sep 3 02:55:06 2030 GMT drop table if exists t1,t2,t3,t4; CREATE TABLE t1 ( Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, diff --git a/mysql-test/r/stat_tables_par.result b/mysql-test/r/stat_tables_par.result index a98f934fa96..f9b2a7921cb 100644 --- a/mysql-test/r/stat_tables_par.result +++ b/mysql-test/r/stat_tables_par.result @@ -148,7 +148,7 @@ use dbt3_s001; set use_stat_tables='preferably'; analyze table lineitem persistent for columns() indexes (i_l_receiptdate); set debug_sync='RESET'; -select * from mysql.index_stats where table_name='lineitem' order by index_name; +select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity; db_name table_name index_name prefix_arity avg_frequency dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 2 1.0000 @@ -212,7 +212,7 @@ analyze table lineitem persistent for all; set debug_sync='open_and_process_table WAIT_FOR parker'; set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2'; use dbt3_s001; -select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68; +select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity;; db_name table_name index_name prefix_arity avg_frequency l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment dbt3_s001 lineitem i_l_shipdate 1 2.6500 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s set debug_sync='RESET'; diff --git a/mysql-test/r/stat_tables_par_innodb.result b/mysql-test/r/stat_tables_par_innodb.result index e0c00c482a0..d3cb0d54d39 100644 --- a/mysql-test/r/stat_tables_par_innodb.result +++ b/mysql-test/r/stat_tables_par_innodb.result @@ -151,7 +151,7 @@ use dbt3_s001; set use_stat_tables='preferably'; analyze table lineitem persistent for columns() indexes (i_l_receiptdate); set debug_sync='RESET'; -select * from mysql.index_stats where table_name='lineitem' order by index_name; +select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity; db_name table_name index_name prefix_arity avg_frequency dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 2 1.0000 @@ -161,7 +161,11 @@ dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 dbt3_s001 lineitem i_l_partkey 1 30.0250 dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_receiptdate 2 1.0152 +dbt3_s001 lineitem i_l_receiptdate 3 1.0000 dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_shipdate 2 1.0149 +dbt3_s001 lineitem i_l_shipdate 3 1.0000 dbt3_s001 lineitem i_l_suppkey 1 600.5000 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 @@ -176,7 +180,11 @@ dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 dbt3_s001 lineitem i_l_partkey 1 30.0250 dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_receiptdate 2 1.0152 +dbt3_s001 lineitem i_l_receiptdate 3 1.0000 dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_shipdate 2 1.0149 +dbt3_s001 lineitem i_l_shipdate 3 1.0000 dbt3_s001 lineitem i_l_suppkey 1 600.5000 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 @@ -202,15 +210,29 @@ db_name table_name index_name prefix_arity avg_frequency dbt3_s001 lineitem PRIMARY 1 4.0027 dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem i_l_commitdate 1 2.7155 +dbt3_s001 lineitem i_l_commitdate 2 1.0364 +dbt3_s001 lineitem i_l_commitdate 3 1.0000 dbt3_s001 lineitem i_l_orderkey 1 4.0027 +dbt3_s001 lineitem i_l_orderkey 2 1.0000 dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0027 dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_orderkey_quantity 3 1.0000 dbt3_s001 lineitem i_l_partkey 1 30.0200 +dbt3_s001 lineitem i_l_partkey 2 1.0089 +dbt3_s001 lineitem i_l_partkey 3 1.0000 dbt3_s001 lineitem i_l_receiptdate 1 2.6473 +dbt3_s001 lineitem i_l_receiptdate 2 1.0152 +dbt3_s001 lineitem i_l_receiptdate 3 1.0000 dbt3_s001 lineitem i_l_shipdate 1 2.6496 +dbt3_s001 lineitem i_l_shipdate 2 1.0149 +dbt3_s001 lineitem i_l_shipdate 3 1.0000 dbt3_s001 lineitem i_l_suppkey 1 600.4000 +dbt3_s001 lineitem i_l_suppkey 2 1.2073 +dbt3_s001 lineitem i_l_suppkey 3 1.0000 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0200 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5771 +dbt3_s001 lineitem i_l_suppkey_partkey 3 1.0030 +dbt3_s001 lineitem i_l_suppkey_partkey 4 1.0000 set @save_global_use_stat_tables=@@global.use_stat_tables; set global use_stat_tables='preferably'; set debug_sync='RESET'; @@ -221,9 +243,11 @@ analyze table lineitem persistent for all; set debug_sync='open_and_process_table WAIT_FOR parker'; set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2'; use dbt3_s001; -select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68; +select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity;; db_name table_name index_name prefix_arity avg_frequency l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment dbt3_s001 lineitem i_l_shipdate 1 2.6496 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +dbt3_s001 lineitem i_l_shipdate 2 1.0149 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +dbt3_s001 lineitem i_l_shipdate 3 1.0000 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s set debug_sync='RESET'; set global use_stat_tables=@save_global_use_stat_tables; DROP DATABASE dbt3_s001; diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index fc98607e38a..b7909f7028c 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -561,7 +561,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away Warnings: -Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1') +Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1 drop table t1; CREATE TABLE t1 (a int(1)); INSERT INTO t1 VALUES (1); @@ -579,7 +579,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -602,7 +602,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -628,7 +628,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -647,7 +647,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -697,7 +697,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -765,9 +765,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -6098,7 +6098,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result index 426e1ba39f9..034cba58c8f 100644 --- a/mysql-test/r/subselect2.result +++ b/mysql-test/r/subselect2.result @@ -163,7 +163,7 @@ SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM t1) OR a = b; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index a a 5 NULL 2 Using where; Using index 1 PRIMARY t3 ref b b 5 test.t2.a 2 Using index -2 SUBQUERY t1 index_subquery PRIMARY,a a 5 const 0 Using index; Using where +2 SUBQUERY t1 const PRIMARY,a PRIMARY 4 const 1 Using where SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM t1) OR a = b; pk a b 0 4 4 @@ -172,7 +172,7 @@ SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM v1) OR a = b; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index a a 5 NULL 2 Using where; Using index 1 PRIMARY t3 ref b b 5 test.t2.a 2 Using index -2 SUBQUERY t1 index_subquery PRIMARY,a a 5 const 0 Using index; Using where +2 SUBQUERY t1 const PRIMARY,a PRIMARY 4 const 1 Using where SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM v1) OR a = b; pk a b 0 4 4 diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result index 2c826cc9172..66d3fa6214a 100644 --- a/mysql-test/r/subselect4.result +++ b/mysql-test/r/subselect4.result @@ -2304,6 +2304,33 @@ WHERE a='r' AND (c,b) NOT IN (SELECT c,b FROM t2 WHERE (c,b)=(t.c,t.b)); a b c d DROP TABLE t1, t2; # +# MDEV-5468: assertion failure with a simplified condition in subselect +# +CREATE TABLE t1 (a int, b int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1); +CREATE TABLE t2 ( pk int PRIMARY KEY, c INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1,4), (2,6); +SELECT ( SELECT MAX(b) FROM t1, t2 WHERE pk = a AND b < from_sq.c ) AS select_sq, +COUNT( DISTINCT from_sq.c ) +FROM ( SELECT DISTINCT t2_1.* FROM t2 AS t2_1, t2 AS t2_2 ) AS from_sq +GROUP BY select_sq ; +select_sq COUNT( DISTINCT from_sq.c ) +1 2 +DROP TABLE t1,t2; +CREATE TABLE t1 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,'BE','BEL'); +CREATE TABLE t2 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1,'BE','BEL'), (2,'MX','MEX'); +CREATE VIEW v2 AS SELECT DISTINCT * FROM t2; +SELECT * FROM t1 AS outer_t1, v2 +WHERE v2.a3 = outer_t1.a3 +AND EXISTS ( SELECT * FROM t1 WHERE a2 < v2.a2 AND id = outer_t1.id ) +AND outer_t1.a3 < 'J' +ORDER BY v2.id; +id a2 a3 id a2 a3 +DROP VIEW v2; +DROP TABLE t1,t2; +# # MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT # CREATE TABLE t1 (a INT) ENGINE=MyISAM; diff --git a/mysql-test/r/subselect_exists_to_in.result b/mysql-test/r/subselect_exists_to_in.result index a70e6df3d00..0e01f585cd4 100644 --- a/mysql-test/r/subselect_exists_to_in.result +++ b/mysql-test/r/subselect_exists_to_in.result @@ -565,7 +565,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away Warnings: -Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1') +Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1 drop table t1; CREATE TABLE t1 (a int(1)); INSERT INTO t1 VALUES (1); @@ -583,7 +583,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -606,7 +606,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -632,7 +632,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -651,7 +651,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -701,7 +701,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -769,9 +769,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -6106,7 +6106,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR diff --git a/mysql-test/r/subselect_extra.result b/mysql-test/r/subselect_extra.result index 5849ccda631..47cb8bca734 100644 --- a/mysql-test/r/subselect_extra.result +++ b/mysql-test/r/subselect_extra.result @@ -46,7 +46,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1 -Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where ('2007-04-25 18:30:22' = 0) +Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where 0 select * from t1 where id in (select id from t1 as x1 where (t1.cur_date is null)); id cur_date @@ -57,7 +57,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1 -Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where ('2007-04-25' = 0) +Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where 0 select * from t2 where id in (select id from t2 as x1 where (t2.cur_date is null)); id cur_date diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 22a5c3abd78..cd78d9f93fb 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -2037,6 +2037,24 @@ INSERT INTO t1 VALUES (1,3,5),(2,4,6); SELECT * FROM t1 WHERE 8 IN (SELECT MIN(pk) FROM t1) AND (pk = a OR pk = b); pk a b DROP TABLE t1; +# +# MDEV-5368: Server crashes in Item_in_subselect::optimize on 2nd +# execution of PS with IN subqueries, materialization+semijoin +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(3); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (8),(9); +PREPARE stmt FROM " +SELECT * FROM t1 WHERE 1 IN ( SELECT b FROM v2 WHERE 2 IN ( SELECT MAX(a) FROM t1 ) ) +"; +EXECUTE stmt; +a +EXECUTE stmt; +a +DROP TABLE t1, t2; +DROP VIEW v2; # End of 5.3 tests # # MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries @@ -2058,6 +2076,24 @@ CA ML CA ML CA ML RO ML DROP TABLE t1,t2; set join_cache_level=@tmp_mdev5056; +# +# MDEV-5368: Server crashes in Item_in_subselect::optimize on 2nd +# execution of PS with IN subqueries, materialization+semijoin +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(3); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (8),(9); +PREPARE stmt FROM " +SELECT * FROM t1 WHERE 1 IN ( SELECT b FROM v2 WHERE 2 IN ( SELECT MAX(a) FROM t1 ) ) +"; +EXECUTE stmt; +a +EXECUTE stmt; +a +DROP TABLE t1, t2; +DROP VIEW v2; # End of 5.5 tests set @subselect_mat_test_optimizer_switch_value=null; set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off'; diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result index 16f67820e0e..7bfa940bda2 100644 --- a/mysql-test/r/subselect_no_mat.result +++ b/mysql-test/r/subselect_no_mat.result @@ -568,7 +568,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away Warnings: -Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1') +Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1 drop table t1; CREATE TABLE t1 (a int(1)); INSERT INTO t1 VALUES (1); @@ -586,7 +586,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -609,7 +609,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -635,7 +635,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -654,7 +654,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -704,7 +704,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -772,9 +772,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -6097,7 +6097,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result index bc2cc71b0fa..5083e23d461 100644 --- a/mysql-test/r/subselect_no_opts.result +++ b/mysql-test/r/subselect_no_opts.result @@ -564,7 +564,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away Warnings: -Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1') +Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1 drop table t1; CREATE TABLE t1 (a int(1)); INSERT INTO t1 VALUES (1); @@ -582,7 +582,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -605,7 +605,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -631,7 +631,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -650,7 +650,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -700,7 +700,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -768,9 +768,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -6093,7 +6093,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result index 40a63afb1c6..6b7dbb7baf1 100644 --- a/mysql-test/r/subselect_no_scache.result +++ b/mysql-test/r/subselect_no_scache.result @@ -567,7 +567,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away Warnings: -Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1') +Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1 drop table t1; CREATE TABLE t1 (a int(1)); INSERT INTO t1 VALUES (1); @@ -585,7 +585,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -608,7 +608,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -634,7 +634,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -653,7 +653,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -703,7 +703,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -771,9 +771,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -6104,7 +6104,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result index 1fc2d98c0e8..1fa3eb2c723 100644 --- a/mysql-test/r/subselect_no_semijoin.result +++ b/mysql-test/r/subselect_no_semijoin.result @@ -564,7 +564,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away Warnings: -Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1') +Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1 drop table t1; CREATE TABLE t1 (a int(1)); INSERT INTO t1 VALUES (1); @@ -582,7 +582,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -605,7 +605,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -631,7 +631,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -650,7 +650,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -700,7 +700,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -768,9 +768,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -6093,7 +6093,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result index 873f8eb662e..c76d40d1a5f 100644 --- a/mysql-test/r/subselect_sj.result +++ b/mysql-test/r/subselect_sj.result @@ -2793,6 +2793,22 @@ mysql information_schema DROP TABLE t1; # +# MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (2),(3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (8),(9); +CREATE TABLE t3 (c INT, INDEX(c)); +INSERT INTO t2 VALUES (5),(6); +PREPARE stmt FROM +"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )"; +EXECUTE stmt; +a +EXECUTE stmt; +a +DROP TABLE t1,t2,t3; +# # MySQL Bug#13340270: assertion table->sort.record_pointers == __null # CREATE TABLE t1 ( @@ -2931,10 +2947,10 @@ CREATE TABLE t3 (c3 VARCHAR(1)) ENGINE=MyISAM; INSERT INTO t3 VALUES ('x'),('d'); SELECT * FROM t1, t2 WHERE pk IN ( SELECT pk FROM t1 LEFT JOIN t3 ON (c1 = c3 ) ) ORDER BY c2, c1; pk c1 c2 -4 NULL x -3 c x 1 v x 2 v x +3 c x +4 NULL x 5 x x # This should show that "t1 left join t3" is still in the semi-join nest: EXPLAIN EXTENDED diff --git a/mysql-test/r/subselect_sj2.result b/mysql-test/r/subselect_sj2.result index d87514923c4..2975176c64a 100644 --- a/mysql-test/r/subselect_sj2.result +++ b/mysql-test/r/subselect_sj2.result @@ -1109,6 +1109,23 @@ t3 AS t3a INNER JOIN t3 AS t3b ON ( t3a.i3 = t3b.i3 ) ); i1 DROP TABLE t1,t2,t3; +# +# MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with materialization+semijoin +# +CREATE TABLE t1 (a INT) engine=innodb; +INSERT INTO t1 VALUES (8),(9); +CREATE TABLE t2 (b INT) engine=innodb; +INSERT INTO t2 VALUES (2),(3); +CREATE TABLE t3 (c INT, INDEX(c)) engine=innodb; +INSERT INTO t2 VALUES (4),(5); +explain +SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL No matching min/max row +SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) ); +a +DROP TABLE t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3,t4; # # MDEV-4782: Valgrind warnings (Conditional jump or move depends on uninitialised value) with InnoDB, semijoin diff --git a/mysql-test/r/subselect_sj2_jcl6.result b/mysql-test/r/subselect_sj2_jcl6.result index 00e393635a2..ff97882c469 100644 --- a/mysql-test/r/subselect_sj2_jcl6.result +++ b/mysql-test/r/subselect_sj2_jcl6.result @@ -1124,6 +1124,23 @@ t3 AS t3a INNER JOIN t3 AS t3b ON ( t3a.i3 = t3b.i3 ) ); i1 DROP TABLE t1,t2,t3; +# +# MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with materialization+semijoin +# +CREATE TABLE t1 (a INT) engine=innodb; +INSERT INTO t1 VALUES (8),(9); +CREATE TABLE t2 (b INT) engine=innodb; +INSERT INTO t2 VALUES (2),(3); +CREATE TABLE t3 (c INT, INDEX(c)) engine=innodb; +INSERT INTO t2 VALUES (4),(5); +explain +SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL No matching min/max row +SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) ); +a +DROP TABLE t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3,t4; # # MDEV-4782: Valgrind warnings (Conditional jump or move depends on uninitialised value) with InnoDB, semijoin diff --git a/mysql-test/r/subselect_sj2_mat.result b/mysql-test/r/subselect_sj2_mat.result index 2306f19606c..f4d7d986a9d 100644 --- a/mysql-test/r/subselect_sj2_mat.result +++ b/mysql-test/r/subselect_sj2_mat.result @@ -1111,6 +1111,23 @@ t3 AS t3a INNER JOIN t3 AS t3b ON ( t3a.i3 = t3b.i3 ) ); i1 DROP TABLE t1,t2,t3; +# +# MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with materialization+semijoin +# +CREATE TABLE t1 (a INT) engine=innodb; +INSERT INTO t1 VALUES (8),(9); +CREATE TABLE t2 (b INT) engine=innodb; +INSERT INTO t2 VALUES (2),(3); +CREATE TABLE t3 (c INT, INDEX(c)) engine=innodb; +INSERT INTO t2 VALUES (4),(5); +explain +SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL No matching min/max row +SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) ); +a +DROP TABLE t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3,t4; # # MDEV-4782: Valgrind warnings (Conditional jump or move depends on uninitialised value) with InnoDB, semijoin diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result index 16e30253ea9..92ad951325b 100644 --- a/mysql-test/r/subselect_sj_jcl6.result +++ b/mysql-test/r/subselect_sj_jcl6.result @@ -2807,6 +2807,22 @@ information_schema mysql DROP TABLE t1; # +# MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (2),(3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (8),(9); +CREATE TABLE t3 (c INT, INDEX(c)); +INSERT INTO t2 VALUES (5),(6); +PREPARE stmt FROM +"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )"; +EXECUTE stmt; +a +EXECUTE stmt; +a +DROP TABLE t1,t2,t3; +# # MySQL Bug#13340270: assertion table->sort.record_pointers == __null # CREATE TABLE t1 ( @@ -2945,10 +2961,10 @@ CREATE TABLE t3 (c3 VARCHAR(1)) ENGINE=MyISAM; INSERT INTO t3 VALUES ('x'),('d'); SELECT * FROM t1, t2 WHERE pk IN ( SELECT pk FROM t1 LEFT JOIN t3 ON (c1 = c3 ) ) ORDER BY c2, c1; pk c1 c2 -4 NULL x -3 c x 1 v x 2 v x +3 c x +4 NULL x 5 x x # This should show that "t1 left join t3" is still in the semi-join nest: EXPLAIN EXTENDED diff --git a/mysql-test/r/subselect_sj_mat.result b/mysql-test/r/subselect_sj_mat.result index a5629d33bfe..efe1bcfe066 100644 --- a/mysql-test/r/subselect_sj_mat.result +++ b/mysql-test/r/subselect_sj_mat.result @@ -2077,6 +2077,24 @@ INSERT INTO t1 VALUES (1,3,5),(2,4,6); SELECT * FROM t1 WHERE 8 IN (SELECT MIN(pk) FROM t1) AND (pk = a OR pk = b); pk a b DROP TABLE t1; +# +# MDEV-5368: Server crashes in Item_in_subselect::optimize on 2nd +# execution of PS with IN subqueries, materialization+semijoin +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(3); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (8),(9); +PREPARE stmt FROM " +SELECT * FROM t1 WHERE 1 IN ( SELECT b FROM v2 WHERE 2 IN ( SELECT MAX(a) FROM t1 ) ) +"; +EXECUTE stmt; +a +EXECUTE stmt; +a +DROP TABLE t1, t2; +DROP VIEW v2; # End of 5.3 tests # # MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries @@ -2098,4 +2116,22 @@ CA ML CA ML CA ML RO ML DROP TABLE t1,t2; set join_cache_level=@tmp_mdev5056; +# +# MDEV-5368: Server crashes in Item_in_subselect::optimize on 2nd +# execution of PS with IN subqueries, materialization+semijoin +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(3); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (8),(9); +PREPARE stmt FROM " +SELECT * FROM t1 WHERE 1 IN ( SELECT b FROM v2 WHERE 2 IN ( SELECT MAX(a) FROM t1 ) ) +"; +EXECUTE stmt; +a +EXECUTE stmt; +a +DROP TABLE t1, t2; +DROP VIEW v2; # End of 5.5 tests diff --git a/mysql-test/r/temporal_literal.result b/mysql-test/r/temporal_literal.result index ea0421c0940..44525aae761 100644 --- a/mysql-test/r/temporal_literal.result +++ b/mysql-test/r/temporal_literal.result @@ -371,49 +371,35 @@ DROP TABLE t1; # # TIME literals in no-zero date context # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT TO_DAYS(TIME'00:00:00'); TO_DAYS(TIME'00:00:00') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +730884 SELECT TO_SECONDS(TIME'00:00:00'); TO_SECONDS(TIME'00:00:00') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +63148377600 SELECT DAYOFYEAR(TIME'00:00:00'); DAYOFYEAR(TIME'00:00:00') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +34 SELECT WEEK(TIME'00:00:00'); WEEK(TIME'00:00:00') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +4 SELECT YEARWEEK(TIME'00:00:00'); YEARWEEK(TIME'00:00:00') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +200104 SELECT WEEKDAY(TIME'00:00:00'); WEEKDAY(TIME'00:00:00') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +5 SELECT CONVERT_TZ(TIME'00:00:00','+00:00','+01:00'); CONVERT_TZ(TIME'00:00:00','+00:00','+01:00') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +2001-02-03 01:00:00 SELECT DATE_ADD(TIME'00:00:00', INTERVAL 1 HOUR); DATE_ADD(TIME'00:00:00', INTERVAL 1 HOUR) 01:00:00 SELECT TIMESTAMPDIFF(SECOND,TIME'00:00:00', TIME'00:00:00'); TIMESTAMPDIFF(SECOND,TIME'00:00:00', TIME'00:00:00') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +0 +SET timestamp=DEFAULT; # # Testing Item_func::fix_fields() # diff --git a/mysql-test/r/timezone2.result b/mysql-test/r/timezone2.result index 70f5ef9edc1..096e996bffb 100644 --- a/mysql-test/r/timezone2.result +++ b/mysql-test/r/timezone2.result @@ -315,16 +315,20 @@ End of 5.1 tests # # MDEV-4653 Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5') # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5'); CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +2001-02-03 07:05:00 SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5'); CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5') +2001-02-03 07:05:00 +SET timestamp=DEFAULT; +# +# MDEV-5506 safe_mutex: Trying to lock unitialized mutex at safemalloc.c on server shutdown after SELECT with CONVERT_TZ +# +SELECT CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' ); +CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' ) NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' # # End of 5.3 tests # diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index 4ead8f8d743..03b942be3f6 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -309,7 +309,7 @@ SELECT CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5 CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5') NULL Warnings: -Warning 1292 Incorrect datetime value: '2022-00-00 00:00:00' +Warning 1292 Incorrect datetime value: '2022-00-00' # # MDEV-4804 Date comparing false result # diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 1c8039f6b53..c508bc310e1 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -519,7 +519,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1 -Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where ('2007-04-25 18:30:22' = 0) +Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where 0 select * from t1 where id in (select id from t1 as x1 where (t1.cur_date is null)); id cur_date @@ -530,7 +530,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1 -Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where ('2007-04-25' = 0) +Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where 0 select * from t2 where id in (select id from t2 as x1 where (t2.cur_date is null)); id cur_date diff --git a/mysql-test/r/type_datetime_hires.result b/mysql-test/r/type_datetime_hires.result index 203e45b86cb..61c8001d98e 100644 --- a/mysql-test/r/type_datetime_hires.result +++ b/mysql-test/r/type_datetime_hires.result @@ -1,3 +1,4 @@ +SET timestamp=UNIX_TIMESTAMP('2001-02-03 10:20:30'); drop table if exists t1, t2, t3; create table t1 (a datetime(7)); ERROR 42000: Too big precision 7 specified for 'a'. Maximum is 6. @@ -197,7 +198,7 @@ bigint_f5_datetime 20101112111417 varchar_f6_datetime 2010-11-12 11:14:17.765432 alter table t1 modify time4_f0_datetime datetime(0), modify datetime3_f1_datetime datetime(1), modify date_f2_datetime datetime(2), modify double_f3_datetime datetime(3), modify decimal5_f4_datetime datetime(4), modify bigint_f5_datetime datetime(5), modify varchar_f6_datetime datetime(6); select * from t1; -time4_f0_datetime 0000-00-00 11:14:17 +time4_f0_datetime 2001-02-03 11:14:17 datetime3_f1_datetime 2010-11-12 11:14:17.7 date_f2_datetime 2010-11-12 00:00:00.00 double_f3_datetime 2010-11-12 11:14:17.766 @@ -207,7 +208,7 @@ varchar_f6_datetime 2010-11-12 11:14:17.765432 delete from t1; insert t1 select * from t2; select * from t1; -time4_f0_datetime 0000-00-00 11:14:17 +time4_f0_datetime 2001-02-03 11:14:17 datetime3_f1_datetime 2010-11-12 11:14:17.7 date_f2_datetime 2010-11-12 00:00:00.00 double_f3_datetime 2010-11-12 11:14:17.765 @@ -262,6 +263,7 @@ a b 2011-01-02 03:04:06.234500 2011-01-02 03:04:06.234561 drop view v1; drop table t1, t2; +SET timestamp=DEFAULT; CREATE TABLE t1 ( taken datetime(5) NOT NULL DEFAULT '0000-00-00 00:00:00', id int(11) NOT NULL DEFAULT '0', diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index bdbfba84994..00a7a9b783e 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -144,12 +144,14 @@ End of 5.0 tests # # Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); CREATE TABLE t1(f1 TIME); INSERT INTO t1 VALUES ('23:38:57'); SELECT TIMESTAMP(f1,'1') FROM t1; TIMESTAMP(f1,'1') -NULL +2001-02-03 23:38:58 DROP TABLE t1; +SET timestamp=DEFAULT; End of 5.1 tests create table t1 (a time); insert t1 values (-131415); @@ -177,11 +179,11 @@ drop table t1; # # MDEV-4634 Crash in CONVERT_TZ # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5'); CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' +2001-02-03 07:05:00 +SET timestamp=DEFAULT; # # MDEV-4652 Wrong result for CONCAT(GREATEST(TIME('00:00:01'),TIME('00:00:00'))) # diff --git a/mysql-test/r/type_time_hires.result b/mysql-test/r/type_time_hires.result index bf54434a04c..2239ecfcaaa 100644 --- a/mysql-test/r/type_time_hires.result +++ b/mysql-test/r/type_time_hires.result @@ -1,3 +1,4 @@ +SET timestamp=UNIX_TIMESTAMP('2001-02-03 10:20:30'); drop table if exists t1, t2, t3; create table t1 (a time(7)); ERROR 42000: Too big precision 7 specified for 'a'. Maximum is 6. @@ -194,8 +195,8 @@ f5_time 11:14:17.76543 f6_time 11:14:17.765432 select cast(f0_time as time(4)) time4_f0_time, cast(f1_time as datetime(3)) datetime3_f1_time, cast(f2_time as date) date_f2_time, cast(f4_time as double) double_f3_time, cast(f4_time as decimal(40,5)) decimal5_f4_time, cast(f5_time as signed) bigint_f5_time, cast(f6_time as char(255)) varchar_f6_time from t1; time4_f0_time 11:14:17.0000 -datetime3_f1_time 0000-00-00 11:14:17.700 -date_f2_time 0000-00-00 +datetime3_f1_time 2001-02-03 11:14:17.700 +date_f2_time 2001-02-03 double_f3_time 111417.7654 decimal5_f4_time 111417.76540 bigint_f5_time 111417 @@ -208,8 +209,8 @@ Code 1265 Message Data truncated for column 'date_f2_time' at row 1 select * from t2; time4_f0_time 11:14:17.0000 -datetime3_f1_time 0000-00-00 11:14:17.700 -date_f2_time 0000-00-00 +datetime3_f1_time 2001-02-03 11:14:17.700 +date_f2_time 2001-02-03 double_f3_time 111417.765 decimal5_f4_time 111417.76540 bigint_f5_time 111417 @@ -221,13 +222,20 @@ Code 1265 Message Data truncated for column 'date_f2_time' at row 1 select * from t1; time4_f0_time 11:14:17.0000 -datetime3_f1_time 0000-00-00 11:14:17.700 -date_f2_time 0000-00-00 +datetime3_f1_time 2001-02-03 11:14:17.700 +date_f2_time 2001-02-03 double_f3_time 111417.765 decimal5_f4_time 111417.76540 bigint_f5_time 111417 varchar_f6_time 11:14:17.765432 alter table t1 modify time4_f0_time time(0), modify datetime3_f1_time time(1), modify date_f2_time time(2), modify double_f3_time time(3), modify decimal5_f4_time time(4), modify bigint_f5_time time(5), modify varchar_f6_time time(6); +Warnings: +Level Note +Code 1265 +Message Data truncated for column 'datetime3_f1_time' at row 1 +Level Note +Code 1265 +Message Data truncated for column 'date_f2_time' at row 1 select * from t1; time4_f0_time 11:14:17 datetime3_f1_time 11:14:17.7 @@ -238,6 +246,13 @@ bigint_f5_time 11:14:17.00000 varchar_f6_time 11:14:17.765432 delete from t1; insert t1 select * from t2; +Warnings: +Level Note +Code 1265 +Message Data truncated for column 'datetime3_f1_time' at row 1 +Level Note +Code 1265 +Message Data truncated for column 'date_f2_time' at row 1 select * from t1; time4_f0_time 11:14:17 datetime3_f1_time 11:14:17.7 @@ -301,6 +316,7 @@ a b 04:05:06.000000 04:05:06.789100 drop view v1; drop table t1, t2; +SET timestamp=DEFAULT; create table t1 (a time(4) not null, key(a)); insert into t1 values ('1:2:3.001'),('1:2:3'), ('-00:00:00.6'),('-00:00:00.7'),('-00:00:00.8'),('-00:00:00.9'),('-00:00:01.0'),('-00:00:01.1'),('-00:00:01.000000'),('-00:00:01.100001'),('-00:00:01.000002'),('-00:00:01.090000'); select * from t1 order by a; diff --git a/mysql-test/r/type_timestamp_hires.result b/mysql-test/r/type_timestamp_hires.result index cc2cb6a403d..dc1cbb377f9 100644 --- a/mysql-test/r/type_timestamp_hires.result +++ b/mysql-test/r/type_timestamp_hires.result @@ -1,3 +1,4 @@ +SET timestamp=UNIX_TIMESTAMP('2001-02-03 10:20:30'); drop table if exists t1, t2, t3; create table t1 (a timestamp(7)); ERROR 42000: Too big precision 7 specified for 'a'. Maximum is 6. @@ -196,12 +197,8 @@ decimal5_f4_timestamp 20101112111417.76540 bigint_f5_timestamp 20101112111417 varchar_f6_timestamp 2010-11-12 11:14:17.765432 alter table t1 modify time4_f0_timestamp timestamp(0), modify datetime3_f1_timestamp timestamp(1), modify date_f2_timestamp timestamp(2), modify double_f3_timestamp timestamp(3), modify decimal5_f4_timestamp timestamp(4), modify bigint_f5_timestamp timestamp(5), modify varchar_f6_timestamp timestamp(6); -Warnings: -Level Warning -Code 1265 -Message Data truncated for column 'time4_f0_timestamp' at row 1 select * from t1; -time4_f0_timestamp 0000-00-00 00:00:00 +time4_f0_timestamp 2001-02-03 11:14:17 datetime3_f1_timestamp 2010-11-12 11:14:17.7 date_f2_timestamp 2010-11-12 00:00:00.00 double_f3_timestamp 2010-11-12 11:14:17.766 @@ -210,12 +207,8 @@ bigint_f5_timestamp 2010-11-12 11:14:17.00000 varchar_f6_timestamp 2010-11-12 11:14:17.765432 delete from t1; insert t1 select * from t2; -Warnings: -Level Warning -Code 1265 -Message Data truncated for column 'time4_f0_timestamp' at row 1 select * from t1; -time4_f0_timestamp 0000-00-00 00:00:00 +time4_f0_timestamp 2001-02-03 11:14:17 datetime3_f1_timestamp 2010-11-12 11:14:17.7 date_f2_timestamp 2010-11-12 00:00:00.00 double_f3_timestamp 2010-11-12 11:14:17.765 @@ -270,6 +263,7 @@ a b 2011-01-02 03:04:06.234500 2011-01-02 03:04:06.234561 drop view v1; drop table t1, t2; +SET timestamp=DEFAULT; set time_zone='+03:00'; set timestamp=unix_timestamp('2011-01-01 01:01:01') + 0.123456; create table t1 (a timestamp(5)); diff --git a/mysql-test/r/udf_debug_sync.result b/mysql-test/r/udf_debug_sync.result new file mode 100644 index 00000000000..2db75f9aa76 --- /dev/null +++ b/mysql-test/r/udf_debug_sync.result @@ -0,0 +1,20 @@ +CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; +CREATE VIEW v1 AS SELECT myfunc_int(1); +SET debug_sync='mysql_create_function_after_lock SIGNAL locked WAIT_FOR go'; +CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB"; +SET debug_sync='now WAIT_FOR locked'; +SET debug_sync='find_udf_before_lock SIGNAL go'; +SELECT * FROM v1; +myfunc_int(1) +1 +FLUSH TABLES; +SET debug_sync='mysql_drop_function_after_lock SIGNAL locked WAIT_FOR go'; +DROP FUNCTION myfunc_double; +SET debug_sync='now WAIT_FOR locked'; +SET debug_sync='find_udf_before_lock SIGNAL go'; +SELECT * FROM v1; +myfunc_int(1) +1 +SET debug_sync='RESET'; +DROP VIEW v1; +DROP FUNCTION myfunc_int; diff --git a/mysql-test/r/union_crash-714.result b/mysql-test/r/union_crash-714.result new file mode 100644 index 00000000000..4a51f88b76f --- /dev/null +++ b/mysql-test/r/union_crash-714.result @@ -0,0 +1,5 @@ +create table t1 (i tinyint); +set debug_dbug='+d,bug11747970_raise_error'; +insert into t1 (i) select i from t1 union select i from t1; +ERROR 70100: Query execution was interrupted +drop table t1; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 9b1c1b6955e..eb896082810 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -1137,12 +1137,12 @@ ERROR HY000: Variable 'ft_stopword_file' is a read only variable # SHOW VARIABLES like 'back_log'; Variable_name Value -back_log 50 +back_log 150 SELECT @@session.back_log; ERROR HY000: Variable 'back_log' is a GLOBAL variable SELECT @@global.back_log; @@global.back_log -50 +150 SET @@session.back_log= 7; ERROR HY000: Variable 'back_log' is a read only variable SET @@global.back_log= 7; diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index a926f975009..7aadf6f75f1 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -205,7 +205,7 @@ ERROR 42S02: Unknown table 'v100' drop view t1; ERROR HY000: 'test.t1' is not VIEW drop table v1; -ERROR 42S02: Unknown table 'test.v1' +ERROR 42S02: 'test.v1' is a view drop view v1,v2; drop table t1; create table t1 (a int); @@ -931,13 +931,13 @@ ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'v2 update v2 set col1 = (select max(col1) from t1); ERROR HY000: The definition of table 'v2' prevents operation UPDATE on table 'v2'. update v2 set col1 = (select max(col1) from v2); -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v2,t2 set v2.col1 = (select max(col1) from v1) where v2.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'v2'. update t1,t2 set t1.col1 = (select max(col1) from v1) where t1.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 't1'. update v1,t2 set v1.col1 = (select max(col1) from v1) where v1.col1 = t2.col1; -ERROR HY000: You can't specify target table 'v1' for update in FROM clause +ERROR HY000: Table 'v1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2,v2 set v2.col1 = (select max(col1) from v1) where v2.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 't2'. update t2,t1 set t1.col1 = (select max(col1) from v1) where t1.col1 = t2.col1; @@ -947,17 +947,17 @@ ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 't2 update v2,t2 set v2.col1 = (select max(col1) from t1) where v2.col1 = t2.col1; ERROR HY000: The definition of table 'v2' prevents operation UPDATE on table 'v2'. update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v1,t2 set v1.col1 = (select max(col1) from t1) where v1.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'v1'. update t2,v2 set v2.col1 = (select max(col1) from t1) where v2.col1 = t2.col1; -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2,t1 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2,v1 set v1.col1 = (select max(col1) from t1) where v1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v2,t2 set v2.col1 = (select max(col1) from v2) where v2.col1 = t2.col1; -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1,t2 set t1.col1 = (select max(col1) from v2) where t1.col1 = t2.col1; ERROR HY000: The definition of table 'v2' prevents operation UPDATE on table 't1'. update v1,t2 set v1.col1 = (select max(col1) from v2) where v1.col1 = t2.col1; @@ -975,27 +975,27 @@ ERROR HY000: The definition of table 'v3' prevents operation UPDATE on table 'v3 update v3 set v3.col1 = (select max(col1) from v2); ERROR HY000: The definition of table 'v2' prevents operation UPDATE on table 'v3'. update v3 set v3.col1 = (select max(col1) from v3); -ERROR HY000: You can't specify target table 'v3' for update in FROM clause +ERROR HY000: Table 'v3' is specified twice, both as a target for 'UPDATE' and as a separate source for data delete from v2 where col1 = (select max(col1) from v1); ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'v2'. delete from v2 where col1 = (select max(col1) from t1); ERROR HY000: The definition of table 'v2' prevents operation DELETE on table 'v2'. delete from v2 where col1 = (select max(col1) from v2); -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v2 from v2,t2 where (select max(col1) from v1) > 0 and v2.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'v2'. delete t1 from t1,t2 where (select max(col1) from v1) > 0 and t1.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 't1'. delete v1 from v1,t2 where (select max(col1) from v1) > 0 and v1.col1 = t2.col1; -ERROR HY000: You can't specify target table 'v1' for update in FROM clause +ERROR HY000: Table 'v1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v2 from v2,t2 where (select max(col1) from t1) > 0 and v2.col1 = t2.col1; ERROR HY000: The definition of table 'v2' prevents operation DELETE on table 'v2'. delete t1 from t1,t2 where (select max(col1) from t1) > 0 and t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v1 from v1,t2 where (select max(col1) from t1) > 0 and v1.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'v1'. delete v2 from v2,t2 where (select max(col1) from v2) > 0 and v2.col1 = t2.col1; -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t1 from t1,t2 where (select max(col1) from v2) > 0 and t1.col1 = t2.col1; ERROR HY000: The definition of table 'v2' prevents operation DELETE on table 't1'. delete v1 from v1,t2 where (select max(col1) from v2) > 0 and v1.col1 = t2.col1; @@ -1009,15 +1009,15 @@ ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'v2 insert into v2 values ((select max(col1) from t1)); ERROR HY000: The definition of table 'v2' prevents operation INSERT on table 'v2'. insert into t1 values ((select max(col1) from t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into v2 values ((select max(col1) from t1)); ERROR HY000: The definition of table 'v2' prevents operation INSERT on table 'v2'. insert into v2 values ((select max(col1) from v2)); -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into t1 values ((select max(col1) from v2)); ERROR HY000: The definition of table 'v2' prevents operation INSERT on table 't1'. insert into v2 values ((select max(col1) from v2)); -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into v3 (col1) values ((select max(col1) from v1)); ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'v3'. insert into v3 (col1) values ((select max(col1) from t1)); @@ -4415,7 +4415,7 @@ WHERE f1<>0 OR f2<>0 AND f4='v' AND (f2<>0 OR f3<>0 AND f5<>0 OR f4 LIKE '%b%'); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 Warnings: -Note 1003 select 'r' AS `f4` from dual where (20 <> 0) +Note 1003 select 'r' AS `f4` from dual where 1 DROP VIEW v1; DROP TABLE t1; # @@ -4950,6 +4950,56 @@ i1 c1 i1 c1 deallocate prepare stmt; drop view v1; drop table t1,t2; +create table t1 (a int); +insert into t1 values (1),(2); +create view v1 (a,r) as select a,rand() from t1; +create table t2 select a, r as r1, r as r2, r as r3 from v1; +select a, r1 = r2, r2 = r3 from t2; +a r1 = r2 r2 = r3 +1 1 1 +2 1 1 +drop view v1; +drop table t1,t2; +# +# MDEV-5515: 2nd execution of a prepared statement returns wrong results +# +CREATE TABLE t1 (i1 INT, j1 INT NOT NULL, PRIMARY KEY (i1)); +INSERT INTO t1 VALUES (30,300),(40,400); +CREATE TABLE t2 (i2 INT); +INSERT INTO t2 VALUES (50),(60); +CREATE TABLE t3 (c3 VARCHAR(20), i3 INT); +INSERT INTO t3 VALUES ('a',10),('b',2); +CREATE TABLE t4 (i4 INT); +INSERT INTO t4 VALUES (1),(2); +DROP VIEW IF EXISTS v1; +Warnings: +Note 1051 Unknown table 'test.v1' +CREATE VIEW v1 AS select coalesce(j1,i3) AS v1_field1 from t2 join t3 left join t1 on ( i1 = i2 ); +CREATE VIEW v2 AS select v1_field1 from t4 join v1; +prepare my_stmt from "select v1_field1 from v2"; +execute my_stmt; +v1_field1 +10 +10 +10 +10 +2 +2 +2 +2 +execute my_stmt; +v1_field1 +10 +10 +10 +10 +2 +2 +2 +2 +deallocate prepare my_stmt; +DROP VIEW v1,v2; +DROP TABLE t1,t2,t3,t4; # ----------------------------------------------------------------- # -- End of 5.3 tests. # ----------------------------------------------------------------- diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index 95dad6d5510..6a4f5ace7d6 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -1161,6 +1161,9 @@ UPDATEXML('<a><c><a>x</a></c></a>','(a)//a','<b />') SELECT ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b'); ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b') aa bb +SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)'); +ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)') + # # Bug#62429 XML: ExtractValue, UpdateXML max arg length 127 chars # diff --git a/mysql-test/std_data/cacert.pem b/mysql-test/std_data/cacert.pem index e44341384e4..f5ba4fec58d 100644 --- a/mysql-test/std_data/cacert.pem +++ b/mysql-test/std_data/cacert.pem @@ -1,17 +1,22 @@ -----BEGIN CERTIFICATE----- -MIICrTCCAhagAwIBAgIJAMI7xZKjhrDbMA0GCSqGSIb3DQEBBAUAMEQxCzAJBgNV +MIIDsjCCApqgAwIBAgIJAL5YrUwfPSWVMA0GCSqGSIb3DQEBBQUAMEQxCzAJBgNV BAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxhMREwDwYD -VQQKEwhNeVNRTCBBQjAeFw0xMDAxMjkxMTQ3MTBaFw0xNTAxMjgxMTQ3MTBaMEQx +VQQKEwhNeVNRTCBBQjAeFw0xMDAxMjkwNTU5NTNaFw0xNTAxMjgwNTU5NTNaMEQx CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxh -MREwDwYDVQQKEwhNeVNRTCBBQjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA -wQYsOEfrN4ESP3FjsI8cghE+tZVuyK2gck61lwieVxjgFMtBd65mI5a1y9pmlOI1 -yM4SB2Ppqcuw7/e1CdV1y7lvHrGNt5yqEHbN4QX1gvsN8TQauP/2WILturk4R4Hq -rKg0ZySu7f1Xhl0ed9a48LpaEHD17IcxWEGMMJwAxF0CAwEAAaOBpjCBozAMBgNV -HRMEBTADAQH/MB0GA1UdDgQWBBSvktYQ0ahLnyxyVKqty+WpBbBrDTB0BgNVHSME -bTBrgBSvktYQ0ahLnyxyVKqty+WpBbBrDaFIpEYwRDELMAkGA1UEBhMCU0UxEDAO -BgNVBAgTB1VwcHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FM -IEFCggkAwjvFkqOGsNswDQYJKoZIhvcNAQEEBQADgYEAdKN1PjwMHAKG2Ww1145g -JQGBnKxSFOUaoSvkBi/4ntTM+ysnViWh7WvxyWjR9zU9arfr7aqsDeQxm0XDOqzj -AQ/cQIla2/Li8tXyfc06bisH/IHRaSc2zWqioTKbEwMdVOdrvq4a8V8ic3xYyIWn -7F4WeS07J8LKardSvM0+hOA= +MREwDwYDVQQKEwhNeVNRTCBBQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAL6kNN4peX7uhK9rb06W/QbPEpVuejmdWdl2PqMshP/eSuXXw7kwVgfpxx9R +vC000CKQQSG9MCoZjtqPnFRsetmWLZgApRpEalGXTXJqq9sEbCfoFizg94U8G7d2 +u5XJjLVmcG34ru36KoBgVx1zeH1puBAf8dOzrE4L7Y+ZQBFzFohjh8C2LqWC4nM5 +qsLmOkDWMipGqYU5DvkKjIbTbwTyRNRgZHWSPfVDDPUIUOsY4BGUp2DpgeGY9aEv +lIs57Ev9JqlIUCV65lOhhDkG+xwmkHKHA+ECEU9cALI8+uXbh48MB9XpMOuk408X +/lX89aZwD0/G9kmObVGnE2G+H5UCAwEAAaOBpjCBozAdBgNVHQ4EFgQUsft+d7VA +jWgRftkR5cPG2k2sUbAwdAYDVR0jBG0wa4AUsft+d7VAjWgRftkR5cPG2k2sUbCh +SKRGMEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdV +cHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAL5YrUwfPSWVMAwGA1UdEwQFMAMB +Af8wDQYJKoZIhvcNAQEFBQADggEBALRUOAmdL8R8sl1y8kiEiFgDatdXK5RDqWai +8yZChfmwTIToHhmQsOEshJe2e8hky3huUj+33VyXjINoMbebIwMuXPwEkbJal8RZ +nSJmF0jN1Qz7J/jFffwK9xmejWZJx49Kt2+Qwrwp6kDeq9TLFqQOoVczgyJPYsTL +NAOib5WqTud3XWvCwxrhqmWu7JZq6sp1fomP/uunprb8y2miWfLESZN2mKAhm44Q +Lws867LT8v2lskEjq2dT1LutD5+R66XcdjgSr0uDziDs64jZwCD6ea94hVFM7ej0 +ZOXYeSEZJ56FjUxu632e9fY8NyMh30yKjjmQf1mM9PuGJvdvsWU= -----END CERTIFICATE----- diff --git a/mysql-test/std_data/client-cert.pem b/mysql-test/std_data/client-cert.pem index ee7f2ab281e..b83ae7c655d 100644 --- a/mysql-test/std_data/client-cert.pem +++ b/mysql-test/std_data/client-cert.pem @@ -1,46 +1,69 @@ Certificate: Data: - Version: 1 (0x0) - Serial Number: 1048577 (0x100001) - Signature Algorithm: md5WithRSAEncryption + Version: 3 (0x2) + Serial Number: 6 (0x6) + Signature Algorithm: sha1WithRSAEncryption Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB Validity - Not Before: Jan 29 11:50:22 2010 GMT - Not After : Jan 28 11:50:22 2015 GMT + Not Before: Feb 20 03:03:26 2010 GMT + Not After : Sep 3 03:03:26 2030 GMT Subject: C=SE, ST=Uppsala, O=MySQL AB Subject Public Key Info: Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:cc:9a:37:49:13:66:dc:cf:e3:0b:13:a1:23:ed: - 78:db:4e:bd:11:f6:8c:0d:76:f9:a3:32:56:9a:f8: - a1:21:6a:55:4e:4d:3f:e6:67:9d:26:99:b2:cd:a4: - 9a:d2:2b:59:5c:d7:8a:d3:60:68:f8:18:bd:c5:be: - 15:e1:2a:3c:a3:d4:61:cb:f5:11:94:17:81:81:f7: - 87:8c:f6:6a:d2:ee:d8:e6:77:f6:62:66:4d:2e:16: - 8d:08:81:4a:c9:c6:4b:31:e5:b9:c7:8a:84:96:48: - a7:47:8c:0d:26:90:56:4e:e6:a5:6e:8c:b3:f2:9f: - fc:3d:78:9b:49:6e:86:83:77 + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:c2:e7:20:cf:89:59:2f:67:cb:4c:9f:e8:11:f2: + 23:e5:f1:b1:ee:3f:66:5f:c3:f5:fd:1e:31:ee:8f: + 4c:2a:bd:c0:4a:a5:9f:c8:44:d5:77:8f:15:1b:4d: + 78:6e:b2:a2:48:a5:24:33:05:40:02:b3:c1:87:8d: + 59:3c:1a:07:aa:86:f0:04:e1:9c:20:4b:22:32:c4: + 51:9e:40:e4:31:c3:57:f5:98:bf:2e:b1:fd:2c:56: + bf:49:d9:9b:e7:17:cc:95:5f:b5:08:19:5e:9d:df: + 65:22:39:2c:48:fb:69:96:31:7a:35:4d:de:60:b4: + c1:60:19:5f:96:56:7e:55:19 Exponent: 65537 (0x10001) - Signature Algorithm: md5WithRSAEncryption - 5e:1f:a3:53:5f:24:13:1c:f8:28:32:b0:7f:69:69:f3:0e:c0: - 34:87:10:03:7d:da:15:8b:bd:19:b8:1a:56:31:e7:85:49:81: - c9:7f:45:20:74:3e:89:c0:e0:26:84:51:cc:04:16:ce:69:99: - 01:e1:26:99:b3:e3:f5:bd:ec:5f:a0:84:e4:38:da:75:78:7b: - 89:9c:d2:cd:60:95:20:ba:8e:e3:7c:e6:df:76:3a:7c:89:77: - 02:94:86:11:3a:c4:61:7d:6f:71:83:21:8a:17:fb:17:e2:ee: - 02:6b:61:c1:b4:52:63:d7:d8:46:b2:c5:9c:6f:38:91:8a:35: - 32:0b + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + 8D:10:67:91:33:76:9C:02:E5:78:5D:D8:C5:EF:25:96:B2:D7:FA:1F + X509v3 Authority Key Identifier: + keyid:B1:FB:7E:77:B5:40:8D:68:11:7E:D9:11:E5:C3:C6:DA:4D:AC:51:B0 + DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB + serial:BE:58:AD:4C:1F:3D:25:95 + + Signature Algorithm: sha1WithRSAEncryption + a9:88:10:3e:5d:2a:47:29:c8:03:27:7a:31:5a:8e:10:03:bc: + b5:4e:37:1d:12:7b:eb:5f:50:71:70:b1:a3:8e:93:0e:77:17: + 6c:47:b6:c9:a4:4d:2a:c4:38:f0:61:55:b2:7f:28:ba:06:79: + ee:67:11:7d:d4:c9:7f:0a:18:c8:c1:cb:d0:2c:f9:63:0f:bb: + 45:ca:de:ea:bb:ac:00:01:52:48:36:2b:07:2b:c8:46:c7:b1: + 21:81:bd:77:39:e7:4c:39:aa:bd:ac:60:d8:a7:bf:cf:14:98: + 4a:0b:a1:40:55:06:8d:6f:35:a9:39:a0:71:a9:97:ba:7c:73: + 3c:41:ba:c5:1c:11:4b:2b:43:1d:2d:ba:7b:5f:14:b5:3d:64: + 62:15:36:b4:16:bd:78:c8:43:8d:f9:1c:a5:d2:ac:a1:58:74: + e1:99:de:ad:04:19:43:a8:bd:0a:fd:19:9b:50:44:46:6d:18: + 55:4d:bf:b4:5b:a4:93:62:c7:64:91:6c:54:34:d1:f8:f3:ff: + 12:6d:5f:85:e7:35:9e:5c:42:81:5e:fb:c8:bb:44:51:98:b2: + ef:1b:9f:5a:22:77:28:7d:da:fb:08:c2:94:9a:0f:42:08:93: + 54:10:1e:ad:f2:4f:fc:62:98:51:e9:9b:b9:3a:93:d9:e4:1f: + 1d:c4:76:d0 -----BEGIN CERTIFICATE----- -MIIB5zCCAVACAxAAATANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G -A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg -QUIwHhcNMTAwMTI5MTE1MDIyWhcNMTUwMTI4MTE1MDIyWjAyMQswCQYDVQQGEwJT -RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIwgZ8wDQYJKoZI -hvcNAQEBBQADgY0AMIGJAoGBAMyaN0kTZtzP4wsToSPteNtOvRH2jA12+aMyVpr4 -oSFqVU5NP+ZnnSaZss2kmtIrWVzXitNgaPgYvcW+FeEqPKPUYcv1EZQXgYH3h4z2 -atLu2OZ39mJmTS4WjQiBSsnGSzHluceKhJZIp0eMDSaQVk7mpW6Ms/Kf/D14m0lu -hoN3AgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAXh+jU18kExz4KDKwf2lp8w7ANIcQ -A33aFYu9GbgaVjHnhUmByX9FIHQ+icDgJoRRzAQWzmmZAeEmmbPj9b3sX6CE5Dja -dXh7iZzSzWCVILqO43zm33Y6fIl3ApSGETrEYX1vcYMhihf7F+LuAmthwbRSY9fY -RrLFnG84kYo1Mgs= +MIIDETCCAfmgAwIBAgIBBjANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJTRTEQ +MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT +UUwgQUIwHhcNMTAwMjIwMDMwMzI2WhcNMzAwOTAzMDMwMzI2WjAyMQswCQYDVQQG +EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIwgZ8wDQYJ +KoZIhvcNAQEBBQADgY0AMIGJAoGBAMLnIM+JWS9ny0yf6BHyI+Xxse4/Zl/D9f0e +Me6PTCq9wEqln8hE1XePFRtNeG6yokilJDMFQAKzwYeNWTwaB6qG8AThnCBLIjLE +UZ5A5DHDV/WYvy6x/SxWv0nZm+cXzJVftQgZXp3fZSI5LEj7aZYxejVN3mC0wWAZ +X5ZWflUZAgMBAAGjgaMwgaAwCQYDVR0TBAIwADAdBgNVHQ4EFgQUjRBnkTN2nALl +eF3Yxe8llrLX+h8wdAYDVR0jBG0wa4AUsft+d7VAjWgRftkR5cPG2k2sUbChSKRG +MEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBz +YWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAL5YrUwfPSWVMA0GCSqGSIb3DQEBBQUA +A4IBAQCpiBA+XSpHKcgDJ3oxWo4QA7y1TjcdEnvrX1BxcLGjjpMOdxdsR7bJpE0q +xDjwYVWyfyi6BnnuZxF91Ml/ChjIwcvQLPljD7tFyt7qu6wAAVJINisHK8hGx7Eh +gb13OedMOaq9rGDYp7/PFJhKC6FAVQaNbzWpOaBxqZe6fHM8QbrFHBFLK0MdLbp7 +XxS1PWRiFTa0Fr14yEON+Ryl0qyhWHThmd6tBBlDqL0K/RmbUERGbRhVTb+0W6ST +YsdkkWxUNNH48/8SbV+F5zWeXEKBXvvIu0RRmLLvG59aIncofdr7CMKUmg9CCJNU +EB6t8k/8YphR6Zu5OpPZ5B8dxHbQ -----END CERTIFICATE----- diff --git a/mysql-test/std_data/client-key.pem b/mysql-test/std_data/client-key.pem index 205b5f31cb9..2fc1754e9c5 100644 --- a/mysql-test/std_data/client-key.pem +++ b/mysql-test/std_data/client-key.pem @@ -1,15 +1,15 @@ -----BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDMmjdJE2bcz+MLE6Ej7XjbTr0R9owNdvmjMlaa+KEhalVOTT/m -Z50mmbLNpJrSK1lc14rTYGj4GL3FvhXhKjyj1GHL9RGUF4GB94eM9mrS7tjmd/Zi -Zk0uFo0IgUrJxksx5bnHioSWSKdHjA0mkFZO5qVujLPyn/w9eJtJboaDdwIDAQAB -AoGASqk/4We2En+93y3jkIO4pXafIe3w/3zZ7caRue1ehx4RUQh5d+95djuB9u7J -HEZ7TpjM7QNyao5EueL6gvbxt0LXFvqAMni7yM9tt/HUYtHHPqYiRtUny9bKYFTm -l8szCCMal/wD9GZU9ByHDNHm7tHUMyMhARNTYSgx+SERFmECQQD/6jJocC4SXf6f -T3LqimWR02lbJ7qCoDgRglsUXh0zjrG+IIiAyE+QOCCx1GMe3Uw6bsIuYwdHT6as -WcdPs04xAkEAzKulvEvLVvN5zfa/DTYRTV7jh6aDleOxjsD5oN/oJXoACnPzVuUL -qQQMNtuAXm6Q1QItrRxpQsSKbY0UQka6JwJBAOSgoNoG5lIIYTKIMvzwGV+XBLeo -HYsXgh+6Wo4uql3mLErUG78ZtWL9kc/tE4R+ZdyKGLaCR/1gXmH5bwN4B/ECQEBb -uUH8k3REG4kojesZlVc+/00ojzgS4UKCa/yqa9VdB6ZBz8MDQydinnShkTwgiGpy -xOoqhO753o2UT0qH8wECQQC99IEJWUnwvExVMkLaZH5NjAFJkb22sjkmuT11tAgU -RQgOMoDOm6driojnOnDWOkx1r1Gy9NgMLooduja4v6cx +MIICWwIBAAKBgQDC5yDPiVkvZ8tMn+gR8iPl8bHuP2Zfw/X9HjHuj0wqvcBKpZ/I +RNV3jxUbTXhusqJIpSQzBUACs8GHjVk8GgeqhvAE4ZwgSyIyxFGeQOQxw1f1mL8u +sf0sVr9J2ZvnF8yVX7UIGV6d32UiOSxI+2mWMXo1Td5gtMFgGV+WVn5VGQIDAQAB +AoGARXcXLKDpVooJ3W+IyQyiWsw//IhANpWjUOm4JiyQmxMyO+i4ACr4Yjpu7WI5 +MEseqAGj20NdwxjKO0PXsCIe5LmrGZ+SI8+CSERFOWXWRtCWz7y7SG30i1k6suvM +mwqWom0tJLwn93uA1lm/WSwKQwUrJRahRQd3EaZqrl7DP5kCQQD/8gbuYAT5pxQe +ULLGM0RvEsXxDYbEDxNbY5wrBazfklBwpumxZpFl6jEAT++7Kh2Ns3A7kB1oUNlA +FPYr+dYPAkEAwvHEwRtoyUr8jqoqVVJWI76CDmBjEOzVeMKW97ztqbs2LxZW8dYI +iOh/myFGpdoUwgu0U8w9MmXcj3ZeZCYKVwJALyQ+AJPw9qa+fuLwOq9gsHCtwrty +EhSQxSlwrz/pWniRll439vPkXfgntF4E0t1r+hiN2Hqv3/HcQgBaYzkuIwJAG023 +bACFxaOuCeFFepvEms8E8jSHy4gQQhCnCl24v8wLw76SQN7kZSCDNtwLRBFuVNtE +z3PMonFn2eQPRmGZkwJAP1c1BHprMQx/ruafdscROILv3JrH40C1bR6KVVBKt1dK +Qpnpgi7hK5rUQjDF8k3bn9ugTt06jyeHe/QhAml0kg== -----END RSA PRIVATE KEY----- diff --git a/mysql-test/std_data/host_old.MYD b/mysql-test/std_data/host_old.MYD new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/mysql-test/std_data/host_old.MYD diff --git a/mysql-test/std_data/host_old.MYI b/mysql-test/std_data/host_old.MYI Binary files differnew file mode 100644 index 00000000000..c4c3f225e25 --- /dev/null +++ b/mysql-test/std_data/host_old.MYI diff --git a/mysql-test/std_data/host_old.frm b/mysql-test/std_data/host_old.frm Binary files differnew file mode 100644 index 00000000000..10ef3ec58be --- /dev/null +++ b/mysql-test/std_data/host_old.frm diff --git a/mysql-test/std_data/mariadb-5.5-binlog.000001 b/mysql-test/std_data/mariadb-5.5-binlog.000001 Binary files differnew file mode 100644 index 00000000000..9b6f6dce0fb --- /dev/null +++ b/mysql-test/std_data/mariadb-5.5-binlog.000001 diff --git a/mysql-test/std_data/server-cert.pem b/mysql-test/std_data/server-cert.pem index 5922fe7ded7..d77bae800f2 100644 --- a/mysql-test/std_data/server-cert.pem +++ b/mysql-test/std_data/server-cert.pem @@ -1,41 +1,69 @@ Certificate: Data: - Version: 1 (0x0) - Serial Number: 1048578 (0x100002) - Signature Algorithm: md5WithRSAEncryption + Version: 3 (0x2) + Serial Number: 4 (0x4) + Signature Algorithm: sha1WithRSAEncryption Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB Validity - Not Before: Jan 29 11:56:49 2010 GMT - Not After : Jan 28 11:56:49 2015 GMT + Not Before: Feb 20 02:55:06 2010 GMT + Not After : Sep 3 02:55:06 2030 GMT Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=localhost Subject Public Key Info: Public Key Algorithm: rsaEncryption - Public-Key: (512 bit) - Modulus: - 00:cd:e4:87:51:9d:72:11:a0:d1:fa:f3:92:8b:13: - 1c:eb:f7:e2:9a:2f:72:a8:d6:65:48:d1:69:af:1b: - c0:4c:13:e5:60:60:51:41:e9:ab:a6:bc:13:bb:0c: - 5e:32:7c:d9:6c:9e:cd:05:24:84:78:db:80:91:2e: - d8:88:2b:c2:ed + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:e3:7d:4f:c2:23:77:a9:3a:2c:d2:69:59:a0:2f: + 4e:d1:51:4c:ae:8d:f5:17:cc:ce:58:9c:83:4f:0b: + a3:bb:29:a2:b8:1d:3e:1b:04:f9:a9:3e:e2:61:d0: + e6:7b:b9:7c:12:d8:1f:86:c9:53:b5:04:dd:df:26: + e9:c0:2b:de:4a:96:2e:f3:23:6f:79:6d:a9:d2:4e: + 17:af:2f:de:8b:68:44:ae:de:a3:e2:c4:37:1c:04: + ad:73:4b:85:f9:83:ac:fe:b7:c1:54:47:2e:96:d4: + 31:96:85:94:69:d6:5a:63:24:04:99:89:19:1d:56: + 8a:d1:77:aa:87:fb:38:cd:b7 Exponent: 65537 (0x10001) - Signature Algorithm: md5WithRSAEncryption - 73:ce:9c:6e:39:46:b4:14:be:da:3f:f3:1b:ba:90:bc:23:43: - d7:82:2a:70:4e:a6:d9:5a:65:5c:b7:df:71:df:75:77:c5:80: - a4:af:fa:d2:59:e2:fd:c9:9c:f0:98:95:8e:69:a9:8c:7c:d8: - 6f:48:d2:e3:36:e0:cd:ff:3f:d1:a5:e6:ab:75:09:c4:50:10: - c4:96:dd:bf:3b:de:32:46:da:ca:4a:f1:d6:52:8a:33:2f:ab: - f5:2e:70:3f:d4:9c:be:00:c8:03:f9:39:8a:df:5b:70:3c:40: - ef:03:be:7c:3d:1d:32:32:f3:51:81:e2:83:30:6e:3d:38:9b: - fb:3c + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + CC:8C:71:40:D0:0F:BF:D1:99:79:3F:1B:E9:10:76:19:67:36:0F:A3 + X509v3 Authority Key Identifier: + keyid:B1:FB:7E:77:B5:40:8D:68:11:7E:D9:11:E5:C3:C6:DA:4D:AC:51:B0 + DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB + serial:BE:58:AD:4C:1F:3D:25:95 + + Signature Algorithm: sha1WithRSAEncryption + 6f:ad:5e:59:fa:84:3a:be:e2:72:b1:e8:66:2a:4e:f8:73:19: + 11:06:11:92:78:56:3e:d6:e8:68:29:90:8b:59:d2:fe:aa:ae: + 25:59:c7:e9:99:bb:4a:06:43:dd:40:bd:cb:f4:ae:79:95:7d: + 8e:90:ef:58:d2:a8:fc:bf:07:f3:37:b2:9b:bd:da:e6:8c:56: + dd:5e:c6:4a:70:7c:3e:3d:a1:e8:35:06:b8:a7:7b:ac:26:85: + 54:5d:09:a2:7b:77:b4:17:7f:72:31:cb:ff:cc:67:6d:e6:3e: + c6:dc:96:eb:4a:0a:ae:e9:48:ae:8a:e0:d6:73:57:6e:32:4c: + 00:dc:28:da:55:b3:9f:9f:d8:98:cc:d9:f1:b6:b3:14:67:2e: + a1:47:1e:51:11:cf:70:9f:31:8f:ba:59:29:f2:d0:88:0b:e2: + 51:6b:f8:31:ed:6d:ac:00:5e:d3:78:4c:95:97:02:cc:74:2b: + 3b:c6:28:e6:2a:c3:30:99:35:b4:4d:31:46:d4:90:f2:47:ed: + 64:85:1a:75:2a:72:0a:2f:c6:3a:2f:d2:ac:6b:31:cc:e5:a8: + 07:c2:d6:22:f3:c6:0f:bf:67:d9:d6:b2:79:cd:48:b5:c3:e0: + e3:18:7f:b5:74:c9:43:19:fb:c4:93:29:ca:cc:90:2b:1b:6f: + 45:f6:25:f9 -----BEGIN CERTIFICATE----- -MIIBtzCCASACAxAAAjANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G -A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg -QUIwHhcNMTAwMTI5MTE1NjQ5WhcNMTUwMTI4MTE1NjQ5WjBGMQswCQYDVQQGEwJT -RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxEjAQBgNVBAMT -CWxvY2FsaG9zdDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDN5IdRnXIRoNH685KL -Exzr9+KaL3Ko1mVI0WmvG8BME+VgYFFB6aumvBO7DF4yfNlsns0FJIR424CRLtiI -K8LtAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAc86cbjlGtBS+2j/zG7qQvCND14Iq -cE6m2VplXLffcd91d8WApK/60lni/cmc8JiVjmmpjHzYb0jS4zbgzf8/0aXmq3UJ -xFAQxJbdvzveMkbaykrx1lKKMy+r9S5wP9ScvgDIA/k5it9bcDxA7wO+fD0dMjLz -UYHigzBuPTib+zw= +MIIDJTCCAg2gAwIBAgIBBDANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJTRTEQ +MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT +UUwgQUIwHhcNMTAwMjIwMDI1NTA2WhcNMzAwOTAzMDI1NTA2WjBGMQswCQYDVQQG +EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxEjAQBgNV +BAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA431PwiN3 +qTos0mlZoC9O0VFMro31F8zOWJyDTwujuymiuB0+GwT5qT7iYdDme7l8EtgfhslT +tQTd3ybpwCveSpYu8yNveW2p0k4Xry/ei2hErt6j4sQ3HAStc0uF+YOs/rfBVEcu +ltQxloWUadZaYyQEmYkZHVaK0Xeqh/s4zbcCAwEAAaOBozCBoDAJBgNVHRMEAjAA +MB0GA1UdDgQWBBTMjHFA0A+/0Zl5PxvpEHYZZzYPozB0BgNVHSMEbTBrgBSx+353 +tUCNaBF+2RHlw8baTaxRsKFIpEYwRDELMAkGA1UEBhMCU0UxEDAOBgNVBAgTB1Vw +cHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCggkAvlit +TB89JZUwDQYJKoZIhvcNAQEFBQADggEBAG+tXln6hDq+4nKx6GYqTvhzGREGEZJ4 +Vj7W6GgpkItZ0v6qriVZx+mZu0oGQ91Avcv0rnmVfY6Q71jSqPy/B/M3spu92uaM +Vt1exkpwfD49oeg1Brine6wmhVRdCaJ7d7QXf3Ixy//MZ23mPsbclutKCq7pSK6K +4NZzV24yTADcKNpVs5+f2JjM2fG2sxRnLqFHHlERz3CfMY+6WSny0IgL4lFr+DHt +bawAXtN4TJWXAsx0KzvGKOYqwzCZNbRNMUbUkPJH7WSFGnUqcgovxjov0qxrMczl +qAfC1iLzxg+/Z9nWsnnNSLXD4OMYf7V0yUMZ+8STKcrMkCsbb0X2Jfk= -----END CERTIFICATE----- diff --git a/mysql-test/std_data/server-key.pem b/mysql-test/std_data/server-key.pem index 1083495cb96..bf0ae205107 100644 --- a/mysql-test/std_data/server-key.pem +++ b/mysql-test/std_data/server-key.pem @@ -1,9 +1,15 @@ -----BEGIN RSA PRIVATE KEY----- -MIIBOwIBAAJBAM3kh1GdchGg0frzkosTHOv34povcqjWZUjRaa8bwEwT5WBgUUHp -q6a8E7sMXjJ82WyezQUkhHjbgJEu2Igrwu0CAwEAAQJBAJuwhFbF3NzRpBbEmnqJ -4GPa1UJMQMLFJF+04tqj/HxJcAIVhOJhGmmtYNw1yjz/ZsPnfJCMz4eFOtdjvGtf -peECIQDmFFg2WLvYo+2m9w9V7z4ZIkg7ixYkI/ObUUctfZkPOQIhAOUWnrvjFrAX -bIvYT/YR50+3ZDLEc51XxNgJnWqWYl1VAiEAnTOFWgyivFC1DgF8PvDp8u5TgCt2 -A1d1GMgd490O+TECIC/WMl0/hTxOF9930vKqOGf//o9PUGkZq8QE9fcM4gtlAiAE -iOcFpnLjtWj57jrhuw214ucnB5rklkQQe+AtcARNkg== +MIICXgIBAAKBgQDjfU/CI3epOizSaVmgL07RUUyujfUXzM5YnINPC6O7KaK4HT4b +BPmpPuJh0OZ7uXwS2B+GyVO1BN3fJunAK95Kli7zI295banSThevL96LaESu3qPi +xDccBK1zS4X5g6z+t8FURy6W1DGWhZRp1lpjJASZiRkdVorRd6qH+zjNtwIDAQAB +AoGAUb0o91y/FjMs/72S0pes/lDz+JRRSGfyjKxQEgrgndNsADOhqRu0iTdrKDJj +XnlbN3ooecnFJfnFrvTQcJhSmlS30j6VrBw6LXpCBK3dvjYgJ9LOne7WK+dF1+vS +FMQtsP04C56Sxy6HJDpMyWJ6oS3Bu169ygG2AxKo+Fk+E6ECQQD38w/MzmrARz2Z +AGeEPDUnVZPYgtmXkmks95S0/2jSoLhmgpvJimzxwpYwVG/BG8dSDVuTDu5kp05D +3bZIp3EzAkEA6uAwJsCZPtHXlWU3wYZJsA697rUNjPaCQOIaZ/lnh5RUHTmUiw1h +Oj/VORqKB0kXqcDfawwLjZEvh1Xli+H5bQJBANTmhw2TvEPnp/OFTl1UGUvyBmXl +TRMB639qAu07VfVtfYi/4ya1zn/0VmOfTOoigQ5qW9Q1AOu6YNCTQl62L9MCQQDc +YfEsW2kvNYxYJHoVfuBjbuGuOnn1e1Oqd70ZND59S6NFLMMBWlORaVWzWACNZ3rp +kAzSj6HDeqgjD2jsQONdAkEAt7S1YHUn8F760bRn4AnAto2TVOYdArtTP/wYjd4o +9rJREO/d8AYkYJ96APLvF0SZ4n3t1pLwQRsKKN8ZGTmzLA== -----END RSA PRIVATE KEY----- diff --git a/mysql-test/std_data/server8k-cert.pem b/mysql-test/std_data/server8k-cert.pem index e71ba5722b9..c4c4c3a6374 100644 --- a/mysql-test/std_data/server8k-cert.pem +++ b/mysql-test/std_data/server8k-cert.pem @@ -1,51 +1,69 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 5 (0x5) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB + Validity + Not Before: Feb 20 03:00:54 2010 GMT + Not After : Sep 3 03:00:54 2030 GMT + Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=server + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:c5:da:44:95:06:77:16:21:af:a0:c4:3c:e9:f8: + 1d:2d:95:f9:63:90:8c:3f:86:ba:77:76:4a:52:4b: + 6b:af:29:f5:1c:aa:d4:3f:3e:42:9f:6d:46:ba:86: + 90:b1:2d:cc:db:c6:33:15:a3:f4:af:53:33:4f:a1: + 56:d1:aa:3b:26:10:f7:64:b5:f9:bf:1b:b1:47:8e: + cc:a6:d6:0d:aa:4a:77:e3:a3:63:9d:2a:dc:65:f4: + 7f:91:17:38:2d:d6:cd:4e:8d:53:52:97:6e:87:fc: + 64:60:a6:a1:00:ac:96:6c:e4:42:94:75:17:46:6f: + 91:b5:dd:06:47:ed:05:e3:db + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + 6E:60:3F:29:13:60:99:ED:0C:F7:15:B5:DB:7B:1C:FB:6F:60:19:ED + X509v3 Authority Key Identifier: + keyid:B1:FB:7E:77:B5:40:8D:68:11:7E:D9:11:E5:C3:C6:DA:4D:AC:51:B0 + DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB + serial:BE:58:AD:4C:1F:3D:25:95 + + Signature Algorithm: sha1WithRSAEncryption + 63:2e:0f:07:14:06:cf:74:90:3d:37:42:f2:48:70:60:21:bc: + 34:52:31:f1:87:70:d2:b2:fb:ff:13:38:dc:f0:5e:43:d7:ee: + a7:c7:1f:ac:aa:d2:8c:4f:fa:3c:4c:73:f6:b6:c2:0c:a0:ea: + a2:c9:e2:73:61:c3:2e:78:40:0f:2a:d3:63:50:9b:b8:f9:89: + 40:ed:98:08:97:c3:07:24:17:34:b5:78:89:0a:bb:83:4c:e2: + 5c:2e:13:d6:21:30:ad:30:48:b5:70:12:ff:4a:6f:42:f0:f8: + 9f:b1:4b:bd:89:2b:f0:9d:e2:49:2b:35:69:18:1f:76:40:b4: + 76:bd:cb:dd:27:2f:c0:c1:e2:33:3e:6e:df:68:54:19:92:8a: + bb:13:9c:cf:d6:17:56:da:bf:0d:64:70:3a:45:b7:aa:5f:e3: + f5:96:ae:34:f2:17:37:27:d0:4b:e8:30:4a:c0:02:42:e2:d2: + 30:eb:eb:c7:d7:ec:d8:df:5c:43:58:e2:6f:b7:58:54:0d:c4: + 01:71:2d:59:8f:44:c7:a1:6c:0b:41:28:fa:b7:63:a7:68:d3: + 4f:c3:0f:17:9e:b2:32:50:e6:0b:87:3d:e2:39:47:c0:d8:0a: + 3b:f6:af:50:68:0f:9d:ef:6e:34:0d:3a:07:94:f8:a4:d7:24: + 86:32:d3:b4 -----BEGIN CERTIFICATE----- -MIIJFDCCBPwCAQEwDQYJKoZIhvcNAQEEBQAwTjELMAkGA1UEBhMCU0UxEDAOBgNV -BAgTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCMQ0wCwYDVQQLEwRUZXN0MQsw -CQYDVQQDEwJDQTAeFw0xMDA3MjgxNDA3MjhaFw0xODEwMTQxNDA3MjhaMFIxCzAJ -BgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQjEN -MAsGA1UECxMEVGVzdDEPMA0GA1UEAxMGc2VydmVyMIIEIjANBgkqhkiG9w0BAQEF -AAOCBA8AMIIECgKCBAEA6h3v1OWb9I9U/Z8diBu/xYGS8NCTD3ZESboHxVI2qSEC -PgxNNcG8Lh0ktQdgYcOe64MnDTZX0Bibm47hoDldrAlTSffFxQhylqBBoXxDF+Lr -hXIqCz7K0PsK+bYusL9ezJ7PETDnCT7oy95q4GXbKsutbNsm9if4ZE41gs2KnoU2 -DA7kvMmkKojrMIL4+BqTXA20LLo0iSbgvUTvpSJw4u96BeyzMNnxK2wP5vvTtUo5 -hACbfU87YjaSKs+q2VXCzfyYGZk1L1xk5GUI0bP+jutf1dDzNttW2/q2Nf5rxx09 -Gh/GwmOnEk1O7cOZ8VQCsOHirIM39NuSARsY6Y3G5XM4k2W4nxyR/RtdG9bvs/33 -aGsZ5V5yp7WSs8s9HHwaCPSsUiLKckQ7uA0TTRgbeweMrrLKovG57jsbBBB8pQD4 -PRd31qgxCdstWXHiWwRyI8vOLWENPXPFqA/rJwwqNdWTogy38aqVXxGYR8PIwjA2 -OaIwFjwGZcsPNLqw6bgAN8O2UBqZHWiMF8mi7brvioDvAIufZuqa2SqT/At45H83 -psQ6R4FsxZt6SAK7EsdPo8OYTrY1i4iPZd/eKhnEu2srEZgsKRwY5H1mvDH5fWCc -HSFu07sWmlmK6Or65Fsa0IaKLJiQDVVETd6xrI0wkM4AOcbKDrS7aywJ426dopbs -+LFdt4N0cdII4gBgJAfLuuA2yrDXRq4P6cgpVMy0R+0dEYE8zzm8zf1a+Ud273LS -9+LB+LJKwqbW8nOPBoiekimIKfJYoOA4+C/mAjsYl1sVjjEhXJAs9S9L2UvnUk1P -sZi4UKHI6eAIEl7VM1sQ4GbdZ0px2dF2Ax7pGkhD+DLpYyYkCprharKZdmuUNLUd -NhXxi/HSEiE+Uy+o8RIzmH7LuROl/ZgnfHjJEiBLt2qPvwrwYd4c3XuXWs4YsWfV -JTt8Mx2ihgVcdGy9//shCSmgJwR1oWrhgC10AEL2fKeRnYUal1i+IxFPp7nb8uwx -UADgR0cY4A3qR/JP489QFIcxBTVs65De+Bq3ecnujk6yeGpD9iptonq4Y8uNZMc1 -kOE7GiFGwR4EufT5SEMh+tUkjth2r+842vmZZuxrVQaohDiATmIJA07W51zKH+nQ -uw4qVKnAhPaDLCLc7YMIH9JcmkeQX0nf8/S2O2WYDH8glVDi5hfW08tCmV647vRY -nTIywUTO0lFpz7M+VyMNaJ6yXU6biBV5hLAI8C5ldr/SWI789W2+ebBaJ9gfK+PT -trohFSK37GcoSH4V6qSLJHCBASEsiddqHIHMLJZRYD+B6J3tLhjVUM43u+MEGbFT -d33ZDke/WzLTExWkaOv36e67gDBmgDuj9yroq3wGfwIDAQABMA0GCSqGSIb3DQEB -BAUAA4IEAQCc9RBhRbuWlmRZPZkqIdi5/+enyjoMmOa6ryJPxFSP8D2jrlHgQsk1 -+GsJmPFT3rwWfoGAQu/aeSX4sp8OhKVJtqNA6MJrGYnZIMolgYa1wZPbkjJsdEfi -UsZdIB0n2+KA0xwEdGPdkGCfNPBtOg557DkcyEvsIZ9ELp4Pp2XzWRhyFGasJZc4 -YwgD/3K2rpOPZoMkBKeKqV19j41OfLKGBVyuaqzitbu9+KT4RU1ibr2a+UuFCwdT -oqyN7bfWXjcjXOMkxCsOmLfKmqQxs7TEOVrYPTdYjamDxLy/e5g5FgoCxGY8iil0 -+YFLZyH6eEx/Os9DlG/M3O1MeRD9U97CdsphbDVZIDyWw5xeX8qQHJe0KSprAgiG -TLhTZHeyrKujQCQS1oFFmNy4gSqXt0j1/6/9T80j6HeyjiiYEaEQK9YLTAjRoA7W -VN8wtHI5F3RlNOVQEJks/bjdlpLL3VhaWtfewGh/mXRGcow84cgcsejMexmhreHm -JfTUl9+X1IFFxGq2/606A9ROQ7kN/s4rXu7/TiMODXI/kZijoWd2SCc7Z0YWoNo7 -IRKkmZtrsflJbObEuK2Jk59uqzSxyQOBId8qtbPo8qJJyHGV5GCp34g4x67BxJBo -h1iyVMamBAS5Ip1ejghuROrB8Hit8NhAZApXju62btJeXLX+mQayXb/wC/IXNJJD -83tXiLfZgs6GzLAq7+KW/64sZSvj87CPiNtxkvjchAvyr+fhbBXCrf4rlOjJE6SH -Je2/Jon7uqijncARGLBeYUT0Aa6k1slpXuSKxDNt7EIkP21kDZ5/OJ0Y1u587KVB -dEhuDgNf2/8ij7gAQBwBoZMe1DrwddrxgLLBlyHpAZetNYFZNT+Cs/OlpqI0Jm59 -kK9pX0BY4AGOd23XM3K/uLawdmf67kkftim7aVaqXFHPiWsJVtlzmidKvNSmbmZe -dOmMXp6PBoqcdusFVUS7vjd3KAes5wUX/CaTyOOPRu0LMSnpwEnaL76IC9x4Jd6d -7QqY/OFTjpPH8nP57LwouiT6MgSUCWGaOkPuBJ9w9sENSbbINpgJJ42iAe2kE+R7 -qEIvf/2ETCTseeQUqm2nWiSPLkNagEh6kojmEoKrGyrv3YjrSXSOY1a70tDVy43+ -ueQDQzNZm3Q7inpke2ZKvWyY0LQmLzP2te+tnNBcdLyKJx7emPRTuMUlEdK7cLbt -V3Sy9IKtyAXqqd66fPFj4NhJygyncj8M6CSqhG5L0GhDbkA8UJ8yK/gfKm3h5xe2 -utULK5VMtAhQt6cVahO59A9t/OI17y45bmlIgdlEQISzVFe9ZbIUJW44zBfPx74k -/w8pMRr8gEuRqpL2WdJiKGG6lhMHLVFo +MIIDIjCCAgqgAwIBAgIBBTANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJTRTEQ +MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT +UUwgQUIwHhcNMTAwMjIwMDMwMDU0WhcNMzAwOTAzMDMwMDU0WjBDMQswCQYDVQQG +EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxDzANBgNV +BAMTBnNlcnZlcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxdpElQZ3FiGv +oMQ86fgdLZX5Y5CMP4a6d3ZKUktrryn1HKrUPz5Cn21GuoaQsS3M28YzFaP0r1Mz +T6FW0ao7JhD3ZLX5vxuxR47MptYNqkp346NjnSrcZfR/kRc4LdbNTo1TUpduh/xk +YKahAKyWbORClHUXRm+Rtd0GR+0F49sCAwEAAaOBozCBoDAJBgNVHRMEAjAAMB0G +A1UdDgQWBBRuYD8pE2CZ7Qz3FbXbexz7b2AZ7TB0BgNVHSMEbTBrgBSx+353tUCN +aBF+2RHlw8baTaxRsKFIpEYwRDELMAkGA1UEBhMCU0UxEDAOBgNVBAgTB1VwcHNh +bGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCggkAvlitTB89 +JZUwDQYJKoZIhvcNAQEFBQADggEBAGMuDwcUBs90kD03QvJIcGAhvDRSMfGHcNKy ++/8TONzwXkPX7qfHH6yq0oxP+jxMc/a2wgyg6qLJ4nNhwy54QA8q02NQm7j5iUDt +mAiXwwckFzS1eIkKu4NM4lwuE9YhMK0wSLVwEv9Kb0Lw+J+xS72JK/Cd4kkrNWkY +H3ZAtHa9y90nL8DB4jM+bt9oVBmSirsTnM/WF1bavw1kcDpFt6pf4/WWrjTyFzcn +0EvoMErAAkLi0jDr68fX7NjfXENY4m+3WFQNxAFxLVmPRMehbAtBKPq3Y6do00/D +DxeesjJQ5guHPeI5R8DYCjv2r1BoD53vbjQNOgeU+KTXJIYy07Q= -----END CERTIFICATE----- diff --git a/mysql-test/std_data/server8k-key.pem b/mysql-test/std_data/server8k-key.pem index 99e7417733e..d3c3ec5baba 100644 --- a/mysql-test/std_data/server8k-key.pem +++ b/mysql-test/std_data/server8k-key.pem @@ -1,99 +1,15 @@ -----BEGIN RSA PRIVATE KEY----- -MIISKQIBAAKCBAEA6h3v1OWb9I9U/Z8diBu/xYGS8NCTD3ZESboHxVI2qSECPgxN -NcG8Lh0ktQdgYcOe64MnDTZX0Bibm47hoDldrAlTSffFxQhylqBBoXxDF+LrhXIq -Cz7K0PsK+bYusL9ezJ7PETDnCT7oy95q4GXbKsutbNsm9if4ZE41gs2KnoU2DA7k -vMmkKojrMIL4+BqTXA20LLo0iSbgvUTvpSJw4u96BeyzMNnxK2wP5vvTtUo5hACb -fU87YjaSKs+q2VXCzfyYGZk1L1xk5GUI0bP+jutf1dDzNttW2/q2Nf5rxx09Gh/G -wmOnEk1O7cOZ8VQCsOHirIM39NuSARsY6Y3G5XM4k2W4nxyR/RtdG9bvs/33aGsZ -5V5yp7WSs8s9HHwaCPSsUiLKckQ7uA0TTRgbeweMrrLKovG57jsbBBB8pQD4PRd3 -1qgxCdstWXHiWwRyI8vOLWENPXPFqA/rJwwqNdWTogy38aqVXxGYR8PIwjA2OaIw -FjwGZcsPNLqw6bgAN8O2UBqZHWiMF8mi7brvioDvAIufZuqa2SqT/At45H83psQ6 -R4FsxZt6SAK7EsdPo8OYTrY1i4iPZd/eKhnEu2srEZgsKRwY5H1mvDH5fWCcHSFu -07sWmlmK6Or65Fsa0IaKLJiQDVVETd6xrI0wkM4AOcbKDrS7aywJ426dopbs+LFd -t4N0cdII4gBgJAfLuuA2yrDXRq4P6cgpVMy0R+0dEYE8zzm8zf1a+Ud273LS9+LB -+LJKwqbW8nOPBoiekimIKfJYoOA4+C/mAjsYl1sVjjEhXJAs9S9L2UvnUk1PsZi4 -UKHI6eAIEl7VM1sQ4GbdZ0px2dF2Ax7pGkhD+DLpYyYkCprharKZdmuUNLUdNhXx -i/HSEiE+Uy+o8RIzmH7LuROl/ZgnfHjJEiBLt2qPvwrwYd4c3XuXWs4YsWfVJTt8 -Mx2ihgVcdGy9//shCSmgJwR1oWrhgC10AEL2fKeRnYUal1i+IxFPp7nb8uwxUADg -R0cY4A3qR/JP489QFIcxBTVs65De+Bq3ecnujk6yeGpD9iptonq4Y8uNZMc1kOE7 -GiFGwR4EufT5SEMh+tUkjth2r+842vmZZuxrVQaohDiATmIJA07W51zKH+nQuw4q -VKnAhPaDLCLc7YMIH9JcmkeQX0nf8/S2O2WYDH8glVDi5hfW08tCmV647vRYnTIy -wUTO0lFpz7M+VyMNaJ6yXU6biBV5hLAI8C5ldr/SWI789W2+ebBaJ9gfK+PTtroh -FSK37GcoSH4V6qSLJHCBASEsiddqHIHMLJZRYD+B6J3tLhjVUM43u+MEGbFTd33Z -Dke/WzLTExWkaOv36e67gDBmgDuj9yroq3wGfwIDAQABAoIEAQCSt6YoZqigz/50 -XvYT6Uf6T6S1lBDFXNmY1qOuDkLBJTWRiwYMDViQEaWCaZgGTKDYeT3M8uR/Phyu -lRFi5vCEMufmcAeZ3hxptw7KU+R8ILJ207/zgit6YglTys9h5txTIack39+6FJmx -wbZ64HpETJZnpMO6+fuZaMXyLjuT8mmXjvHcOgXOvjWeFkZOveDhjJkAesUXuqyX -EI+ajoXuQiPXeKonkD2qd7NTjzfy4gw/ZF4NXs0ZVJeviqtIPo2xp33udOw2vRFh -bMvlF4cNLAbIKYVyOG0ruOfd2I7Unsc/CvD1u5vlRVuUd8OO0JZLIZR7hlRX+A58 -8O1g2H/wJZAsF1BnLnFzDGYCX2WjCCK3Zn85FkKGRa0lTdYDduad/C/N3Y2/pHFE -e7U/2D7IkEei59tD2HcsDBB3MJnckkn/hyiL9qWcxqWZ61vurE+XjU6tc6fnfhk9 -pJQ6yU3epPU7Vfsk0UGA7bbgKpsyzyH8Zl76YC2mN2ZVJjZekfhY+ibT9odEPdOl -yLB5iXA6/WhKkDWaOqZGOH+7MblWgT9wHINlcn+nKzOr00JHl26ac6aMlXXi9vbe -4jgJbFK1HYlFIndyX/BdqRTsFemDoDrVqrEYsaONoVYDd9c5qrqYOeh34DhOksQW -hNwWBfmMlfzgOGtCYhMeK+AajqTtUbMYQA6qp47KJd/Oa5Dvi3ZCpvZh3Ll5iIau -rqCtmojsWCqmpWSu7P+Wu4+O3XkUMPdQUuQ5rJFESEBB3yEJcxqk/RItTcKNElNC -PASrPrMD9cli7S/pJ+frbhu1Gna1ArXzXQE9pMozPaBpjCig7+15R0lL3pmOKO6e -WK3dgSwrnW6TQdLPlSD4lbRoiIdTHVBczztDeUqVvFiV3/cuaEi1nvaVdAYLqjuL -ogK4HwE/FQ54S0ijAsP52n25usoH6OTU3bSd/7NTp0vZCy3yf10x7HUdsh2DvhRO -3+TSK5t0yz0Nt7hNwcI6pLmWUIYcZgpFc/WsiiGscTfhy8rh3kRHI8ylGq53KNF+ -yCVmjqnBRWs91ArxmeF1ctX2t3w5p7gf65hJWqoX/2DiSi5FBsr6HLxa5sUi4wRZ -136aCNt5Wu7w+AzPDbQW6qKUGSyfHJAw4JZasZcaZLise5IWb1ks0DtFbWWdT3ux -8r2AM7IO1WopnekrYCnx/aBvBAv4NjWozVA517ztVttPERt3AGb4nm387nYt5R2U -NO2GBWcDyT8JQLKmffE1AkWolCR1GsvcNLQfLCbnNppgsnsLE/viTG4mq1wjnd8O -2Q8nH1SVTuyGFREMp/zsiAEaGfdd0hI2r1J7OdNPBBCtmhITsy9ZYHqm5vrGvy3s -vi2GuB2RAoICAQD/oWUsg4eTJxHifTJLz/tVSTXnw7DhfbFVa1K1rUV63/MRQAFW -pabN4T6Yfp3CpdRkljCA8KPJZj7euwhm4OEg1ulpOouA+cfWlE9RFE8wyOK5SYwM -k+nk31P9MUC866pZg/ghzBGDub91OW1+ZGEtqnLI/n/LhiAIWt0hJvgZclTc1cAL -xffHVlFwoSyNl/nc3ueZCC95nOLst2XcuxZLLbOFtZCmDYsp49q/Jn6EFjn4Ge2o -qp38z6eZgDMP1F4lb9nDqXPHfUSt2jxKlmpfXS+IPKdba67+EjhbtmUYzaR4EoPI -zh+o6SrVWT6Yve7KGiYv06fuRz1m/lLQO/Arbd9ntSjgn+ZEXGOkbhnHUX3DJ4ny -/6XEGB9NLQjern4uNTn0AaV+uvhncapFMaIBnVfq0Cw8eog0136PBYRaVX7T44j5 -HwIyGXWtYGA/SzDEQoksD0Y/T61BEGnLZaKeavNd82WwFvcYHZtE0J4aQGjCEE7N -+nijzCy+j5ETmme9KJvQHpEyXP3N4RBko1eWvyTwFZDdIXtoa6TTEI51lm+FXJ/b -Y+BzMr6KRo29FB+7//1ptUoMvn5hzL0PwOv2ZSTQuoG5hLDEbxWXLNhd1VHcfznF -3EZHwfD2F8aGQ3kz+fkMTNfK955KorDrmLgvmV9eZZ5yQxGZrs5H5YfKpwKCAgEA -6nSUbzfSdVFUH89NM5FmEJgkD06vqCgHl2mpyF+VmDGcay4K06eA4QbRO5kns13+ -n6PcBl/YVW/rNE8iFi+WxfqUpAjdR1HlShvTuTRVqtFTfuN8XhbYU6VMjKyuE0kd -LKe3KRdwubjVNhXRZLBknU+3Y/4hnIR7mcE3/M5Zv5hjb7XnwWg/SzxV9WojCKiu -vQ7cXhH5/o7EuKcl1d6vueGhWsRylCG9RimwgViR2H7zD9kpkOc0nNym9cSpb0Gv -Lui4cf/fVwIt2HfNEGBjbM/83e2MH6b8Xp1fFAy0aXCdRtOo4LVOzJVAxn5dERMX -4JJ4d5cSFbssDN1bITOKzuytfBqRIQGNkOfizgQNWUiaFI0MhEN/icymjm1ybOIh -Gc9tzqKI4wP2X9g+u3+Oof1QaBcZ4UbZEU9ITN87Pa6XVJmpNx7A81BafWoEPFeE -ahoO4XDwlHZazDuSlOseEShxXcVwaIiqySy7OBEPBVuYdEd2Qw/z3JTx9Kw8MKnf -hu+ar5tz5dPnJIsvLeYCcJDe/K6loiZuHTtPbWEy9p6It7qubQNPBvTSBN5eVDKc -Q2bTQNCx8SAAA9C5gJiwWoQKsXJzbRFRY77P9JjuGpua3YJ2nYBHEJmF+fp1R33c -uHIyMphPMkKC4GC3/43kkMr6tck8kZbXGSYsLsBr2GkCggIBAJvvrjILQianzKcm -zAmnI6AQ+ssYesvyyrxaraeZvSqJdlLtgmOCxVANuQt5IW9djUSWwZvGL4Np1aw0 -15k6UNqhftzsE7FnrVneOsww4WXXBUcV8FKz4Bf3i9qFswILmGzmrfSf8YczRfGS -SJKzVPxwX3jwlrBmbx/pnb7dcLbFIbNcyLvl1ZJJu4BDMVRmgssTRp/5eExtQZg4 -//A4SA8wH7TO3yAMXvn8vrGgH8kfbdlEp88d1SYk3g4rP/rGB3A63NIYikIEzmJn -ICQ3wUfPJnGq3kRMWgEuyCZaCy2oNE3yrWVPJ8z3/2MJ/79ZDVNHxEeki2o1FuW+ -+nGAPq+fZIp03iy4HdVRro7dgugtc9QaSHJtNId8V4vSjviX5Oz3FxUb9AJst58S -nVV8Q2FMxBa/SlzSOkhRtCg2q1gXkzhaMnIVUleRZFGQ2uWBToxKMjcoUifIyN1J -z999bkfI4hBLq5pRSAXz+YVu5SMKa10GaawIwJLat+i+1zboF6QyI2o/Wz8nrsNq -KX/ajFGu5C94WFgsVoWKNI90KBLe48Ssje9c68waBlV/WHMg1YLvU3yqVDOV+K5c -IHB9tPMnG+AgBYZPxSzuvnLrrkj/GeKx0WI7TrvzOLRGKJo6irMEJ8IzFegASRUq -TVZKYQDYRG7m+lKlSxU+pyMAh2c9AoICAE4kavCip1eIssQjYLTGSkFPo/0iGbOv -G9CgXAE3snFWX67tWphupKrbjdMSWcQTmPD2OTg6q6zWL4twsIi6dcMooHAHsFC7 -//LyUV/SDJdxSyXohiQJ8zH1zwy35RDydnHSuF5OvLh53T44iWDI1dAEqLgAFI3J -LjTxzEpLMGiGTuYFt+ejai0WQAQayvBw4ESM9m+4CB2K0hBFTXv5y5HlnNTW0uWC -VUZUUMrbjUieDz8B/zOXi9aYSGFzmZFGUDAPSqJcSMEELemPDF7f8WNr8vi42tIV -4tlaFD1nep4F9bWMiCXU6B2RxVQi+7vcJEIqL1KUnGd3ydfD00K+ng4Xnj7Vz/cz -QE7CqrpFaXmPlCMzW6+dm51/AyhHXDLkL2od05hiXcNkJ7KMLWRqwExHVIxM3shR -x7lYNl3ArUsCrNd6m4aOjnrKFk7kjeLavHxskPccoGKrC9o0JMfTkWLgmuBJFQ0S -N/HzIbcvIFWF0Ms4ojb50yp6ziXhXfJOO/0KUQEki71XIhvw89mVZszDzD5lqzjf -HCZMBU4MbmL6NdEevFIDH0zPPkx3HPNtJt3kIJbit9wI8VhUMe+ldGnGxpWb8tKw -SfM3vrHkYr+lizk26XfXMFhdAuVtT7dzQKSNEyP/1a2Hs307Xzgiv8JulJ8QIkrX -/nsYWPOAGLG5AoICABmdW9Ppkvuhb1AEcjTWb+XCyopoBc6vit/uQWD9uO+CeX7a -cfzq+iH01CAjyVMc4E1JDc5Lpi106U+GRGcAAaPJB2Sp5NznoxaOVrb71blu4Q4x -bNjtKM/P/DXpO+yJYoOPdKtaSDhtnfNDM7H/jztJ3XIrOltKA7CcRDohbBWIx8Q0 -0uEpvfFpZZBco3yVmjP0RLgIVYn/ZDj9wGhSvFWIJ5vv6GXmtDrcHGMLxcfv7t76 -UVcMW/Yy4mYJRCzGOrWagyVijJ6MTVNciqadWcH1KcbB3EGoMFYMn61or2qJABPM -xz89IlhnROU1Re3X/QRx5t86cw6oa+FqrWMOhSs31I0dNWSuS/xDympG27YIYSDd -mv5seT78GjFmMJC5pPOLoXsbTPB0HpsX2/UL/w/eRAfilTOef/Cf9VE5MP/C2YR7 -NBxUU7/+21D6WvdtBTcZbrXWGroAo8zPP+PwX0+c6WoAvqDJvCPndp8xZhSgEJN/ -0kScptezi8n3ZHI95EA9U5mAHxHz0IhDDVzWw/z1f1SBPxKVX3+By3zaa3lrD2ch -cHq7nBkX72veEevnHUY8Z2rHE2G2jdmRfOtwm4sjL0VBV9fRRoxzJWRduKyeOtDL -EhhBhUoTrT48UnfW9hxnbNLB9P/hh+UJu9HrS2uAwHoGE1+8gcyundupGDBn +MIICXgIBAAKBgQDF2kSVBncWIa+gxDzp+B0tlfljkIw/hrp3dkpSS2uvKfUcqtQ/ +PkKfbUa6hpCxLczbxjMVo/SvUzNPoVbRqjsmEPdktfm/G7FHjsym1g2qSnfjo2Od +Ktxl9H+RFzgt1s1OjVNSl26H/GRgpqEArJZs5EKUdRdGb5G13QZH7QXj2wIDAQAB +AoGBAJLCjh7Q9eLnx+QDzH9s+Q/IcH4nSbERmh1lFEopAc6j29qQ6PGkmDy0DUPs +70VOCOh5A4mo3aZzm9sUfVb24/nRtmyTP/AtMuIVGCsUqzI28dJRGvRlY0aSQG/C +ILqMP69kiMNGBvuyEIiJhisOmMvDFEp7HrrXHJM9qcc217DpAkEA4nzJ9yyy2e4O +r6/D711hdfcU/F+ktXw+pL77kSSdTABUap92Uv2RL36UA4q5h8RNvq/GrzMNm6Ye +u2IMvBCiTQJBAN+iRbiMJCSitTg5YVMluVbT87co7jbTqk7LN1ujyIFEklm4xlHG +DLJNgEoDR7QJtAkL++FyogC4zsQsey5voscCQQCp54trTbDuI9QIoAaQrrDKWgz4 +NpfNPeOQm2UFQT5vIWAyjGWrZGViB8bp0UvVOcJI5nxaOiZfOYOcdrWu75uRAkAn +67zMc9/j1lPJRJz2Dc7nDBD+ikTz7pcBV897AWLCiK4jbBOi91q+3YzgKXO8VNsZ +nlUJasA2psbqSBJ5OJ5zAkEA2UxoMju54hASjT54Z92IzraVw4Vo8CYwOcw5fr7z ++m5xg1mmWdLBclmZ+WjARzDuTHIW6u/WCxNGg42AykWzfw== -----END RSA PRIVATE KEY----- diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index 7f676b7ccfd..d80b4aaf822 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -9,9 +9,9 @@ sub skip_combinations { # disable innodb/xtradb combinatons for configurations that were not built push @combinations, 'innodb_plugin' unless $ENV{HA_INNODB_SO}; - # if something is compiled in, it's innodb. xtradb is MODULE_ONLY: - push @combinations, 'innodb' unless $::mysqld_variables{'innodb'} eq "ON"; - push @combinations, 'xtradb'; + # if something is compiled in, it's xtradb. innodb is MODULE_ONLY: + push @combinations, 'xtradb' unless $::mysqld_variables{'innodb'} eq "ON"; + push @combinations, 'innodb'; # XtraDB is RECOMPILE_FOR_EMBEDDED, ha_xtradb.so cannot work with embedded server push @combinations, 'xtradb_plugin' if not $ENV{HA_XTRADB_SO} @@ -43,10 +43,14 @@ sub skip_combinations { unless $::mysqld_variables{'innodb'} eq "ON"; # disable tests that use ipv6, if unsupported - use Socket; - $skip{'include/check_ipv6.inc'} = 'No IPv6' - unless socket SOCK, PF_INET6, SOCK_STREAM, getprotobyname('tcp'); - close SOCK; + sub ipv6_ok() { + use Socket; + return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp'); + # eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation + eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) }; + return $! != 101; + } + $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok(); %skip; } diff --git a/mysql-test/suite/archive/discover.result b/mysql-test/suite/archive/discover.result index c4f4bb4104f..e1ca9cb6a65 100644 --- a/mysql-test/suite/archive/discover.result +++ b/mysql-test/suite/archive/discover.result @@ -135,4 +135,7 @@ select * from t1; a flush tables; create table t1 (a int) engine=archive; +flush tables; +create table t1 (a int) engine=archive; +ERROR 42S01: Table 't1' already exists drop table t1; diff --git a/mysql-test/suite/archive/discover.test b/mysql-test/suite/archive/discover.test index 8dfe09f7b33..20cb69efa00 100644 --- a/mysql-test/suite/archive/discover.test +++ b/mysql-test/suite/archive/discover.test @@ -126,5 +126,9 @@ select * from t1; flush tables; remove_file $mysqld_datadir/test/t1.ARZ; create table t1 (a int) engine=archive; +remove_file $mysqld_datadir/test/t1.frm; +flush tables; +--error ER_TABLE_EXISTS_ERROR +create table t1 (a int) engine=archive; drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_checkpoint.result b/mysql-test/suite/binlog/r/binlog_checkpoint.result index 8a57b26ebb0..2ce9ed760f5 100644 --- a/mysql-test/suite/binlog/r/binlog_checkpoint.result +++ b/mysql-test/suite/binlog/r/binlog_checkpoint.result @@ -115,3 +115,4 @@ master-bin.000006 # DROP TABLE t1, t2; SET GLOBAL max_binlog_size= @old_max_binlog_size; SET GLOBAL innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; +SET debug_sync = 'reset'; diff --git a/mysql-test/suite/binlog/t/binlog_checkpoint.test b/mysql-test/suite/binlog/t/binlog_checkpoint.test index 4fa40b23547..356f860af32 100644 --- a/mysql-test/suite/binlog/t/binlog_checkpoint.test +++ b/mysql-test/suite/binlog/t/binlog_checkpoint.test @@ -143,3 +143,4 @@ INSERT INTO t1 VALUES (31, REPEAT("x", 4100)); DROP TABLE t1, t2; SET GLOBAL max_binlog_size= @old_max_binlog_size; SET GLOBAL innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; +SET debug_sync = 'reset'; diff --git a/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test index c1756b22eab..daf4969be85 100644 --- a/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test +++ b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test @@ -45,8 +45,8 @@ INSERT INTO t3 VALUES (1),(2); INSERT INTO test1.t1 VALUES (3,3); USE test1; -LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1
- FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
+LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1 + FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n'; DELETE FROM test3.t3 WHERE a=1; flush logs; diff --git a/mysql-test/suite/csv/csv.result b/mysql-test/suite/csv/csv.result index 5ac79a23c47..8d497f52b31 100644 --- a/mysql-test/suite/csv/csv.result +++ b/mysql-test/suite/csv/csv.result @@ -5379,7 +5379,7 @@ ERROR 42000: The storage engine for the table doesn't support nullable columns SHOW WARNINGS; Level Code Message Error 1178 The storage engine for the table doesn't support nullable columns -Error 1005 Can't create table `test`.`t1` (errno: 138 "Unsupported extension used for table") +Warning 1112 Table 't1' uses an extension that doesn't exist in this MariaDB version create table t1 (c1 tinyblob not null) engine=csv; insert into t1 values("This"); update t1 set c1="That" where c1="This"; @@ -5485,3 +5485,11 @@ SELECT * FROM t1; ERROR HY000: Table 't1' is marked as crashed and should be repaired DROP TABLE t1; End of 5.1 tests +# +# MDEV-5612 - my_rename() deletes files when it shouldn't +# +CREATE TABLE t1(a INT NOT NULL) ENGINE=CSV; +RENAME TABLE t1 TO t2; +SELECT * FROM t2; +a +DROP TABLE t2; diff --git a/mysql-test/suite/csv/csv.test b/mysql-test/suite/csv/csv.test index 768a21912a2..90617d06599 100644 --- a/mysql-test/suite/csv/csv.test +++ b/mysql-test/suite/csv/csv.test @@ -1917,3 +1917,12 @@ SELECT * FROM t1; DROP TABLE t1; --echo End of 5.1 tests + +--echo # +--echo # MDEV-5612 - my_rename() deletes files when it shouldn't +--echo # +CREATE TABLE t1(a INT NOT NULL) ENGINE=CSV; +move_file $MYSQLD_DATADIR/test/t1.CSV $MYSQLD_DATADIR/test/t2.CSV; +RENAME TABLE t1 TO t2; +SELECT * FROM t2; +DROP TABLE t2; diff --git a/mysql-test/suite/federated/federated.result b/mysql-test/suite/federated/federated.result index 4d35550f210..a71a16e07c7 100644 --- a/mysql-test/suite/federated/federated.result +++ b/mysql-test/suite/federated/federated.result @@ -6,7 +6,7 @@ SHOW WARNINGS; Level Code Message Error 1 server name: 'non_existing' doesn't exist! Error 1 Can't create/write to file 'non_existing' (Errcode: 14 "Bad address") -Error 1005 Can't create table `test`.`t1` (errno: 1 "Operation not permitted") +Warning 1030 Got error 1 "Operation not permitted" from storage engine FEDERATED create table t1 (a int); create table fed (a int) engine=Federated CONNECTION='mysql://root@127.0.0.1:MASTER_PORT/test/t1'; drop table t1; diff --git a/mysql-test/suite/federated/federated.test b/mysql-test/suite/federated/federated.test index cb14dc2a239..0cb0551d23e 100644 --- a/mysql-test/suite/federated/federated.test +++ b/mysql-test/suite/federated/federated.test @@ -6,6 +6,7 @@ connection master; # --error 1 CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='non_existing'; +--replace_result "Not owner" "Operation not permitted" SHOW WARNINGS; # diff --git a/mysql-test/suite/federated/federated_archive.result b/mysql-test/suite/federated/federated_archive.result index c2f43458126..6ff1da69725 100644 --- a/mysql-test/suite/federated/federated_archive.result +++ b/mysql-test/suite/federated/federated_archive.result @@ -20,13 +20,13 @@ id name 1 foo 2 bar DELETE FROM federated.t1 WHERE id = 1; -ERROR HY000: Got error 10000 'Error on remote system: 1031: Storage engine ARCHIVE of the table `federated`.`archive_table` doesn'' from FEDERATED +ERROR HY000: Got error 10000 'Error on remote system: 1031: Storage engine ARCHIVE of the table `federated`.`archive_table` doesn't have this option' from FEDERATED SELECT * FROM federated.t1; id name 1 foo 2 bar UPDATE federated.t1 SET name='baz' WHERE id = 1; -ERROR HY000: Got error 10000 'Error on remote system: 1031: Storage engine ARCHIVE of the table `federated`.`archive_table` doesn'' from FEDERATED +ERROR HY000: Got error 10000 'Error on remote system: 1031: Storage engine ARCHIVE of the table `federated`.`archive_table` doesn't have this option' from FEDERATED SELECT * FROM federated.t1; id name 1 foo diff --git a/mysql-test/suite/federated/federated_maybe_16324629.result b/mysql-test/suite/federated/federated_maybe_16324629.result new file mode 100644 index 00000000000..b1dd8097cac --- /dev/null +++ b/mysql-test/suite/federated/federated_maybe_16324629.result @@ -0,0 +1,16 @@ +CREATE DATABASE federated; +CREATE DATABASE federated; +create table federated.t1 (a int, b int, unique key (a), key (b)); +create table t1 (a int, b int, unique key (a), key (b)) +engine=federated CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +insert into t1 values (3, 3), (7, 7); +delete t1 from t1 where a = 3; +select * from t1; +a b +3 3 +7 7 +drop table t1; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; diff --git a/mysql-test/suite/federated/federated_maybe_16324629.test b/mysql-test/suite/federated/federated_maybe_16324629.test new file mode 100644 index 00000000000..53d79e70c80 --- /dev/null +++ b/mysql-test/suite/federated/federated_maybe_16324629.test @@ -0,0 +1,23 @@ +# +# Inspired by a bug fix for internal Oracle MySQL bug#16324629 +# +source include/federated.inc; + +connection slave; +create table federated.t1 (a int, b int, unique key (a), key (b)); + +connection master; + +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval create table t1 (a int, b int, unique key (a), key (b)) + engine=federated CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; + +insert into t1 values (3, 3), (7, 7); +delete t1 from t1 where a = 3; +select * from t1; +drop table t1; + +connection slave; +connection default; +source include/federated_cleanup.inc; + diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index 9cf63fb355c..2b98bc704d5 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -1,3 +1,4 @@ +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -3936,12 +3937,10 @@ my_time, id FROM t1_values WHERE select_id = 46 OR select_id IS NULL order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 -NULL -838:59:59 2 -0000-01-03 22:59:59 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Truncated incorrect datetime value: '-838:59:59' +2000-12-30 01:00:01 -838:59:59 2 +2001-03-09 22:59:59 838:59:59 3 +2001-02-03 13:00:00 13:00:00 4 +2001-02-03 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3950,12 +3949,10 @@ WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 46 OR select_id IS NULL) order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 -NULL -838:59:59 2 -0000-01-03 22:59:59 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Truncated incorrect datetime value: '-838:59:59' +2000-12-30 01:00:01 -838:59:59 2 +2001-03-09 22:59:59 838:59:59 3 +2001-02-03 13:00:00 13:00:00 4 +2001-02-03 10:00:00 10:00:00 5 DROP VIEW v1; @@ -4302,10 +4299,10 @@ my_time, id FROM t1_values WHERE select_id = 35 OR select_id IS NULL order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 +2000-12-30 -838:59:59 2 +2001-03-09 838:59:59 3 +2001-02-03 13:00:00 4 +2001-02-03 10:00:00 5 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -4314,10 +4311,10 @@ WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 35 OR select_id IS NULL) order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 +2000-12-30 -838:59:59 2 +2001-03-09 838:59:59 3 +2001-02-03 13:00:00 4 +2001-02-03 10:00:00 5 DROP VIEW v1; @@ -5280,3 +5277,4 @@ DROP VIEW v1; DROP TABLE t1_selects, t1_modes, t1_values; +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index 96b6d3171f0..e6d98159b39 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -7579,7 +7579,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 CREATE OR REPLACE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TEMPORARY VIEW test.v1 AS +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VIEW test.v1 AS SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result index a98bc9db7d7..f0d1f196193 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -429,20 +429,6 @@ def information_schema VIEWS TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL def information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select def information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select def information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select -def information_schema XTRADB_INTERNAL_HASH_TABLES CONSTANT_MEMORY 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select -def information_schema XTRADB_INTERNAL_HASH_TABLES INTERNAL_HASH_TABLE_NAME 1 NO varchar 100 300 NULL NULL NULL utf8 utf8_general_ci varchar(100) select -def information_schema XTRADB_INTERNAL_HASH_TABLES TOTAL_MEMORY 2 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select -def information_schema XTRADB_INTERNAL_HASH_TABLES VARIABLE_MEMORY 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select -def information_schema XTRADB_READ_VIEW READ_VIEW_LOW_LIMIT_TRX_ID 4 NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) select -def information_schema XTRADB_READ_VIEW READ_VIEW_LOW_LIMIT_TRX_NUMBER 2 NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) select -def information_schema XTRADB_READ_VIEW READ_VIEW_UNDO_NUMBER 1 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select -def information_schema XTRADB_READ_VIEW READ_VIEW_UPPER_LIMIT_TRX_ID 3 NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) select -def information_schema XTRADB_RSEG curr_size 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select -def information_schema XTRADB_RSEG max_size 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select -def information_schema XTRADB_RSEG page_no 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select -def information_schema XTRADB_RSEG rseg_id 1 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select -def information_schema XTRADB_RSEG space_id 2 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select -def information_schema XTRADB_RSEG zip_size 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select ########################################################################## # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH ########################################################################## @@ -930,17 +916,3 @@ NULL information_schema USER_STATISTICS EMPTY_QUERIES bigint NULL NULL NULL NULL 3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) 3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) -3.0000 information_schema XTRADB_INTERNAL_HASH_TABLES INTERNAL_HASH_TABLE_NAME varchar 100 300 utf8 utf8_general_ci varchar(100) -NULL information_schema XTRADB_INTERNAL_HASH_TABLES TOTAL_MEMORY bigint NULL NULL NULL NULL bigint(21) unsigned -NULL information_schema XTRADB_INTERNAL_HASH_TABLES CONSTANT_MEMORY bigint NULL NULL NULL NULL bigint(21) unsigned -NULL information_schema XTRADB_INTERNAL_HASH_TABLES VARIABLE_MEMORY bigint NULL NULL NULL NULL bigint(21) unsigned -NULL information_schema XTRADB_READ_VIEW READ_VIEW_UNDO_NUMBER bigint NULL NULL NULL NULL bigint(21) unsigned -3.0000 information_schema XTRADB_READ_VIEW READ_VIEW_LOW_LIMIT_TRX_NUMBER varchar 18 54 utf8 utf8_general_ci varchar(18) -3.0000 information_schema XTRADB_READ_VIEW READ_VIEW_UPPER_LIMIT_TRX_ID varchar 18 54 utf8 utf8_general_ci varchar(18) -3.0000 information_schema XTRADB_READ_VIEW READ_VIEW_LOW_LIMIT_TRX_ID varchar 18 54 utf8 utf8_general_ci varchar(18) -NULL information_schema XTRADB_RSEG rseg_id bigint NULL NULL NULL NULL bigint(21) unsigned -NULL information_schema XTRADB_RSEG space_id bigint NULL NULL NULL NULL bigint(21) unsigned -NULL information_schema XTRADB_RSEG zip_size bigint NULL NULL NULL NULL bigint(21) unsigned -NULL information_schema XTRADB_RSEG page_no bigint NULL NULL NULL NULL bigint(21) unsigned -NULL information_schema XTRADB_RSEG max_size bigint NULL NULL NULL NULL bigint(21) unsigned -NULL information_schema XTRADB_RSEG curr_size bigint NULL NULL NULL NULL bigint(21) unsigned diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index 5d12796c46e..43516edc70a 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -1,4 +1,5 @@ SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -3937,12 +3938,10 @@ my_time, id FROM t1_values WHERE select_id = 46 OR select_id IS NULL order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 -NULL -838:59:59 2 -0000-01-03 22:59:59 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Truncated incorrect datetime value: '-838:59:59' +2000-12-30 01:00:01 -838:59:59 2 +2001-03-09 22:59:59 838:59:59 3 +2001-02-03 13:00:00 13:00:00 4 +2001-02-03 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3951,12 +3950,10 @@ WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 46 OR select_id IS NULL) order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 -NULL -838:59:59 2 -0000-01-03 22:59:59 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Truncated incorrect datetime value: '-838:59:59' +2000-12-30 01:00:01 -838:59:59 2 +2001-03-09 22:59:59 838:59:59 3 +2001-02-03 13:00:00 13:00:00 4 +2001-02-03 10:00:00 10:00:00 5 DROP VIEW v1; @@ -4303,10 +4300,10 @@ my_time, id FROM t1_values WHERE select_id = 35 OR select_id IS NULL order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 +2000-12-30 -838:59:59 2 +2001-03-09 838:59:59 3 +2001-02-03 13:00:00 4 +2001-02-03 10:00:00 5 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -4315,10 +4312,10 @@ WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 35 OR select_id IS NULL) order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 +2000-12-30 -838:59:59 2 +2001-03-09 838:59:59 3 +2001-02-03 13:00:00 4 +2001-02-03 10:00:00 5 DROP VIEW v1; @@ -5281,3 +5278,4 @@ DROP VIEW v1; DROP TABLE t1_selects, t1_modes, t1_values; +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index ddde31b76d1..21990c2bd9d 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -7580,7 +7580,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 CREATE OR REPLACE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TEMPORARY VIEW test.v1 AS +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VIEW test.v1 AS SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index 5d12796c46e..43516edc70a 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -1,4 +1,5 @@ SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -3937,12 +3938,10 @@ my_time, id FROM t1_values WHERE select_id = 46 OR select_id IS NULL order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 -NULL -838:59:59 2 -0000-01-03 22:59:59 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Truncated incorrect datetime value: '-838:59:59' +2000-12-30 01:00:01 -838:59:59 2 +2001-03-09 22:59:59 838:59:59 3 +2001-02-03 13:00:00 13:00:00 4 +2001-02-03 10:00:00 10:00:00 5 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3951,12 +3950,10 @@ WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 46 OR select_id IS NULL) order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 -NULL -838:59:59 2 -0000-01-03 22:59:59 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Truncated incorrect datetime value: '-838:59:59' +2000-12-30 01:00:01 -838:59:59 2 +2001-03-09 22:59:59 838:59:59 3 +2001-02-03 13:00:00 13:00:00 4 +2001-02-03 10:00:00 10:00:00 5 DROP VIEW v1; @@ -4303,10 +4300,10 @@ my_time, id FROM t1_values WHERE select_id = 35 OR select_id IS NULL order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 +2000-12-30 -838:59:59 2 +2001-03-09 838:59:59 3 +2001-02-03 13:00:00 4 +2001-02-03 10:00:00 5 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -4315,10 +4312,10 @@ WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 35 OR select_id IS NULL) order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 +2000-12-30 -838:59:59 2 +2001-03-09 838:59:59 3 +2001-02-03 13:00:00 4 +2001-02-03 10:00:00 5 DROP VIEW v1; @@ -5281,3 +5278,4 @@ DROP VIEW v1; DROP TABLE t1_selects, t1_modes, t1_values; +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/funcs_1/r/myisam_views-big.result b/mysql-test/suite/funcs_1/r/myisam_views-big.result index 39782f8d2c5..55704135530 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views-big.result +++ b/mysql-test/suite/funcs_1/r/myisam_views-big.result @@ -8400,7 +8400,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 CREATE OR REPLACE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TEMPORARY VIEW test.v1 AS +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VIEW test.v1 AS SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; diff --git a/mysql-test/suite/funcs_1/views/func_view.inc b/mysql-test/suite/funcs_1/views/func_view.inc index 1dba96f6901..c26f21945c3 100644 --- a/mysql-test/suite/funcs_1/views/func_view.inc +++ b/mysql-test/suite/funcs_1/views/func_view.inc @@ -151,6 +151,8 @@ # # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); + --disable_warnings DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; @@ -1359,3 +1361,5 @@ while ($select_id) --enable_ps_protocol DROP TABLE t1_selects, t1_modes, t1_values; + +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/handler/innodb.result b/mysql-test/suite/handler/innodb.result index eb054136b8d..78660b0ef9c 100644 --- a/mysql-test/suite/handler/innodb.result +++ b/mysql-test/suite/handler/innodb.result @@ -256,7 +256,7 @@ handler t1 read a=(1); a b handler t1 read a next; a b -16 ccc +14 aaa handler t1 close; handler t1 open; prepare stmt from 'handler t1 read a=(?) limit ?,?'; @@ -563,7 +563,7 @@ HANDLER t1 READ `primary` = (1, 1000); no1 no2 HANDLER t1 READ `primary` NEXT; no1 no2 -2 8 +2 6 DROP TABLE t1; create table t1 (c1 int); insert into t1 values (14397); diff --git a/mysql-test/suite/handler/innodb.test b/mysql-test/suite/handler/innodb.test index 6527c4bb8bb..d752da7dc31 100644 --- a/mysql-test/suite/handler/innodb.test +++ b/mysql-test/suite/handler/innodb.test @@ -9,6 +9,11 @@ # rename t/innodb_handler.test to t/handler_innodb.test # +if (`select plugin_auth_version < "5.6.15" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in InnoDB before 5.6.15 +} + --source include/have_innodb.inc let $engine_type= InnoDB; diff --git a/mysql-test/suite/innodb/include/innodb-util.pl b/mysql-test/suite/innodb/include/innodb-util.pl new file mode 100644 index 00000000000..241545dac18 --- /dev/null +++ b/mysql-test/suite/innodb/include/innodb-util.pl @@ -0,0 +1,126 @@ +# +# Utility functions to copy files for WL#5522 +# +# All the tables must be in the same database, you can call it like so: +# ib_backup_tablespaces("test", "t1", "blah", ...). + +use File::Copy; +use File::Spec; + +sub ib_normalize_path { + my ($path) = @_; +} + +sub ib_backup_tablespace { + my ($db, $table) = @_; + my $datadir = $ENV{'MYSQLD_DATADIR'}; + my $cfg_file = sprintf("%s.cfg", $table); + my $ibd_file = sprintf("%s.ibd", $table); + my $tmpd = $ENV{'MYSQLTEST_VARDIR'} . "/tmp"; + + my @args = (File::Spec->catfile($datadir, $db, $ibd_file), + File::Spec->catfile($tmpd, $ibd_file)); + + copy(@args) or die "copy @args failed: $!"; + + my @args = (File::Spec->catfile($datadir, $db, $cfg_file), + File::Spec->catfile($tmpd, $cfg_file)); + + copy(@args) or die "copy @args failed: $!"; +} + +sub ib_cleanup { + my ($db, $table) = @_; + my $datadir = $ENV{'MYSQLD_DATADIR'}; + my $cfg_file = sprintf("%s.cfg", $table); + + print "unlink: $cfg_file\n"; + + # These may or may not exist + unlink(File::Spec->catfile($datadir, $db, $cfg_file)); +} + +sub ib_unlink_tablespace { + my ($db, $table) = @_; + my $datadir = $ENV{'MYSQLD_DATADIR'}; + my $ibd_file = sprintf("%s.ibd", $table); + + print "unlink: $ibd_file\n"; + # This may or may not exist + unlink(File::Spec->catfile($datadir, $db, $ibd_file)); + + ib_cleanup($db, $table); +} + +sub ib_backup_tablespaces { + my ($db, @tables) = @_; + + foreach my $table (@tables) { + print "backup: $table\n"; + ib_backup_tablespace($db, $table); + } +} + +sub ib_discard_tablespace { } + +sub ib_discard_tablespaces { } + +sub ib_restore_cfg_file { + my ($tmpd, $datadir, $db, $table) = @_; + my $cfg_file = sprintf("%s.cfg", $table); + + my @args = (File::Spec->catfile($tmpd, $cfg_file), + File::Spec->catfile($datadir, "$db", $cfg_file)); + + copy(@args) or die "copy @args failed: $!"; +} + +sub ib_restore_ibd_file { + my ($tmpd, $datadir, $db, $table) = @_; + my $ibd_file = sprintf("%s.ibd", $table); + + my @args = (File::Spec->catfile($tmpd, $ibd_file), + File::Spec->catfile($datadir, $db, $ibd_file)); + + copy(@args) or die "copy @args failed: $!"; +} + +sub ib_restore_tablespace { + my ($db, $table) = @_; + my $datadir = $ENV{'MYSQLD_DATADIR'}; + my $tmpd = $ENV{'MYSQLTEST_VARDIR'} . "/tmp"; + + ib_restore_cfg_file($tmpd, $datadir, $db, $table); + ib_restore_ibd_file($tmpd, $datadir, $db, $table); +} + +sub ib_restore_tablespaces { + my ($db, @tables) = @_; + + foreach my $table (@tables) { + print "restore: $table .ibd and .cfg files\n"; + ib_restore_tablespace($db, $table); + } +} + +sub ib_restore_cfg_files { + my ($db, @tables) = @_; + my $datadir = $ENV{'MYSQLD_DATADIR'}; + my $tmpd = $ENV{'MYSQLTEST_VARDIR'} . "/tmp"; + + foreach my $table (@tables) { + print "restore: $table .cfg file\n"; + ib_restore_cfg_file($tmpd, $datadir, $db, $table); + } +} + +sub ib_restore_ibd_files { + my ($db, @tables) = @_; + my $datadir = $ENV{'MYSQLD_DATADIR'}; + my $tmpd = $ENV{'MYSQLTEST_VARDIR'} . "/tmp"; + + foreach my $table (@tables) { + print "restore: $table .ibd file\n"; + ib_restore_ibd_file($tmpd, $datadir, $db, $table); + } +} diff --git a/mysql-test/suite/innodb/r/innodb-alter-discard.result b/mysql-test/suite/innodb/r/innodb-alter-discard.result new file mode 100644 index 00000000000..29712868239 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-alter-discard.result @@ -0,0 +1,21 @@ +SET GLOBAL innodb_file_per_table=1; +CREATE TABLE t(a INT)ENGINE=InnoDB; +call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$"); +call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$"); +call mtr.add_suppression("InnoDB: Table 'test/t'$"); +call mtr.add_suppression("Could not find a valid tablespace file for"); +call mtr.add_suppression("InnoDB: Tablespace open failed for '\"test\"\.\"t\"', ignored"); +call mtr.add_suppression("InnoDB: Failed to find tablespace for table '\"test\"\.\"t\"' in the cache"); +call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found"); +call mtr.add_suppression("Table .*t in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist"); +SELECT * FROM t; +ERROR 42S02: Table 'test.t' doesn't exist in engine +ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE; +ERROR 42S02: Table 'test.t' doesn't exist in engine +ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY; +ERROR 42S02: Table 'test.t1' doesn't exist +ALTER TABLE t DISCARD TABLESPACE; +Warnings: +Warning 1812 Tablespace is missing for table 'test/t' +Warning 1812 Tablespace is missing for table 't' +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/innodb-bug-14068765.result b/mysql-test/suite/innodb/r/innodb-bug-14068765.result new file mode 100644 index 00000000000..7a8f959b995 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-bug-14068765.result @@ -0,0 +1,42 @@ +DROP TABLE IF EXISTS t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +CREATE DATABASE testdb_wl5522; +CREATE TABLE testdb_wl5522.t1(col1 bit(1) , col2 boolean,col3 tinyint , col4 smallint , col5 mediumint ,col6 int , col7 bigint , col8 float (14,3) ,col9 double (14,3), col10 VARCHAR(20) CHARACTER SET utf8 , col11 TEXT CHARACTER SET binary , col12 ENUM('a','b','c') CHARACTER SET binary ,col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs ,col14 CHAR(20) , col15 VARBINARY (400) , col16 BINARY(40), col17 BLOB (400) , col18 int not null primary key,col19 DATE ,col20 DATETIME , col21 TIMESTAMP ,col22 TIME , col23 YEAR ) ENGINE = Innodb; +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); +INSERT INTO testdb_wl5522.t1 VALUES (1,1,-128,32767,-8388608,2147483647,-9223372036854775808, 92233720368.222,-92233720368.222,'aaa', 'aaaaaaaaaa','b','bbbbb','ccccc',REPEAT('d',40),REPEAT('d',40),REPEAT('d',40), 1,'1000-01-01','3000-12-31 23:59:59.99','1990-01-01 00:00:01.00','01:59:59.00','1901'); +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL); +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +ERROR 23000: Column 'col18' cannot be null +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +FLUSH TABLES testdb_wl5522.t1 WITH READ LOCK; +SELECT COUNT(*) FROM testdb_wl5522.t1; +COUNT(*) +2 +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1(col1 bit(1) , col2 boolean,col3 tinyint , col4 smallint , col5 mediumint ,col6 int , col7 bigint , col8 float (14,3) ,col9 double (14,3), col10 VARCHAR(20) CHARACTER SET utf8 , col11 TEXT CHARACTER SET binary , col12 ENUM('a','b','c') CHARACTER SET binary ,col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs ,col14 CHAR(20) , col15 VARBINARY (400) , col16 BINARY(40), col17 BLOB (400) , col18 int not null primary key,col19 DATE ,col20 DATETIME , col21 TIMESTAMP ,col22 TIME , col23 YEAR ) ENGINE = Innodb; +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE testdb_wl5522.t1; +Table Op Msg_type Msg_text +testdb_wl5522.t1 check status OK +SELECT COUNT(*) FROM testdb_wl5522.t1; +COUNT(*) +2 +DROP TABLE testdb_wl5522.t1; +DROP DATABASE testdb_wl5522; +SET GLOBAL INNODB_FILE_FORMAT=Antelope; +SET GLOBAL INNODB_FILE_PER_TABLE=1; diff --git a/mysql-test/suite/innodb/r/innodb-bug-14084530.result b/mysql-test/suite/innodb/r/innodb-bug-14084530.result new file mode 100644 index 00000000000..4b4f201300c --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-bug-14084530.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +SET AUTOCOMMIT = 0; +CREATE DATABASE testdb_wl5522; +CREATE TABLE testdb_wl5522.t1 (c1 int ) engine = Innodb; +BEGIN; +INSERT INTO testdb_wl5522.t1 VALUES (1),(123),(331); +ROLLBACK; +SELECT c1 FROM testdb_wl5522.t1; +c1 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (c1 int ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE testdb_wl5522.t1; +Table Op Msg_type Msg_text +testdb_wl5522.t1 check status OK +SELECT c1 FROM testdb_wl5522.t1; +c1 +SET AUTOCOMMIT = 1; +DROP TABLE testdb_wl5522.t1; +DROP DATABASE testdb_wl5522; +SET GLOBAL INNODB_FILE_FORMAT=Antelope; +SET GLOBAL INNODB_FILE_PER_TABLE=1; diff --git a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result new file mode 100644 index 00000000000..cc2a0373444 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result @@ -0,0 +1,39 @@ +# +# Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE +# OPERATION IF IT IS DONE IN-PLACE +# +SET GLOBAL innodb_change_buffering_debug = 1; +CREATE TABLE t1( +a INT AUTO_INCREMENT PRIMARY KEY, +b CHAR(1), +c INT, +INDEX(b)) +ENGINE=InnoDB; +INSERT INTO t1 VALUES(0,'x',1); +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +BEGIN; +SELECT b FROM t1 LIMIT 3; +b +x +x +x +BEGIN; +DELETE FROM t1 WHERE a=1; +INSERT INTO t1 VALUES(1,'X',1); +SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace'; +SELECT b FROM t1 LIMIT 3; +ERROR HY000: Lost connection to MySQL server during query +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-1.result b/mysql-test/suite/innodb/r/innodb-wl5522-1.result new file mode 100644 index 00000000000..060840859a7 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-wl5522-1.result @@ -0,0 +1,811 @@ +DROP TABLE IF EXISTS t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; +@@innodb_file_format +Barracuda +DROP DATABASE IF EXISTS testdb_wl5522; +Warnings: +Note 1008 Can't drop database 'testdb_wl5522'; database doesn't exist +CREATE DATABASE testdb_wl5522; +CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb; +INSERT INTO testdb_wl5522.t1 VALUES (1),(123),(331); +SELECT c1 FROM testdb_wl5522.t1; +c1 +1 +123 +331 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +SELECT * FROM testdb_wl5522.t1 ORDER BY c1; +c1 +1 +123 +331 +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1 ORDER BY c1; +c1 +1 +123 +331 +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( +col1 BIT(1), +col2 BOOLEAN, +col3 TINYINT, +col4 SMALLINT, +col5 MEDIUMINT, +col6 INT, +col7 BIGINT, +col8 FLOAT (14,3) , +col9 DOUBLE (14,3), +col10 VARCHAR(20), +col11 TEXT , +col12 ENUM('a','b','c'), +col13 TEXT, +col14 CHAR(20) , +col15 VARBINARY (400) , +col16 BINARY(40), +col17 BLOB (400) , +col18 INT NOT NULL PRIMARY KEY, +col19 DATE , +col20 DATETIME , +col21 TIMESTAMP , +col22 TIME , +col23 YEAR ) ENGINE = Innodb; +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); +INSERT INTO testdb_wl5522.t1 VALUES +(1,1,-128,32767,-8388608,2147483647,-9223372036854775808, 92233720368.222, +-92233720368.222,'aaa', + 'aaaaaaaaaa','b','bbbbb','ccccc', +REPEAT('d',40),REPEAT('d',40),REPEAT('d',40),1,'1000-01-01', +'3000-12-31 23:59:59.99','1990-01-01 00:00:01.00', +'01:59:59.00','1901'); +INSERT INTO testdb_wl5522.t1 VALUES +(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL); +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +ERROR 23000: Column 'col18' cannot be null +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +FLUSH TABLES testdb_wl5522.t1 WITH READ LOCK; +SELECT COUNT(*) FROM testdb_wl5522.t1; +COUNT(*) +2 +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( +col1 BIT(1), +col2 BOOLEAN, +col3 TINYINT, +col4 SMALLINT, +col5 MEDIUMINT, +col6 INT, +col7 BIGINT, +col8 FLOAT (14,3) , +col9 DOUBLE (14,3), +col10 VARCHAR(20), +col11 TEXT, +col12 ENUM('a','b','c'), +col13 TEXT, +col14 CHAR(20) , +col15 VARBINARY (400) , +col16 BINARY(40), +col17 BLOB (400) , +col18 INT NOT NULL PRIMARY KEY, +col19 DATE , +col20 DATETIME , +col21 TIMESTAMP , +col22 TIME , +col23 YEAR ) ENGINE = Innodb; +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE testdb_wl5522.t1; +Table Op Msg_type Msg_text +testdb_wl5522.t1 check status OK +SELECT COUNT(*) FROM testdb_wl5522.t1; +COUNT(*) +2 +DROP TABLE testdb_wl5522.t1; +SET GLOBAL innodb_file_format='Barracuda'; +CREATE TABLE testdb_wl5522.t1 ( +col_1_varbinary VARBINARY (4000) , +col_2_varchar VARCHAR (4000), +col_3_text TEXT (4000), +col_4_blob BLOB (4000), +col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), +col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC ENGINE = Innodb; +INSERT INTO testdb_wl5522.t1 VALUES( +REPEAT('a', 4000),REPEAT('o', 4000),REPEAT('a', 4000), REPEAT('o', 4000), +REPEAT('a', 4000),REPEAT('a', 4000),REPEAT('a', 255)); +SELECT col_1_varbinary = REPEAT("a", 4000) , +col_2_varchar = REPEAT("o", 4000) , +col_3_text = REPEAT("a", 4000) , +col_4_blob = REPEAT("o", 4000) , +col_5_text = REPEAT("a", 4000) , +col_6_varchar = REPEAT("a", 4000) , +col_7_binary = REPEAT("a", 255) +FROM testdb_wl5522.t1; +col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) col_3_text = REPEAT("a", 4000) col_4_blob = REPEAT("o", 4000) col_5_text = REPEAT("a", 4000) col_6_varchar = REPEAT("a", 4000) col_7_binary = REPEAT("a", 255) +1 1 1 1 1 1 1 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( +col_1_varbinary VARBINARY (4000) , +col_2_varchar VARCHAR (4000), +col_3_text TEXT (4000), +col_4_blob BLOB (4000), +col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), +col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT col_1_varbinary = REPEAT("a", 4000) , +col_2_varchar = REPEAT("o", 4000) , +col_3_text = REPEAT("a", 4000) , +col_4_blob = REPEAT("o", 4000) , +col_5_text = REPEAT("a", 4000) , +col_6_varchar = REPEAT("a", 4000) , +col_7_binary = REPEAT("a", 255) +FROM testdb_wl5522.t1; +col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) col_3_text = REPEAT("a", 4000) col_4_blob = REPEAT("o", 4000) col_5_text = REPEAT("a", 4000) col_6_varchar = REPEAT("a", 4000) col_7_binary = REPEAT("a", 255) +1 1 1 1 1 1 1 +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( +col_1_int INT AUTO_INCREMENT, +col_2_varchar VARCHAR (20), +PRIMARY KEY (col_1_int)) ENGINE = Innodb; +INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'),(3,'a3'); +INSERT INTO testdb_wl5522.t1 (col_2_varchar) VALUES ('a4'),('a5'),('a6'); +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +col_1_int col_2_varchar +1 a1 +2 a2 +3 a3 +4 a4 +5 a5 +6 a6 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( +col_1_int INT AUTO_INCREMENT, +col_2_varchar VARCHAR (20), +PRIMARY KEY (col_1_int)) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +col_1_int col_2_varchar +1 a1 +2 a2 +3 a3 +4 a4 +5 a5 +6 a6 +INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +INSERT INTO testdb_wl5522.t1(col_2_varchar) VALUES ('a101'),('a102'),('a103'); +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +col_1_int col_2_varchar +1 a1 +2 a2 +3 a3 +4 a4 +5 a5 +6 a6 +7 a101 +8 a102 +9 a103 +ALTER TABLE testdb_wl5522.t1 MODIFY col_1_int BIGINT; +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +col_1_int col_2_varchar +1 a1 +2 a2 +3 a3 +4 a4 +5 a5 +6 a6 +7 a101 +8 a102 +9 a103 +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( +col_1_int INT,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_2_varchar)) ENGINE = Innodb; +CREATE TABLE testdb_wl5522.t1_fk ( +col_1_int INT,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_1_int), +FOREIGN KEY (col_2_varchar) REFERENCES testdb_wl5522.t1(col_2_varchar) +) ENGINE = Innodb; +INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'),(3,'a3'),(4,'a4'),(5,'a5'); +INSERT INTO testdb_wl5522.t1_fk VALUES (1,'a1'),(2,'a2'),(3,'a3'); +SELECT * FROM testdb_wl5522.t1; +col_1_int col_2_varchar +1 a1 +2 a2 +3 a3 +4 a4 +5 a5 +SELECT * FROM testdb_wl5522.t1_fk; +col_1_int col_2_varchar +1 a1 +2 a2 +3 a3 +FLUSH TABLES testdb_wl5522.t1,testdb_wl5522.t1_fk FOR EXPORT; +backup: t1 +backup: t1_fk +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1_fk,testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( +col_1_int INT,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_2_varchar)) ENGINE = Innodb; +CREATE TABLE testdb_wl5522.t1_fk ( +col_1_int INT,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_1_int), +FOREIGN KEY (col_2_varchar) REFERENCES testdb_wl5522.t1(col_2_varchar) +) ENGINE = Innodb; +SET foreign_key_checks = 0; +ALTER TABLE testdb_wl5522.t1_fk DISCARD TABLESPACE; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +SET foreign_key_checks = 1; +restore: t1 .ibd and .cfg files +restore: t1_fk .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +ALTER TABLE testdb_wl5522.t1_fk IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1; +col_1_int col_2_varchar +1 a1 +2 a2 +3 a3 +4 a4 +5 a5 +SELECT * FROM testdb_wl5522.t1_fk; +col_1_int col_2_varchar +1 a1 +2 a2 +3 a3 +INSERT INTO testdb_wl5522.t1_fk VALUES (100,'a100'); +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`testdb_wl5522`.`t1_fk`, CONSTRAINT `t1_fk_ibfk_1` FOREIGN KEY (`col_2_varchar`) REFERENCES `t1` (`col_2_varchar`)) +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1_fk VALUES (4,'a4'),(5,'a5'); +ROLLBACK; +SELECT * FROM testdb_wl5522.t1_fk; +col_1_int col_2_varchar +1 a1 +2 a2 +3 a3 +DROP TABLE testdb_wl5522.t1_fk,testdb_wl5522.t1; +SET AUTOCOMMIT = 1; +CREATE TABLE testdb_wl5522.t1 ( +col_1_int int,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_2_varchar)) ENGINE = Innodb; +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'); +SELECT * FROM testdb_wl5522.t1; +col_1_int col_2_varchar +1 a1 +2 a2 +COMMIT; +INSERT INTO testdb_wl5522.t1 VALUES (3,'a3'),(4,'a4'); +ROLLBACK; +INSERT INTO testdb_wl5522.t1 VALUES (5,'a5'),(6,'a6'); +COMMIT; +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +col_1_int col_2_varchar +1 a1 +2 a2 +5 a5 +6 a6 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( +col_1_int int,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_2_varchar)) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +SET AUTOCOMMIT = 0; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +INSERT INTO testdb_wl5522.t1 VALUES (7,'a7'),(8,'a8'); +COMMIT; +INSERT INTO testdb_wl5522.t1 VALUES (9,'a9'),(10,'a10'); +ROLLBACK; +INSERT INTO testdb_wl5522.t1 VALUES (11,'a11'),(12,'a12'); +COMMIT; +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +col_1_int col_2_varchar +1 a1 +2 a2 +5 a5 +6 a6 +7 a7 +8 a8 +11 a11 +12 a12 +SET AUTOCOMMIT = 1; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( i int ) ENGINE = Innodb; +INSERT INTO testdb_wl5522.t1 VALUES (100),(200),(300); +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +i +100 +200 +300 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( i int ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +i +100 +200 +300 +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1 VALUES (101),(102),(103); +COMMIT; +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +i +100 +101 +102 +103 +200 +300 +SET AUTOCOMMIT = 1; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( i int ) ENGINE = Innodb; +INSERT INTO testdb_wl5522.t1 VALUES (100),(200),(300); +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +i +100 +200 +300 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( i bigint) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Column i precise type mismatch.) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( i int ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Tablespace for table 't1' exists. Please DISCARD the tablespace before IMPORT. +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +i +100 +200 +300 +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1 VALUES (101),(102),(103); +COMMIT; +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +i +100 +101 +102 +103 +200 +300 +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (i int) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +DROP TABLE testdb_wl5522.t1; +SET AUTOCOMMIT = 1; +CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb; +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1 VALUES (1),(123),(331); +SELECT c1 FROM testdb_wl5522.t1; +c1 +1 +123 +331 +ROLLBACK; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1 ORDER BY c1; +c1 +DROP TABLE testdb_wl5522.t1; +SET AUTOCOMMIT = 1; +CREATE TABLE testdb_wl5522.t1 (col_1 CHAR (255) , +col_2 VARCHAR (255), col_3 VARCHAR (255), +col_4 VARCHAR (255),col_5 VARCHAR (255), +col_6 text (255), col_7 text (255), +col_8 text (255),col_9 text (255), +col_10 BLOB (255),col_11 BLOB (255), +col_12 BLOB (255), col_13 BLOB (255), +col_14 BLOB (255) , col_15 int ) ENGINE = innodb; +CREATE INDEX prefix_idx ON testdb_wl5522.t1( +col_1 (50),col_2 (50),col_3 (50), +col_4 (50),col_5 (50),col_6 (50), +col_7 (50),col_8 (50),col_9 (50), +col_10 (50),col_11 (50),col_12 (50), +col_13(50)); +INSERT INTO testdb_wl5522.t1 VALUES ( +REPEAT("col1_00001",10),REPEAT("col2_00001",10),REPEAT("col3_00001",10), +REPEAT("col4_00001",10),REPEAT("col5_00001",10),REPEAT("col6_00001",10), +REPEAT("col7_00001",10),REPEAT("col8_00001",10),REPEAT("col9_00001",10), +REPEAT("col10_00001",10),REPEAT("col11_00001",10),REPEAT("col12_00001",10), +REPEAT("col13_00001",10),REPEAT("col14_00001",10),1); +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; +col_1 = REPEAT("col1_00001",10) col_2 = REPEAT("col2_00001",10) col_3 = REPEAT("col3_00001",10) col_4 = REPEAT("col4_00001",10) col_5 = REPEAT("col5_00001",10) col_6 = REPEAT("col6_00001",10) col_7 = REPEAT("col7_00001",10) col_8 = REPEAT("col8_00001",10) col_9 = REPEAT("col9_00001",10) col_10 = REPEAT("col10_00001",10) col_11 = REPEAT("col11_00001",10) col_12 = REPEAT("col12_00001",10) col_13 = REPEAT("col13_00001",10) col_14 = REPEAT("col14_00001",10) col_15 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (col_1 CHAR (255) , +col_2 VARCHAR (255), col_3 VARCHAR (255), +col_4 VARCHAR (255),col_5 VARCHAR (255), +col_6 text (255), col_7 text (255), +col_8 text (255),col_9 text (255), +col_10 BLOB (255),col_11 BLOB (255), +col_12 BLOB (255), col_13 BLOB (255), +col_14 BLOB (255) , col_15 int ) ENGINE = innodb; +CREATE INDEX prefix_idx ON testdb_wl5522.t1( +col_1 (50),col_2 (50),col_3 (50), +col_4 (50),col_5 (50),col_6 (50), +col_7 (50),col_8 (50),col_9 (50), +col_10 (50),col_11 (50),col_12 (50), +col_13(50)); +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; +col_1 = REPEAT("col1_00001",10) col_2 = REPEAT("col2_00001",10) col_3 = REPEAT("col3_00001",10) col_4 = REPEAT("col4_00001",10) col_5 = REPEAT("col5_00001",10) col_6 = REPEAT("col6_00001",10) col_7 = REPEAT("col7_00001",10) col_8 = REPEAT("col8_00001",10) col_9 = REPEAT("col9_00001",10) col_10 = REPEAT("col10_00001",10) col_11 = REPEAT("col11_00001",10) col_12 = REPEAT("col12_00001",10) col_13 = REPEAT("col13_00001",10) col_14 = REPEAT("col14_00001",10) col_15 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (col_1 CHAR (255) , +col_2 VARCHAR (255), col_3 VARCHAR (255), +col_4 VARCHAR (255),col_5 VARCHAR (255), +col_6 text (255), col_7 text (255), +col_8 text (255),col_9 text (255), +col_10 BLOB (255),col_11 BLOB (255), +col_12 BLOB (255), col_13 BLOB (255), +col_14 BLOB (255) , col_15 int ) ENGINE = innodb; +CREATE INDEX idx1 ON testdb_wl5522.t1(col_1); +CREATE INDEX idx2 ON testdb_wl5522.t1(col_2); +CREATE INDEX idx3 ON testdb_wl5522.t1(col_3); +CREATE INDEX idx4 ON testdb_wl5522.t1(col_4); +CREATE INDEX idx5 ON testdb_wl5522.t1(col_5); +CREATE INDEX idx6 ON testdb_wl5522.t1(col_6(255)); +CREATE INDEX idx7 ON testdb_wl5522.t1(col_7(255)); +CREATE INDEX idx8 ON testdb_wl5522.t1(col_8(255)); +CREATE INDEX idx9 ON testdb_wl5522.t1(col_9(255)); +CREATE INDEX idx10 ON testdb_wl5522.t1(col_10(255)); +CREATE INDEX idx11 ON testdb_wl5522.t1(col_11(255)); +CREATE INDEX idx12 ON testdb_wl5522.t1(col_12(255)); +CREATE INDEX idx13 ON testdb_wl5522.t1(col_13(255)); +CREATE INDEX idx14 ON testdb_wl5522.t1(col_14(255)); +INSERT INTO testdb_wl5522.t1 VALUES ( +REPEAT("col1_00001",10),REPEAT("col2_00001",10),REPEAT("col3_00001",10), +REPEAT("col4_00001",10),REPEAT("col5_00001",10),REPEAT("col6_00001",10), +REPEAT("col7_00001",10),REPEAT("col8_00001",10),REPEAT("col9_00001",10), +REPEAT("col10_00001",10),REPEAT("col11_00001",10),REPEAT("col12_00001",10), +REPEAT("col13_00001",10),REPEAT("col14_00001",10),1); +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; +col_1 = REPEAT("col1_00001",10) col_2 = REPEAT("col2_00001",10) col_3 = REPEAT("col3_00001",10) col_4 = REPEAT("col4_00001",10) col_5 = REPEAT("col5_00001",10) col_6 = REPEAT("col6_00001",10) col_7 = REPEAT("col7_00001",10) col_8 = REPEAT("col8_00001",10) col_9 = REPEAT("col9_00001",10) col_10 = REPEAT("col10_00001",10) col_11 = REPEAT("col11_00001",10) col_12 = REPEAT("col12_00001",10) col_13 = REPEAT("col13_00001",10) col_14 = REPEAT("col14_00001",10) col_15 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (col_1 CHAR (255) , +col_2 VARCHAR (255), col_3 VARCHAR (255), +col_4 VARCHAR (255),col_5 VARCHAR (255), +col_6 text (255), col_7 text (255), +col_8 text (255),col_9 text (255), +col_10 BLOB (255),col_11 BLOB (255), +col_12 BLOB (255), col_13 BLOB (255), +col_14 BLOB (255) , col_15 int ) ENGINE = innodb; +CREATE INDEX idx1 ON testdb_wl5522.t1(col_1); +CREATE INDEX idx2 ON testdb_wl5522.t1(col_2); +CREATE INDEX idx3 ON testdb_wl5522.t1(col_3); +CREATE INDEX idx4 ON testdb_wl5522.t1(col_4); +CREATE INDEX idx5 ON testdb_wl5522.t1(col_5); +CREATE INDEX idx6 ON testdb_wl5522.t1(col_6(255)); +CREATE INDEX idx7 ON testdb_wl5522.t1(col_7(255)); +CREATE INDEX idx8 ON testdb_wl5522.t1(col_8(255)); +CREATE INDEX idx9 ON testdb_wl5522.t1(col_9(255)); +CREATE INDEX idx10 ON testdb_wl5522.t1(col_10(255)); +CREATE INDEX idx11 ON testdb_wl5522.t1(col_11(255)); +CREATE INDEX idx12 ON testdb_wl5522.t1(col_12(255)); +CREATE INDEX idx13 ON testdb_wl5522.t1(col_13(255)); +CREATE INDEX idx14 ON testdb_wl5522.t1(col_14(255)); +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; +col_1 = REPEAT("col1_00001",10) col_2 = REPEAT("col2_00001",10) col_3 = REPEAT("col3_00001",10) col_4 = REPEAT("col4_00001",10) col_5 = REPEAT("col5_00001",10) col_6 = REPEAT("col6_00001",10) col_7 = REPEAT("col7_00001",10) col_8 = REPEAT("col8_00001",10) col_9 = REPEAT("col9_00001",10) col_10 = REPEAT("col10_00001",10) col_11 = REPEAT("col11_00001",10) col_12 = REPEAT("col12_00001",10) col_13 = REPEAT("col13_00001",10) col_14 = REPEAT("col14_00001",10) col_15 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1(col_15) VALUES (15000),(16000); +SELECT col_15 FROM testdb_wl5522.t1 WHERE col_15 > 11000; +col_15 +15000 +16000 +ROLLBACK; +SELECT col_15 FROM testdb_wl5522.t1 WHERE col_15 > 11000; +col_15 +INSERT INTO testdb_wl5522.t1(col_15) VALUES (15000),(16000); +COMMIT; +SELECT col_15 FROM testdb_wl5522.t1 WHERE col_15 > 11000; +col_15 +15000 +16000 +ALTER TABLE testdb_wl5522.t1 DROP INDEX idx1; +ALTER TABLE testdb_wl5522.t1 DROP INDEX idx6; +ALTER TABLE testdb_wl5522.t1 DROP INDEX idx10; +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; +col_1 = REPEAT("col1_00001",10) col_2 = REPEAT("col2_00001",10) col_3 = REPEAT("col3_00001",10) col_4 = REPEAT("col4_00001",10) col_5 = REPEAT("col5_00001",10) col_6 = REPEAT("col6_00001",10) col_7 = REPEAT("col7_00001",10) col_8 = REPEAT("col8_00001",10) col_9 = REPEAT("col9_00001",10) col_10 = REPEAT("col10_00001",10) col_11 = REPEAT("col11_00001",10) col_12 = REPEAT("col12_00001",10) col_13 = REPEAT("col13_00001",10) col_14 = REPEAT("col14_00001",10) col_15 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 15000 +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 16000 +ALTER TABLE testdb_wl5522.t1 ADD INDEX idx1 (col_1); +ALTER TABLE testdb_wl5522.t1 ADD INDEX idx6 (col_1(255)); +ALTER TABLE testdb_wl5522.t1 ADD INDEX idx10 (col_10(255)); +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; +col_1 = REPEAT("col1_00001",10) col_2 = REPEAT("col2_00001",10) col_3 = REPEAT("col3_00001",10) col_4 = REPEAT("col4_00001",10) col_5 = REPEAT("col5_00001",10) col_6 = REPEAT("col6_00001",10) col_7 = REPEAT("col7_00001",10) col_8 = REPEAT("col8_00001",10) col_9 = REPEAT("col9_00001",10) col_10 = REPEAT("col10_00001",10) col_11 = REPEAT("col11_00001",10) col_12 = REPEAT("col12_00001",10) col_13 = REPEAT("col13_00001",10) col_14 = REPEAT("col14_00001",10) col_15 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 15000 +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 16000 +DROP TABLE testdb_wl5522.t1; +SET AUTOCOMMIT = 1; +CREATE TABLE testdb_wl5522.t1(col1 bit(1) , +col2 boolean,col3 tinyint , col4 smallint , +col5 mediumint ,col6 int , col7 bigint , +col8 float (14,3) ,col9 double (14,3), +col10 VARCHAR(20) CHARACTER SET utf8 , +col11 TEXT CHARACTER SET binary , +col12 ENUM('a','b','c') CHARACTER SET binary, +col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs , +col14 CHAR(20) , col15 VARBINARY (400), +col16 BINARY(40), col17 BLOB (400), +col18 int not null primary key, +col19 DATE ,col20 DATETIME , col21 TIMESTAMP , +col22 TIME , col23 YEAR ) ENGINE = Innodb; +CREATE TABLE testdb_wl5522.trigger_table ( i int ) ENGINE = Innodb; +CREATE TRIGGER testdb_wl5522.tri AFTER INSERT ON testdb_wl5522.t1 +FOR EACH ROW INSERT INTO testdb_wl5522.trigger_table VALUES(NEW.col18); +CREATE OR REPLACE VIEW testdb_wl5522.VW1 AS SELECT * FROM testdb_wl5522.t1; +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); +INSERT INTO testdb_wl5522.t1 VALUES ( +1,1,-128,32767,-8388608,2147483647,-9223372036854775808,92233720368.222, +-92233720368.222,'aaa','aaaaaaaaaa','b','bbbbb','ccccc',REPEAT('d',40), +REPEAT('d',40),REPEAT('d',40),1,'1000-01-01','3000-12-31 23:59:59.99', +'1990-01-01 00:00:01.00','01:59:59.00','1901'); +INSERT INTO testdb_wl5522.t1 VALUES ( +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,3,NULL,NULL,NULL,NULL,NULL); +INSERT INTO testdb_wl5522.t1 VALUES ( +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +ERROR 23000: Column 'col18' cannot be null +INSERT INTO testdb_wl5522.t1 VALUES ( +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,1,NULL,NULL,NULL,NULL,NULL); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +SELECT COUNT(*) FROM testdb_wl5522.t1; +COUNT(*) +2 +SELECT * FROM testdb_wl5522.trigger_table; +i +1 +3 +SELECT COUNT(*) FROM testdb_wl5522.VW1; +COUNT(*) +2 +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1(col1 bit(1) , +col2 boolean,col3 tinyint , col4 smallint , +col5 mediumint ,col6 int , col7 bigint , +col8 float (14,3) ,col9 double (14,3), +col10 VARCHAR(20) CHARACTER SET utf8 , +col11 TEXT CHARACTER SET binary , +col12 ENUM('a','b','c') CHARACTER SET binary, +col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs , +col14 CHAR(20) , col15 VARBINARY (400), +col16 BINARY(40), col17 BLOB (400), +col18 int not null primary key, +col19 DATE ,col20 DATETIME , col21 TIMESTAMP , +col22 TIME , col23 YEAR ) ENGINE = Innodb; +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT COUNT(*) FROM testdb_wl5522.t1; +COUNT(*) +2 +SELECT * FROM testdb_wl5522.trigger_table; +i +1 +3 +SELECT COUNT(*) FROM testdb_wl5522.VW1; +COUNT(*) +2 +INSERT INTO testdb_wl5522.t1(col18) VALUES (5); +SELECT * FROM testdb_wl5522.trigger_table; +i +1 +3 +UPDATE testdb_wl5522.t1 SET col18=10 WHERE col18=1; +SELECT COUNT(*) FROM testdb_wl5522.VW1; +COUNT(*) +3 +SELECT COUNT(*) FROM testdb_wl5522.t1 WHERE col18=10; +COUNT(*) +1 +ALTER TABLE testdb_wl5522.t1 ADD COLUMN col24 varbinary(40) default null; +INSERT INTO testdb_wl5522.t1(col18,col24) VALUES (6,REPEAT('a',10)); +SELECT col24,col18 FROM testdb_wl5522.t1 WHERE col18 in (6,1,10) ORDER BY col18; +col24 col18 +aaaaaaaaaa 6 +NULL 10 +ALTER TABLE testdb_wl5522.t1 DROP INDEX prefix_idx; +SELECT col18,col14 FROM testdb_wl5522.t1 WHERE col14 like '_ccc%'; +col18 col14 +10 ccccc +ALTER TABLE testdb_wl5522.t1 ADD INDEX prefix_idx (col24(10)); +SELECT col18,col24 FROM testdb_wl5522.t1 WHERE col24 like '_a_a%'; +col18 col24 +6 aaaaaaaaaa +DROP TABLE testdb_wl5522.t1; +DROP DATABASE testdb_wl5522; +call mtr.add_suppression("Got error -1 when reading table '.*'"); +call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*"); +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); +SET GLOBAL INNODB_FILE_FORMAT=Antelope; +SET GLOBAL INNODB_FILE_PER_TABLE=1; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result new file mode 100644 index 00000000000..a4e44be1c72 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result @@ -0,0 +1,580 @@ +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; +@@innodb_file_format +Barracuda +SET SESSION innodb_strict_mode=1; +SELECT @@SESSION.innodb_strict_mode; +@@SESSION.innodb_strict_mode +1 +DROP DATABASE IF EXISTS test_wl5522; +Warnings: +Note 1008 Can't drop database 'test_wl5522'; database doesn't exist +CREATE DATABASE test_wl5522; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; +INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4); +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; +SELECT * FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Lost connection to MySQL server during query +SET SESSION debug_dbug="-d,ib_import_before_commit_crash"; +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Lost connection to MySQL server during query +unlink: t1.ibd +unlink: t1.cfg +# Restart and reconnect to the server +SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash"; +DROP TABLE test_wl5522.t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; +@@innodb_file_format +Barracuda +SET SESSION innodb_strict_mode=1; +SELECT @@SESSION.innodb_strict_mode; +@@SESSION.innodb_strict_mode +1 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE test_wl5522.t1; +Table Op Msg_type Msg_text +test_wl5522.t1 check status OK +SELECT COUNT(*) FROM test_wl5522.t1; +COUNT(*) +4 +INSERT INTO test_wl5522.t1 VALUES(400), (500), (600); +SELECT * FROM test_wl5522.t1; +c1 +1 +2 +3 +4 +400 +500 +600 +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_internal_error"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: While updating the <space, root page number> of index "GEN_CLUST_INDEX" - Generic error +SET SESSION debug_dbug="-d,ib_import_internal_error"; +restore: t1 .ibd and .cfg files +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Too many concurrent transactions +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure"; +SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Got error 44 'Tablespace not found' from ./test_wl5522/t1.ibd +SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_cluster_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_cluster_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure"; +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 ( +c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 BIGINT, +c3 VARCHAR(2048), +c4 VARCHAR(2048), +INDEX idx1(c2), +INDEX idx2(c3(512)), +INDEX idx3(c4(512))) Engine=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +SET GLOBAL innodb_disable_background_merge=ON; +SET GLOBAL innodb_monitor_reset = ibuf_merges; +SET GLOBAL innodb_monitor_reset = ibuf_merges_insert; +INSERT INTO test_wl5522.t1(c2, c3, c4) VALUES +(1, REPEAT('a', 2048), REPEAT('a', 2048)), +(2, REPEAT('b', 2048), REPEAT('b', 2048)), +(3, REPEAT('c', 2048), REPEAT('c', 2048)), +(4, REPEAT('d', 2048), REPEAT('d', 2048)); +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +DELETE FROM test_wl5522.t1 WHERE c2 = 1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c3 = REPEAT("c2", 1024); +UPDATE test_wl5522.t1 SET c4 = REPEAT("c4", 1024); +SHOW CREATE TABLE test_wl5522.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` bigint(20) NOT NULL AUTO_INCREMENT, + `c2` bigint(20) DEFAULT NULL, + `c3` varchar(2048) DEFAULT NULL, + `c4` varchar(2048) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx1` (`c2`), + KEY `idx2` (`c3`(512)), + KEY `idx3` (`c4`(512)) +) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 +SELECT c1, c2 FROM test_wl5522.t1; +c1 c2 +2 32 +3 48 +4 64 +6 92 +7 108 +8 124 +13 197 +14 213 +15 229 +17 257 +18 273 +19 289 +28 422 +29 438 +30 454 +32 482 +33 498 +34 514 +36 542 +37 558 +38 574 +40 602 +41 618 +42 634 +59 887 +60 903 +61 919 +63 947 +64 963 +65 979 +67 1007 +68 1023 +69 1039 +71 1067 +72 1083 +73 1099 +75 1127 +76 1143 +77 1159 +79 1187 +80 1203 +81 1219 +83 1247 +84 1263 +85 1279 +87 1307 +88 1323 +89 1339 +122 1832 +123 1848 +124 1864 +126 1892 +127 1908 +128 1924 +130 1952 +131 1968 +132 1984 +134 2012 +135 2028 +136 2044 +138 2072 +139 2088 +140 2104 +142 2132 +143 2148 +144 2164 +146 2192 +147 2208 +148 2224 +150 2252 +151 2268 +152 2284 +154 2312 +155 2328 +156 2344 +158 2372 +159 2388 +160 2404 +162 2432 +163 2448 +164 2464 +166 2492 +167 2508 +168 2524 +170 2552 +171 2568 +172 2584 +174 2612 +175 2628 +176 2644 +178 2672 +179 2688 +180 2704 +182 2732 +183 2748 +184 2764 +SELECT COUNT(*) FROM test_wl5522.t1; +COUNT(*) +96 +SELECT SUM(c2) FROM test_wl5522.t1; +SUM(c2) +145278 +SELECT name +FROM information_schema.innodb_metrics +WHERE name = 'ibuf_merges_insert' AND count = 0; +name +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +SELECT name +FROM information_schema.innodb_metrics +WHERE name = 'ibuf_merges' AND count > 0; +name +ibuf_merges +SELECT name +FROM information_schema.innodb_metrics +WHERE name = 'ibuf_merges_inserts' AND count > 0; +name +SET GLOBAL innodb_disable_background_merge=OFF; +SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 ( +c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 BIGINT, +c3 VARCHAR(2048), +c4 VARCHAR(2048), +INDEX idx1(c2), +INDEX idx2(c3(512)), +INDEX idx3(c4(512))) Engine=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SELECT c1, c2 FROM test_wl5522.t1; +c1 c2 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE test_wl5522.t1; +Table Op Msg_type Msg_text +test_wl5522.t1 check status OK +SELECT c1,c2 FROM test_wl5522.t1; +c1 c2 +2 32 +3 48 +4 64 +6 92 +7 108 +8 124 +13 197 +14 213 +15 229 +17 257 +18 273 +19 289 +28 422 +29 438 +30 454 +32 482 +33 498 +34 514 +36 542 +37 558 +38 574 +40 602 +41 618 +42 634 +59 887 +60 903 +61 919 +63 947 +64 963 +65 979 +67 1007 +68 1023 +69 1039 +71 1067 +72 1083 +73 1099 +75 1127 +76 1143 +77 1159 +79 1187 +80 1203 +81 1219 +83 1247 +84 1263 +85 1279 +87 1307 +88 1323 +89 1339 +122 1832 +123 1848 +124 1864 +126 1892 +127 1908 +128 1924 +130 1952 +131 1968 +132 1984 +134 2012 +135 2028 +136 2044 +138 2072 +139 2088 +140 2104 +142 2132 +143 2148 +144 2164 +146 2192 +147 2208 +148 2224 +150 2252 +151 2268 +152 2284 +154 2312 +155 2328 +156 2344 +158 2372 +159 2388 +160 2404 +162 2432 +163 2448 +164 2464 +166 2492 +167 2508 +168 2524 +170 2552 +171 2568 +172 2584 +174 2612 +175 2628 +176 2644 +178 2672 +179 2688 +180 2704 +182 2732 +183 2748 +184 2764 +SELECT COUNT(*) FROM test_wl5522.t1; +COUNT(*) +96 +SELECT SUM(c2) FROM test_wl5522.t1; +SUM(c2) +145278 +SHOW CREATE TABLE test_wl5522.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` bigint(20) NOT NULL AUTO_INCREMENT, + `c2` bigint(20) DEFAULT NULL, + `c3` varchar(2048) DEFAULT NULL, + `c4` varchar(2048) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx1` (`c2`), + KEY `idx2` (`c3`(512)), + KEY `idx3` (`c4`(512)) +) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +INSERT INTO test_wl5522.t1 VALUES +(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); +Warnings: +Warning 1265 Data truncated for column 'c2' at row 1 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +SELECT COUNT(*) FROM test_wl5522.t1; +COUNT(*) +256 +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index "GEN_CLUST_INDEX" +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_create_index_failure_1"; +ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1); +Warnings: +Warning 1814 Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="-d,ib_import_create_index_failure_1"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,fil_space_create_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Got error 11 'Generic error' from ./test_wl5522/t1.ibd +SET SESSION debug_dbug="-d,fil_space_create_failure"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Got error 39 'Data structure corruption' from ./test_wl5522/t1.ibd +SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Unsupported +SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +DROP DATABASE test_wl5522; +set global innodb_monitor_disable = all; +set global innodb_monitor_reset_all = all; +set global innodb_monitor_enable = default; +set global innodb_monitor_disable = default; +set global innodb_monitor_reset = default; +set global innodb_monitor_reset_all = default; +SET GLOBAL INNODB_FILE_PER_TABLE=1; +SET GLOBAL INNODB_FILE_FORMAT=Antelope; +SET SESSION innodb_strict_mode=0; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result new file mode 100644 index 00000000000..0c914ebc7a6 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result @@ -0,0 +1,925 @@ +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +DROP DATABASE IF EXISTS test_wl5522; +Warnings: +Note 1008 Can't drop database 'test_wl5522'; database doesn't exist +CREATE DATABASE test_wl5522; +SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; +INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +ERROR HY000: Lost connection to MySQL server during query +SET SESSION debug_dbug="-d,ib_discard_before_commit_crash"; +DROP TABLE test_wl5522.t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; +INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +ERROR HY000: Lost connection to MySQL server during query +SET SESSION debug_dbug="-d,ib_discard_after_commit_crash"; +DROP TABLE test_wl5522.t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4); +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; +SELECT * FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Lost connection to MySQL server during query +SET SESSION debug_dbug="-d,ib_import_before_commit_crash"; +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Lost connection to MySQL server during query +unlink: t1.ibd +unlink: t1.cfg +# Restart and reconnect to the server +SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash"; +DROP TABLE test_wl5522.t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE test_wl5522.t1; +Table Op Msg_type Msg_text +test_wl5522.t1 check status OK +SELECT COUNT(*) FROM test_wl5522.t1; +COUNT(*) +4 +INSERT INTO test_wl5522.t1 VALUES(400), (500), (600); +SELECT * FROM test_wl5522.t1; +c1 +1 +2 +3 +4 +400 +500 +600 +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_1"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_1"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_2"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_2"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_3"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_3"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_4"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_4"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_5"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_5"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_6"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_6"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_7"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_7"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_8"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_8"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_9"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_9"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_10"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_10"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_11"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_11"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +SET SESSION debug_dbug="+d,ib_export_io_write_failure_12"; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +Warnings: +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed +Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed +UNLOCK TABLES; +SET SESSION debug_dbug="-d,ib_export_io_write_failure_12"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (100), (200), (300); +SELECT COUNT(*) FROM test_wl5522.t1; +COUNT(*) +3 +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_io_read_error_1"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while reading index fields. +SET SESSION debug_dbug="-d,ib_import_io_read_error_1"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_io_read_error_2"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while reading index meta-data, expected to read 44 bytes but read only 0 bytes +SET SESSION debug_dbug="-d,ib_import_io_read_error_2"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_io_read_error_3"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while reading number of indexes. +SET SESSION debug_dbug="-d,ib_import_io_read_error_3"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_io_read_error_4"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while reading table column meta-data. +SET SESSION debug_dbug="-d,ib_import_io_read_error_4"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_io_read_error_5"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while reading meta-data export hostname length. +SET SESSION debug_dbug="-d,ib_import_io_read_error_5"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_io_read_error_6"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while reading meta-data table name length. +SET SESSION debug_dbug="-d,ib_import_io_read_error_6"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_io_read_error_7"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while reading autoinc value. +SET SESSION debug_dbug="-d,ib_import_io_read_error_7"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_io_read_error_8"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while reading meta-data header. +SET SESSION debug_dbug="-d,ib_import_io_read_error_8"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_io_read_error_9"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while reading meta-data version. +SET SESSION debug_dbug="-d,ib_import_io_read_error_9"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_string_read_error"; +restore: t1 .cfg file +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: IO Read error: while parsing export hostname. +SET SESSION debug_dbug="-d,ib_import_string_read_error"; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_OOM_1"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +SET SESSION debug_dbug="-d,ib_import_OOM_1"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_OOM_2"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +SET SESSION debug_dbug="-d,ib_import_OOM_2"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_OOM_4"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +SET SESSION debug_dbug="-d,ib_import_OOM_4"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_OOM_5"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +SET SESSION debug_dbug="-d,ib_import_OOM_5"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_OOM_6"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +SET SESSION debug_dbug="-d,ib_import_OOM_6"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_OOM_7"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +SET SESSION debug_dbug="-d,ib_import_OOM_7"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_OOM_8"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +SET SESSION debug_dbug="-d,ib_import_OOM_8"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_OOM_9"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +SET SESSION debug_dbug="-d,ib_import_OOM_9"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_OOM_10"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +SET SESSION debug_dbug="-d,ib_import_OOM_10"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_internal_error"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: While updating the <space, root page number> of index "GEN_CLUST_INDEX" - Generic error +SET SESSION debug_dbug="-d,ib_import_internal_error"; +restore: t1 .ibd and .cfg files +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Too many concurrent transactions +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure"; +SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Got error 44 'Tablespace not found' from ./test_wl5522/t1.ibd +SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_cluster_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_cluster_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure"; +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure"; +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 ( +c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 BIGINT, +c3 VARCHAR(2048), +c4 VARCHAR(2048), +INDEX idx1(c2), +INDEX idx2(c3(512)), +INDEX idx3(c4(512))) Engine=InnoDB; +SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +SET GLOBAL innodb_disable_background_merge=ON; +SET GLOBAL innodb_monitor_reset = ibuf_merges; +SET GLOBAL innodb_monitor_reset = ibuf_merges_insert; +INSERT INTO test_wl5522.t1(c2, c3, c4) VALUES +(1, REPEAT('a', 2048), REPEAT('a', 2048)), +(2, REPEAT('b', 2048), REPEAT('b', 2048)), +(3, REPEAT('c', 2048), REPEAT('c', 2048)), +(4, REPEAT('d', 2048), REPEAT('d', 2048)); +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +DELETE FROM test_wl5522.t1 WHERE c2 = 1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c3 = REPEAT("c2", 1024); +UPDATE test_wl5522.t1 SET c4 = REPEAT("c4", 1024); +SHOW CREATE TABLE test_wl5522.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` bigint(20) NOT NULL AUTO_INCREMENT, + `c2` bigint(20) DEFAULT NULL, + `c3` varchar(2048) DEFAULT NULL, + `c4` varchar(2048) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx1` (`c2`), + KEY `idx2` (`c3`(512)), + KEY `idx3` (`c4`(512)) +) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 +SELECT c1, c2 FROM test_wl5522.t1; +c1 c2 +2 32 +3 48 +4 64 +6 92 +7 108 +8 124 +13 197 +14 213 +15 229 +17 257 +18 273 +19 289 +28 422 +29 438 +30 454 +32 482 +33 498 +34 514 +36 542 +37 558 +38 574 +40 602 +41 618 +42 634 +59 887 +60 903 +61 919 +63 947 +64 963 +65 979 +67 1007 +68 1023 +69 1039 +71 1067 +72 1083 +73 1099 +75 1127 +76 1143 +77 1159 +79 1187 +80 1203 +81 1219 +83 1247 +84 1263 +85 1279 +87 1307 +88 1323 +89 1339 +122 1832 +123 1848 +124 1864 +126 1892 +127 1908 +128 1924 +130 1952 +131 1968 +132 1984 +134 2012 +135 2028 +136 2044 +138 2072 +139 2088 +140 2104 +142 2132 +143 2148 +144 2164 +146 2192 +147 2208 +148 2224 +150 2252 +151 2268 +152 2284 +154 2312 +155 2328 +156 2344 +158 2372 +159 2388 +160 2404 +162 2432 +163 2448 +164 2464 +166 2492 +167 2508 +168 2524 +170 2552 +171 2568 +172 2584 +174 2612 +175 2628 +176 2644 +178 2672 +179 2688 +180 2704 +182 2732 +183 2748 +184 2764 +SELECT COUNT(*) FROM test_wl5522.t1; +COUNT(*) +96 +SELECT SUM(c2) FROM test_wl5522.t1; +SUM(c2) +145278 +SELECT name +FROM information_schema.innodb_metrics +WHERE name = 'ibuf_merges_insert' AND count = 0; +name +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +SELECT name +FROM information_schema.innodb_metrics +WHERE name = 'ibuf_merges' AND count > 0; +name +ibuf_merges +SELECT name +FROM information_schema.innodb_metrics +WHERE name = 'ibuf_merges_inserts' AND count > 0; +name +SET GLOBAL innodb_disable_background_merge=OFF; +SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 ( +c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 BIGINT, +c3 VARCHAR(2048), +c4 VARCHAR(2048), +INDEX idx1(c2), +INDEX idx2(c3(512)), +INDEX idx3(c4(512))) Engine=InnoDB; +SELECT c1, c2 FROM test_wl5522.t1; +c1 c2 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE test_wl5522.t1; +Table Op Msg_type Msg_text +test_wl5522.t1 check status OK +SELECT c1,c2 FROM test_wl5522.t1; +c1 c2 +2 32 +3 48 +4 64 +6 92 +7 108 +8 124 +13 197 +14 213 +15 229 +17 257 +18 273 +19 289 +28 422 +29 438 +30 454 +32 482 +33 498 +34 514 +36 542 +37 558 +38 574 +40 602 +41 618 +42 634 +59 887 +60 903 +61 919 +63 947 +64 963 +65 979 +67 1007 +68 1023 +69 1039 +71 1067 +72 1083 +73 1099 +75 1127 +76 1143 +77 1159 +79 1187 +80 1203 +81 1219 +83 1247 +84 1263 +85 1279 +87 1307 +88 1323 +89 1339 +122 1832 +123 1848 +124 1864 +126 1892 +127 1908 +128 1924 +130 1952 +131 1968 +132 1984 +134 2012 +135 2028 +136 2044 +138 2072 +139 2088 +140 2104 +142 2132 +143 2148 +144 2164 +146 2192 +147 2208 +148 2224 +150 2252 +151 2268 +152 2284 +154 2312 +155 2328 +156 2344 +158 2372 +159 2388 +160 2404 +162 2432 +163 2448 +164 2464 +166 2492 +167 2508 +168 2524 +170 2552 +171 2568 +172 2584 +174 2612 +175 2628 +176 2644 +178 2672 +179 2688 +180 2704 +182 2732 +183 2748 +184 2764 +SELECT COUNT(*) FROM test_wl5522.t1; +COUNT(*) +96 +SELECT SUM(c2) FROM test_wl5522.t1; +SUM(c2) +145278 +SHOW CREATE TABLE test_wl5522.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` bigint(20) NOT NULL AUTO_INCREMENT, + `c2` bigint(20) DEFAULT NULL, + `c3` varchar(2048) DEFAULT NULL, + `c4` varchar(2048) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx1` (`c2`), + KEY `idx2` (`c3`(512)), + KEY `idx3` (`c4`(512)) +) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES +(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); +Warnings: +Warning 1265 Data truncated for column 'c2' at row 1 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +SELECT COUNT(*) FROM test_wl5522.t1; +COUNT(*) +256 +FLUSH TABLES test_wl5522.t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE test_wl5522.t1; +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption +SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index "GEN_CLUST_INDEX" +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Incorrect key file for table 't1'; try to repair it +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_create_index_failure_1"; +ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1); +Warnings: +Warning 1814 Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="-d,ib_import_create_index_failure_1"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,fil_space_create_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Got error 11 'Generic error' from ./test_wl5522/t1.ibd +SET SESSION debug_dbug="-d,fil_space_create_failure"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Got error 39 'Data structure corruption' from ./test_wl5522/t1.ibd +SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; +SELECT COUNT(*) FROM test_wl5522.t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure"; +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Unsupported +SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure"; +DROP TABLE test_wl5522.t1; +unlink: t1.ibd +unlink: t1.cfg +DROP DATABASE test_wl5522; +set global innodb_monitor_disable = all; +set global innodb_monitor_reset_all = all; +set global innodb_monitor_enable = default; +set global innodb_monitor_disable = default; +set global innodb_monitor_reset = default; +set global innodb_monitor_reset_all = default; +SET GLOBAL INNODB_FILE_PER_TABLE=1; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-zip.result new file mode 100644 index 00000000000..47413b18ce9 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-wl5522-zip.result @@ -0,0 +1,503 @@ +DROP TABLE IF EXISTS t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; +@@innodb_file_format +Barracuda +SET SESSION innodb_strict_mode=1; +SELECT @@SESSION.innodb_strict_mode; +@@SESSION.innodb_strict_mode +1 +CREATE TABLE t1 +(a INT AUTO_INCREMENT PRIMARY KEY, +b char(22), +c varchar(255), +KEY (b)) +ENGINE = InnoDB ROW_FORMAT=COMPRESSED ; +insert into t1 (b, c) values ('Apa', 'Filler........'), +('Banan', 'Filler........'), ('Cavalry', '..asdasdfaeraf'), +('Devotion', 'asdfuihknaskdf'), ('Evolution', 'lsjndofiabsoibeg'); +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t1; +COUNT(*) +640 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +a b c +819 Apa Filler........ +814 Apa Filler........ +809 Apa Filler........ +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +a b c +823 Evolution lsjndofiabsoibeg +822 Devotion asdfuihknaskdf +821 Cavalry ..asdasdfaeraf +t1.frm +t1.ibd +# Restarting server +# Done restarting server +FLUSH TABLE t1 FOR EXPORT; +# List before copying files +t1.cfg +t1.frm +t1.ibd +UNLOCK TABLES; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t1; +COUNT(*) +1280 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +a b c +1459 Apa Filler........ +1454 Apa Filler........ +1449 Apa Filler........ +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +a b c +1463 Evolution lsjndofiabsoibeg +1462 Devotion asdfuihknaskdf +1461 Cavalry ..asdasdfaeraf +# Restarting server +# Done restarting server +# List before t1 DISCARD +t1.frm +t1.ibd +ALTER TABLE t1 DISCARD TABLESPACE; +# List after t1 DISCARD +t1.frm +ALTER TABLE t1 IMPORT TABLESPACE; +ALTER TABLE t1 ENGINE InnoDB; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT COUNT(*) FROM t1; +COUNT(*) +640 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +a b c +819 Apa Filler........ +814 Apa Filler........ +809 Apa Filler........ +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +a b c +823 Evolution lsjndofiabsoibeg +822 Devotion asdfuihknaskdf +821 Cavalry ..asdasdfaeraf +t1.cfg +t1.frm +t1.ibd +SELECT COUNT(*) FROM t1; +COUNT(*) +640 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +a b c +819 Apa Filler........ +814 Apa Filler........ +809 Apa Filler........ +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +a b c +823 Evolution lsjndofiabsoibeg +822 Devotion asdfuihknaskdf +821 Cavalry ..asdasdfaeraf +DROP TABLE t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; +@@innodb_file_format +Barracuda +SET SESSION innodb_strict_mode=1; +SELECT @@SESSION.innodb_strict_mode; +@@SESSION.innodb_strict_mode +1 +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +INSERT INTO t1(c2) VALUES(1); +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Tablespace for table 't1' exists. Please DISCARD the tablespace before IMPORT. +SELECT * FROM t1; +c1 c2 +1 1 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +t1.frm +t1.ibd +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +backup: t1 +t1.cfg +t1.frm +t1.ibd +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +t1.cfg +t1.frm +t1.ibd +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +t1.frm +t1.ibd +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +backup: t1 +t1.cfg +t1.frm +t1.ibd +UNLOCK TABLES; +t1.frm +t1.ibd +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +t1.cfg +t1.frm +t1.ibd +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +COUNT(*) +16 +backup: t1 +t1.cfg +t1.frm +t1.ibd +UNLOCK TABLES; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +COUNT(*) +16 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +COUNT(*) +16 +backup: t1 +UNLOCK TABLES; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX x(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.) +ALTER TABLE t1 DROP INDEX x; +Warnings: +Warning 1814 Tablespace has been discarded for table 't1' +ALTER TABLE t1 ADD INDEX idx(c2); +Warnings: +Warning 1814 Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +unlink: t1.cfg +DROP TABLE t1; +SET GLOBAL innodb_file_per_table = 0; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1 +FLUSH TABLES t1 FOR EXPORT; +Warnings: +Warning 1809 Table '"test"."t1"' in system tablespace +UNLOCK TABLES; +DROP TABLE t1; +SET GLOBAL innodb_file_per_table = 1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +FLUSH TABLES t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Number of indexes don't match, table has 1 indexes but the tablespace meta-data file has 2 indexes) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, +c3 INT, INDEX idx(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Number of columns don't match, table has 6 columns but the tablespace meta-data file has 5 columns) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 BIGINT, INDEX idx(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Column c2 precise type mismatch.) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +DROP TABLE t1; +call mtr.add_suppression("Got error -1 when reading table '.*'"); +call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*"); +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); +SET GLOBAL INNODB_FILE_FORMAT=Antelope; +SET GLOBAL INNODB_FILE_PER_TABLE=1; +SET SESSION innodb_strict_mode=0; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result new file mode 100644 index 00000000000..fb4ac37b9fd --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-wl5522.result @@ -0,0 +1,1033 @@ +DROP TABLE IF EXISTS t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; +@@innodb_file_format +Barracuda +CREATE TABLE t1 +(a INT AUTO_INCREMENT PRIMARY KEY, +b char(22), +c varchar(255), +KEY (b)) +ENGINE = InnoDB; +insert into t1 (b, c) values ('Apa', 'Filler........'), +('Banan', 'Filler........'), ('Cavalry', '..asdasdfaeraf'), +('Devotion', 'asdfuihknaskdf'), ('Evolution', 'lsjndofiabsoibeg'); +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t1; +COUNT(*) +640 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +a b c +819 Apa Filler........ +814 Apa Filler........ +809 Apa Filler........ +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +a b c +823 Evolution lsjndofiabsoibeg +822 Devotion asdfuihknaskdf +821 Cavalry ..asdasdfaeraf +t1.frm +t1.ibd +# Restarting server +# Done restarting server +FLUSH TABLE t1 FOR EXPORT; +# List before copying files +t1.cfg +t1.frm +t1.ibd +UNLOCK TABLES; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t1; +COUNT(*) +1280 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +a b c +1459 Apa Filler........ +1454 Apa Filler........ +1449 Apa Filler........ +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +a b c +1463 Evolution lsjndofiabsoibeg +1462 Devotion asdfuihknaskdf +1461 Cavalry ..asdasdfaeraf +# Restarting server +# Done restarting server +# List before t1 DISCARD +t1.frm +t1.ibd +ALTER TABLE t1 DISCARD TABLESPACE; +# List after t1 DISCARD +t1.frm +ALTER TABLE t1 IMPORT TABLESPACE; +ALTER TABLE t1 ENGINE InnoDB; +SELECT COUNT(*) FROM t1; +COUNT(*) +640 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +a b c +819 Apa Filler........ +814 Apa Filler........ +809 Apa Filler........ +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +a b c +823 Evolution lsjndofiabsoibeg +822 Devotion asdfuihknaskdf +821 Cavalry ..asdasdfaeraf +t1.cfg +t1.frm +t1.ibd +SELECT COUNT(*) FROM t1; +COUNT(*) +640 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +a b c +819 Apa Filler........ +814 Apa Filler........ +809 Apa Filler........ +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +a b c +823 Evolution lsjndofiabsoibeg +822 Devotion asdfuihknaskdf +821 Cavalry ..asdasdfaeraf +DROP TABLE t1; +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; +@@innodb_file_per_table +1 +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; +@@innodb_file_format +Barracuda +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB; +INSERT INTO t1(c2) VALUES(1); +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Tablespace for table 't1' exists. Please DISCARD the tablespace before IMPORT. +SELECT * FROM t1; +c1 c2 +1 1 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +t1.frm +t1.ibd +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +backup: t1 +t1.cfg +t1.frm +t1.ibd +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +t1.cfg +t1.frm +t1.ibd +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +t1.frm +t1.ibd +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +backup: t1 +t1.cfg +t1.frm +t1.ibd +UNLOCK TABLES; +t1.frm +t1.ibd +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +t1.cfg +t1.frm +t1.ibd +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX(c2)) ENGINE=InnoDB; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +COUNT(*) +16 +backup: t1 +t1.cfg +t1.frm +t1.ibd +UNLOCK TABLES; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX(c2)) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +COUNT(*) +16 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +COUNT(*) +16 +backup: t1 +UNLOCK TABLES; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX x(c2)) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.) +ALTER TABLE t1 DROP INDEX x; +Warnings: +Warning 1814 Tablespace has been discarded for table 't1' +ALTER TABLE t1 ADD INDEX idx(c2); +Warnings: +Warning 1814 Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +unlink: t1.cfg +DROP TABLE t1; +SET GLOBAL innodb_file_per_table = 0; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +16 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1 +FLUSH TABLES t1 FOR EXPORT; +Warnings: +Warning 1809 Table '"test"."t1"' in system tablespace +UNLOCK TABLES; +DROP TABLE t1; +SET GLOBAL innodb_file_per_table = 1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +FLUSH TABLES t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Number of indexes don't match, table has 1 indexes but the tablespace meta-data file has 2 indexes) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, +c3 INT, INDEX idx(c2)) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Number of columns don't match, table has 6 columns but the tablespace meta-data file has 5 columns) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 BIGINT, INDEX idx(c2)) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Column c2 precise type mismatch.) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +FLUSH TABLES t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x0) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x0) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +FLUSH TABLES t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x1) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x1) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +FLUSH TABLES t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x21) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x21) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table 't1' +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +DROP TABLE t1; +call mtr.add_suppression("Got error -1 when reading table '.*'"); +call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*"); +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); +SET GLOBAL INNODB_FILE_FORMAT=Antelope; +SET GLOBAL INNODB_FILE_PER_TABLE=1; diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result index 7d255e794c0..bc961ba1e46 100644 --- a/mysql-test/suite/innodb/r/innodb.result +++ b/mysql-test/suite/innodb/r/innodb.result @@ -1597,10 +1597,6 @@ select distinct concat(a, b) from t1; concat(a, b) 11113333 drop table t1; -CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB; -SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE); -ERROR HY000: The table does not have FULLTEXT index to support this query -DROP TABLE t1; CREATE TABLE t1 (a_id tinyint(4) NOT NULL default '0', PRIMARY KEY (a_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES (1),(2),(3); CREATE TABLE t2 (b_id tinyint(4) NOT NULL default '0',b_a tinyint(4) NOT NULL default '0', PRIMARY KEY (b_id), KEY (b_a), diff --git a/mysql-test/suite/innodb/r/innodb_bug13510739.result b/mysql-test/suite/innodb/r/innodb_bug13510739.result index 8aa4323eeb0..e1e6e27239c 100644 --- a/mysql-test/suite/innodb/r/innodb_bug13510739.result +++ b/mysql-test/suite/innodb/r/innodb_bug13510739.result @@ -6,5 +6,5 @@ HANDLER bug13510739 READ `primary` = (2); c HANDLER bug13510739 READ `primary` NEXT; c -4 +3 DROP TABLE bug13510739; diff --git a/mysql-test/suite/innodb/r/innodb_bug46000.result b/mysql-test/suite/innodb/r/innodb_bug46000.result index f3dff71539b..0e3f0ef59ae 100644 --- a/mysql-test/suite/innodb/r/innodb_bug46000.result +++ b/mysql-test/suite/innodb/r/innodb_bug46000.result @@ -6,7 +6,7 @@ show warnings; Level Code Message Warning 1280 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index. Error 1280 Incorrect index name 'GEN_CLUST_INDEX' -Error 1005 Can't create table `test`.`bug46000` (errno: -1 "Internal error < 0 (Not system error)") +Warning 1030 Got error -1 "Internal error < 0 (Not system error)" from storage engine InnoDB create table bug46000(id int) engine=innodb; create index GEN_CLUST_INDEX on bug46000(id); ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX' diff --git a/mysql-test/suite/innodb/r/innodb_information_schema.result b/mysql-test/suite/innodb/r/innodb_information_schema.result index 6f97fdcc0a0..1b83bc29493 100644 --- a/mysql-test/suite/innodb/r/innodb_information_schema.result +++ b/mysql-test/suite/innodb/r/innodb_information_schema.result @@ -51,4 +51,4 @@ RUNNING 4 0 0 7 1 0 REPEATABLE READ 1 1 trx_isolation_level trx_unique_checks trx_foreign_key_checks SERIALIZABLE 0 0 trx_state trx_isolation_level trx_last_foreign_key_error -RUNNING REPEATABLE READ `test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c02`) REFERENCES `t1` (`c01`) +RUNNING REPEATABLE READ `test`.`t2`, CONSTRAINT `fk1` FOREIGN KEY (`c02`) REFERENCES `t1` (`c01`) diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index eb48b0ec895..b7fb733b9fd 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -1700,8 +1700,8 @@ t2 CREATE TABLE `t2` ( PRIMARY KEY (`c`,`d`), CONSTRAINT `c1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON DELETE NO ACTION, CONSTRAINT `c2` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION, - CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION, - CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION + CONSTRAINT `f3` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION, + CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; @@ -2561,6 +2561,8 @@ KEY idx2 (f2,f4) ) ENGINE=InnoDB; LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1; ANALYZE TABLE t1; +set @tmp_innodb_mysql= @@optimizer_switch; +set optimizer_switch='extended_keys=off'; SELECT * FROM t1 WHERE f1 IN (3305028,3353871,3772880,3346860,4228206,3336022, 3470988,3305175,3329875,3817277,3856380,3796193, @@ -2584,6 +2586,7 @@ EXPLAIN SELECT * FROM t1 WHERE f1 IN AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge PRIMARY,idx1,idx2 idx2,idx1,PRIMARY 7,60,4 NULL 1 Using intersect(idx2,idx1,PRIMARY); Using where +set optimizer_switch=@tmp_innodb_mysql; DROP TABLE t1; # # Bug#51431 Wrong sort order after import of dump file diff --git a/mysql-test/suite/innodb/r/row_lock.result b/mysql-test/suite/innodb/r/row_lock.result new file mode 100644 index 00000000000..c2fb7b90c3f --- /dev/null +++ b/mysql-test/suite/innodb/r/row_lock.result @@ -0,0 +1,16 @@ +CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1),(2,2); +CREATE TABLE t2 (c INT, d INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1,1), (2,2); +CREATE TABLE t3 (e INT) ENGINE=InnoDB; +CREATE TABLE t4 ENGINE=InnoDB AS SELECT * FROM t2; +BEGIN; +UPDATE t1 SET a = 0 WHERE a = ( SELECT e FROM t3 ); +SET DEBUG_SYNC='srv_suspend_mysql_thread_enter SIGNAL waiting'; +UPDATE t4 SET d = 1 WHERE d in ( SELECT a FROM t1 ) ORDER BY c LIMIT 6; +SET DEBUG_SYNC='now WAIT_FOR waiting'; +SET DEBUG_SYNC='RESET'; +UPDATE t4 SET d = 9; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +commit; +drop table t1,t2,t3,t4; diff --git a/mysql-test/suite/innodb/t/innodb-alter-discard.test b/mysql-test/suite/innodb/t/innodb-alter-discard.test new file mode 100644 index 00000000000..80678cef0a6 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-alter-discard.test @@ -0,0 +1,46 @@ +#Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING OR DISCARDED TABLESPACES + +--source include/not_embedded.inc +--source include/have_innodb.inc + +let $MYSQLD_DATADIR=`select @@datadir`; +SET GLOBAL innodb_file_per_table=1; +CREATE TABLE t(a INT)ENGINE=InnoDB; + +# Shut down the server +-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +-- shutdown_server +-- source include/wait_until_disconnected.inc + +# Remove the tablespace file. +let IBD=$MYSQLD_DATADIR/test/t.ibd; +perl; +unlink "$ENV{IBD}" || die "Unable to unlink $ENV{IBD}\n"; +EOF + +# Restart the server. +-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +-- enable_reconnect +-- source include/wait_until_connected_again.inc + +call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$"); +call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$"); +call mtr.add_suppression("InnoDB: Table 'test/t'$"); +call mtr.add_suppression("Could not find a valid tablespace file for"); +call mtr.add_suppression("InnoDB: Tablespace open failed for '\"test\"\.\"t\"', ignored"); +call mtr.add_suppression("InnoDB: Failed to find tablespace for table '\"test\"\.\"t\"' in the cache"); +call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found"); +call mtr.add_suppression("Table .*t in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist"); + +# The ER_NO_SUCH_TABLE is being thrown by ha_innobase::open(). +# The table does exist, only the tablespace does not exist. +--error ER_NO_SUCH_TABLE_IN_ENGINE +SELECT * FROM t; + +--error ER_NO_SUCH_TABLE_IN_ENGINE +ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE; +--error ER_NO_SUCH_TABLE +ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY; + +ALTER TABLE t DISCARD TABLESPACE; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test index c3754b47ba5..256e7d838ea 100644 --- a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test +++ b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test @@ -2,11 +2,6 @@ # embedded server does not support restarting -- source include/not_embedded.inc -if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in InnoDB 5.6.10 or earlier -} - # # 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from # the index (PRIMARY) diff --git a/mysql-test/suite/innodb/t/innodb-bug-14068765.test b/mysql-test/suite/innodb/t/innodb-bug-14068765.test new file mode 100644 index 00000000000..185e8849e21 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-bug-14068765.test @@ -0,0 +1,73 @@ +-- source include/have_innodb.inc +--disable_warnings + +DROP TABLE IF EXISTS t1; +--enable_warnings +let MYSQLD_DATADIR =`SELECT @@datadir`; +let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; +let $innodb_file_format = `SELECT @@innodb_file_format`; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +#SET GLOBAL innodb_file_format = `Barracuda`; +#SELECT @@innodb_file_format; + +# Export/import on the same instance, with --innodb-file-per-table=1 +CREATE DATABASE testdb_wl5522; + +CREATE TABLE testdb_wl5522.t1(col1 bit(1) , col2 boolean,col3 tinyint , col4 smallint , col5 mediumint ,col6 int , col7 bigint , col8 float (14,3) ,col9 double (14,3), col10 VARCHAR(20) CHARACTER SET utf8 , col11 TEXT CHARACTER SET binary , col12 ENUM('a','b','c') CHARACTER SET binary ,col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs ,col14 CHAR(20) , col15 VARBINARY (400) , col16 BINARY(40), col17 BLOB (400) , col18 int not null primary key,col19 DATE ,col20 DATETIME , col21 TIMESTAMP ,col22 TIME , col23 YEAR ) ENGINE = Innodb; + + +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); + +INSERT INTO testdb_wl5522.t1 VALUES (1,1,-128,32767,-8388608,2147483647,-9223372036854775808, 92233720368.222,-92233720368.222,'aaa', 'aaaaaaaaaa','b','bbbbb','ccccc',REPEAT('d',40),REPEAT('d',40),REPEAT('d',40), 1,'1000-01-01','3000-12-31 23:59:59.99','1990-01-01 00:00:01.00','01:59:59.00','1901'); + +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL); + +--error ER_BAD_NULL_ERROR +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + +--error ER_DUP_ENTRY +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL); + +FLUSH TABLES testdb_wl5522.t1 WITH READ LOCK; +SELECT COUNT(*) FROM testdb_wl5522.t1; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1(col1 bit(1) , col2 boolean,col3 tinyint , col4 smallint , col5 mediumint ,col6 int , col7 bigint , col8 float (14,3) ,col9 double (14,3), col10 VARCHAR(20) CHARACTER SET utf8 , col11 TEXT CHARACTER SET binary , col12 ENUM('a','b','c') CHARACTER SET binary ,col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs ,col14 CHAR(20) , col15 VARBINARY (400) , col16 BINARY(40), col17 BLOB (400) , col18 int not null primary key,col19 DATE ,col20 DATETIME , col21 TIMESTAMP ,col22 TIME , col23 YEAR ) ENGINE = Innodb; + + +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); + +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; + +CHECK TABLE testdb_wl5522.t1; + +SELECT COUNT(*) FROM testdb_wl5522.t1; + +DROP TABLE testdb_wl5522.t1; + +DROP DATABASE testdb_wl5522; + +eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; +eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb-bug-14084530.test b/mysql-test/suite/innodb/t/innodb-bug-14084530.test new file mode 100644 index 00000000000..94a2d6b2252 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-bug-14084530.test @@ -0,0 +1,52 @@ +-- source include/have_innodb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +let MYSQLD_DATADIR =`SELECT @@datadir`; +let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; +let $innodb_file_format = `SELECT @@innodb_file_format`; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +SET AUTOCOMMIT = 0; + +# Export/import on the same instance, with --innodb-file-per-table=1 +CREATE DATABASE testdb_wl5522; +CREATE TABLE testdb_wl5522.t1 (c1 int ) engine = Innodb; + +BEGIN; +INSERT INTO testdb_wl5522.t1 VALUES (1),(123),(331); +ROLLBACK; + +SELECT c1 FROM testdb_wl5522.t1; + +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1 (c1 int ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE testdb_wl5522.t1; +SELECT c1 FROM testdb_wl5522.t1; + +SET AUTOCOMMIT = 1; +DROP TABLE testdb_wl5522.t1; +DROP DATABASE testdb_wl5522; +eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; +eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt new file mode 100644 index 00000000000..33e2b863684 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt @@ -0,0 +1 @@ +--log-error=$MYSQLTEST_VARDIR/tmp/my_restart.err diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test new file mode 100644 index 00000000000..1774bb7f796 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test @@ -0,0 +1,75 @@ +if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in InnoDB before 5.6.17 +} + +--echo # +--echo # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE +--echo # OPERATION IF IT IS DONE IN-PLACE +--echo # +--source include/have_innodb.inc +# innodb_change_buffering_debug option is debug only +--source include/have_debug.inc +# Embedded server does not support crashing +--source include/not_embedded.inc +# DBUG_SUICIDE() hangs under valgrind +--source include/not_valgrind.inc + +# The flag innodb_change_buffering_debug is only available in debug builds. +# It instructs InnoDB to try to evict pages from the buffer pool when +# change buffering is possible, so that the change buffer will be used +# whenever possible. +SET GLOBAL innodb_change_buffering_debug = 1; +let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err; + +CREATE TABLE t1( + a INT AUTO_INCREMENT PRIMARY KEY, + b CHAR(1), + c INT, + INDEX(b)) +ENGINE=InnoDB; + +# Create enough rows for the table, so that the change buffer will be +# used for modifying the secondary index page. There must be multiple +# index pages, because changes to the root page are never buffered. +INSERT INTO t1 VALUES(0,'x',1); +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; + +BEGIN; +SELECT b FROM t1 LIMIT 3; + +connect (con1,localhost,root,,); +connection con1; +BEGIN; +DELETE FROM t1 WHERE a=1; +# This should be buffered, if innodb_change_buffering_debug = 1 is in effect. +INSERT INTO t1 VALUES(1,'X',1); + +SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace'; +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--error 2013 +# This should force a change buffer merge +SELECT b FROM t1 LIMIT 3; + +let SEARCH_PATTERN=Wrote log record for ibuf update in place operation; +--source include/search_pattern_in_file.inc + +# Write file to make mysql-test-run.pl start up the server again +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--enable_reconnect +--source include/wait_until_connected_again.inc + +CHECK TABLE t1; + +# Cleanup +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test index 01592ae9bb8..8598647de66 100644 --- a/mysql-test/suite/innodb/t/innodb-index.test +++ b/mysql-test/suite/innodb/t/innodb-index.test @@ -1,10 +1,5 @@ -- source include/have_innodb.inc -if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in InnoDB 5.6.10 or earlier -} - let $innodb_file_format_orig=`select @@innodb_file_format`; let $innodb_file_format_max_orig=`select @@innodb_file_format_max`; diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-1.test b/mysql-test/suite/innodb/t/innodb-wl5522-1.test new file mode 100644 index 00000000000..b1db34976a9 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-wl5522-1.test @@ -0,0 +1,952 @@ +# Not supported in embedded +--source include/not_embedded.inc + +-- source include/have_innodb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +let MYSQLD_DATADIR =`SELECT @@datadir`; +let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; +let $innodb_file_format = `SELECT @@innodb_file_format`; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; + +let $MYSQLD_DATADIR = `SELECT @@datadir`; + +# Following testcases are created from JET cases (where import +# export instance are differnt server ) +# Here test will be run on same import and export instance. + +DROP DATABASE IF EXISTS testdb_wl5522; +CREATE DATABASE testdb_wl5522; + +# case 1 +CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb; +INSERT INTO testdb_wl5522.t1 VALUES (1),(123),(331); +SELECT c1 FROM testdb_wl5522.t1; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +SELECT * FROM testdb_wl5522.t1 ORDER BY c1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1 ORDER BY c1; +DROP TABLE testdb_wl5522.t1; + +# case 2 +CREATE TABLE testdb_wl5522.t1 ( +col1 BIT(1), +col2 BOOLEAN, +col3 TINYINT, +col4 SMALLINT, +col5 MEDIUMINT, +col6 INT, +col7 BIGINT, +col8 FLOAT (14,3) , +col9 DOUBLE (14,3), +col10 VARCHAR(20), +col11 TEXT , +col12 ENUM('a','b','c'), +col13 TEXT, +col14 CHAR(20) , +col15 VARBINARY (400) , +col16 BINARY(40), +col17 BLOB (400) , +col18 INT NOT NULL PRIMARY KEY, +col19 DATE , +col20 DATETIME , +col21 TIMESTAMP , +col22 TIME , +col23 YEAR ) ENGINE = Innodb; + +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); +INSERT INTO testdb_wl5522.t1 VALUES +(1,1,-128,32767,-8388608,2147483647,-9223372036854775808, 92233720368.222, +-92233720368.222,'aaa', + 'aaaaaaaaaa','b','bbbbb','ccccc', +REPEAT('d',40),REPEAT('d',40),REPEAT('d',40),1,'1000-01-01', +'3000-12-31 23:59:59.99','1990-01-01 00:00:01.00', +'01:59:59.00','1901'); +INSERT INTO testdb_wl5522.t1 VALUES +(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL); +--error 1048 +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +--error 1062 +INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL); + +FLUSH TABLES testdb_wl5522.t1 WITH READ LOCK; +SELECT COUNT(*) FROM testdb_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1 ( +col1 BIT(1), +col2 BOOLEAN, +col3 TINYINT, +col4 SMALLINT, +col5 MEDIUMINT, +col6 INT, +col7 BIGINT, +col8 FLOAT (14,3) , +col9 DOUBLE (14,3), +col10 VARCHAR(20), +col11 TEXT, +col12 ENUM('a','b','c'), +col13 TEXT, +col14 CHAR(20) , +col15 VARBINARY (400) , +col16 BINARY(40), +col17 BLOB (400) , +col18 INT NOT NULL PRIMARY KEY, +col19 DATE , +col20 DATETIME , +col21 TIMESTAMP , +col22 TIME , +col23 YEAR ) ENGINE = Innodb; + +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); + +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE testdb_wl5522.t1; + +SELECT COUNT(*) FROM testdb_wl5522.t1; + +DROP TABLE testdb_wl5522.t1; + + +# case 3 - with blob objects + +SET GLOBAL innodb_file_format='Barracuda'; + +CREATE TABLE testdb_wl5522.t1 ( +col_1_varbinary VARBINARY (4000) , +col_2_varchar VARCHAR (4000), +col_3_text TEXT (4000), +col_4_blob BLOB (4000), +col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), +col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC ENGINE = Innodb; + +INSERT INTO testdb_wl5522.t1 VALUES( +REPEAT('a', 4000),REPEAT('o', 4000),REPEAT('a', 4000), REPEAT('o', 4000), +REPEAT('a', 4000),REPEAT('a', 4000),REPEAT('a', 255)); + +SELECT col_1_varbinary = REPEAT("a", 4000) , +col_2_varchar = REPEAT("o", 4000) , +col_3_text = REPEAT("a", 4000) , +col_4_blob = REPEAT("o", 4000) , +col_5_text = REPEAT("a", 4000) , +col_6_varchar = REPEAT("a", 4000) , +col_7_binary = REPEAT("a", 255) +FROM testdb_wl5522.t1; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1 ( +col_1_varbinary VARBINARY (4000) , +col_2_varchar VARCHAR (4000), +col_3_text TEXT (4000), +col_4_blob BLOB (4000), +col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), +col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC ENGINE = Innodb; + +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; + +SELECT col_1_varbinary = REPEAT("a", 4000) , +col_2_varchar = REPEAT("o", 4000) , +col_3_text = REPEAT("a", 4000) , +col_4_blob = REPEAT("o", 4000) , +col_5_text = REPEAT("a", 4000) , +col_6_varchar = REPEAT("a", 4000) , +col_7_binary = REPEAT("a", 255) +FROM testdb_wl5522.t1; + +DROP TABLE testdb_wl5522.t1; + +# case 4 - trasportable tablesace with autoincrement +CREATE TABLE testdb_wl5522.t1 ( +col_1_int INT AUTO_INCREMENT, +col_2_varchar VARCHAR (20), +PRIMARY KEY (col_1_int)) ENGINE = Innodb; + +INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'),(3,'a3'); +INSERT INTO testdb_wl5522.t1 (col_2_varchar) VALUES ('a4'),('a5'),('a6'); + +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1 ( +col_1_int INT AUTO_INCREMENT, +col_2_varchar VARCHAR (20), +PRIMARY KEY (col_1_int)) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; + +# error on inserting duplicate value +--error 1062 +INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'); +# insert new values +INSERT INTO testdb_wl5522.t1(col_2_varchar) VALUES ('a101'),('a102'),('a103'); +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +# check table can be altered +ALTER TABLE testdb_wl5522.t1 MODIFY col_1_int BIGINT; +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; + +DROP TABLE testdb_wl5522.t1; + +# case 5 - check with primary and foreign key +CREATE TABLE testdb_wl5522.t1 ( +col_1_int INT,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_2_varchar)) ENGINE = Innodb; + +CREATE TABLE testdb_wl5522.t1_fk ( +col_1_int INT,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_1_int), +FOREIGN KEY (col_2_varchar) REFERENCES testdb_wl5522.t1(col_2_varchar) +) ENGINE = Innodb; + + +INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'),(3,'a3'),(4,'a4'),(5,'a5'); +INSERT INTO testdb_wl5522.t1_fk VALUES (1,'a1'),(2,'a2'),(3,'a3'); + +SELECT * FROM testdb_wl5522.t1; +SELECT * FROM testdb_wl5522.t1_fk; +FLUSH TABLES testdb_wl5522.t1,testdb_wl5522.t1_fk FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +ib_backup_tablespaces("testdb_wl5522", "t1_fk"); +EOF + +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1_fk,testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1 ( +col_1_int INT,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_2_varchar)) ENGINE = Innodb; + +CREATE TABLE testdb_wl5522.t1_fk ( +col_1_int INT,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_1_int), +FOREIGN KEY (col_2_varchar) REFERENCES testdb_wl5522.t1(col_2_varchar) +) ENGINE = Innodb; + +# Alter table discrad table is not allowed with foreign_key_checks = 1 +SET foreign_key_checks = 0; +ALTER TABLE testdb_wl5522.t1_fk DISCARD TABLESPACE; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +SET foreign_key_checks = 1; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_discard_tablespaces("testdb_wl5522", "t1_fk"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1_fk"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +ALTER TABLE testdb_wl5522.t1_fk IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1; +SELECT * FROM testdb_wl5522.t1_fk; + +# Enter Invalid value: PK-FK relationship violation +--error 1452 +INSERT INTO testdb_wl5522.t1_fk VALUES (100,'a100'); + +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1_fk VALUES (4,'a4'),(5,'a5'); +ROLLBACK; +SELECT * FROM testdb_wl5522.t1_fk; + +DROP TABLE testdb_wl5522.t1_fk,testdb_wl5522.t1; +SET AUTOCOMMIT = 1; + + +# case 6 - transporatbale tablespace with transactions +CREATE TABLE testdb_wl5522.t1 ( +col_1_int int,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_2_varchar)) ENGINE = Innodb; +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'); +SELECT * FROM testdb_wl5522.t1; +COMMIT; +INSERT INTO testdb_wl5522.t1 VALUES (3,'a3'),(4,'a4'); +ROLLBACK; +INSERT INTO testdb_wl5522.t1 VALUES (5,'a5'),(6,'a6'); +COMMIT; +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( +col_1_int int,col_2_varchar VARCHAR (20), +PRIMARY KEY (col_2_varchar)) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +SET AUTOCOMMIT = 0; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; + + +INSERT INTO testdb_wl5522.t1 VALUES (7,'a7'),(8,'a8'); +COMMIT; +INSERT INTO testdb_wl5522.t1 VALUES (9,'a9'),(10,'a10'); +ROLLBACK; +INSERT INTO testdb_wl5522.t1 VALUES (11,'a11'),(12,'a12'); +COMMIT; +SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int; +SET AUTOCOMMIT = 1; + +DROP TABLE testdb_wl5522.t1; + +#case 7 - transpotable tablespace with transaction(earlier failed with jet) + +CREATE TABLE testdb_wl5522.t1 ( i int ) ENGINE = Innodb; +INSERT INTO testdb_wl5522.t1 VALUES (100),(200),(300); +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 ( i int ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1 VALUES (101),(102),(103); +COMMIT; +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +SET AUTOCOMMIT = 1; +DROP TABLE testdb_wl5522.t1; + + +# case 8 - negative cases +CREATE TABLE testdb_wl5522.t1 ( i int ) ENGINE = Innodb; +INSERT INTO testdb_wl5522.t1 VALUES (100),(200),(300); +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +# try if we can flush again +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; + +# create table with incorrect schema +CREATE TABLE testdb_wl5522.t1 ( i bigint) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +# error as mismatch in column data type +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; + +# explicilty delet idb file before creating table with correct schema +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("testdb_wl5522", "t1"); +EOF + +DROP TABLE testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1 ( i int ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +# Import should succeed +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +# Try to import twice +--error 1813 +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1 ORDER BY i; + +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1 VALUES (101),(102),(103); +COMMIT; +SELECT * FROM testdb_wl5522.t1 ORDER BY i; +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (i int) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; +# do not delete ibt file and try to import +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF +#--error 1000 +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +DROP TABLE testdb_wl5522.t1; +SET AUTOCOMMIT = 1; + + +# case 9 - empty table import +CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb; +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1 VALUES (1),(123),(331); +SELECT c1 FROM testdb_wl5522.t1; +ROLLBACK; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; +CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb; +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; +SELECT * FROM testdb_wl5522.t1 ORDER BY c1; +DROP TABLE testdb_wl5522.t1; +SET AUTOCOMMIT = 1; + +# case 10 - tt with prefix index + +CREATE TABLE testdb_wl5522.t1 (col_1 CHAR (255) , +col_2 VARCHAR (255), col_3 VARCHAR (255), +col_4 VARCHAR (255),col_5 VARCHAR (255), +col_6 text (255), col_7 text (255), +col_8 text (255),col_9 text (255), +col_10 BLOB (255),col_11 BLOB (255), +col_12 BLOB (255), col_13 BLOB (255), +col_14 BLOB (255) , col_15 int ) ENGINE = innodb; + +CREATE INDEX prefix_idx ON testdb_wl5522.t1( +col_1 (50),col_2 (50),col_3 (50), +col_4 (50),col_5 (50),col_6 (50), +col_7 (50),col_8 (50),col_9 (50), +col_10 (50),col_11 (50),col_12 (50), +col_13(50)); + +INSERT INTO testdb_wl5522.t1 VALUES ( +REPEAT("col1_00001",10),REPEAT("col2_00001",10),REPEAT("col3_00001",10), +REPEAT("col4_00001",10),REPEAT("col5_00001",10),REPEAT("col6_00001",10), +REPEAT("col7_00001",10),REPEAT("col8_00001",10),REPEAT("col9_00001",10), +REPEAT("col10_00001",10),REPEAT("col11_00001",10),REPEAT("col12_00001",10), +REPEAT("col13_00001",10),REPEAT("col14_00001",10),1); + +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; + +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1 (col_1 CHAR (255) , +col_2 VARCHAR (255), col_3 VARCHAR (255), +col_4 VARCHAR (255),col_5 VARCHAR (255), +col_6 text (255), col_7 text (255), +col_8 text (255),col_9 text (255), +col_10 BLOB (255),col_11 BLOB (255), +col_12 BLOB (255), col_13 BLOB (255), +col_14 BLOB (255) , col_15 int ) ENGINE = innodb; + +CREATE INDEX prefix_idx ON testdb_wl5522.t1( +col_1 (50),col_2 (50),col_3 (50), +col_4 (50),col_5 (50),col_6 (50), +col_7 (50),col_8 (50),col_9 (50), +col_10 (50),col_11 (50),col_12 (50), +col_13(50)); + + +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; + + +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; + +DROP TABLE testdb_wl5522.t1; + + +# case 11 - tt with secondary index + +CREATE TABLE testdb_wl5522.t1 (col_1 CHAR (255) , +col_2 VARCHAR (255), col_3 VARCHAR (255), +col_4 VARCHAR (255),col_5 VARCHAR (255), +col_6 text (255), col_7 text (255), +col_8 text (255),col_9 text (255), +col_10 BLOB (255),col_11 BLOB (255), +col_12 BLOB (255), col_13 BLOB (255), +col_14 BLOB (255) , col_15 int ) ENGINE = innodb; + +CREATE INDEX idx1 ON testdb_wl5522.t1(col_1); +CREATE INDEX idx2 ON testdb_wl5522.t1(col_2); +CREATE INDEX idx3 ON testdb_wl5522.t1(col_3); +CREATE INDEX idx4 ON testdb_wl5522.t1(col_4); +CREATE INDEX idx5 ON testdb_wl5522.t1(col_5); +CREATE INDEX idx6 ON testdb_wl5522.t1(col_6(255)); +CREATE INDEX idx7 ON testdb_wl5522.t1(col_7(255)); +CREATE INDEX idx8 ON testdb_wl5522.t1(col_8(255)); +CREATE INDEX idx9 ON testdb_wl5522.t1(col_9(255)); +CREATE INDEX idx10 ON testdb_wl5522.t1(col_10(255)); +CREATE INDEX idx11 ON testdb_wl5522.t1(col_11(255)); +CREATE INDEX idx12 ON testdb_wl5522.t1(col_12(255)); +CREATE INDEX idx13 ON testdb_wl5522.t1(col_13(255)); +CREATE INDEX idx14 ON testdb_wl5522.t1(col_14(255)); + +INSERT INTO testdb_wl5522.t1 VALUES ( +REPEAT("col1_00001",10),REPEAT("col2_00001",10),REPEAT("col3_00001",10), +REPEAT("col4_00001",10),REPEAT("col5_00001",10),REPEAT("col6_00001",10), +REPEAT("col7_00001",10),REPEAT("col8_00001",10),REPEAT("col9_00001",10), +REPEAT("col10_00001",10),REPEAT("col11_00001",10),REPEAT("col12_00001",10), +REPEAT("col13_00001",10),REPEAT("col14_00001",10),1); + +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; + +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1 (col_1 CHAR (255) , +col_2 VARCHAR (255), col_3 VARCHAR (255), +col_4 VARCHAR (255),col_5 VARCHAR (255), +col_6 text (255), col_7 text (255), +col_8 text (255),col_9 text (255), +col_10 BLOB (255),col_11 BLOB (255), +col_12 BLOB (255), col_13 BLOB (255), +col_14 BLOB (255) , col_15 int ) ENGINE = innodb; + +CREATE INDEX idx1 ON testdb_wl5522.t1(col_1); +CREATE INDEX idx2 ON testdb_wl5522.t1(col_2); +CREATE INDEX idx3 ON testdb_wl5522.t1(col_3); +CREATE INDEX idx4 ON testdb_wl5522.t1(col_4); +CREATE INDEX idx5 ON testdb_wl5522.t1(col_5); +CREATE INDEX idx6 ON testdb_wl5522.t1(col_6(255)); +CREATE INDEX idx7 ON testdb_wl5522.t1(col_7(255)); +CREATE INDEX idx8 ON testdb_wl5522.t1(col_8(255)); +CREATE INDEX idx9 ON testdb_wl5522.t1(col_9(255)); +CREATE INDEX idx10 ON testdb_wl5522.t1(col_10(255)); +CREATE INDEX idx11 ON testdb_wl5522.t1(col_11(255)); +CREATE INDEX idx12 ON testdb_wl5522.t1(col_12(255)); +CREATE INDEX idx13 ON testdb_wl5522.t1(col_13(255)); +CREATE INDEX idx14 ON testdb_wl5522.t1(col_14(255)); + +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; + +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; + +# perform transaction on impoted table +SET AUTOCOMMIT = 0; +INSERT INTO testdb_wl5522.t1(col_15) VALUES (15000),(16000); +SELECT col_15 FROM testdb_wl5522.t1 WHERE col_15 > 11000; +ROLLBACK; +SELECT col_15 FROM testdb_wl5522.t1 WHERE col_15 > 11000; +INSERT INTO testdb_wl5522.t1(col_15) VALUES (15000),(16000); +COMMIT; +SELECT col_15 FROM testdb_wl5522.t1 WHERE col_15 > 11000; +# dml +ALTER TABLE testdb_wl5522.t1 DROP INDEX idx1; +ALTER TABLE testdb_wl5522.t1 DROP INDEX idx6; +ALTER TABLE testdb_wl5522.t1 DROP INDEX idx10; + +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; + +ALTER TABLE testdb_wl5522.t1 ADD INDEX idx1 (col_1); +ALTER TABLE testdb_wl5522.t1 ADD INDEX idx6 (col_1(255)); +ALTER TABLE testdb_wl5522.t1 ADD INDEX idx10 (col_10(255)); + + +SELECT +col_1 = REPEAT("col1_00001",10), +col_2 = REPEAT("col2_00001",10), +col_3 = REPEAT("col3_00001",10), +col_4 = REPEAT("col4_00001",10), +col_5 = REPEAT("col5_00001",10), +col_6 = REPEAT("col6_00001",10), +col_7 = REPEAT("col7_00001",10), +col_8 = REPEAT("col8_00001",10), +col_9 = REPEAT("col9_00001",10), +col_10 = REPEAT("col10_00001",10), +col_11 = REPEAT("col11_00001",10), +col_12 = REPEAT("col12_00001",10), +col_13 = REPEAT("col13_00001",10), +col_14 = REPEAT("col14_00001",10), +col_15 +FROM testdb_wl5522.t1; + +DROP TABLE testdb_wl5522.t1; +SET AUTOCOMMIT = 1; + +# case 12 - tt with trigger / view + +CREATE TABLE testdb_wl5522.t1(col1 bit(1) , +col2 boolean,col3 tinyint , col4 smallint , +col5 mediumint ,col6 int , col7 bigint , +col8 float (14,3) ,col9 double (14,3), +col10 VARCHAR(20) CHARACTER SET utf8 , +col11 TEXT CHARACTER SET binary , +col12 ENUM('a','b','c') CHARACTER SET binary, +col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs , +col14 CHAR(20) , col15 VARBINARY (400), +col16 BINARY(40), col17 BLOB (400), +col18 int not null primary key, +col19 DATE ,col20 DATETIME , col21 TIMESTAMP , +col22 TIME , col23 YEAR ) ENGINE = Innodb; + +# table for trigger action +CREATE TABLE testdb_wl5522.trigger_table ( i int ) ENGINE = Innodb; +# define trigger +CREATE TRIGGER testdb_wl5522.tri AFTER INSERT ON testdb_wl5522.t1 +FOR EACH ROW INSERT INTO testdb_wl5522.trigger_table VALUES(NEW.col18); +# define view +CREATE OR REPLACE VIEW testdb_wl5522.VW1 AS SELECT * FROM testdb_wl5522.t1; + +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); + + +INSERT INTO testdb_wl5522.t1 VALUES ( +1,1,-128,32767,-8388608,2147483647,-9223372036854775808,92233720368.222, +-92233720368.222,'aaa','aaaaaaaaaa','b','bbbbb','ccccc',REPEAT('d',40), +REPEAT('d',40),REPEAT('d',40),1,'1000-01-01','3000-12-31 23:59:59.99', +'1990-01-01 00:00:01.00','01:59:59.00','1901'); + +INSERT INTO testdb_wl5522.t1 VALUES ( +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,3,NULL,NULL,NULL,NULL,NULL); + + +--error 1048 +INSERT INTO testdb_wl5522.t1 VALUES ( +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + +--error 1062 +INSERT INTO testdb_wl5522.t1 VALUES ( +NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, +NULL,NULL,1,NULL,NULL,NULL,NULL,NULL); + +SELECT COUNT(*) FROM testdb_wl5522.t1; +SELECT * FROM testdb_wl5522.trigger_table; +SELECT COUNT(*) FROM testdb_wl5522.VW1; +FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("testdb_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +# trigger is also dropped when table is dropped +DROP TABLE testdb_wl5522.t1; + +CREATE TABLE testdb_wl5522.t1(col1 bit(1) , +col2 boolean,col3 tinyint , col4 smallint , +col5 mediumint ,col6 int , col7 bigint , +col8 float (14,3) ,col9 double (14,3), +col10 VARCHAR(20) CHARACTER SET utf8 , +col11 TEXT CHARACTER SET binary , +col12 ENUM('a','b','c') CHARACTER SET binary, +col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs , +col14 CHAR(20) , col15 VARBINARY (400), +col16 BINARY(40), col17 BLOB (400), +col18 int not null primary key, +col19 DATE ,col20 DATETIME , col21 TIMESTAMP , +col22 TIME , col23 YEAR ) ENGINE = Innodb; + +CREATE INDEX idx1 ON testdb_wl5522.t1(col18); +CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); +CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12); +CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8); + + +ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("testdb_wl5522", "t1"); +ib_restore_tablespaces("testdb_wl5522", "t1"); +EOF + +ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; + +SELECT COUNT(*) FROM testdb_wl5522.t1; +SELECT * FROM testdb_wl5522.trigger_table; +SELECT COUNT(*) FROM testdb_wl5522.VW1; + +# trigger table is not updated as trigger got dropped +INSERT INTO testdb_wl5522.t1(col18) VALUES (5); +# validate data in table not updated +SELECT * FROM testdb_wl5522.trigger_table; + +UPDATE testdb_wl5522.t1 SET col18=10 WHERE col18=1; + +# view shows updated data +SELECT COUNT(*) FROM testdb_wl5522.VW1; + +SELECT COUNT(*) FROM testdb_wl5522.t1 WHERE col18=10; +ALTER TABLE testdb_wl5522.t1 ADD COLUMN col24 varbinary(40) default null; +INSERT INTO testdb_wl5522.t1(col18,col24) VALUES (6,REPEAT('a',10)); +SELECT col24,col18 FROM testdb_wl5522.t1 WHERE col18 in (6,1,10) ORDER BY col18; +ALTER TABLE testdb_wl5522.t1 DROP INDEX prefix_idx; +SELECT col18,col14 FROM testdb_wl5522.t1 WHERE col14 like '_ccc%'; +ALTER TABLE testdb_wl5522.t1 ADD INDEX prefix_idx (col24(10)); +SELECT col18,col24 FROM testdb_wl5522.t1 WHERE col24 like '_a_a%'; + +DROP TABLE testdb_wl5522.t1; + +DROP DATABASE testdb_wl5522; + +call mtr.add_suppression("Got error -1 when reading table '.*'"); +call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*"); +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); + +# cleanup +--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg +--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd +--remove_file $MYSQLTEST_VARDIR/tmp/t1_fk.cfg +--remove_file $MYSQLTEST_VARDIR/tmp/t1_fk.ibd + +eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; +eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test new file mode 100644 index 00000000000..1290b9b5bb7 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test @@ -0,0 +1,758 @@ +# Not supported in embedded +--source include/not_embedded.inc + +# This test case needs to crash the server. Needs a debug server. +--source include/have_debug.inc + +# Don't test this under valgrind, memory leaks will occur. +--source include/not_valgrind.inc + +# Avoid CrashReporter popup on Mac +--source include/not_crashrep.inc + +-- source include/have_innodb.inc + +# compressed table in tests are with sizes KEY_BLOCK_SIZE 1,2,4,8,16 +# Table creatation fails if KEY_BLOCK_SIZE > innodb-page-size,so +# allow test to run only when innodb-page-size=16 +--source include/have_innodb_16k.inc + + +let MYSQLD_DATADIR =`SELECT @@datadir`; +let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; +let $innodb_file_format = `SELECT @@innodb_file_format`; +let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; +let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522\\t1.ibd'/; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; + +SET SESSION innodb_strict_mode=1; +SELECT @@SESSION.innodb_strict_mode; + + + +DROP DATABASE IF EXISTS test_wl5522; +CREATE DATABASE test_wl5522; + +# Create the table that we will use for crash recovery (during IMPORT) +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; +INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4); + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test_wl5522", "t1"); +EOF +UNLOCK TABLES; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test_wl5522", "t1"); +EOF + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +##### Before commit crash +SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; + +--error ER_TABLESPACE_DISCARDED +SELECT * FROM test_wl5522.t1; + +# Write file to make mysql-test-run.pl start up the server again +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + +# Execute the statement that causes the crash +--error 2013 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +--enable_reconnect +--source include/wait_until_connected_again.inc +--disable_reconnect + +SET SESSION debug_dbug="-d,ib_import_before_commit_crash"; +#### Before commit crash + +# Check that the DD is consistent after recovery + +##### Before checkpoint crash +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Don't start up the server right away. +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + +# Execute the statement that causes the crash +--error 2013 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +# After the above test the results are non-deterministic, +# delete the old tablespace files and drop the table, +# recreate the table and do a proper import. +-- source include/wait_until_disconnected.inc +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +--echo # Restart and reconnect to the server +--enable_reconnect +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--source include/wait_until_connected_again.inc +--disable_reconnect + +SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash"; +#### Before checkpoint crash + +# After the above test the results are non-deterministic, recreate the table +# and do a proper import. + +DROP TABLE test_wl5522.t1; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; + +SET SESSION innodb_strict_mode=1; +SELECT @@SESSION.innodb_strict_mode; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE test_wl5522.t1; + +SELECT COUNT(*) FROM test_wl5522.t1; + +INSERT INTO test_wl5522.t1 VALUES(400), (500), (600); + +SELECT * FROM test_wl5522.t1; + +DROP TABLE test_wl5522.t1; + +# Test handling of internal failure error +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after reset of space id and LSN in the tablespace +SET SESSION debug_dbug="+d,ib_import_internal_error"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_internal_error"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +DROP TABLE test_wl5522.t1; + + +# Test failure after reset of space id and LSN in the tablespace +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb +ROW_FORMAT=COMPRESSED; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after reset of space id and LSN in the tablespace +SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure"; + +# Test failure after attempting a tablespace open +SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; + +--replace_regex /file: '.*t1.ibd'/'t1.ibd'/ + +--error ER_GET_ERRMSG +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after ibuf check +SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; + +# Need proper mapping of error codes :-( +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after adjusting the cluster index root page +SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure"; + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after importing the cluster index +SET SESSION debug_dbug="+d,ib_import_cluster_failure"; + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_cluster_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after importing the secondary index(es) +SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure"; + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after importing the cluster index +SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure"; + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure"; + +# Left over from the failed IMPORT +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +DROP TABLE test_wl5522.t1; + +--disable_query_log +# Enable metrics for the counters we are going to use +set global innodb_monitor_enable = purge_stop_count; +set global innodb_monitor_enable = purge_resume_count; +set global innodb_monitor_enable = ibuf_merges; +set global innodb_monitor_enable = ibuf_merges_insert; +--enable_query_log + +# +# Create a large table with delete marked records, disable purge during +# the update so that we can test the IMPORT purge code. +# +CREATE TABLE test_wl5522.t1 ( + c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 BIGINT, + c3 VARCHAR(2048), + c4 VARCHAR(2048), + INDEX idx1(c2), + INDEX idx2(c3(512)), + INDEX idx3(c4(512))) Engine=InnoDB + ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + +# Stop purge so that it doesn't remove the delete marked entries. +SET GLOBAL INNODB_PURGE_STOP_NOW=ON; + +# Disable change buffer merge from the master thread, additionally +# enable aggressive flushing so that more changes are buffered. +SET GLOBAL innodb_disable_background_merge=ON; +SET GLOBAL innodb_monitor_reset = ibuf_merges; +SET GLOBAL innodb_monitor_reset = ibuf_merges_insert; + +INSERT INTO test_wl5522.t1(c2, c3, c4) VALUES + (1, REPEAT('a', 2048), REPEAT('a', 2048)), + (2, REPEAT('b', 2048), REPEAT('b', 2048)), + (3, REPEAT('c', 2048), REPEAT('c', 2048)), + (4, REPEAT('d', 2048), REPEAT('d', 2048)); + +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; + +DELETE FROM test_wl5522.t1 WHERE c2 = 1; + +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c3 = REPEAT("c2", 1024); +UPDATE test_wl5522.t1 SET c4 = REPEAT("c4", 1024); + +SHOW CREATE TABLE test_wl5522.t1; + +SELECT c1, c2 FROM test_wl5522.t1; +SELECT COUNT(*) FROM test_wl5522.t1; +SELECT SUM(c2) FROM test_wl5522.t1; + +SELECT name + FROM information_schema.innodb_metrics + WHERE name = 'ibuf_merges_insert' AND count = 0; + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +SELECT name + FROM information_schema.innodb_metrics + WHERE name = 'ibuf_merges' AND count > 0; + +SELECT name + FROM information_schema.innodb_metrics + WHERE name = 'ibuf_merges_inserts' AND count > 0; + +SET GLOBAL innodb_disable_background_merge=OFF; + +# Enable normal operation +SET GLOBAL INNODB_PURGE_RUN_NOW=ON; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 ( + c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 BIGINT, + c3 VARCHAR(2048), + c4 VARCHAR(2048), + INDEX idx1(c2), + INDEX idx2(c3(512)), + INDEX idx3(c4(512))) Engine=InnoDB + ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + +SELECT c1, c2 FROM test_wl5522.t1; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE test_wl5522.t1; + +SELECT c1,c2 FROM test_wl5522.t1; +SELECT COUNT(*) FROM test_wl5522.t1; +SELECT SUM(c2) FROM test_wl5522.t1; + +SHOW CREATE TABLE test_wl5522.t1; + +DROP TABLE test_wl5522.t1; + +#### +# Create a table and save the tablespace and .cfg file, we need to create +# a Btree that has several levels +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +INSERT INTO test_wl5522.t1 VALUES + (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); + +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +SELECT COUNT(*) FROM test_wl5522.t1; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +# + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +# Following alter is not failing +#--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2"; + +--replace_regex $pathfix + +--error ER_INNODB_INDEX_CORRUPT +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_create_index_failure_1"; + +ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1); + +SET SESSION debug_dbug="-d,ib_import_create_index_failure_1"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +# + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,fil_space_create_failure"; + +--replace_regex $pathfix + +--error ER_GET_ERRMSG +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,fil_space_create_failure"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +# + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; + +--replace_regex $pathfix + +--error ER_GET_ERRMSG +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +# + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + + +DROP DATABASE test_wl5522; + +set global innodb_monitor_disable = all; +set global innodb_monitor_reset_all = all; + +-- disable_warnings +set global innodb_monitor_enable = default; +set global innodb_monitor_disable = default; +set global innodb_monitor_reset = default; +set global innodb_monitor_reset_all = default; +-- enable_warnings + +--disable_query_log +call mtr.add_suppression("'Resource temporarily unavailable'"); +call mtr.add_suppression("Monitor ibuf_merges is already enabled"); +call mtr.add_suppression("Monitor ibuf_merges_insert is already enabled"); +call mtr.add_suppression("Got error -1 when reading table '.*'"); +call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded."); +call mtr.add_suppression("InnoDB: Tablespace '.*' exists in the cache.*"); +call mtr.add_suppression("InnoDB: Freeing existing tablespace '.*' entry from the cache with id.*"); +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); +call mtr.add_suppression(".*There was an error writing to the meta data file.*"); +call mtr.add_suppression("InnoDB: Trying to import a tablespace, but could not open the tablespace file"); +call mtr.add_suppression("Unsupported tablespace format"); +call mtr.add_suppression("Error in page .* of index \"GEN_CLUST_INDEX\" of table \"test_wl5522\".\"t1\""); +call mtr.add_suppression("Page is marked as free"); +call mtr.add_suppression("t1.ibd: Page .* at offset .* looks corrupted"); +call mtr.add_suppression("but tablespace with that id or name does not exist"); +call mtr.add_suppression("Failed to find tablespace for table '\"test_wl5522\".\"t1\"' in the cache"); +call mtr.add_suppression("Could not find a valid tablespace file for 'test_wl5522.*t1'"); +--enable_query_log + +#cleanup +--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg +--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd + +eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; +eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; +eval SET SESSION innodb_strict_mode=$innodb_strict_mode_orig; + diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test new file mode 100644 index 00000000000..9c0c11fadab --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test @@ -0,0 +1,1494 @@ +# Not supported in embedded +--source include/not_embedded.inc + +# Adding big test option for this test. +--source include/big_test.inc + +# This test case needs to crash the server. Needs a debug server. +--source include/have_debug.inc + +# Don't test this under valgrind, memory leaks will occur. +--source include/not_valgrind.inc + +# Avoid CrashReporter popup on Mac +--source include/not_crashrep.inc + +-- source include/have_innodb.inc + +let MYSQLD_DATADIR =`SELECT @@datadir`; +let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; +let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522\\t1.ibd'/; +let $strerrfix=/ (\(.+\))//; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +DROP DATABASE IF EXISTS test_wl5522; +CREATE DATABASE test_wl5522; + +##### Before DISCARD commit crash +SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; +INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); + +# Write file to make mysql-test-run.pl start up the server again +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + +# Execute the statement that causes the crash +--error 2013 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--enable_reconnect +--source include/wait_until_connected_again.inc +--disable_reconnect + +SET SESSION debug_dbug="-d,ib_discard_before_commit_crash"; +DROP TABLE test_wl5522.t1; +#### Before DISCARD commit crash + +##### After DISCARD commit crash +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; +INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); + +# Write file to make mysql-test-run.pl start up the server again +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + +# Execute the statement that causes the crash +--error 2013 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--enable_reconnect +--source include/wait_until_connected_again.inc +--disable_reconnect + +SET SESSION debug_dbug="-d,ib_discard_after_commit_crash"; +DROP TABLE test_wl5522.t1; +#### After DISCARD commit crash + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +# Create the table that we will use for crash recovery (during IMPORT) +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4); + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test_wl5522", "t1"); +EOF +UNLOCK TABLES; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +##### Before commit crash +SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; + +--error ER_TABLESPACE_DISCARDED +SELECT * FROM test_wl5522.t1; + +# Write file to make mysql-test-run.pl start up the server again +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + +# Execute the statement that causes the crash +--error 2013 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +--enable_reconnect +--source include/wait_until_connected_again.inc +--disable_reconnect + +SET SESSION debug_dbug="-d,ib_import_before_commit_crash"; +#### Before commit crash + +# Check that the DD is consistent after recovery + +##### Before checkpoint crash +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Don't start up the server right away. +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + +# Execute the statement that causes the crash +--error 2013 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +# After the above test the results are non-deterministic, +# delete the old tablespace files and drop the table, +# recreate the table and do a proper import. +-- source include/wait_until_disconnected.inc +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +--echo # Restart and reconnect to the server +--enable_reconnect +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--source include/wait_until_connected_again.inc +--disable_reconnect + +SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash"; +#### Before checkpoint crash + +# After the above test the results are non-deterministic, recreate the table +# and do a proper import. + +DROP TABLE test_wl5522.t1; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE test_wl5522.t1; + +SELECT COUNT(*) FROM test_wl5522.t1; + +INSERT INTO test_wl5522.t1 VALUES(400), (500), (600); + +SELECT * FROM test_wl5522.t1; + +DROP TABLE test_wl5522.t1; + +# Test IO Write error(s), flush tables doesn't return an error message +# so we have to make do with the error/warning pushed by the server +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_1"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_1"; + +DROP TABLE test_wl5522.t1; + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_2"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_2"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_3"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_3"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_4"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_4"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_5"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_5"; + +DROP TABLE test_wl5522.t1; + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_6"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_6"; + +DROP TABLE test_wl5522.t1; + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_7"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_7"; + +DROP TABLE test_wl5522.t1; + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_8"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_8"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_9"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_9"; + +DROP TABLE test_wl5522.t1; + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_10"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_10"; + +DROP TABLE test_wl5522.t1; + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_11"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_11"; + +DROP TABLE test_wl5522.t1; + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +SET SESSION debug_dbug="+d,ib_export_io_write_failure_12"; + +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +UNLOCK TABLES; + +SET SESSION debug_dbug="-d,ib_export_io_write_failure_12"; + +DROP TABLE test_wl5522.t1; + +# Create a table and save the tablespace and .cfg file +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (100), (200), (300); +SELECT COUNT(*) FROM test_wl5522.t1; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE test_wl5522.t1; + +# Test IO Read error(s) +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_io_read_error_1"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_io_read_error_1"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_io_read_error_2"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_io_read_error_2"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_io_read_error_3"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_io_read_error_3"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_io_read_error_4"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_io_read_error_4"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_io_read_error_5"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_io_read_error_5"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_io_read_error_6"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_io_read_error_6"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_io_read_error_7"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_io_read_error_7"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_io_read_error_8"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_io_read_error_8"; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_io_read_error_9"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_io_read_error_9"; + +DROP TABLE test_wl5522.t1; + +# Test string read failure +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_string_read_error"; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_cfg_files("test_wl5522", "t1"); +EOF + +--replace_regex $strerrfix + +--error ER_IO_READ_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_string_read_error"; + +DROP TABLE test_wl5522.t1; + +# Test OOM error during import + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_OOM_1"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_OUT_OF_RESOURCES +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_OOM_1"; + +DROP TABLE test_wl5522.t1; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_OOM_2"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_OUT_OF_RESOURCES +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_OOM_2"; + +DROP TABLE test_wl5522.t1; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_OOM_4"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_OUT_OF_RESOURCES +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_OOM_4"; + +DROP TABLE test_wl5522.t1; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_OOM_5"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_OUT_OF_RESOURCES +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_OOM_5"; + +DROP TABLE test_wl5522.t1; + + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_OOM_6"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_OUT_OF_RESOURCES +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_OOM_6"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_OOM_7"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_OUT_OF_RESOURCES +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_OOM_7"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_OOM_8"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_OUT_OF_RESOURCES +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_OOM_8"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_OOM_9"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_OUT_OF_RESOURCES +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_OOM_9"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; +INSERT INTO test_wl5522.t1 VALUES (1); + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_OOM_10"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_OUT_OF_RESOURCES +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_OOM_10"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +#### +# Test handling of internal failure error +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after reset of space id and LSN in the tablespace +SET SESSION debug_dbug="+d,ib_import_internal_error"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_internal_error"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +DROP TABLE test_wl5522.t1; + + +# Test failure after reset of space id and LSN in the tablespace +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after reset of space id and LSN in the tablespace +SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure"; + +# Test failure after attempting a tablespace open +SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; + +--replace_regex /file: '.*t1.ibd'/'t1.ibd'/ + +--error ER_GET_ERRMSG +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after ibuf check +SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; + +# Need proper mapping of error codes :-( +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after adjusting the cluster index root page +SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure"; + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after importing the cluster index +SET SESSION debug_dbug="+d,ib_import_cluster_failure"; + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_cluster_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after importing the secondary index(es) +SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure"; + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure"; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +# Test failure after importing the cluster index +SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure"; + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure"; + +# Left over from the failed IMPORT +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +DROP TABLE test_wl5522.t1; + +--disable_query_log +# Enable metrics for the counters we are going to use +set global innodb_monitor_enable = purge_stop_count; +set global innodb_monitor_enable = purge_resume_count; +set global innodb_monitor_enable = ibuf_merges; +set global innodb_monitor_enable = ibuf_merges_insert; +--enable_query_log + +# +# Create a large table with delete marked records, disable purge during +# the update so that we can test the IMPORT purge code. +# +CREATE TABLE test_wl5522.t1 ( + c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 BIGINT, + c3 VARCHAR(2048), + c4 VARCHAR(2048), + INDEX idx1(c2), + INDEX idx2(c3(512)), + INDEX idx3(c4(512))) Engine=InnoDB; + +# Stop purge so that it doesn't remove the delete marked entries. +SET GLOBAL INNODB_PURGE_STOP_NOW=ON; + +# Disable change buffer merge from the master thread, additionally +# enable aggressive flushing so that more changes are buffered. +SET GLOBAL innodb_disable_background_merge=ON; +SET GLOBAL innodb_monitor_reset = ibuf_merges; +SET GLOBAL innodb_monitor_reset = ibuf_merges_insert; + +INSERT INTO test_wl5522.t1(c2, c3, c4) VALUES + (1, REPEAT('a', 2048), REPEAT('a', 2048)), + (2, REPEAT('b', 2048), REPEAT('b', 2048)), + (3, REPEAT('c', 2048), REPEAT('c', 2048)), + (4, REPEAT('d', 2048), REPEAT('d', 2048)); + +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1; + +DELETE FROM test_wl5522.t1 WHERE c2 = 1; + +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c2 = c2 + c1; +UPDATE test_wl5522.t1 SET c3 = REPEAT("c2", 1024); +UPDATE test_wl5522.t1 SET c4 = REPEAT("c4", 1024); + +SHOW CREATE TABLE test_wl5522.t1; + +SELECT c1, c2 FROM test_wl5522.t1; +SELECT COUNT(*) FROM test_wl5522.t1; +SELECT SUM(c2) FROM test_wl5522.t1; + +SELECT name + FROM information_schema.innodb_metrics + WHERE name = 'ibuf_merges_insert' AND count = 0; + +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +SELECT name + FROM information_schema.innodb_metrics + WHERE name = 'ibuf_merges' AND count > 0; + +SELECT name + FROM information_schema.innodb_metrics + WHERE name = 'ibuf_merges_inserts' AND count > 0; + +SET GLOBAL innodb_disable_background_merge=OFF; + +# Enable normal operation +SET GLOBAL INNODB_PURGE_RUN_NOW=ON; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 ( + c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 BIGINT, + c3 VARCHAR(2048), + c4 VARCHAR(2048), + INDEX idx1(c2), + INDEX idx2(c3(512)), + INDEX idx3(c4(512))) Engine=InnoDB; + +SELECT c1, c2 FROM test_wl5522.t1; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +CHECK TABLE test_wl5522.t1; + +SELECT c1,c2 FROM test_wl5522.t1; +SELECT COUNT(*) FROM test_wl5522.t1; +SELECT SUM(c2) FROM test_wl5522.t1; + +SHOW CREATE TABLE test_wl5522.t1; + +DROP TABLE test_wl5522.t1; + +#### +# Create a table and save the tablespace and .cfg file, we need to create +# a Btree that has several levels +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; + +INSERT INTO test_wl5522.t1 VALUES + (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); + +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; +SELECT COUNT(*) FROM test_wl5522.t1; +FLUSH TABLES test_wl5522.t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test_wl5522", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE test_wl5522.t1; + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +# + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +# +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2"; + +--replace_regex $pathfix + +--error ER_INNODB_INDEX_CORRUPT +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF +# + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3"; + +--replace_regex $pathfix + +--error ER_NOT_KEYFILE +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +SET SESSION debug_dbug="+d,ib_import_create_index_failure_1"; + +ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1); + +SET SESSION debug_dbug="-d,ib_import_create_index_failure_1"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +# + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,fil_space_create_failure"; + +--replace_regex $pathfix + +--error ER_GET_ERRMSG +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,fil_space_create_failure"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +# + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; + +--replace_regex $pathfix + +--error ER_GET_ERRMSG +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + +# + +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; + +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; + +--error ER_TABLESPACE_DISCARDED +SELECT COUNT(*) FROM test_wl5522.t1; + +# Restore files +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test_wl5522", "t1"); +EOF + +SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure"; + +--replace_regex /'.*t1.cfg'/'t1.cfg'/ + +--error ER_INTERNAL_ERROR +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; + +SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure"; + +DROP TABLE test_wl5522.t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test_wl5522", "t1"); +EOF + + +DROP DATABASE test_wl5522; + +set global innodb_monitor_disable = all; +set global innodb_monitor_reset_all = all; + +-- disable_warnings +set global innodb_monitor_enable = default; +set global innodb_monitor_disable = default; +set global innodb_monitor_reset = default; +set global innodb_monitor_reset_all = default; +-- enable_warnings + +--disable_query_log +call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!"); +call mtr.add_suppression("'Resource temporarily unavailable'"); +call mtr.add_suppression("Monitor ibuf_merges is already enabled"); +call mtr.add_suppression("Monitor ibuf_merges_insert is already enabled"); +call mtr.add_suppression("Got error -1 when reading table '.*'"); +call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded."); +call mtr.add_suppression("InnoDB: Tablespace '.*' exists in the cache.*"); +call mtr.add_suppression("InnoDB: Freeing existing tablespace '.*' entry from the cache with id.*"); +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); +call mtr.add_suppression(".*There was an error writing to the meta data file.*"); +call mtr.add_suppression("InnoDB: Trying to import a tablespace, but could not open the tablespace file"); +call mtr.add_suppression("Unsupported tablespace format"); +call mtr.add_suppression("Error in page .* of index \"GEN_CLUST_INDEX\" of table \"test_wl5522\".\"t1\""); +call mtr.add_suppression("Page is marked as free"); +call mtr.add_suppression("t1.ibd: Page .* at offset .* looks corrupted"); +call mtr.add_suppression("but tablespace with that id or name does not exist"); +call mtr.add_suppression("Failed to find tablespace for table '\"test_wl5522\".\"t1\"' in the cache"); +call mtr.add_suppression("Could not find a valid tablespace file for 'test_wl5522.*t1'"); +call mtr.add_suppression("while reading index meta-data, expected to read 44 bytes but read only 0 bytes"); +--enable_query_log + +#cleanup +--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg +--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd + +eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; + diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-zip.test new file mode 100644 index 00000000000..d139e0b700d --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-wl5522-zip.test @@ -0,0 +1,544 @@ +# Not supported in embedded +--source include/not_embedded.inc + +-- source include/have_innodb.inc +# compressed table in tests are with sizes KEY_BLOCK_SIZE 1,2,4,8,16 +# Table creatation fails if KEY_BLOCK_SIZE > innodb-page-size,so +# allow test to run only when innodb-page-size=16 +--source include/have_innodb_16k.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; +let $innodb_file_format = `SELECT @@innodb_file_format`; +let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; + +SET SESSION innodb_strict_mode=1; +SELECT @@SESSION.innodb_strict_mode; + +let $MYSQLD_TMPDIR = `SELECT @@tmpdir`; +let $MYSQLD_DATADIR = `SELECT @@datadir`; + +CREATE TABLE t1 +(a INT AUTO_INCREMENT PRIMARY KEY, + b char(22), + c varchar(255), + KEY (b)) +ENGINE = InnoDB ROW_FORMAT=COMPRESSED ; + +insert into t1 (b, c) values ('Apa', 'Filler........'), +('Banan', 'Filler........'), ('Cavalry', '..asdasdfaeraf'), +('Devotion', 'asdfuihknaskdf'), ('Evolution', 'lsjndofiabsoibeg'); + +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t1; +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +--list_files $MYSQLD_DATADIR/test +--echo # Restarting server +-- source include/restart_mysqld.inc +--echo # Done restarting server +FLUSH TABLE t1 FOR EXPORT; +--echo # List before copying files +--list_files $MYSQLD_DATADIR/test +--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_TMPDIR/t1.cfg +--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_TMPDIR/t1.ibd +UNLOCK TABLES; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t1; +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +--echo # Restarting server +-- source include/restart_mysqld.inc +--echo # Done restarting server +--echo # List before t1 DISCARD +--list_files $MYSQLD_DATADIR/test +ALTER TABLE t1 DISCARD TABLESPACE; +--echo # List after t1 DISCARD +--list_files $MYSQLD_DATADIR/test +--copy_file $MYSQLD_TMPDIR/t1.cfg $MYSQLD_DATADIR/test/t1.cfg +--copy_file $MYSQLD_TMPDIR/t1.ibd $MYSQLD_DATADIR/test/t1.ibd +ALTER TABLE t1 IMPORT TABLESPACE; +ALTER TABLE t1 ENGINE InnoDB; +SELECT COUNT(*) FROM t1; +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +--list_files $MYSQLD_DATADIR/test +SELECT COUNT(*) FROM t1; +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +DROP TABLE t1; +--remove_file $MYSQLD_TMPDIR/t1.cfg +--remove_file $MYSQLD_TMPDIR/t1.ibd + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; + +# restore session variable +SET SESSION innodb_strict_mode=1; +SELECT @@SESSION.innodb_strict_mode; + +let MYSQLD_DATADIR =`SELECT @@datadir`; + +# Try importing when tablespace already exists +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +INSERT INTO t1(c2) VALUES(1); +--error ER_TABLESPACE_EXISTS +ALTER TABLE t1 IMPORT TABLESPACE; +SELECT * FROM t1; +DROP TABLE t1; + +# Export/import on the same instance, with --innodb-file-per-table=1 +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +--list_files $MYSQLD_DATADIR/test + +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +--list_files $MYSQLD_DATADIR/test + +UNLOCK TABLES; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--list_files $MYSQLD_DATADIR/test + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +SELECT COUNT(*) FROM t1; + +DROP TABLE t1; + +# Export/import on the same instance, with --innodb-file-per-table=1 +# Insert some more records to move the LSN forward and then drop the +# table and restore +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +--list_files $MYSQLD_DATADIR/test +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF +--list_files $MYSQLD_DATADIR/test +UNLOCK TABLES; + +--list_files $MYSQLD_DATADIR/test + +# Move the LSN forward +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--list_files $MYSQLD_DATADIR/test + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +SELECT COUNT(*) FROM t1; + +DROP TABLE t1; + +# Export/import on the same instance, with --innodb-file-per-table=1 +# Insert some more records to move the LSN forward and then drop the +# table and restore, this time the table has a secondary index too. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF +--list_files $MYSQLD_DATADIR/test +UNLOCK TABLES; + +# Move the LSN forward +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +SELECT COUNT(*) FROM t1 WHERE c2 = 1; + +DROP TABLE t1; + +# Export/import on the same instance, with --innodb-file-per-table=1 +# Insert some more records to move the LSN forward and then drop the +# table and restore, this time the table has a secondary index too. +# Rename the index on the create so that the IMPORT fails, drop index +# Create with proper name and then do an IMPORT. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF +UNLOCK TABLES; + +# Move the LSN forward +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX x(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +# This is really a name mismatch error, need better error codes. +-- error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +ALTER TABLE t1 DROP INDEX x; +ALTER TABLE t1 ADD INDEX idx(c2); + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +DROP TABLE t1; + +# +# Export/import on the same instance, with --innodb-file-per-table=0 +# This should fail because it is not supported +SET GLOBAL innodb_file_per_table = 0; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +SELECT COUNT(*) FROM t1; + +SHOW CREATE TABLE t1; + +# This should fail, InnoDB should return a warning +FLUSH TABLES t1 FOR EXPORT; + +UNLOCK TABLES; + +DROP TABLE t1; + +# +# Tests that check for schema mismatch during IMPORT +# + +SET GLOBAL innodb_file_per_table = 1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +FLUSH TABLES t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE t1; + +# Table without the secondary index +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +# This should fail because of a missing secondary index +-- error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# Table with an additional column +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, + c3 INT, INDEX idx(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +# This should fail because the table has an additional column +-- error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# Change the column type of c2 +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 BIGINT, INDEX idx(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +# This should fail because c2 is now a BIGINT and not INT +-- error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# This should fail because KEY_BLOCK_SIZE is different +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +# This should fail because is KEY_BLOCK_SIZE=4 +# but KEY_BLOCK_SIZE=8 is exported table +# Need better error message for following +--replace_regex /\(.*\)// +-- error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + + +# This should be OK. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + +call mtr.add_suppression("Got error -1 when reading table '.*'"); +call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*"); +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); + +# cleanup +--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg +--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd + +eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; +eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; +eval SET SESSION innodb_strict_mode=$innodb_strict_mode_orig; diff --git a/mysql-test/suite/innodb/t/innodb-wl5522.test b/mysql-test/suite/innodb/t/innodb-wl5522.test new file mode 100644 index 00000000000..c9e7748cb47 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-wl5522.test @@ -0,0 +1,884 @@ +# Not supported in embedded +--source include/not_embedded.inc + +-- source include/have_innodb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; +let $innodb_file_format = `SELECT @@innodb_file_format`; + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; + +let $MYSQLD_TMPDIR = `SELECT @@tmpdir`; +let $MYSQLD_DATADIR = `SELECT @@datadir`; + +CREATE TABLE t1 +(a INT AUTO_INCREMENT PRIMARY KEY, + b char(22), + c varchar(255), + KEY (b)) +ENGINE = InnoDB; + +insert into t1 (b, c) values ('Apa', 'Filler........'), +('Banan', 'Filler........'), ('Cavalry', '..asdasdfaeraf'), +('Devotion', 'asdfuihknaskdf'), ('Evolution', 'lsjndofiabsoibeg'); + +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t1; +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +--list_files $MYSQLD_DATADIR/test +--echo # Restarting server +-- source include/restart_mysqld.inc +--echo # Done restarting server +FLUSH TABLE t1 FOR EXPORT; +--echo # List before copying files +--list_files $MYSQLD_DATADIR/test +--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_TMPDIR/t1.cfg +--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_TMPDIR/t1.ibd +UNLOCK TABLES; +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t1; +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +--echo # Restarting server +-- source include/restart_mysqld.inc +--echo # Done restarting server +--echo # List before t1 DISCARD +--list_files $MYSQLD_DATADIR/test +ALTER TABLE t1 DISCARD TABLESPACE; +--echo # List after t1 DISCARD +--list_files $MYSQLD_DATADIR/test +--copy_file $MYSQLD_TMPDIR/t1.cfg $MYSQLD_DATADIR/test/t1.cfg +--copy_file $MYSQLD_TMPDIR/t1.ibd $MYSQLD_DATADIR/test/t1.ibd +ALTER TABLE t1 IMPORT TABLESPACE; +ALTER TABLE t1 ENGINE InnoDB; +SELECT COUNT(*) FROM t1; +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +--list_files $MYSQLD_DATADIR/test +SELECT COUNT(*) FROM t1; +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3; +SELECT * FROM t1 ORDER BY a DESC LIMIT 3; +DROP TABLE t1; + +--remove_file $MYSQLD_TMPDIR/t1.cfg +--remove_file $MYSQLD_TMPDIR/t1.ibd + +SET GLOBAL innodb_file_per_table = 1; +SELECT @@innodb_file_per_table; + +SET GLOBAL innodb_file_format = `Barracuda`; +SELECT @@innodb_file_format; + +let MYSQLD_DATADIR =`SELECT @@datadir`; + +# Try importing when tablespace already exists +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB; + +INSERT INTO t1(c2) VALUES(1); +--error ER_TABLESPACE_EXISTS +ALTER TABLE t1 IMPORT TABLESPACE; +SELECT * FROM t1; +DROP TABLE t1; + +# Export/import on the same instance, with --innodb-file-per-table=1 +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +--list_files $MYSQLD_DATADIR/test + +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +--list_files $MYSQLD_DATADIR/test + +UNLOCK TABLES; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--list_files $MYSQLD_DATADIR/test + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +SELECT COUNT(*) FROM t1; + +DROP TABLE t1; + +# Export/import on the same instance, with --innodb-file-per-table=1 +# Insert some more records to move the LSN forward and then drop the +# table and restore +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +--list_files $MYSQLD_DATADIR/test +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF +--list_files $MYSQLD_DATADIR/test +UNLOCK TABLES; + +--list_files $MYSQLD_DATADIR/test + +# Move the LSN forward +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--list_files $MYSQLD_DATADIR/test + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +SELECT COUNT(*) FROM t1; + +DROP TABLE t1; + +# Export/import on the same instance, with --innodb-file-per-table=1 +# Insert some more records to move the LSN forward and then drop the +# table and restore, this time the table has a secondary index too. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX(c2)) ENGINE=InnoDB; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF +--list_files $MYSQLD_DATADIR/test +UNLOCK TABLES; + +# Move the LSN forward +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX(c2)) ENGINE=InnoDB; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +SELECT COUNT(*) FROM t1 WHERE c2 = 1; + +DROP TABLE t1; + +# Export/import on the same instance, with --innodb-file-per-table=1 +# Insert some more records to move the LSN forward and then drop the +# table and restore, this time the table has a secondary index too. +# Rename the index on the create so that the IMPORT fails, drop index +# Create with proper name and then do an IMPORT. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +FLUSH TABLES t1 FOR EXPORT; +SELECT COUNT(*) FROM t1 WHERE c2 = 1; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF +UNLOCK TABLES; + +# Move the LSN forward +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX x(c2)) ENGINE=InnoDB; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +# This is really a name mismatch error, need better error codes. +-- error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +ALTER TABLE t1 DROP INDEX x; +ALTER TABLE t1 ADD INDEX idx(c2); + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +DROP TABLE t1; + +# +# Export/import on the same instance, with --innodb-file-per-table=0 +# This should fail because it is not supported +SET GLOBAL innodb_file_per_table = 0; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +SELECT COUNT(*) FROM t1; + +SHOW CREATE TABLE t1; + +# This should fail, InnoDB should return a warning +FLUSH TABLES t1 FOR EXPORT; + +UNLOCK TABLES; + +DROP TABLE t1; + +# +# Tests that check for schema mismatch during IMPORT +# + +SET GLOBAL innodb_file_per_table = 1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +FLUSH TABLES t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE t1; + +# Table without the secondary index +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT) ENGINE=InnoDB; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +# This should fail because of a missing secondary index +-- error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# Table with an additional column +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, + c3 INT, INDEX idx(c2)) ENGINE=InnoDB; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +# This should fail because the table has an additional column +-- error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# Change the column type of c2 +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 BIGINT, INDEX idx(c2)) ENGINE=InnoDB; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +# This should fail because c2 is now a BIGINT and not INT +-- error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# This should be OK. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + +# +# Row format tests [EXPORT REDUNDANT - IMPORT COMPACT & DYNAMIC] +# +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +FLUSH TABLES t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# This should be OK. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + +# +# Row format tests [EXPORT COMPACT - IMPORT REDUNDANT & DYNAMIC] +# +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +FLUSH TABLES t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# This should be OK. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + +# +# Row format tests [EXPORT DYNAMIC- IMPORT REDUNDANT & DYNAMIC] +# +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +FLUSH TABLES t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# This should be OK. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + +call mtr.add_suppression("Got error -1 when reading table '.*'"); +call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*"); +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); + +# cleanup +--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg +--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd + +eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; +eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index e2056d66855..f687f089d78 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -1,9 +1,3 @@ ---source include/not_windows_embedded.inc -# remove this when -# Bug#53947 InnoDB: Assertion failure in thread 4224 in file -# .\sync\sync0sync.c line 324 -# is fixed - ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # @@ -1245,16 +1239,6 @@ select distinct concat(a, b) from t1; drop table t1; # -# BUG#7709 test case - Boolean fulltext query against unsupported -# engines does not fail -# - -CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB; ---error 1764 -SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE); -DROP TABLE t1; - -# # check null values #1 # diff --git a/mysql-test/suite/innodb/t/innodb_bug13510739.test b/mysql-test/suite/innodb/t/innodb_bug13510739.test index f10bcd8e272..d2193996d68 100644 --- a/mysql-test/suite/innodb/t/innodb_bug13510739.test +++ b/mysql-test/suite/innodb/t/innodb_bug13510739.test @@ -2,6 +2,10 @@ # Bug#13510739 63775: SERVER CRASH ON HANDLER READ NEXT AFTER DELETE RECORD. # +if (`select plugin_auth_version < "5.6.15" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in InnoDB before 5.6.15 +} -- source include/have_innodb.inc CREATE TABLE bug13510739 (c INTEGER NOT NULL, PRIMARY KEY (c)) ENGINE=INNODB; diff --git a/mysql-test/suite/innodb/t/innodb_bug60196-master.opt b/mysql-test/suite/innodb/t/innodb_bug60196-master.opt index c0a1981fa7c..ac4d3211e89 100644 --- a/mysql-test/suite/innodb/t/innodb_bug60196-master.opt +++ b/mysql-test/suite/innodb/t/innodb_bug60196-master.opt @@ -1 +1 @@ ---lower-case-table-names=2
+--lower-case-table-names=2 diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test index 44e2e8b2342..7c2ae98f001 100644 --- a/mysql-test/suite/innodb/t/innodb_mysql.test +++ b/mysql-test/suite/innodb/t/innodb_mysql.test @@ -717,6 +717,9 @@ LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1; ANALYZE TABLE t1; -- enable_result_log +set @tmp_innodb_mysql= @@optimizer_switch; +set optimizer_switch='extended_keys=off'; + SELECT * FROM t1 WHERE f1 IN (3305028,3353871,3772880,3346860,4228206,3336022, 3470988,3305175,3329875,3817277,3856380,3796193, @@ -728,6 +731,7 @@ EXPLAIN SELECT * FROM t1 WHERE f1 IN 3470988,3305175,3329875,3817277,3856380,3796193, 3784744,4180925,4559596,3963734,3856391,4494153) AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ; +set optimizer_switch=@tmp_innodb_mysql; DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/row_lock.test b/mysql-test/suite/innodb/t/row_lock.test new file mode 100644 index 00000000000..7a209f08956 --- /dev/null +++ b/mysql-test/suite/innodb/t/row_lock.test @@ -0,0 +1,53 @@ +if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in InnoDB before 5.6.17 +} + +# +# Test of wrong call to unlock_row +# MDEV-5629 Failing assertion: state == TRX_STATE_NOT_STARTED on +# concurrent CREATE OR REPLACE and transactional UPDATE +# + +--source include/have_innodb.inc +--source include/have_debug_sync.inc + +CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1),(2,2); + +CREATE TABLE t2 (c INT, d INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1,1), (2,2); + +CREATE TABLE t3 (e INT) ENGINE=InnoDB; +CREATE TABLE t4 ENGINE=InnoDB AS SELECT * FROM t2; + +--connect (con11,localhost,root,,test) + +BEGIN; +UPDATE t1 SET a = 0 WHERE a = ( SELECT e FROM t3 ); + +--connect (con12,localhost,root,,test) + +SET DEBUG_SYNC='srv_suspend_mysql_thread_enter SIGNAL waiting'; + +--send +UPDATE t4 SET d = 1 WHERE d in ( SELECT a FROM t1 ) ORDER BY c LIMIT 6; + +--connection con11 + +# Wait for con12 to start waiting for con11 + +SET DEBUG_SYNC='now WAIT_FOR waiting'; +SET DEBUG_SYNC='RESET'; + +UPDATE t4 SET d = 9; + +--connection con12 +--error ER_LOCK_DEADLOCK +--reap +--connection con11 +commit; +--connection default +--disconnect con12 +--disconnect con11 +drop table t1,t2,t3,t4; diff --git a/mysql-test/suite/innodb_fts/r/fulltext.result b/mysql-test/suite/innodb_fts/r/fulltext.result index f3c913110d2..e665fd1370f 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext.result +++ b/mysql-test/suite/innodb_fts/r/fulltext.result @@ -337,9 +337,9 @@ insert into t2 values (1, 1, 'xxfoo'); insert into t2 values (2, 1, 'xxbar'); insert into t2 values (3, 1, 'xxbuz'); select * from t1 join t2 using(`t1_id`) where match (t1.name, t2.name) against('xxfoo' in boolean mode); -ERROR HY000: The table does not have FULLTEXT index to support this query +ERROR HY000: Incorrect arguments to MATCH select * from t2 where match name against ('*a*b*c*d*e*f*' in boolean mode); -ERROR HY000: The table does not have FULLTEXT index to support this query +ERROR HY000: Can't find FULLTEXT index matching the column list drop table t1,t2; create table t1 (a text, fulltext key (a)) ENGINE = InnoDB; insert into t1 select "xxxx yyyy zzzz"; @@ -479,16 +479,13 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 fulltext a a 0 1 Using where EXPLAIN SELECT * FROM t1 IGNORE INDEX(a) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL b NULL NULL NULL 8 Using where +ERROR HY000: Can't find FULLTEXT index matching the column list EXPLAIN SELECT * FROM t1 USE INDEX(b) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL b NULL NULL NULL 8 Using where +ERROR HY000: Can't find FULLTEXT index matching the column list EXPLAIN SELECT * FROM t1 FORCE INDEX(b) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref b b 5 const 5 Using where +ERROR HY000: Can't find FULLTEXT index matching the column list DROP TABLE t1; CREATE TABLE t1(a CHAR(10), fulltext(a)) ENGINE = InnoDB; INSERT INTO t1 VALUES('aaa15'); @@ -562,14 +559,12 @@ WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE) ); count(*) 1 -# should return 0 SELECT count(*) FROM t1 WHERE not exists( SELECT 1 FROM t2 IGNORE INDEX (b2), t3 WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE) ); -count(*) -0 +ERROR HY000: Can't find FULLTEXT index matching the column list DROP TABLE t1,t2,t3; CREATE TABLE t1 (a VARCHAR(4), FULLTEXT(a)) ENGINE = InnoDB; INSERT INTO t1 VALUES diff --git a/mysql-test/suite/innodb_fts/r/fulltext_left_join.result b/mysql-test/suite/innodb_fts/r/fulltext_left_join.result index f40d22caa92..fc8d29bbef2 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext_left_join.result +++ b/mysql-test/suite/innodb_fts/r/fulltext_left_join.result @@ -66,7 +66,7 @@ create table t2 (m_id int not null, f char(200), key (m_id), fulltext (f)) engin insert into t2 values (1, 'bword'), (3, 'aword'), (5, ''); ANALYZE TABLE t2; select * from t1 left join t2 on m_id = id where match(d, e, f) against ('+aword +bword' in boolean mode); -id d e m_id f +ERROR HY000: Incorrect arguments to MATCH drop table t1,t2; CREATE TABLE t1 ( id int(10) NOT NULL auto_increment, @@ -89,9 +89,7 @@ ANALYZE TABLE t2; SELECT t1.*, MATCH(t1.name) AGAINST('string') AS relevance FROM t1 LEFT JOIN t2 ON t1.link = t2.id WHERE MATCH(t1.name, t2.name) AGAINST('string' IN BOOLEAN MODE); -id link name relevance -1 1 string 0.000000001885928302414186 -2 0 string 0.000000001885928302414186 +ERROR HY000: Incorrect arguments to MATCH DROP TABLE t1,t2; CREATE TABLE t1 (a INT) ENGINE = InnoDB; CREATE TABLE t2 (b INT, c TEXT, KEY(b), FULLTEXT(c)) ENGINE = InnoDB; diff --git a/mysql-test/suite/innodb_fts/r/fulltext_misc.result b/mysql-test/suite/innodb_fts/r/fulltext_misc.result index 2e803d1f815..7c342475eeb 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext_misc.result +++ b/mysql-test/suite/innodb_fts/r/fulltext_misc.result @@ -115,7 +115,7 @@ drop table t1, t2; CREATE TABLE t1(a TEXT CHARSET ucs2 COLLATE ucs2_unicode_ci) ENGINE = InnoDB; INSERT INTO t1 VALUES('abcd'); SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abcd' IN BOOLEAN MODE); -ERROR HY000: The table does not have FULLTEXT index to support this query +ERROR HY000: Can't find FULLTEXT index matching the column list DROP TABLE t1; create table t1 (a varchar(10), key(a), fulltext (a)) ENGINE = InnoDB; insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result index 3f22e79a384..f6be36a24ef 100644 --- a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result +++ b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result @@ -710,8 +710,7 @@ CREATE FULLTEXT INDEX i ON t1 (char_column2); Warnings: Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID SELECT * FROM t1 WHERE MATCH(char_column) AGAINST ('abc*' IN BOOLEAN MODE); -id char_column char_column2 -NULL abcde abcde +ERROR HY000: Can't find FULLTEXT index matching the column list DROP TABLE t1; "----------Test22---------" CREATE TABLE t1 ( id INT , char_column VARCHAR(60) CHARACTER SET UTF8) ENGINE = InnoDB; diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result b/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result new file mode 100644 index 00000000000..569de081762 --- /dev/null +++ b/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result @@ -0,0 +1,29 @@ +INSTALL PLUGIN simple_parser SONAME 'mypluglib'; +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200), +body TEXT, +FULLTEXT (title) WITH PARSER simple_parser +) ENGINE=MyISAM; +ALTER TABLE articles ENGINE=InnoDB; +ERROR HY000: Cannot CREATE FULLTEXT INDEX WITH PARSER on InnoDB table +DROP TABLE articles; +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200), +body TEXT, +FULLTEXT (title) WITH PARSER simple_parser +) ENGINE=InnoDB; +ERROR HY000: Cannot CREATE FULLTEXT INDEX WITH PARSER on InnoDB table +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200), +body TEXT, +FULLTEXT (title) +) ENGINE=InnoDB; +ALTER TABLE articles ADD FULLTEXT INDEX (body) WITH PARSER simple_parser; +ERROR HY000: Cannot CREATE FULLTEXT INDEX WITH PARSER on InnoDB table +CREATE FULLTEXT INDEX ft_index ON articles(body) WITH PARSER simple_parser; +ERROR HY000: Cannot CREATE FULLTEXT INDEX WITH PARSER on InnoDB table +DROP TABLE articles; +UNINSTALL PLUGIN simple_parser; diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_result_cache_limit.result b/mysql-test/suite/innodb_fts/r/innodb_fts_result_cache_limit.result new file mode 100644 index 00000000000..b4fe5154cc3 --- /dev/null +++ b/mysql-test/suite/innodb_fts/r/innodb_fts_result_cache_limit.result @@ -0,0 +1,31 @@ +CREATE TABLE t1 ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +a VARCHAR(200), +b TEXT +) ENGINE= InnoDB; +CREATE FULLTEXT INDEX idx on t1 (a,b); +Warnings: +Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID +INSERT INTO t1 (a,b) VALUES +('MySQL from Tutorial','DBMS stands for DataBase ...') , +('when To Use MySQL Well','After that you went through a ...'), +('where will Optimizing MySQL','what In this tutorial we will show ...'), +('MySQL from Tutorial','DBMS stands for DataBase ...') , +('when To Use MySQL Well','After that you went through a ...'), +('where will Optimizing MySQL','what In this tutorial we will show ...'), +('MySQL from Tutorial','DBMS stands for DataBase ...') , +('when To Use MySQL Well','After that you went through a ...'), +('where will Optimizing MySQL','what In this tutorial we will show ...'); +SET SESSION debug_dbug="+d,fts_instrument_result_cache_limit"; +SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('mysql' IN BOOLEAN MODE); +COUNT(*) +9 +SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('mysql' WITH QUERY EXPANSION); +ERROR HY000: Table handler out of memory +SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN MODE); +ERROR HY000: Table handler out of memory +SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database" @ 5' IN BOOLEAN MODE); +ERROR HY000: Table handler out of memory +SET SESSION debug_dbug="-d,fts_instrument_result_cache_limit"; +DROP TABLE t1; +SET GLOBAL innodb_ft_result_cache_limit=default; diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result b/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result new file mode 100644 index 00000000000..5f8d5e37680 --- /dev/null +++ b/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result @@ -0,0 +1,321 @@ +SELECT @@innodb_ft_server_stopword_table; +@@innodb_ft_server_stopword_table +NULL +SELECT @@innodb_ft_enable_stopword; +@@innodb_ft_enable_stopword +1 +SELECT @@innodb_ft_user_stopword_table; +@@innodb_ft_user_stopword_table +NULL +SET NAMES utf8; +# Test 1 : default latin1_swedish_ci +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200) +) ENGINE=InnoDB; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +1 love +2 LOVE +3 lòve +4 LÃ’VE +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +DROP TABLE articles; +DROP TABLE user_stopword; +# Test 2 : latin1_general_ci +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200) +) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +3 lòve +4 LÃ’VE +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB +DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +1 love +2 LOVE +DROP TABLE articles; +DROP TABLE user_stopword; +# Test 3 : latin1_spanish_ci +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200) +) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +1 love +2 LOVE +3 lòve +4 LÃ’VE +5 löve +6 LÖVE +7 løve +8 LØVE +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB +DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +DROP TABLE articles; +DROP TABLE user_stopword; +# Test 4 : utf8_general_ci +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200) +) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +1 love +2 LOVE +3 lòve +4 LÃ’VE +5 löve +6 LÖVE +9 lṓve +10 Lá¹’VE +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB +DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +DROP TABLE articles; +DROP TABLE user_stopword; +# Test 5 : utf8_unicode_ci +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200) +) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_swedish_ci; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +1 love +2 LOVE +3 lòve +4 LÃ’VE +9 lṓve +10 Lá¹’VE +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB +DEFAULT CHARACTER SET utf8 COLLATE utf8_swedish_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +DROP TABLE articles; +DROP TABLE user_stopword; +# Test 6 : utf8_unicode_ci +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200) +) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +1 love +2 LOVE +3 lòve +4 LÃ’VE +5 löve +6 LÖVE +9 lṓve +10 Lá¹’VE +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB +DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +DROP TABLE articles; +DROP TABLE user_stopword; +# Test 7 : gb2312_chinese_ci +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200) +) ENGINE=InnoDB DEFAULT CHARACTER SET gb2312 COLLATE gb2312_chinese_ci; +INSERT INTO articles (title) VALUES +('相亲相爱'),('怜香惜爱'),('充满å¯çˆ±'),('爱æ¨äº¤ç»‡'); +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('相亲相爱' IN NATURAL LANGUAGE MODE); +id title +1 相亲相爱 +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB +DEFAULT CHARACTER SET gb2312 COLLATE gb2312_chinese_ci; +INSERT INTO user_stopword VALUES('相亲相爱'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('相亲相爱' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('怜香惜爱' IN NATURAL LANGUAGE MODE); +id title +2 怜香惜爱 +DROP TABLE articles; +DROP TABLE user_stopword; +# Test 8 : test shutdown to check if stopword still works +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200) +) ENGINE=InnoDB; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +1 love +2 LOVE +3 lòve +4 LÃ’VE +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +# Shutdown and restart mysqld +SET NAMES utf8; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +DROP TABLE articles; +DROP TABLE user_stopword; +# Test 9 : drop user stopwrod table,test shutdown to check if it works +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200) +) ENGINE=InnoDB; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +1 love +2 LOVE +3 lòve +4 LÃ’VE +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +DROP TABLE user_stopword; +# Shutdown and restart mysqld +SET NAMES utf8; +INSERT INTO articles (title) VALUES +('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), +('lṓve'),('Lá¹’VE'); +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('lòve' IN NATURAL LANGUAGE MODE); +id title +11 love +12 LOVE +13 lòve +14 LÃ’VE +SELECT * FROM articles WHERE MATCH (title) +AGAINST ('love' IN NATURAL LANGUAGE MODE); +id title +11 love +12 LOVE +13 lòve +14 LÃ’VE +DROP TABLE articles; +SET SESSION innodb_ft_enable_stopword=1; +SET GLOBAL innodb_ft_server_stopword_table=default; +SET SESSION innodb_ft_user_stopword_table=default; diff --git a/mysql-test/suite/innodb_fts/t/fulltext.test b/mysql-test/suite/innodb_fts/t/fulltext.test index d75a650ca4d..90d5d5c71e0 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext.test +++ b/mysql-test/suite/innodb_fts/t/fulltext.test @@ -4,11 +4,6 @@ --source include/have_innodb.inc -if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in InnoDB 5.6.10 or earlier -} - --disable_warnings drop table if exists t1,t2,t3; --enable_warnings @@ -281,17 +276,17 @@ create table t2 (t2_id int(11) primary key, t1_id int(11), name varchar(32)) ENG insert into t2 values (1, 1, 'xxfoo'); insert into t2 values (2, 1, 'xxbar'); insert into t2 values (3, 1, 'xxbuz'); -# INNODB_FTS: Note there is no fulltext index on table. InnoDB do not support -# Fulltext search in such case, will return 1739 ---error ER_TABLE_HAS_NO_FT +# INNODB_FTS: InnoDB do not support MATCH expressions with arguments from +# different tables +--error ER_WRONG_ARGUMENTS select * from t1 join t2 using(`t1_id`) where match (t1.name, t2.name) against('xxfoo' in boolean mode); # # Bug #7858: bug with many short (< ft_min_word_len) words in boolean search # # INNODB_FTS: Note there is no fulltext index on table. InnoDB do not support -# Fulltext search in such case, will return 1739 ---error ER_TABLE_HAS_NO_FT +# Fulltext search in such case +--error ER_FT_MATCHING_KEY_NOT_FOUND select * from t2 where match name against ('*a*b*c*d*e*f*' in boolean mode); drop table t1,t2; @@ -490,12 +485,15 @@ WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; EXPLAIN SELECT * FROM t1 FORCE INDEX(a) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; +--error ER_FT_MATCHING_KEY_NOT_FOUND EXPLAIN SELECT * FROM t1 IGNORE INDEX(a) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; +--error ER_FT_MATCHING_KEY_NOT_FOUND EXPLAIN SELECT * FROM t1 USE INDEX(b) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; +--error ER_FT_MATCHING_KEY_NOT_FOUND EXPLAIN SELECT * FROM t1 FORCE INDEX(b) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; @@ -592,7 +590,7 @@ SELECT count(*) FROM t1 WHERE WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE) ); ---echo # should return 0 +--error ER_FT_MATCHING_KEY_NOT_FOUND SELECT count(*) FROM t1 WHERE not exists( SELECT 1 FROM t2 IGNORE INDEX (b2), t3 diff --git a/mysql-test/suite/innodb_fts/t/fulltext_left_join.test b/mysql-test/suite/innodb_fts/t/fulltext_left_join.test index 54cec263bfa..23bbd5ddc10 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext_left_join.test +++ b/mysql-test/suite/innodb_fts/t/fulltext_left_join.test @@ -77,6 +77,7 @@ insert into t2 values (1, 'bword'), (3, 'aword'), (5, ''); -- disable_result_log ANALYZE TABLE t2; -- enable_result_log +--error ER_WRONG_ARGUMENTS select * from t1 left join t2 on m_id = id where match(d, e, f) against ('+aword +bword' in boolean mode); drop table t1,t2; @@ -107,6 +108,7 @@ ANALYZE TABLE t1; ANALYZE TABLE t2; -- enable_result_log +--error ER_WRONG_ARGUMENTS SELECT t1.*, MATCH(t1.name) AGAINST('string') AS relevance FROM t1 LEFT JOIN t2 ON t1.link = t2.id WHERE MATCH(t1.name, t2.name) AGAINST('string' IN BOOLEAN MODE); diff --git a/mysql-test/suite/innodb_fts/t/fulltext_misc.test b/mysql-test/suite/innodb_fts/t/fulltext_misc.test index 18fbd7112fd..424cfda2f95 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext_misc.test +++ b/mysql-test/suite/innodb_fts/t/fulltext_misc.test @@ -139,7 +139,7 @@ CREATE TABLE t1(a TEXT CHARSET ucs2 COLLATE ucs2_unicode_ci) ENGINE = InnoDB; INSERT INTO t1 VALUES('abcd'); # INNODB_FTS: Please Note this table do not have FTS. InnoDB return 1214 error ---error ER_TABLE_HAS_NO_FT +--error ER_FT_MATCHING_KEY_NOT_FOUND SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abcd' IN BOOLEAN MODE); DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/t/fulltext_order_by.test b/mysql-test/suite/innodb_fts/t/fulltext_order_by.test index 5ea5c89a49c..b8f64a2fe78 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext_order_by.test +++ b/mysql-test/suite/innodb_fts/t/fulltext_order_by.test @@ -152,7 +152,7 @@ order by (select b.id, b.betreff from t3 b) order by match(betreff) against ('+abc' in boolean mode) desc; ---error 1191 +--error ER_FT_MATCHING_KEY_NOT_FOUND (select b.id, b.betreff from t3 b) union (select b.id, b.betreff from t3 b) order by match(betreff) against ('+abc') desc; diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test index 934d52f764f..68ca8974512 100644 --- a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test +++ b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test @@ -9,11 +9,6 @@ let collation=UTF8_UNICODE_CI; drop table if exists t1; --enable_warnings -if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in InnoDB 5.6.10 or earlier -} - # Create FTS table CREATE TABLE t1 ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, @@ -643,6 +638,7 @@ CREATE TABLE t1 ( id INT , char_column VARCHAR(60) CHARACTER SET UTF32, char_col INSERT INTO t1 (char_column) VALUES ('abcde'),('fghij'),('klmno'),('qrstu'); UPDATE t1 SET char_column2 = char_column; CREATE FULLTEXT INDEX i ON t1 (char_column2); +--error ER_FT_MATCHING_KEY_NOT_FOUND SELECT * FROM t1 WHERE MATCH(char_column) AGAINST ('abc*' IN BOOLEAN MODE); DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test b/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test new file mode 100644 index 00000000000..e800faed0f5 --- /dev/null +++ b/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test @@ -0,0 +1,45 @@ +--source include/have_simple_parser.inc +--source include/have_innodb.inc + +# Install fts parser plugin +INSTALL PLUGIN simple_parser SONAME 'mypluglib'; + +# Create a myisam table and alter it to innodb table +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200), + body TEXT, + FULLTEXT (title) WITH PARSER simple_parser + ) ENGINE=MyISAM; +--error ER_INNODB_NO_FT_USES_PARSER +ALTER TABLE articles ENGINE=InnoDB; + +DROP TABLE articles; + +# Create a table having a full text index with parser +--error ER_INNODB_NO_FT_USES_PARSER +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200), + body TEXT, + FULLTEXT (title) WITH PARSER simple_parser + ) ENGINE=InnoDB; + +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200), + body TEXT, + FULLTEXT (title) + ) ENGINE=InnoDB; + +# Alter table to add a full text index with parser +--error ER_INNODB_NO_FT_USES_PARSER +ALTER TABLE articles ADD FULLTEXT INDEX (body) WITH PARSER simple_parser; + +# Create a full text index with parser +--error ER_INNODB_NO_FT_USES_PARSER +CREATE FULLTEXT INDEX ft_index ON articles(body) WITH PARSER simple_parser; + +DROP TABLE articles; +# Uninstall plugin +UNINSTALL PLUGIN simple_parser; diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_result_cache_limit.test b/mysql-test/suite/innodb_fts/t/innodb_fts_result_cache_limit.test new file mode 100644 index 00000000000..dc55712b47c --- /dev/null +++ b/mysql-test/suite/innodb_fts/t/innodb_fts_result_cache_limit.test @@ -0,0 +1,51 @@ +# This is a basic test for innodb fts result cache limit. + +-- source include/have_innodb.inc + +# Must have debug code to use SET SESSION debug +--source include/have_debug.inc + +# Create FTS table +CREATE TABLE t1 ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + a VARCHAR(200), + b TEXT + ) ENGINE= InnoDB; + +# Create the FTS index again +CREATE FULLTEXT INDEX idx on t1 (a,b); + +# Insert rows +INSERT INTO t1 (a,b) VALUES + ('MySQL from Tutorial','DBMS stands for DataBase ...') , + ('when To Use MySQL Well','After that you went through a ...'), + ('where will Optimizing MySQL','what In this tutorial we will show ...'), + ('MySQL from Tutorial','DBMS stands for DataBase ...') , + ('when To Use MySQL Well','After that you went through a ...'), + ('where will Optimizing MySQL','what In this tutorial we will show ...'), + ('MySQL from Tutorial','DBMS stands for DataBase ...') , + ('when To Use MySQL Well','After that you went through a ...'), + ('where will Optimizing MySQL','what In this tutorial we will show ...'); + +SET SESSION debug_dbug="+d,fts_instrument_result_cache_limit"; + +# Simple term search +SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('mysql' IN BOOLEAN MODE); + +# Query expansion +--error 128 +SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('mysql' WITH QUERY EXPANSION); + +# Simple phrase search +--error 128 +SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN MODE); + +# Simple proximity search +--error 128 +SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database" @ 5' IN BOOLEAN MODE); + +SET SESSION debug_dbug="-d,fts_instrument_result_cache_limit"; + +DROP TABLE t1; + +SET GLOBAL innodb_ft_result_cache_limit=default; diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test b/mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test new file mode 100644 index 00000000000..cb49ca0e39f --- /dev/null +++ b/mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test @@ -0,0 +1,421 @@ +# This is the basic function tests for innodb FTS stopword charset + +-- source include/have_innodb.inc + +# Valgrind would complain about memory leaks when we crash on purpose. +--source include/not_valgrind.inc +# Embedded server does not support crashing +--source include/not_embedded.inc +# Avoid CrashReporter popup on Mac +--source include/not_crashrep.inc + +let $innodb_ft_server_stopword_table_orig=`SELECT @@innodb_ft_server_stopword_table`; +let $innodb_ft_enable_stopword_orig=`SELECT @@innodb_ft_enable_stopword`; +let $innodb_ft_user_stopword_table_orig=`SELECT @@innodb_ft_user_stopword_table`; + +SELECT @@innodb_ft_server_stopword_table; +SELECT @@innodb_ft_enable_stopword; +SELECT @@innodb_ft_user_stopword_table; + +SET NAMES utf8; + +-- echo # Test 1 : default latin1_swedish_ci +# Create FTS table with default charset latin1_swedish_ci +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200) + ) ENGINE=InnoDB; + +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); + +# Build full text index with default stopword +CREATE FULLTEXT INDEX ft_idx ON articles(title); +--enable_warnings + +# We can find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +# Define a user stopword table and set to it +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; + +# Rebuild the full text index with user stopword +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); + +# Now we will not find 'lòve' and check result with 'love' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +DROP TABLE articles; +DROP TABLE user_stopword; + +-- echo # Test 2 : latin1_general_ci +# Create FTS table with default charset latin1_swedish_ci +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200) + ) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; + +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); + +# Build full text index with default stopword +CREATE FULLTEXT INDEX ft_idx ON articles(title); +--enable_warnings + +# We can find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +# Define a user stopword table and set to it +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB + DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; + +# Rebuild the full text index with user stopword +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); + +# Now we will not find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +DROP TABLE articles; +DROP TABLE user_stopword; + +-- echo # Test 3 : latin1_spanish_ci +# Create FTS table with default charset latin1_swedish_ci +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200) + ) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci; + +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); + +# Build full text index with default stopword +CREATE FULLTEXT INDEX ft_idx ON articles(title); +--enable_warnings + +# We can find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +# Define a user stopword table and set to it +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB + DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; + +# Rebuild the full text index with user stopword +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); + +# Now we will not find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +DROP TABLE articles; +DROP TABLE user_stopword; + +-- echo # Test 4 : utf8_general_ci +# Create FTS table with default charset utf8_general_ci +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200) + ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; + +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); + +# Build full text index with default stopword +CREATE FULLTEXT INDEX ft_idx ON articles(title); +--enable_warnings + +# We can find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +# Define a user stopword table and set to it +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB + DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; + +# Rebuild the full text index with user stopword +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); + +# Now we will not find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +DROP TABLE articles; +DROP TABLE user_stopword; + +-- echo # Test 5 : utf8_unicode_ci +# Create FTS table with default charset utf8_swedish_ci +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200) + ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_swedish_ci; + +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); + +# Build full text index with default stopword +CREATE FULLTEXT INDEX ft_idx ON articles(title); +--enable_warnings + +# We can find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +# Define a user stopword table and set to it +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB + DEFAULT CHARACTER SET utf8 COLLATE utf8_swedish_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; + +# Rebuild the full text index with user stopword +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); + +# Now we will not find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +DROP TABLE articles; +DROP TABLE user_stopword; + +-- echo # Test 6 : utf8_unicode_ci +# Create FTS table with default charset utf8_unicode_ci +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200) + ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; + +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); + +# Build full text index with default stopword +CREATE FULLTEXT INDEX ft_idx ON articles(title); +--enable_warnings + +# We can find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +# Define a user stopword table and set to it +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB + DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; + +# Rebuild the full text index with user stopword +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); + +# Now we will not find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +DROP TABLE articles; +DROP TABLE user_stopword; + +-- echo # Test 7 : gb2312_chinese_ci +# Create FTS table with default charset gb2312_chinese_ci +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200) + ) ENGINE=InnoDB DEFAULT CHARACTER SET gb2312 COLLATE gb2312_chinese_ci; + +--disable_warnings +INSERT INTO articles (title) VALUES + ('相亲相爱'),('怜香惜爱'),('充满å¯çˆ±'),('爱æ¨äº¤ç»‡'); + +# Build full text index with default stopword +CREATE FULLTEXT INDEX ft_idx ON articles(title); +--enable_warnings + +# We can find '相亲相爱' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('相亲相爱' IN NATURAL LANGUAGE MODE); + +# Define a user stopword table and set to it +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB + DEFAULT CHARACTER SET gb2312 COLLATE gb2312_chinese_ci; +INSERT INTO user_stopword VALUES('相亲相爱'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; + +# Rebuild the full text index with user stopword +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); + +# Now we will not find '相亲相爱' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('相亲相爱' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('怜香惜爱' IN NATURAL LANGUAGE MODE); + +DROP TABLE articles; +DROP TABLE user_stopword; + +-- echo # Test 8 : test shutdown to check if stopword still works +# Create FTS table with default charset latin1_swedish_ci +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200) + ) ENGINE=InnoDB; + +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); + +# Build full text index with default stopword +CREATE FULLTEXT INDEX ft_idx ON articles(title); +--enable_warnings + +# We can find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +# Define a user stopword table and set to it +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; + +# Rebuild the full text index with user stopword +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); + +# Now we will not find 'lòve' and check result with 'love' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +--echo # Shutdown and restart mysqld +--source include/restart_mysqld.inc + +SET NAMES utf8; + +# Insert rows to check if it uses user stopword +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); +--enable_warnings + +# Now we will not find 'lòve' and check result with 'love' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +DROP TABLE articles; +DROP TABLE user_stopword; + +-- echo # Test 9 : drop user stopwrod table,test shutdown to check if it works +# Create FTS table with default charset latin1_swedish_ci +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200) + ) ENGINE=InnoDB; + +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); + +# Build full text index with default stopword +CREATE FULLTEXT INDEX ft_idx ON articles(title); +--enable_warnings + +# We can find 'lòve' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +# Define a user stopword table and set to it +CREATE TABLE user_stopword(value varchar(30)) ENGINE = InnoDB; +INSERT INTO user_stopword VALUES('lòve'); +SET GLOBAL innodb_ft_server_stopword_table = 'test/user_stopword'; + +# Rebuild the full text index with user stopword +DROP INDEX ft_idx ON articles; +CREATE FULLTEXT INDEX ft_idx ON articles(title); + +# Now we will not find 'lòve' and check result with 'love' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +# Drop user stopword table +DROP TABLE user_stopword; + +--echo # Shutdown and restart mysqld +--source include/restart_mysqld.inc + +SET NAMES utf8; + +# Insert rows to check if it uses user stopword +--disable_warnings +INSERT INTO articles (title) VALUES + ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), + ('lṓve'),('Lá¹’VE'); +--enable_warnings + +# Now we will not find 'lòve' and check result with 'love' +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('lòve' IN NATURAL LANGUAGE MODE); + +SELECT * FROM articles WHERE MATCH (title) + AGAINST ('love' IN NATURAL LANGUAGE MODE); + +DROP TABLE articles; + +# Restore Values +eval SET SESSION innodb_ft_enable_stopword=$innodb_ft_enable_stopword_orig; +eval SET GLOBAL innodb_ft_server_stopword_table=default; +eval SET SESSION innodb_ft_user_stopword_table=default; diff --git a/mysql-test/suite/innodb/r/innodb-create-options.result b/mysql-test/suite/innodb_zip/r/innodb-create-options.result index a3dcaee3a10..fe3d799229d 100644 --- a/mysql-test/suite/innodb/r/innodb-create-options.result +++ b/mysql-test/suite/innodb_zip/r/innodb-create-options.result @@ -15,6 +15,7 @@ SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: invalid ROW_FORMAT specifier. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; SHOW WARNINGS; Level Code Message @@ -63,18 +64,21 @@ SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; SHOW WARNINGS; Level Code Message @@ -255,6 +259,7 @@ SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and # and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope # and that they can be set to default values during strict mode. @@ -268,18 +273,21 @@ SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; SHOW WARNINGS; Level Code Message @@ -352,18 +360,21 @@ SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; SHOW WARNINGS; Level Code Message diff --git a/mysql-test/suite/innodb/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result index 4c55cccb28a..dbfae3c0630 100644 --- a/mysql-test/suite/innodb/r/innodb-zip.result +++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result @@ -185,6 +185,7 @@ show warnings; Level Code Message Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t3 (id int primary key) engine = innodb key_block_size = 1; create table t4 (id int primary key) engine = innodb key_block_size = 2; create table t5 (id int primary key) engine = innodb key_block_size = 4; @@ -212,6 +213,7 @@ show warnings; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t3 (id int primary key) engine = innodb key_block_size = 4 row_format = compact; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options") @@ -219,6 +221,7 @@ show warnings; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t4 (id int primary key) engine = innodb key_block_size = 4 row_format = dynamic; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t4` (errno: 140 "Wrong create options") @@ -226,6 +229,7 @@ show warnings; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. Error 1005 Can't create table `mysqltest_innodb_zip`.`t4` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t5 (id int primary key) engine = innodb key_block_size = 4 row_format = default; SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql'; @@ -241,6 +245,7 @@ Level Code Message Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. Error 1005 Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = compact; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") @@ -249,6 +254,7 @@ Level Code Message Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = dynamic; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") @@ -257,6 +263,7 @@ Level Code Message Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql'; table_schema table_name row_format data_length index_length set global innodb_file_per_table = off; @@ -266,30 +273,35 @@ show warnings; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t2 (id int primary key) engine = innodb key_block_size = 2; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") show warnings; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t3 (id int primary key) engine = innodb key_block_size = 4; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options") show warnings; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t6 (id int primary key) engine = innodb row_format = compressed; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options") show warnings; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. Error 1005 Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t7 (id int primary key) engine = innodb row_format = dynamic; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options") show warnings; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. Error 1005 Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql'; @@ -305,30 +317,35 @@ show warnings; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t2 (id int primary key) engine = innodb key_block_size = 2; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") show warnings; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t3 (id int primary key) engine = innodb key_block_size = 4; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options") show warnings; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t6 (id int primary key) engine = innodb row_format = compressed; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options") show warnings; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. Error 1005 Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t7 (id int primary key) engine = innodb row_format = dynamic; ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options") show warnings; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. Error 1005 Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql'; diff --git a/mysql-test/suite/innodb/r/innodb_bug36169.result b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result index aa80e4d7aa4..aa80e4d7aa4 100644 --- a/mysql-test/suite/innodb/r/innodb_bug36169.result +++ b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result diff --git a/mysql-test/suite/innodb/r/innodb_bug36172.result b/mysql-test/suite/innodb_zip/r/innodb_bug36172.result index 195775f74c8..195775f74c8 100644 --- a/mysql-test/suite/innodb/r/innodb_bug36172.result +++ b/mysql-test/suite/innodb_zip/r/innodb_bug36172.result diff --git a/mysql-test/suite/innodb/r/innodb_bug52745.result b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result index f4393e8fae0..f4393e8fae0 100644 --- a/mysql-test/suite/innodb/r/innodb_bug52745.result +++ b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result diff --git a/mysql-test/suite/innodb/r/innodb_bug53591.result b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result index dbebb9d2d33..dbebb9d2d33 100644 --- a/mysql-test/suite/innodb/r/innodb_bug53591.result +++ b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result diff --git a/mysql-test/suite/innodb/r/innodb_bug56680.result b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result index 5e798b69167..5e798b69167 100644 --- a/mysql-test/suite/innodb/r/innodb_bug56680.result +++ b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result diff --git a/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result index 1f6d6948756..1f6d6948756 100644 --- a/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result +++ b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result diff --git a/mysql-test/suite/innodb/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result index b610d1ed7b8..b610d1ed7b8 100644 --- a/mysql-test/suite/innodb/r/innodb_index_large_prefix.result +++ b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result diff --git a/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result index 746072781bd..746072781bd 100644 --- a/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result +++ b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result diff --git a/mysql-test/suite/innodb/t/innodb-create-options.test b/mysql-test/suite/innodb_zip/t/innodb-create-options.test index aeb22514bf6..aeb22514bf6 100644 --- a/mysql-test/suite/innodb/t/innodb-create-options.test +++ b/mysql-test/suite/innodb_zip/t/innodb-create-options.test diff --git a/mysql-test/suite/innodb/t/innodb-zip.test b/mysql-test/suite/innodb_zip/t/innodb-zip.test index 1c7c7c8c419..1c7c7c8c419 100644 --- a/mysql-test/suite/innodb/t/innodb-zip.test +++ b/mysql-test/suite/innodb_zip/t/innodb-zip.test diff --git a/mysql-test/suite/innodb/t/innodb_bug36169.test b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test index 6426bd683ae..6426bd683ae 100644 --- a/mysql-test/suite/innodb/t/innodb_bug36169.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test diff --git a/mysql-test/suite/innodb/t/innodb_bug36172.test b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test index 015f461e532..015f461e532 100644 --- a/mysql-test/suite/innodb/t/innodb_bug36172.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test diff --git a/mysql-test/suite/innodb/t/innodb_bug52745.test b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test index 3c5d79826f0..3c5d79826f0 100644 --- a/mysql-test/suite/innodb/t/innodb_bug52745.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test diff --git a/mysql-test/suite/innodb/t/innodb_bug53591.test b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test index 8bc461719b8..8bc461719b8 100644 --- a/mysql-test/suite/innodb/t/innodb_bug53591.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test diff --git a/mysql-test/suite/innodb/t/innodb_bug56680.test b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test index f592bd16942..f592bd16942 100644 --- a/mysql-test/suite/innodb/t/innodb_bug56680.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table-master.opt index a9a3d8c3db8..a9a3d8c3db8 100644 --- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt +++ b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table-master.opt diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table.test index 4263e839c85..4263e839c85 100644 --- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test +++ b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table.test diff --git a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test index 17f82f88fef..17f82f88fef 100644 --- a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test +++ b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test diff --git a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test index 77f55002da5..77f55002da5 100644 --- a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test +++ b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test diff --git a/mysql-test/suite/maria/alter.result b/mysql-test/suite/maria/alter.result new file mode 100644 index 00000000000..1a7daf5a1ee --- /dev/null +++ b/mysql-test/suite/maria/alter.result @@ -0,0 +1,33 @@ +drop table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' +CREATE TABLE t1 (pk INT, d DATETIME, PRIMARY KEY(pk), KEY(d)) ENGINE=Aria; +ALTER TABLE t1 DISABLE KEYS; +INSERT INTO t1 VALUES (1,'2000-01-01 22:22:22'),(2,'2012-12-21 12:12:12'); +INSERT INTO t1 VALUES (3, '2008-07-24'); +ALTER TABLE t1 ENABLE KEYS; +SELECT t1a.pk FROM t1 AS t1a LEFT JOIN t1 AS t1b ON t1a.pk = t1b.pk; +pk +1 +2 +3 +SELECT * FROM t1 AS t1a LEFT JOIN t1 AS t1b ON t1a.pk = t1b.pk; +pk d pk d +1 2000-01-01 22:22:22 1 2000-01-01 22:22:22 +2 2012-12-21 12:12:12 2 2012-12-21 12:12:12 +3 2008-07-24 00:00:00 3 2008-07-24 00:00:00 +DROP TABLE t1; +CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, KEY(i)) ENGINE=Aria; +ALTER TABLE t1 DISABLE KEYS; +INSERT INTO t1 VALUES (1,11); +INSERT INTO t1 VALUES (2,0),(3,33),(4,0),(5,55),(6,66),(7,0),(8,88),(9,99); +ALTER TABLE t1 ENABLE KEYS; +SELECT * FROM t1 WHERE i = 0 OR pk BETWEEN 6 AND 10; +pk i +2 0 +4 0 +6 66 +7 0 +8 88 +9 99 +DROP TABLE t1; diff --git a/mysql-test/suite/maria/alter.test b/mysql-test/suite/maria/alter.test new file mode 100644 index 00000000000..abca4865688 --- /dev/null +++ b/mysql-test/suite/maria/alter.test @@ -0,0 +1,27 @@ +# Testing of potential problems in Aria and alter table + +-- source include/have_maria.inc + +drop table if exists t1; + +# +# MDEV-4970 Wrong result with Aria table populated with disabled keys +# + +CREATE TABLE t1 (pk INT, d DATETIME, PRIMARY KEY(pk), KEY(d)) ENGINE=Aria; +ALTER TABLE t1 DISABLE KEYS; +INSERT INTO t1 VALUES (1,'2000-01-01 22:22:22'),(2,'2012-12-21 12:12:12'); +INSERT INTO t1 VALUES (3, '2008-07-24'); +ALTER TABLE t1 ENABLE KEYS; + +SELECT t1a.pk FROM t1 AS t1a LEFT JOIN t1 AS t1b ON t1a.pk = t1b.pk; +SELECT * FROM t1 AS t1a LEFT JOIN t1 AS t1b ON t1a.pk = t1b.pk; +DROP TABLE t1; + +CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, KEY(i)) ENGINE=Aria; +ALTER TABLE t1 DISABLE KEYS; +INSERT INTO t1 VALUES (1,11); +INSERT INTO t1 VALUES (2,0),(3,33),(4,0),(5,55),(6,66),(7,0),(8,88),(9,99); +ALTER TABLE t1 ENABLE KEYS; +SELECT * FROM t1 WHERE i = 0 OR pk BETWEEN 6 AND 10; +DROP TABLE t1; diff --git a/mysql-test/suite/maria/icp.result b/mysql-test/suite/maria/icp.result index 28b6418d6cf..85a21ada47d 100644 --- a/mysql-test/suite/maria/icp.result +++ b/mysql-test/suite/maria/icp.result @@ -167,7 +167,7 @@ WHERE ts BETWEEN '0000-00-00' AND '2010-00-01 00:00:00' ORDER BY ts DESC LIMIT 2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where +1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using where DROP TABLE t1; # diff --git a/mysql-test/suite/maria/maria-preload.result b/mysql-test/suite/maria/maria-preload.result index a693b6768ac..2c2a529e006 100644 --- a/mysql-test/suite/maria/maria-preload.result +++ b/mysql-test/suite/maria/maria-preload.result @@ -58,13 +58,13 @@ count(*) 4181 select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 9 +ARIA_PAGECACHE_READS 11 select count(*) from t1 where b = 'test1'; count(*) 4181 select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 9 +ARIA_PAGECACHE_READS 11 flush tables; flush status; select @@preload_buffer_size; @@ -75,18 +75,18 @@ Table Op Msg_type Msg_text test.t1 preload_keys status OK select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 80 +ARIA_PAGECACHE_READS 107 select count(*) from t1 where b = 'test1'; count(*) 4181 select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 80 +ARIA_PAGECACHE_READS 107 flush tables; flush status; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 80 +ARIA_PAGECACHE_READS 107 set session preload_buffer_size=256*1024; select @@preload_buffer_size; @@preload_buffer_size @@ -96,18 +96,18 @@ Table Op Msg_type Msg_text test.t1 preload_keys status OK select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 151 +ARIA_PAGECACHE_READS 203 select count(*) from t1 where b = 'test1'; count(*) 4181 select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 157 +ARIA_PAGECACHE_READS 211 flush tables; flush status; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 157 +ARIA_PAGECACHE_READS 211 set session preload_buffer_size=1*1024; select @@preload_buffer_size; @@preload_buffer_size @@ -118,7 +118,7 @@ test.t1 preload_keys status OK test.t2 preload_keys status OK select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 271 +ARIA_PAGECACHE_READS 364 select count(*) from t1 where b = 'test1'; count(*) 4181 @@ -127,12 +127,12 @@ count(*) 2584 select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 274 +ARIA_PAGECACHE_READS 369 flush tables; flush status; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 274 +ARIA_PAGECACHE_READS 369 load index into cache t3, t2 key (primary,b) ; Table Op Msg_type Msg_text test.t3 preload_keys Error Table 'test.t3' doesn't exist @@ -140,12 +140,12 @@ test.t3 preload_keys status Operation failed test.t2 preload_keys status OK select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 317 +ARIA_PAGECACHE_READS 426 flush tables; flush status; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 317 +ARIA_PAGECACHE_READS 426 load index into cache t3 key (b), t2 key (c) ; Table Op Msg_type Msg_text test.t3 preload_keys Error Table 'test.t3' doesn't exist @@ -154,7 +154,7 @@ test.t2 preload_keys Error Key 'c' doesn't exist in table 't2' test.t2 preload_keys status Operation failed select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; variable_name g.variable_value-i.variable_value -ARIA_PAGECACHE_READS 317 +ARIA_PAGECACHE_READS 426 drop table t1, t2; drop temporary table initial; show status like "key_read%"; diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index 77da9813559..952cdc09c90 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -662,6 +662,13 @@ create table t1 ( a tinytext, b char(1), index idx (a(1),b) ); insert into t1 values (null,''), (null,''); explain select count(*) from t1 where a is null; id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx idx 4 const 2 Using where +insert into t1 values(1,'a'); +explain select count(*) from t1 where a is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx idx 4 const 2 Using where +explain select count(*) from t1 where a = 'a'; +id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref idx idx 4 const 1 Using where select count(*) from t1 where a is null; count(*) diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index 7ecf1e33061..df73c8d8199 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -632,6 +632,9 @@ drop table t1,t2; create table t1 ( a tinytext, b char(1), index idx (a(1),b) ); insert into t1 values (null,''), (null,''); explain select count(*) from t1 where a is null; +insert into t1 values(1,'a'); +explain select count(*) from t1 where a is null; +explain select count(*) from t1 where a = 'a'; select count(*) from t1 where a is null; drop table t1; diff --git a/mysql-test/suite/multi_source/skip_counter.result b/mysql-test/suite/multi_source/skip_counter.result index bdf9a03d9a1..10226e2ba4e 100644 --- a/mysql-test/suite/multi_source/skip_counter.result +++ b/mysql-test/suite/multi_source/skip_counter.result @@ -1,9 +1,11 @@ drop database if exists db; create database db; +create table db.this_will_not_be_replicated (i int) engine=MyISAM; create table db.t1 (i int) engine=MyISAM; +create table db.t2 (i int) engine=MyISAM; drop database if exists db; create database db; -create table db.t2 (i int) engine=MyISAM; +create table db.t3 (i int) engine=MyISAM; change master 'master1' to master_port=MYPORT_1, master_host='127.0.0.1', @@ -37,7 +39,7 @@ select @@global.sql_slave_skip_counter; select @@session.sql_slave_skip_counter; @@session.sql_slave_skip_counter 0 -set global sql_slave_skip_counter= 5; +set global sql_slave_skip_counter= 4; set default_master_connection = 'master1'; select @@session.sql_slave_skip_counter; @@session.sql_slave_skip_counter @@ -51,7 +53,7 @@ Warning 1617 There is no master connection 'qqq' set default_master_connection = 'master2'; select @@session.sql_slave_skip_counter; @@session.sql_slave_skip_counter -5 +4 select @@global.max_relay_log_size; @@global.max_relay_log_size 1073741824 @@ -102,6 +104,8 @@ show tables in db; Tables_in_db t1 t2 +t3 +this_will_not_be_replicated drop database db; set global sql_slave_skip_counter = 0; set global max_relay_log_size = 1073741824; diff --git a/mysql-test/suite/multi_source/skip_counter.test b/mysql-test/suite/multi_source/skip_counter.test index 73c48dfd6d7..937261350a8 100644 --- a/mysql-test/suite/multi_source/skip_counter.test +++ b/mysql-test/suite/multi_source/skip_counter.test @@ -14,7 +14,9 @@ drop database if exists db; --enable_warnings create database db; +create table db.this_will_not_be_replicated (i int) engine=MyISAM; create table db.t1 (i int) engine=MyISAM; +create table db.t2 (i int) engine=MyISAM; --save_master_pos # Create the same schema and another table @@ -26,7 +28,7 @@ create table db.t1 (i int) engine=MyISAM; drop database if exists db; --enable_warnings create database db; -create table db.t2 (i int) engine=MyISAM; +create table db.t3 (i int) engine=MyISAM; --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) @@ -54,10 +56,14 @@ master_host='127.0.0.1', master_user='root'; # the schema creation will be replicated from the 1st master, -# so we want to skip it in the second replication connection. - -# Normally it should have been 2 events, but currently Binlog_checkpoint + -# 2 Gtid also count. Maybe we'll need to modify the test later +# so we want to skip it in the second replication connection +# The events we want to skip are: +# +# The start format statement event +# drop database if exists db +# create database db +# Create table db.t1 +# - > 4 events in total --let $skip_counter_saved = `select @@global.sql_slave_skip_counter` --let $max_relay_log_size_saved= `select @@global.max_relay_log_size` @@ -71,7 +77,8 @@ select @@session.sql_slave_skip_counter; set global sql_slave_skip_counter= default; select @@global.sql_slave_skip_counter; select @@session.sql_slave_skip_counter; -set global sql_slave_skip_counter= 5; +set global sql_slave_skip_counter= 4; + set default_master_connection = 'master1'; select @@session.sql_slave_skip_counter; set default_master_connection = 'qqq'; @@ -100,7 +107,6 @@ select @@session.max_relay_log_size; set global max_binlog_size= 4*1024*1024; select @@global.max_relay_log_size; - start slave 'master2'; --source include/wait_for_slave_to_start.inc set default_master_connection = ''; @@ -115,7 +121,7 @@ set default_master_connection = ''; # If the skip_counter worked as expected, we should # get here (replication shouldn't have broken) # and should see both tables here -# (drop database which came from master2 shoudn't have been executed +# (drop database which came from master2 shouldn't have been executed # so t1 should still exist) show tables in db; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test index 6c6b416df8a..2b5864a3e69 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test @@ -1,248 +1,248 @@ ---source include/have_debug.inc
-# Test for BUG#42991 "invalid memory access and/or crash when using
-# index condition pushdown + InnoDB"
-# Note that you need to run with --valgrind to see the warnings
-# about invalid memory accesses.
-
---source include/have_innodb.inc
-
-# Valgrind errors happen only with this:
-set session debug_dbug="+d,optimizer_innodb_icp";
-
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
-
-DROP TABLE IF EXISTS `table5`;
-SET @saved_cs_client = @@character_set_client;
-SET character_set_client = utf8;
-CREATE TABLE `table5` (
- `col0` mediumtext,
- `col1` varchar(90) DEFAULT NULL,
- `col2` tinytext,
- `col3` time DEFAULT NULL,
- `col4` tinyint(1) DEFAULT NULL,
- `col5` tinytext,
- `col6` tinyint(1) DEFAULT NULL,
- `col7` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `col8` tinyblob,
- `col9` tinyint(4) DEFAULT NULL,
- `col10` year(4) DEFAULT NULL,
- `col11` set('test1','test2','test3') DEFAULT NULL,
- `col12` text,
- `col13` char(248) DEFAULT NULL,
- `col14` bigint(20) DEFAULT NULL,
- `col15` text,
- `col16` tinyint(4) DEFAULT NULL,
- `col17` decimal(10,0) DEFAULT NULL,
- `col18` set('test1','test2','test3') DEFAULT NULL,
- `col19` varchar(255) DEFAULT NULL,
- `col20` float DEFAULT NULL,
- `col21` int(11) DEFAULT NULL,
- `col22` text,
- `col23` tinyint(1) DEFAULT NULL,
- `col24` decimal(10,0) NOT NULL DEFAULT '0',
- `col25` double DEFAULT NULL,
- `col26` float DEFAULT NULL,
- `col27` tinyblob,
- `col28` decimal(10,0) DEFAULT NULL,
- `col29` mediumblob,
- `col30` date DEFAULT NULL,
- `col31` longtext,
- `col32` date DEFAULT NULL,
- `col33` float DEFAULT NULL,
- `col34` bigint(20) DEFAULT NULL,
- `col35` tinytext,
- `col36` mediumtext,
- `col37` time DEFAULT NULL,
- `col38` int(11) DEFAULT NULL,
- `col39` tinyint(4) DEFAULT NULL,
- `col40` set('test1','test2','test3') DEFAULT NULL,
- `col41` char(130) DEFAULT NULL,
- `col42` smallint(6) DEFAULT NULL,
- `col43` int(11) DEFAULT NULL,
- `col44` mediumtext,
- `col45` varchar(126) DEFAULT NULL,
- `col46` int(11) DEFAULT NULL,
- `col47` double DEFAULT NULL,
- `col48` bigint(20) DEFAULT NULL,
- `col49` mediumtext,
- `col50` tinyblob,
- `col51` mediumint(9) DEFAULT NULL,
- `col52` text,
- `col53` varchar(208) DEFAULT NULL,
- `col54` varchar(207) DEFAULT NULL,
- `col55` decimal(10,0) DEFAULT NULL,
- `col56` datetime DEFAULT NULL,
- `col57` enum('test1','test2','test3') DEFAULT NULL,
- `col58` decimal(10,0) DEFAULT NULL,
- `col59` tinyblob,
- `col60` varchar(73) DEFAULT NULL,
- `col61` mediumtext,
- `col62` tinyblob,
- `col63` datetime DEFAULT NULL,
- `col64` decimal(10,0) DEFAULT NULL,
- `col65` mediumint(9) DEFAULT NULL,
- `col66` datetime DEFAULT NULL,
- `col67` decimal(10,0) DEFAULT NULL,
- `col68` tinyint(4) DEFAULT NULL,
- `col69` varchar(58) DEFAULT NULL,
- `col70` decimal(10,0) DEFAULT NULL,
- `col71` mediumtext,
- `col72` date DEFAULT NULL,
- `col73` time DEFAULT NULL,
- `col74` double DEFAULT NULL,
- `col75` decimal(10,0) DEFAULT NULL,
- `col76` mediumblob,
- `col77` double DEFAULT NULL,
- `col78` year(4) DEFAULT NULL,
- `col79` year(4) DEFAULT NULL,
- `col80` varchar(255) DEFAULT NULL,
- `col81` blob,
- `col82` bigint(20) DEFAULT NULL,
- `col83` enum('test1','test2','test3') DEFAULT NULL,
- `col84` decimal(10,0) DEFAULT NULL,
- `col85` set('test1','test2','test3') DEFAULT NULL,
- `col86` mediumtext,
- `col87` varchar(255) DEFAULT NULL,
- `col88` time DEFAULT NULL,
- `col89` enum('test1','test2','test3') DEFAULT NULL,
- `col90` decimal(10,0) DEFAULT NULL,
- `col91` float DEFAULT NULL,
- `col92` datetime DEFAULT NULL,
- `col93` tinytext,
- `col94` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `col95` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `col96` text,
- `col97` double DEFAULT NULL,
- `col98` varchar(198) DEFAULT NULL,
- `col99` time DEFAULT NULL,
- `col100` tinyint(4) DEFAULT NULL,
- `col101` bigint(20) DEFAULT NULL,
- `col102` varchar(255) DEFAULT NULL,
- `col103` varchar(255) DEFAULT NULL,
- `col104` mediumint(9) DEFAULT NULL,
- `col105` mediumtext,
- `col106` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `col107` smallint(6) DEFAULT NULL,
- `col108` decimal(10,0) DEFAULT NULL,
- `col109` decimal(10,0) DEFAULT NULL,
- `col110` float DEFAULT NULL,
- `col111` decimal(10,0) DEFAULT NULL,
- `col112` double DEFAULT NULL,
- `col113` tinytext,
- `col114` float DEFAULT NULL,
- `col115` varchar(7) DEFAULT NULL,
- `col116` longtext,
- `col117` date DEFAULT NULL,
- `col118` bigint(20) DEFAULT NULL,
- `col119` text,
- `col120` bigint(20) DEFAULT NULL,
- `col121` blob,
- `col122` char(110) DEFAULT NULL,
- `col123` decimal(10,0) DEFAULT NULL,
- `col124` mediumblob,
- `col125` decimal(10,0) DEFAULT NULL,
- `col126` decimal(10,0) DEFAULT NULL,
- `col127` tinyint(1) DEFAULT NULL,
- `col128` time DEFAULT NULL,
- `col129` tinyblob,
- `col130` tinyblob,
- `col131` date DEFAULT NULL,
- `col132` int(11) DEFAULT NULL,
- `col133` varchar(123) DEFAULT NULL,
- `col134` char(238) DEFAULT NULL,
- `col135` varchar(225) DEFAULT NULL,
- `col136` longtext,
- `col137` varchar(255) DEFAULT NULL,
- `col138` double DEFAULT NULL,
- `col139` tinyblob,
- `col140` datetime DEFAULT NULL,
- `col141` tinytext,
- `col142` varchar(255) DEFAULT NULL,
- `col143` bigint(20) DEFAULT NULL,
- `col144` varchar(236) DEFAULT NULL,
- `col145` text,
- `col146` year(4) DEFAULT NULL,
- `col147` decimal(10,0) DEFAULT NULL,
- `col148` text,
- `col149` mediumblob,
- `col150` tinyint(4) DEFAULT NULL,
- `col151` tinyint(1) DEFAULT NULL,
- `col152` varchar(72) DEFAULT NULL,
- `col153` int(11) DEFAULT NULL,
- `col154` varchar(165) DEFAULT NULL,
- `col155` tinyint(4) DEFAULT NULL,
- `col156` mediumtext,
- `col157` double DEFAULT NULL,
- `col158` time DEFAULT NULL,
- `col159` mediumblob,
- `col160` varchar(255) DEFAULT NULL,
- `col161` datetime DEFAULT NULL,
- `col162` double DEFAULT NULL,
- `col163` blob,
- `col164` enum('test1','test2','test3') DEFAULT NULL,
- `col165` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `col166` date DEFAULT NULL,
- `col167` tinyblob,
- `col168` tinyblob,
- `col169` varchar(255) DEFAULT NULL,
- `col170` datetime DEFAULT NULL,
- `col171` bigint(20) DEFAULT NULL,
- `col172` varchar(30) DEFAULT NULL,
- `col173` longtext,
- `col174` time DEFAULT NULL,
- `col175` float DEFAULT NULL,
- PRIMARY KEY (`col24`),
- KEY `idx0` (`col16`,`col156`(139),`col97`,`col120`),
- KEY `idx1` (`col24`,`col0`(108)),
- KEY `idx2` (`col117`,`col173`(34),`col132`,`col82`),
- KEY `idx3` (`col2`(86)),
- KEY `idx4` (`col2`(43)),
- KEY `idx5` (`col83`,`col35`(87),`col111`),
- KEY `idx6` (`col6`,`col134`,`col92`),
- KEY `idx7` (`col56`),
- KEY `idx8` (`col30`,`col53`,`col129`(66)),
- KEY `idx9` (`col53`,`col113`(211),`col32`,`col15`(75)),
- KEY `idx10` (`col34`),
- KEY `idx11` (`col126`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-SET character_set_client = @saved_cs_client;
-
-
-LOCK TABLES `table5` WRITE;
-/*!40000 ALTER TABLE `table5` DISABLE KEYS */;
-INSERT INTO `table5` VALUES ('referenda','hermaphroditism','superable','00:00:00',-128,NULL,-128,'0000-00-00 00:00:00',NULL,-128,1901,NULL,'blandly',NULL,6541,'unsuspectingly',NULL,'7250','',NULL,-31358,26248,'Kilmarnock\'s',127,'-27305',28987,NULL,NULL,'-30388','utilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitarians','0000-00-00','Agincourt','0000-00-00',-28063,27242,'readies',NULL,'00:00:00',NULL,-128,'',NULL,NULL,18719,NULL,NULL,14038,17275,NULL,'gait\'s','honeymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'sho',8860,NULL,'demigod','outpulling',NULL,'1904-01-17 09:51:06','test1','-18008','grotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'s','Oakleil\'s','Shostakovich','indiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscre','2076-10-05 02:05:43','29914',-18885,'2088-05-25 13:36:33','25',-128,'Bob','-14559','ammeter','0000-00-00','00:00:00',-29756,NULL,'digressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigression',-23894,1963,1915,'SadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadye',NULL,NULL,'','17512','','anaphylaxis\'s','chiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schise','50:11:25','test1','-13685',-18328,'2020-01-19 22:04:54',NULL,'1988-05-10 10:30:56','0000-00-00 00:00:00','Birdie\'s',-27746,NULL,'179:19:25',-128,24141,'radiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparen','ingroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'sing',18950,'Beaulieu','0000-00-00 00:00:00',-23421,'-2865',NULL,NULL,NULL,NULL,'vandalizes',-24683,'interop','Apis\'s','0000-00-00',19745,'Volgograd\'s',-15194,NULL,'Binni','4540','phylumphylumphylumphylum','-25781',NULL,-128,'406:37:03','posthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthastepos','manneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristman','0000-00-00',19774,'shariah',NULL,'aquarelle','homographic',NULL,-18959,'thoroughfarethoroughfarethoroughfarethoroughfarethoroughfarethoroughfare','2000-09-05 03:33:50','Baptlsta','Witt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'s',4727,NULL,'posting',2119,'32416',NULL,'charredcharredcharredcharredcharredcharredcharredcharredcharredcharred',-128,NULL,'Rollin\'s',NULL,NULL,127,'waviness\'s',11164,'424:28:18','FaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucher','stalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'s','1901-01-29 13:48:34',-31988,'Dyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'s','','2022-01-01 21:14:30','0000-00-00','conventionalistconventionalistconventionalistconventionalistconventionalistconventionalistconventionalistconventionalist','mirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnesses','tessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stes','2028-05-21 04:56:16',NULL,'Hasid','Hardecanute','00:00:00',-3782);
-INSERT INTO `table5` VALUES ('hemoglobin\'s','Toffey\'s','Juvenal','00:00:00',-128,'harmonicon',-128,'2004-02-13 09:45:46',NULL,NULL,1911,'','Tananarive\'s',NULL,30666,'spiniferous',127,'30675','','Frederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFr',30388,4769,'Erymanthus\'s',127,'-20972',NULL,-17111,'explosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosiveness','-28154','magnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'s','0000-00-00','removes','0000-00-00',16859,NULL,NULL,'Moishe\'s','00:00:00',NULL,NULL,NULL,'hyperform\'s',30540,-26603,'soporific',NULL,NULL,19264,-14618,NULL,'zootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszo',5654,'intermezzi','Atkins\'s','hieroglyphically','15885','2068-10-19 12:22:30','','4972','apatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapa','severeness','pleaders',NULL,'2070-09-15 17:21:46','15245',-18313,'1934-01-01 01:20:15','-3488',127,'Delawarian','14952','foregathers','0000-00-00','00:00:00',-27837,'7143','madhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'s',-17163,1951,2054,'raffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraf','REMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMs',3607,'','-17633','',NULL,NULL,'806:59:31','test1','-29600',20301,'1985-10-09 17:57:25',NULL,'0000-00-00 00:00:00','0000-00-00 00:00:00','Perseid',-32117,'constructer\'s','612:19:03',127,NULL,'overdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingove','Carlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCa',24868,'preamble','0000-00-00 00:00:00',-7582,'-865','-14488',6884,'-24713',NULL,'topknot\'s',18469,NULL,'histrionism\'s','0000-00-00',31715,'Dag',14543,'wooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'s','tightest',NULL,'aquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'s','15603',NULL,-128,'640:34:17','acetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumaceta','torridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridl','9323-05-13',-28292,'Barnaul\'s',NULL,'slanginesses','supernova',NULL,20804,NULL,'2020-10-05 12:00:38','rive',NULL,-31498,'considerateness\'s','nevus\'s',1901,'-12956','fashioner\'s','unfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'s',-128,127,'nephralgia\'s',13881,'sciatically',NULL,'Tuesday',21227,'00:00:00','halocarbons','duvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduv','2075-01-21 10:49:44',-19735,'snubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubs','test1','0000-00-00 00:00:00','0000-00-00','kiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkib',NULL,'connoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseurscon','1953-01-23 17:36:00',NULL,'Principal',NULL,'316:28:48',NULL);
-INSERT INTO `table5` VALUES (NULL,'Annmarie','intangibleness\'s','00:00:00',-128,'transmogrify',127,'0000-00-00 00:00:00',NULL,127,2093,'','enamored','refired',-21296,'neglectful',127,'-9992','',NULL,NULL,3583,'Lockheed\'s',127,'-15717',-29743,-16280,'embouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembou','-24875',NULL,'0000-00-00',NULL,'0000-00-00',30124,20356,'drinkable','obscenity','00:00:00',NULL,127,'',NULL,-16664,NULL,'unmoor','Vaughan\'s',30457,-16509,-10049,'squeamishness','encirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencir',-16460,'abatement\'s',NULL,'expatriate','-28670','1925-05-15 11:44:20','','-3762','DelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDel','Skerl\'s','unmatched',NULL,'1980-01-11 16:02:04','25917',18187,'2001-07-26 13:48:08','-28706',127,'gimme','8807',NULL,'0000-00-00','00:00:00',7666,'21762','drawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacks',16131,2031,2077,'subjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysub','Argenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'s',NULL,'','-17090','','fobs','humiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliat','221:02:40','','-1107',4624,'1926-05-11 03:35:52',NULL,'2037-05-13 05:02:44','0000-00-00 00:00:00','Heddie\'s',-6554,NULL,'00:00:00',127,NULL,'lxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlx','RawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawley',6613,'Beaufort','0000-00-00 00:00:00',12214,NULL,'25469',-26474,'12062',NULL,'physiographer',26382,'cosmogo','deportment\'s','0000-00-00',17492,'propretor\'s',NULL,'zingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzing','Suzetta','25513','tearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkers','21613',NULL,-128,'108:58:18','sporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallyspo','Monera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'','0000-00-00',18776,'diffractometer',NULL,'crawls','Inglebert','unguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableun',18112,'melanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanis','1940-05-18 13:21:00','artlessly','blotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblots',6476,NULL,'Bartlett',2143,NULL,'thaumaturge\'s','Hazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'s',127,127,'Winthorpe',-29765,'idiocrasy\'s',NULL,'sandcastles',-9852,'281:41:52','Volny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'s','protagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagon','2076-01-04 15:01:57',NULL,'auscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultations','','0000-00-00 00:00:00','0000-00-00','limenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimen','accommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatingly',NULL,'2018-01-01 05:48:54',17404,NULL,NULL,'195:36:50',24658);
-INSERT INTO `table5` VALUES ('caddishly',NULL,'Kotah','00:00:00',-128,'tailoring',127,'0000-00-00 00:00:00','trustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustie',-128,1967,NULL,NULL,'parallelisms',NULL,NULL,127,NULL,'',NULL,NULL,-513,NULL,NULL,'-14518',NULL,-22393,'AngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAng','32257','regalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregaling','0000-00-00','newspaperwoman','0000-00-00',24845,-17741,'impassiveness','Antillean','00:00:00',-13615,-128,'','gantries',-27983,-6070,'Benetton','aridest',NULL,21574,-25634,'McWilliams\'s','burrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowe',18947,NULL,NULL,'surrealistic',NULL,'1954-07-07 08:58:49','test1','-11714','ExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExEx','administrants','Oxycontin','interpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterper','1914-05-28 05:15:03','3942',NULL,'2046-09-07 18:16:36','3220',127,'arising','18472','anacolutha','0000-00-00','613:15:45',NULL,'-23969',NULL,18979,2031,1975,'AlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcesti','septicitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticities',-25058,'',NULL,'','Kulturkampf','pollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpol','00:00:00','','12283',2881,'1926-12-10 09:24:42','Darken\'s','2034-12-21 15:59:00','0000-00-00 00:00:00',NULL,NULL,NULL,'305:05:06',127,NULL,'feudalityfeudality','Merrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMer',-25733,'borak','0000-00-00 00:00:00',-11465,'877',NULL,-1029,'5107',NULL,'Balaton\'s',NULL,'Martian','miserliness','0000-00-00',14689,'catchment',18457,'billet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'s','humerus\'s','24741',NULL,NULL,'-19233',-128,'00:00:00','fashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfas','judiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjud','0000-00-00',15972,'Letrice\'s','hydrographer',NULL,'Federica','evidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevi',4115,'pshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspsh','1924-10-15 16:31:18','Hamlet','trowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'',-3485,'galvanized',NULL,1924,'-22877','unfired','inchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'s',-128,-128,'VHF',-5304,NULL,127,'glossator',16348,'213:10:59','',NULL,'1946-01-11 17:25:16',262,'DoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDouty','test1','0000-00-00 00:00:00','0000-00-00',NULL,'feasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasibl','contortionisticcontortionisticcontortionisticcontortionisticcontortionisticcontortionisticcontortionistic','2027-06-09 07:56:16',6909,'tessitura','indefensible','00:00:00',-6628);
-INSERT INTO `table5` VALUES ('bassoonist\'s',NULL,'refastens','114:27:50',127,'unrestricted',127,'2032-01-13 11:11:22','abstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'s',NULL,1955,'','Hodosh','allocates',-5067,'Cenac\'s',-128,'31546',NULL,'impassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassab',-30347,292,'Sandi\'s',NULL,'-12402',8206,NULL,'encircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircl','6346','ArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentinians','0000-00-00','Riehl\'s','0000-00-00',NULL,5580,'planets',NULL,'58:35:07',317,127,'','gender',-19514,7112,'Pissaro','relevantly',28777,-21818,-17111,'shoddiness\'s',NULL,NULL,'flee','Boatwright\'s','restrict','12537','2096-04-25 08:45:21','test1','-4613','quagga','masterstroke\'s','overcheck\'s',NULL,'1981-10-14 18:30:02','21097',-26481,'2065-07-11 02:13:44',NULL,NULL,'bathroom','-29833','gracelessness\'s','0000-00-00','09:44:40',-7368,NULL,'applecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'s',-21077,2015,2039,'cascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scas','nervingnervingnervingnervingnervingnervingnervingnervingnervingnerving',22043,'','5740','','mustached','actin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'s','00:00:00','test1','13871',-22276,'1956-01-05 15:08:47','slimline','0000-00-00 00:00:00','0000-00-00 00:00:00','royally',NULL,'mako','51:54:53',NULL,NULL,'deliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'s','DOADOADOADOADOADOADOADOADOADOADOADOADOA',-16244,'Fayette\'s','2020-06-21 05:34:18',-24353,'24097','-28819',12278,'-2365',21322,'stumps',-61,NULL,'subpoena\'s','0000-00-00',31242,'knicker',23567,NULL,'Cathar','29557','thallusthallusthallusthallusthallusthallusthallusthallusthallusthallus','26114',NULL,-128,'00:00:00','salmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsal','shiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshive','0000-00-00',-3152,'syndesis','misbrands','Smiga','stagnation\'s','nonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricno',NULL,NULL,'1988-09-11 14:33:03',NULL,'provokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglypr',25510,'thunderpeal\'s','hierology',1932,'7729','Fahrenheit','metathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'s',NULL,-128,'sinfonia\'s',-6293,'proactive',127,NULL,-24751,'00:00:00','woodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopper','Constantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'','1997-01-01 22:40:48',NULL,'MatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlick','test1','2000-12-17 11:19:08','0000-00-00',NULL,'cosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmica','Loesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesc','2078-07-25 04:56:08',10472,NULL,NULL,'345:12:02',-13120);
-INSERT INTO `table5` VALUES ('segmentation\'s','shapelessness\'s','coagulators','127:46:24',-128,NULL,127,'0000-00-00 00:00:00','seekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingsee',NULL,2085,'','indent','flyblown',NULL,'Alegre',-128,'-27917','','DesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDes',2473,NULL,'screwball\'s',NULL,'-4861',-7088,-30734,'tambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintam',NULL,NULL,'0000-00-00','Dorcia','0000-00-00',-25745,-1237,'Shoifet\'s','sarsaparillas','21:11:41',31612,-128,'','subway\'s',-5032,-30369,'preventives','lyre',7995,21283,13197,'chippies','rubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubig',19050,'orch','semiliterates','Gerome',NULL,'2058-12-26 21:29:19','',NULL,'dyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdya','Dukas\'s','Christiania','polyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvale','1920-05-23 14:07:00','672',NULL,'1956-06-27 12:15:00','-22658',NULL,'holograph\'s',NULL,'gutsy','0000-00-00','00:00:00',-9558,'1148','fainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfains',NULL,2023,2132,'Balmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBal','overdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdo',-24707,'test1','-13970','','tensility','BuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddie','00:00:00','','580',25115,'2000-07-01 09:01:36','apprentice','1992-01-01 08:55:38','0000-00-00 00:00:00','premunire',24664,NULL,'821:21:05',NULL,-29284,'rapidestrapidestrapidestrapidestrapidestrapidestrapidest','convectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorcon',-3808,'intuitively','0000-00-00 00:00:00',-22296,NULL,'2802',28786,NULL,NULL,'loanword',-12107,'deodori','strophe','0000-00-00',-11013,'undeclared',-8513,'sinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'s','peloria\'s','14940','blushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblush','30550','11566',127,'00:00:00','worktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'swo','looker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'s','5657-05-11',23094,'onerousness','bearer','censured','Shoemaker','mulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomul',5930,'ZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoust','1953-04-28 11:55:44','consulted','invalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinv',-27798,'carnauba\'s','Wilson',1963,NULL,'On\'s','leisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurely',NULL,-128,NULL,17674,'Queenstown\'s',-128,'convertors',1776,'576:20:59',NULL,'allegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriall','2097-10-02 08:41:26',31057,'AfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikaners','test1','0000-00-00 00:00:00','0000-00-00','backwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbac',NULL,NULL,'1932-10-01 18:49:04',12985,NULL,'leukocytes','603:54:26',-22488);
-INSERT INTO `table5` VALUES ('Frasquito\'s','unsatisfactory','jetted','00:00:00',NULL,'Merlin\'s',127,'0000-00-00 00:00:00',NULL,NULL,1998,'','decomposer','Commons',-14813,'oversimplification\'s',NULL,'-5368','','engirdengirdengirdengirdengirdengirdengirdengirdengird',-13627,14305,'frontally',127,'18421',-32295,NULL,NULL,'21841',NULL,'0000-00-00','cytology','2424-00-17',-30542,-17621,'octarchy\'s','outfoxed','00:00:00',27469,-128,'','Kamat\'s',-24130,-5948,'riband','Betsy',NULL,-18769,NULL,NULL,'Serafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSeraf',NULL,'disconcerting',NULL,'whirly','-20343','2020-07-01 12:09:36','','-26975','antiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticant',NULL,'ecumenically','utilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilize','1952-08-01 17:53:28','7903',-5633,'2024-03-17 13:46:59','-5474',127,'Malmö\'s',NULL,NULL,'0000-00-00','571:58:00',17287,'26711','alphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetize',-15158,2001,1997,'hobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithob','Campinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'s',-5693,'test1','3741','','Audrye\'s','monstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymo','00:00:00','test1','-21023',4693,'1998-01-06 04:41:40','Silastic\'s','0000-00-00 00:00:00','0000-00-00 00:00:00','Hedelman\'s',-30080,'normalization\'s','00:00:00',NULL,8197,NULL,NULL,NULL,'nudism\'s','2005-04-13 00:31:55',29046,'8992','11992',NULL,'-1685',-11453,'mythology\'s',26185,'Pyrenea','Pedrick\'s','0000-00-00',27436,'shots',NULL,'discordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscords','bayonet','-7217','scriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscripts',NULL,'17182',NULL,'628:49:55','nunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenuncle',NULL,'0000-00-00',-17444,'celestite\'s','Adars','Hispaniola','Mesopotamians','agglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutin',31998,'electrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistriesele','2005-09-09 23:41:06','bastinaded',NULL,-10763,'impetuosity\'s','xenogenesis\'s',1947,'-29913',NULL,'taxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomies',NULL,NULL,'internees',28697,'Kharkov\'s',NULL,'Swabia',18366,'00:00:00','delayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayer','circusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycir','2066-02-13 14:27:00',-28405,NULL,'test1','0000-00-00 00:00:00','0000-00-00','heterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotr','enchondromaenchondromaenchondromaenchondromaenchondromaenchondromaenchondromaenchondroma','AryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAry','2090-10-13 10:03:05',NULL,NULL,'Yucatan','285:37:51',7627);
-/*!40000 ALTER TABLE `table5` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
-
-#explain select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ;
-
-select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ;
-
-drop table `table5`;
+--source include/have_debug.inc +# Test for BUG#42991 "invalid memory access and/or crash when using +# index condition pushdown + InnoDB" +# Note that you need to run with --valgrind to see the warnings +# about invalid memory accesses. + +--source include/have_innodb.inc + +# Valgrind errors happen only with this: +set session debug_dbug="+d,optimizer_innodb_icp"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + + +DROP TABLE IF EXISTS `table5`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `table5` ( + `col0` mediumtext, + `col1` varchar(90) DEFAULT NULL, + `col2` tinytext, + `col3` time DEFAULT NULL, + `col4` tinyint(1) DEFAULT NULL, + `col5` tinytext, + `col6` tinyint(1) DEFAULT NULL, + `col7` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `col8` tinyblob, + `col9` tinyint(4) DEFAULT NULL, + `col10` year(4) DEFAULT NULL, + `col11` set('test1','test2','test3') DEFAULT NULL, + `col12` text, + `col13` char(248) DEFAULT NULL, + `col14` bigint(20) DEFAULT NULL, + `col15` text, + `col16` tinyint(4) DEFAULT NULL, + `col17` decimal(10,0) DEFAULT NULL, + `col18` set('test1','test2','test3') DEFAULT NULL, + `col19` varchar(255) DEFAULT NULL, + `col20` float DEFAULT NULL, + `col21` int(11) DEFAULT NULL, + `col22` text, + `col23` tinyint(1) DEFAULT NULL, + `col24` decimal(10,0) NOT NULL DEFAULT '0', + `col25` double DEFAULT NULL, + `col26` float DEFAULT NULL, + `col27` tinyblob, + `col28` decimal(10,0) DEFAULT NULL, + `col29` mediumblob, + `col30` date DEFAULT NULL, + `col31` longtext, + `col32` date DEFAULT NULL, + `col33` float DEFAULT NULL, + `col34` bigint(20) DEFAULT NULL, + `col35` tinytext, + `col36` mediumtext, + `col37` time DEFAULT NULL, + `col38` int(11) DEFAULT NULL, + `col39` tinyint(4) DEFAULT NULL, + `col40` set('test1','test2','test3') DEFAULT NULL, + `col41` char(130) DEFAULT NULL, + `col42` smallint(6) DEFAULT NULL, + `col43` int(11) DEFAULT NULL, + `col44` mediumtext, + `col45` varchar(126) DEFAULT NULL, + `col46` int(11) DEFAULT NULL, + `col47` double DEFAULT NULL, + `col48` bigint(20) DEFAULT NULL, + `col49` mediumtext, + `col50` tinyblob, + `col51` mediumint(9) DEFAULT NULL, + `col52` text, + `col53` varchar(208) DEFAULT NULL, + `col54` varchar(207) DEFAULT NULL, + `col55` decimal(10,0) DEFAULT NULL, + `col56` datetime DEFAULT NULL, + `col57` enum('test1','test2','test3') DEFAULT NULL, + `col58` decimal(10,0) DEFAULT NULL, + `col59` tinyblob, + `col60` varchar(73) DEFAULT NULL, + `col61` mediumtext, + `col62` tinyblob, + `col63` datetime DEFAULT NULL, + `col64` decimal(10,0) DEFAULT NULL, + `col65` mediumint(9) DEFAULT NULL, + `col66` datetime DEFAULT NULL, + `col67` decimal(10,0) DEFAULT NULL, + `col68` tinyint(4) DEFAULT NULL, + `col69` varchar(58) DEFAULT NULL, + `col70` decimal(10,0) DEFAULT NULL, + `col71` mediumtext, + `col72` date DEFAULT NULL, + `col73` time DEFAULT NULL, + `col74` double DEFAULT NULL, + `col75` decimal(10,0) DEFAULT NULL, + `col76` mediumblob, + `col77` double DEFAULT NULL, + `col78` year(4) DEFAULT NULL, + `col79` year(4) DEFAULT NULL, + `col80` varchar(255) DEFAULT NULL, + `col81` blob, + `col82` bigint(20) DEFAULT NULL, + `col83` enum('test1','test2','test3') DEFAULT NULL, + `col84` decimal(10,0) DEFAULT NULL, + `col85` set('test1','test2','test3') DEFAULT NULL, + `col86` mediumtext, + `col87` varchar(255) DEFAULT NULL, + `col88` time DEFAULT NULL, + `col89` enum('test1','test2','test3') DEFAULT NULL, + `col90` decimal(10,0) DEFAULT NULL, + `col91` float DEFAULT NULL, + `col92` datetime DEFAULT NULL, + `col93` tinytext, + `col94` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `col95` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `col96` text, + `col97` double DEFAULT NULL, + `col98` varchar(198) DEFAULT NULL, + `col99` time DEFAULT NULL, + `col100` tinyint(4) DEFAULT NULL, + `col101` bigint(20) DEFAULT NULL, + `col102` varchar(255) DEFAULT NULL, + `col103` varchar(255) DEFAULT NULL, + `col104` mediumint(9) DEFAULT NULL, + `col105` mediumtext, + `col106` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `col107` smallint(6) DEFAULT NULL, + `col108` decimal(10,0) DEFAULT NULL, + `col109` decimal(10,0) DEFAULT NULL, + `col110` float DEFAULT NULL, + `col111` decimal(10,0) DEFAULT NULL, + `col112` double DEFAULT NULL, + `col113` tinytext, + `col114` float DEFAULT NULL, + `col115` varchar(7) DEFAULT NULL, + `col116` longtext, + `col117` date DEFAULT NULL, + `col118` bigint(20) DEFAULT NULL, + `col119` text, + `col120` bigint(20) DEFAULT NULL, + `col121` blob, + `col122` char(110) DEFAULT NULL, + `col123` decimal(10,0) DEFAULT NULL, + `col124` mediumblob, + `col125` decimal(10,0) DEFAULT NULL, + `col126` decimal(10,0) DEFAULT NULL, + `col127` tinyint(1) DEFAULT NULL, + `col128` time DEFAULT NULL, + `col129` tinyblob, + `col130` tinyblob, + `col131` date DEFAULT NULL, + `col132` int(11) DEFAULT NULL, + `col133` varchar(123) DEFAULT NULL, + `col134` char(238) DEFAULT NULL, + `col135` varchar(225) DEFAULT NULL, + `col136` longtext, + `col137` varchar(255) DEFAULT NULL, + `col138` double DEFAULT NULL, + `col139` tinyblob, + `col140` datetime DEFAULT NULL, + `col141` tinytext, + `col142` varchar(255) DEFAULT NULL, + `col143` bigint(20) DEFAULT NULL, + `col144` varchar(236) DEFAULT NULL, + `col145` text, + `col146` year(4) DEFAULT NULL, + `col147` decimal(10,0) DEFAULT NULL, + `col148` text, + `col149` mediumblob, + `col150` tinyint(4) DEFAULT NULL, + `col151` tinyint(1) DEFAULT NULL, + `col152` varchar(72) DEFAULT NULL, + `col153` int(11) DEFAULT NULL, + `col154` varchar(165) DEFAULT NULL, + `col155` tinyint(4) DEFAULT NULL, + `col156` mediumtext, + `col157` double DEFAULT NULL, + `col158` time DEFAULT NULL, + `col159` mediumblob, + `col160` varchar(255) DEFAULT NULL, + `col161` datetime DEFAULT NULL, + `col162` double DEFAULT NULL, + `col163` blob, + `col164` enum('test1','test2','test3') DEFAULT NULL, + `col165` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `col166` date DEFAULT NULL, + `col167` tinyblob, + `col168` tinyblob, + `col169` varchar(255) DEFAULT NULL, + `col170` datetime DEFAULT NULL, + `col171` bigint(20) DEFAULT NULL, + `col172` varchar(30) DEFAULT NULL, + `col173` longtext, + `col174` time DEFAULT NULL, + `col175` float DEFAULT NULL, + PRIMARY KEY (`col24`), + KEY `idx0` (`col16`,`col156`(139),`col97`,`col120`), + KEY `idx1` (`col24`,`col0`(108)), + KEY `idx2` (`col117`,`col173`(34),`col132`,`col82`), + KEY `idx3` (`col2`(86)), + KEY `idx4` (`col2`(43)), + KEY `idx5` (`col83`,`col35`(87),`col111`), + KEY `idx6` (`col6`,`col134`,`col92`), + KEY `idx7` (`col56`), + KEY `idx8` (`col30`,`col53`,`col129`(66)), + KEY `idx9` (`col53`,`col113`(211),`col32`,`col15`(75)), + KEY `idx10` (`col34`), + KEY `idx11` (`col126`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +SET character_set_client = @saved_cs_client; + + +LOCK TABLES `table5` WRITE; +/*!40000 ALTER TABLE `table5` DISABLE KEYS */; +INSERT INTO `table5` VALUES ('referenda','hermaphroditism','superable','00:00:00',-128,NULL,-128,'0000-00-00 00:00:00',NULL,-128,1901,NULL,'blandly',NULL,6541,'unsuspectingly',NULL,'7250','',NULL,-31358,26248,'Kilmarnock\'s',127,'-27305',28987,NULL,NULL,'-30388','utilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitarians','0000-00-00','Agincourt','0000-00-00',-28063,27242,'readies',NULL,'00:00:00',NULL,-128,'',NULL,NULL,18719,NULL,NULL,14038,17275,NULL,'gait\'s','honeymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'sho',8860,NULL,'demigod','outpulling',NULL,'1904-01-17 09:51:06','test1','-18008','grotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'s','Oakleil\'s','Shostakovich','indiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscre','2076-10-05 02:05:43','29914',-18885,'2088-05-25 13:36:33','25',-128,'Bob','-14559','ammeter','0000-00-00','00:00:00',-29756,NULL,'digressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigression',-23894,1963,1915,'SadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadye',NULL,NULL,'','17512','','anaphylaxis\'s','chiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schise','50:11:25','test1','-13685',-18328,'2020-01-19 22:04:54',NULL,'1988-05-10 10:30:56','0000-00-00 00:00:00','Birdie\'s',-27746,NULL,'179:19:25',-128,24141,'radiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparen','ingroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'sing',18950,'Beaulieu','0000-00-00 00:00:00',-23421,'-2865',NULL,NULL,NULL,NULL,'vandalizes',-24683,'interop','Apis\'s','0000-00-00',19745,'Volgograd\'s',-15194,NULL,'Binni','4540','phylumphylumphylumphylum','-25781',NULL,-128,'406:37:03','posthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthastepos','manneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristman','0000-00-00',19774,'shariah',NULL,'aquarelle','homographic',NULL,-18959,'thoroughfarethoroughfarethoroughfarethoroughfarethoroughfarethoroughfare','2000-09-05 03:33:50','Baptlsta','Witt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'s',4727,NULL,'posting',2119,'32416',NULL,'charredcharredcharredcharredcharredcharredcharredcharredcharredcharred',-128,NULL,'Rollin\'s',NULL,NULL,127,'waviness\'s',11164,'424:28:18','FaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucher','stalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'s','1901-01-29 13:48:34',-31988,'Dyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'s','','2022-01-01 21:14:30','0000-00-00','conventionalistconventionalistconventionalistconventionalistconventionalistconventionalistconventionalistconventionalist','mirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnesses','tessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stes','2028-05-21 04:56:16',NULL,'Hasid','Hardecanute','00:00:00',-3782); +INSERT INTO `table5` VALUES ('hemoglobin\'s','Toffey\'s','Juvenal','00:00:00',-128,'harmonicon',-128,'2004-02-13 09:45:46',NULL,NULL,1911,'','Tananarive\'s',NULL,30666,'spiniferous',127,'30675','','Frederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFr',30388,4769,'Erymanthus\'s',127,'-20972',NULL,-17111,'explosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosiveness','-28154','magnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'s','0000-00-00','removes','0000-00-00',16859,NULL,NULL,'Moishe\'s','00:00:00',NULL,NULL,NULL,'hyperform\'s',30540,-26603,'soporific',NULL,NULL,19264,-14618,NULL,'zootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszo',5654,'intermezzi','Atkins\'s','hieroglyphically','15885','2068-10-19 12:22:30','','4972','apatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapa','severeness','pleaders',NULL,'2070-09-15 17:21:46','15245',-18313,'1934-01-01 01:20:15','-3488',127,'Delawarian','14952','foregathers','0000-00-00','00:00:00',-27837,'7143','madhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'s',-17163,1951,2054,'raffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraf','REMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMs',3607,'','-17633','',NULL,NULL,'806:59:31','test1','-29600',20301,'1985-10-09 17:57:25',NULL,'0000-00-00 00:00:00','0000-00-00 00:00:00','Perseid',-32117,'constructer\'s','612:19:03',127,NULL,'overdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingove','Carlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCa',24868,'preamble','0000-00-00 00:00:00',-7582,'-865','-14488',6884,'-24713',NULL,'topknot\'s',18469,NULL,'histrionism\'s','0000-00-00',31715,'Dag',14543,'wooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'s','tightest',NULL,'aquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'s','15603',NULL,-128,'640:34:17','acetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumaceta','torridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridl','9323-05-13',-28292,'Barnaul\'s',NULL,'slanginesses','supernova',NULL,20804,NULL,'2020-10-05 12:00:38','rive',NULL,-31498,'considerateness\'s','nevus\'s',1901,'-12956','fashioner\'s','unfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'s',-128,127,'nephralgia\'s',13881,'sciatically',NULL,'Tuesday',21227,'00:00:00','halocarbons','duvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduv','2075-01-21 10:49:44',-19735,'snubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubs','test1','0000-00-00 00:00:00','0000-00-00','kiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkib',NULL,'connoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseurscon','1953-01-23 17:36:00',NULL,'Principal',NULL,'316:28:48',NULL); +INSERT INTO `table5` VALUES (NULL,'Annmarie','intangibleness\'s','00:00:00',-128,'transmogrify',127,'0000-00-00 00:00:00',NULL,127,2093,'','enamored','refired',-21296,'neglectful',127,'-9992','',NULL,NULL,3583,'Lockheed\'s',127,'-15717',-29743,-16280,'embouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembou','-24875',NULL,'0000-00-00',NULL,'0000-00-00',30124,20356,'drinkable','obscenity','00:00:00',NULL,127,'',NULL,-16664,NULL,'unmoor','Vaughan\'s',30457,-16509,-10049,'squeamishness','encirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencir',-16460,'abatement\'s',NULL,'expatriate','-28670','1925-05-15 11:44:20','','-3762','DelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDel','Skerl\'s','unmatched',NULL,'1980-01-11 16:02:04','25917',18187,'2001-07-26 13:48:08','-28706',127,'gimme','8807',NULL,'0000-00-00','00:00:00',7666,'21762','drawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacks',16131,2031,2077,'subjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysub','Argenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'s',NULL,'','-17090','','fobs','humiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliat','221:02:40','','-1107',4624,'1926-05-11 03:35:52',NULL,'2037-05-13 05:02:44','0000-00-00 00:00:00','Heddie\'s',-6554,NULL,'00:00:00',127,NULL,'lxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlx','RawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawley',6613,'Beaufort','0000-00-00 00:00:00',12214,NULL,'25469',-26474,'12062',NULL,'physiographer',26382,'cosmogo','deportment\'s','0000-00-00',17492,'propretor\'s',NULL,'zingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzing','Suzetta','25513','tearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkers','21613',NULL,-128,'108:58:18','sporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallyspo','Monera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'','0000-00-00',18776,'diffractometer',NULL,'crawls','Inglebert','unguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableun',18112,'melanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanis','1940-05-18 13:21:00','artlessly','blotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblots',6476,NULL,'Bartlett',2143,NULL,'thaumaturge\'s','Hazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'s',127,127,'Winthorpe',-29765,'idiocrasy\'s',NULL,'sandcastles',-9852,'281:41:52','Volny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'s','protagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagon','2076-01-04 15:01:57',NULL,'auscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultations','','0000-00-00 00:00:00','0000-00-00','limenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimen','accommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatingly',NULL,'2018-01-01 05:48:54',17404,NULL,NULL,'195:36:50',24658); +INSERT INTO `table5` VALUES ('caddishly',NULL,'Kotah','00:00:00',-128,'tailoring',127,'0000-00-00 00:00:00','trustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustie',-128,1967,NULL,NULL,'parallelisms',NULL,NULL,127,NULL,'',NULL,NULL,-513,NULL,NULL,'-14518',NULL,-22393,'AngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAng','32257','regalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregaling','0000-00-00','newspaperwoman','0000-00-00',24845,-17741,'impassiveness','Antillean','00:00:00',-13615,-128,'','gantries',-27983,-6070,'Benetton','aridest',NULL,21574,-25634,'McWilliams\'s','burrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowe',18947,NULL,NULL,'surrealistic',NULL,'1954-07-07 08:58:49','test1','-11714','ExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExEx','administrants','Oxycontin','interpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterper','1914-05-28 05:15:03','3942',NULL,'2046-09-07 18:16:36','3220',127,'arising','18472','anacolutha','0000-00-00','613:15:45',NULL,'-23969',NULL,18979,2031,1975,'AlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcesti','septicitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticities',-25058,'',NULL,'','Kulturkampf','pollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpol','00:00:00','','12283',2881,'1926-12-10 09:24:42','Darken\'s','2034-12-21 15:59:00','0000-00-00 00:00:00',NULL,NULL,NULL,'305:05:06',127,NULL,'feudalityfeudality','Merrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMer',-25733,'borak','0000-00-00 00:00:00',-11465,'877',NULL,-1029,'5107',NULL,'Balaton\'s',NULL,'Martian','miserliness','0000-00-00',14689,'catchment',18457,'billet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'s','humerus\'s','24741',NULL,NULL,'-19233',-128,'00:00:00','fashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfas','judiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjud','0000-00-00',15972,'Letrice\'s','hydrographer',NULL,'Federica','evidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevi',4115,'pshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspsh','1924-10-15 16:31:18','Hamlet','trowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'',-3485,'galvanized',NULL,1924,'-22877','unfired','inchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'s',-128,-128,'VHF',-5304,NULL,127,'glossator',16348,'213:10:59','',NULL,'1946-01-11 17:25:16',262,'DoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDouty','test1','0000-00-00 00:00:00','0000-00-00',NULL,'feasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasibl','contortionisticcontortionisticcontortionisticcontortionisticcontortionisticcontortionisticcontortionistic','2027-06-09 07:56:16',6909,'tessitura','indefensible','00:00:00',-6628); +INSERT INTO `table5` VALUES ('bassoonist\'s',NULL,'refastens','114:27:50',127,'unrestricted',127,'2032-01-13 11:11:22','abstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'s',NULL,1955,'','Hodosh','allocates',-5067,'Cenac\'s',-128,'31546',NULL,'impassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassab',-30347,292,'Sandi\'s',NULL,'-12402',8206,NULL,'encircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircl','6346','ArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentinians','0000-00-00','Riehl\'s','0000-00-00',NULL,5580,'planets',NULL,'58:35:07',317,127,'','gender',-19514,7112,'Pissaro','relevantly',28777,-21818,-17111,'shoddiness\'s',NULL,NULL,'flee','Boatwright\'s','restrict','12537','2096-04-25 08:45:21','test1','-4613','quagga','masterstroke\'s','overcheck\'s',NULL,'1981-10-14 18:30:02','21097',-26481,'2065-07-11 02:13:44',NULL,NULL,'bathroom','-29833','gracelessness\'s','0000-00-00','09:44:40',-7368,NULL,'applecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'s',-21077,2015,2039,'cascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scas','nervingnervingnervingnervingnervingnervingnervingnervingnervingnerving',22043,'','5740','','mustached','actin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'s','00:00:00','test1','13871',-22276,'1956-01-05 15:08:47','slimline','0000-00-00 00:00:00','0000-00-00 00:00:00','royally',NULL,'mako','51:54:53',NULL,NULL,'deliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'s','DOADOADOADOADOADOADOADOADOADOADOADOADOA',-16244,'Fayette\'s','2020-06-21 05:34:18',-24353,'24097','-28819',12278,'-2365',21322,'stumps',-61,NULL,'subpoena\'s','0000-00-00',31242,'knicker',23567,NULL,'Cathar','29557','thallusthallusthallusthallusthallusthallusthallusthallusthallusthallus','26114',NULL,-128,'00:00:00','salmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsal','shiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshive','0000-00-00',-3152,'syndesis','misbrands','Smiga','stagnation\'s','nonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricno',NULL,NULL,'1988-09-11 14:33:03',NULL,'provokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglypr',25510,'thunderpeal\'s','hierology',1932,'7729','Fahrenheit','metathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'s',NULL,-128,'sinfonia\'s',-6293,'proactive',127,NULL,-24751,'00:00:00','woodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopper','Constantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'','1997-01-01 22:40:48',NULL,'MatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlick','test1','2000-12-17 11:19:08','0000-00-00',NULL,'cosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmica','Loesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesc','2078-07-25 04:56:08',10472,NULL,NULL,'345:12:02',-13120); +INSERT INTO `table5` VALUES ('segmentation\'s','shapelessness\'s','coagulators','127:46:24',-128,NULL,127,'0000-00-00 00:00:00','seekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingsee',NULL,2085,'','indent','flyblown',NULL,'Alegre',-128,'-27917','','DesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDes',2473,NULL,'screwball\'s',NULL,'-4861',-7088,-30734,'tambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintam',NULL,NULL,'0000-00-00','Dorcia','0000-00-00',-25745,-1237,'Shoifet\'s','sarsaparillas','21:11:41',31612,-128,'','subway\'s',-5032,-30369,'preventives','lyre',7995,21283,13197,'chippies','rubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubig',19050,'orch','semiliterates','Gerome',NULL,'2058-12-26 21:29:19','',NULL,'dyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdya','Dukas\'s','Christiania','polyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvale','1920-05-23 14:07:00','672',NULL,'1956-06-27 12:15:00','-22658',NULL,'holograph\'s',NULL,'gutsy','0000-00-00','00:00:00',-9558,'1148','fainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfains',NULL,2023,2132,'Balmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBal','overdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdo',-24707,'test1','-13970','','tensility','BuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddie','00:00:00','','580',25115,'2000-07-01 09:01:36','apprentice','1992-01-01 08:55:38','0000-00-00 00:00:00','premunire',24664,NULL,'821:21:05',NULL,-29284,'rapidestrapidestrapidestrapidestrapidestrapidestrapidest','convectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorcon',-3808,'intuitively','0000-00-00 00:00:00',-22296,NULL,'2802',28786,NULL,NULL,'loanword',-12107,'deodori','strophe','0000-00-00',-11013,'undeclared',-8513,'sinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'s','peloria\'s','14940','blushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblush','30550','11566',127,'00:00:00','worktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'swo','looker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'s','5657-05-11',23094,'onerousness','bearer','censured','Shoemaker','mulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomul',5930,'ZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoust','1953-04-28 11:55:44','consulted','invalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinv',-27798,'carnauba\'s','Wilson',1963,NULL,'On\'s','leisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurely',NULL,-128,NULL,17674,'Queenstown\'s',-128,'convertors',1776,'576:20:59',NULL,'allegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriall','2097-10-02 08:41:26',31057,'AfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikaners','test1','0000-00-00 00:00:00','0000-00-00','backwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbac',NULL,NULL,'1932-10-01 18:49:04',12985,NULL,'leukocytes','603:54:26',-22488); +INSERT INTO `table5` VALUES ('Frasquito\'s','unsatisfactory','jetted','00:00:00',NULL,'Merlin\'s',127,'0000-00-00 00:00:00',NULL,NULL,1998,'','decomposer','Commons',-14813,'oversimplification\'s',NULL,'-5368','','engirdengirdengirdengirdengirdengirdengirdengirdengird',-13627,14305,'frontally',127,'18421',-32295,NULL,NULL,'21841',NULL,'0000-00-00','cytology','2424-00-17',-30542,-17621,'octarchy\'s','outfoxed','00:00:00',27469,-128,'','Kamat\'s',-24130,-5948,'riband','Betsy',NULL,-18769,NULL,NULL,'Serafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSeraf',NULL,'disconcerting',NULL,'whirly','-20343','2020-07-01 12:09:36','','-26975','antiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticant',NULL,'ecumenically','utilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilize','1952-08-01 17:53:28','7903',-5633,'2024-03-17 13:46:59','-5474',127,'Malmö\'s',NULL,NULL,'0000-00-00','571:58:00',17287,'26711','alphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetize',-15158,2001,1997,'hobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithob','Campinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'s',-5693,'test1','3741','','Audrye\'s','monstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymo','00:00:00','test1','-21023',4693,'1998-01-06 04:41:40','Silastic\'s','0000-00-00 00:00:00','0000-00-00 00:00:00','Hedelman\'s',-30080,'normalization\'s','00:00:00',NULL,8197,NULL,NULL,NULL,'nudism\'s','2005-04-13 00:31:55',29046,'8992','11992',NULL,'-1685',-11453,'mythology\'s',26185,'Pyrenea','Pedrick\'s','0000-00-00',27436,'shots',NULL,'discordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscords','bayonet','-7217','scriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscripts',NULL,'17182',NULL,'628:49:55','nunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenuncle',NULL,'0000-00-00',-17444,'celestite\'s','Adars','Hispaniola','Mesopotamians','agglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutin',31998,'electrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistriesele','2005-09-09 23:41:06','bastinaded',NULL,-10763,'impetuosity\'s','xenogenesis\'s',1947,'-29913',NULL,'taxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomies',NULL,NULL,'internees',28697,'Kharkov\'s',NULL,'Swabia',18366,'00:00:00','delayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayer','circusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycir','2066-02-13 14:27:00',-28405,NULL,'test1','0000-00-00 00:00:00','0000-00-00','heterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotr','enchondromaenchondromaenchondromaenchondromaenchondromaenchondromaenchondromaenchondroma','AryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAry','2090-10-13 10:03:05',NULL,NULL,'Yucatan','285:37:51',7627); +/*!40000 ALTER TABLE `table5` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + + +#explain select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ; + +select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ; + +drop table `table5`; diff --git a/mysql-test/suite/parts/r/insert_ignore-5421.result b/mysql-test/suite/parts/r/insert_ignore-5421.result new file mode 100644 index 00000000000..6cbb21fe2d7 --- /dev/null +++ b/mysql-test/suite/parts/r/insert_ignore-5421.result @@ -0,0 +1,9 @@ +CREATE TABLE t1 (i INT) ENGINE=MyISAM +PARTITION BY RANGE (i) ( +PARTITION p00 VALUES LESS THAN (1), +PARTITION p01 VALUES LESS THAN (2) +); +INSERT IGNORE INTO t1 VALUES (3); +Warnings: +Warning 1526 Table has no partition for value 3 +DROP TABLE t1; diff --git a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result index b10f4da1c99..d7a77e5e54a 100644 --- a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result +++ b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result @@ -22,6 +22,7 @@ Level Code Message Warning 1478 InnoDB: DATA DIRECTORY requires innodb_file_per_table. Warning 1478 InnoDB: INDEX DIRECTORY is not supported Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB Error 6 Error on delete of 'MYSQLD_DATADIR/test/t1.par' (Errcode: 2 "No such file or directory") # # InnoDB is different from MyISAM in that it uses a text file diff --git a/mysql-test/suite/parts/t/insert_ignore-5421.test b/mysql-test/suite/parts/t/insert_ignore-5421.test new file mode 100644 index 00000000000..889f2ccae7b --- /dev/null +++ b/mysql-test/suite/parts/t/insert_ignore-5421.test @@ -0,0 +1,12 @@ +# +# MDEV-5421 Assertion `! is_set()' fails on INSERT IGNORE when a table has no partition for a value +# + +--source include/have_partition.inc +CREATE TABLE t1 (i INT) ENGINE=MyISAM +PARTITION BY RANGE (i) ( + PARTITION p00 VALUES LESS THAN (1), + PARTITION p01 VALUES LESS THAN (2) +); +INSERT IGNORE INTO t1 VALUES (3); +DROP TABLE t1; diff --git a/mysql-test/suite/perfschema/r/digest_table_full.result b/mysql-test/suite/perfschema/r/digest_table_full.result index bba3bc8d9e5..9c0efb7b1ca 100644 --- a/mysql-test/suite/perfschema/r/digest_table_full.result +++ b/mysql-test/suite/perfschema/r/digest_table_full.result @@ -113,7 +113,7 @@ SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARN SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS NULL NULL NULL 55 32 1 2 -statements_digest b7123a38bb99ce09f09d127df4e39b18 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0 +statements_digest 0e98ee6a98e296530ec59c12dbc08dfe TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0 SHOW VARIABLES LIKE "performance_schema_digests_size"; Variable_name Value performance_schema_digests_size 2 diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result index ff3f9ec76fa..c2a9be78385 100644 --- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result +++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result @@ -7,20 +7,19 @@ NAME ENABLED TIMED wait/synch/mutex/sql/Cversion_lock YES YES wait/synch/mutex/sql/Delayed_insert::mutex YES YES wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state YES YES +wait/synch/mutex/sql/gtid_waiting::LOCK_gtid_waiting YES YES wait/synch/mutex/sql/hash_filo::lock YES YES wait/synch/mutex/sql/HA_DATA_PARTITION::LOCK_auto_inc YES YES wait/synch/mutex/sql/LOCK_active_mi YES YES wait/synch/mutex/sql/LOCK_audit_mask YES YES wait/synch/mutex/sql/LOCK_binlog_state YES YES wait/synch/mutex/sql/LOCK_commit_ordered YES YES -wait/synch/mutex/sql/LOCK_connection_count YES YES select * from performance_schema.setup_instruments where name like 'Wait/Synch/Rwlock/sql/%' and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock') order by name limit 10; NAME ENABLED TIMED wait/synch/rwlock/sql/LOCK_dboptions YES YES -wait/synch/rwlock/sql/LOCK_flush YES YES wait/synch/rwlock/sql/LOCK_grant YES YES wait/synch/rwlock/sql/LOCK_system_variables_hash YES YES wait/synch/rwlock/sql/LOCK_sys_init_connect YES YES @@ -29,6 +28,7 @@ wait/synch/rwlock/sql/LOCK_tdc YES YES wait/synch/rwlock/sql/LOGGER::LOCK_logger YES YES wait/synch/rwlock/sql/MDL_context::LOCK_waiting_for YES YES wait/synch/rwlock/sql/MDL_lock::rwlock YES YES +wait/synch/rwlock/sql/Query_cache_query::lock YES YES select * from performance_schema.setup_instruments where name like 'Wait/Synch/Cond/sql/%' and name not in ( @@ -37,15 +37,15 @@ where name like 'Wait/Synch/Cond/sql/%' order by name limit 10; NAME ENABLED TIMED wait/synch/cond/sql/COND_flush_thread_cache YES YES +wait/synch/cond/sql/COND_group_commit_orderer YES YES wait/synch/cond/sql/COND_manager YES YES wait/synch/cond/sql/COND_parallel_entry YES YES wait/synch/cond/sql/COND_prepare_ordered YES YES wait/synch/cond/sql/COND_queue_state YES YES wait/synch/cond/sql/COND_rpl_thread YES YES wait/synch/cond/sql/COND_rpl_thread_pool YES YES +wait/synch/cond/sql/COND_rpl_thread_queue YES YES wait/synch/cond/sql/COND_server_started YES YES -wait/synch/cond/sql/COND_thread_cache YES YES -wait/synch/cond/sql/COND_thread_count YES YES select * from performance_schema.setup_instruments where name='Wait'; select * from performance_schema.setup_instruments diff --git a/mysql-test/suite/perfschema/r/statement_digest.result b/mysql-test/suite/perfschema/r/statement_digest.result index 82bb1211cbc..41cba435cb6 100644 --- a/mysql-test/suite/perfschema/r/statement_digest.result +++ b/mysql-test/suite/perfschema/r/statement_digest.result @@ -112,43 +112,43 @@ DROP TRIGGER trg; SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS -statements_digest b7123a38bb99ce09f09d127df4e39b18 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0 -statements_digest b84133205e24517207248a0eefded78a SELECT ? FROM t1 1 0 0 0 -statements_digest 88a673e6a76a2bd1ad72dddc7e9be037 SELECT ? FROM `t1` 1 0 0 0 -statements_digest a885b0a3ae7886d11bfdc7c51b3d7110 SELECT ?, ... FROM t1 2 0 0 0 -statements_digest e3a97cc772f0acebfe7ee5537dfcc881 SELECT ? FROM t2 1 0 0 0 -statements_digest 9ecf822210da222eae9b56a0017765fc SELECT ?, ... FROM t2 2 0 0 0 -statements_digest 98bbad9fba6ace6566d118333c00c67d INSERT INTO t1 VALUES (?) 1 1 0 0 -statements_digest 724ab5bcd5f11b3975a65331c89443c0 INSERT INTO t2 VALUES (?) 1 1 0 0 -statements_digest a351a420a8ef3b894177d2620be682ca INSERT INTO t3 VALUES (...) 4 4 0 0 -statements_digest f66804d1ba3de87895f9a82c6cef04d4 INSERT INTO t4 VALUES (...) 1 1 0 0 -statements_digest 797b00d27cc1a212f4f4d61d3ad11e66 INSERT INTO t5 VALUES (...) 1 1 0 0 -statements_digest 90427cb3f602eaa97b1cc97c0ef16d85 INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0 -statements_digest 1691e787cfe88075cb3e9fd48ac4a52b INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0 -statements_digest cf401a585c798da2f55f72b0a99ded18 INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0 -statements_digest 1e25bc6303e3968077c586dab9c5562c INSERT INTO t1 VALUES ( NULL ) 1 1 0 0 -statements_digest 30f72e28c64b3e6ca888715a848cd085 INSERT INTO t6 VALUES (...) 5 5 0 0 -statements_digest 551dce993b267c981c5b3eb285c2fe57 SELECT ? + ? 3 0 0 0 -statements_digest d31e1af4dc7ed5fe3ff61c78db7b327e SELECT ? 1 0 0 0 -statements_digest 33003a7b4de282603814a057945694d3 CREATE SCHEMA statements_digest_temp 2 2 0 0 -statements_digest 6ce84f85f37b9996e3dcbed9d55b88dd DROP SCHEMA statements_digest_temp 2 0 0 0 -statements_digest 08c862f2422dd8464a3b7b96d9de1dfa SELECT ? FROM no_such_table 1 0 0 1 -statements_digest c41b789a3176e6dbd8157848c6ff4aaf CREATE TABLE dup_table ( c CHARACTER (?) ) 2 0 0 1 -statements_digest fe693f8cf543b249a89f9f76c363d9d5 DROP TABLE dup_table 1 0 0 0 -statements_digest 5a6a862982ca17eff9038f2d852d848f INSERT INTO t11 VALUES (?) 1 1 1 0 -statements_digest b72d811ed58c8f2ec01e110bcad3138b SHOW WARNINGS 1 0 0 0 -statements_digest 63e18c50006c39c70200e63e720a9f0a PREPARE stmt FROM ? 1 0 0 0 -statements_digest eac5a2c580910e14eb0894ef21a25353 EXECUTE stmt 2 0 0 0 -statements_digest 5f1eaa4567c93974669fc403159245db DEALLOCATE PREPARE stmt 1 0 0 0 -statements_digest acb8e84440f68ee053d486688dfc88b2 CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 0 0 0 -statements_digest 44c11865a2c9cd9f884bca10564ac818 CALL p1 ( ) 2 0 0 0 -statements_digest fb004af2d0db6f35a97ccdbbc51343ef DROP PROCEDURE p1 1 0 0 0 -statements_digest 6566febd24d7b17c53f75785ce94936c CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 0 0 0 -statements_digest 5bc097b58c334afe0875d7b74d0eb86e SELECT func (...) 2 0 0 0 -statements_digest 183cce493d199f32fad2174aab485298 DROP FUNCTION func 1 0 0 0 -statements_digest b0f05e1bd191be18730e2e24801a448d CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 0 0 0 -statements_digest 4a20ca3773c57af8a3949b76f446505a INSERT INTO t12 VALUES (?) 2 2 0 0 -statements_digest b345f3bef14924fea5ce7129cd374576 DROP TRIGGER trg 1 0 0 0 +statements_digest 0e98ee6a98e296530ec59c12dbc08dfe TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0 +statements_digest 954f43425c3234acc8e194afd97e8a0a SELECT ? FROM t1 1 0 0 0 +statements_digest fc365a54bc19d746bd24c27aba46b990 SELECT ? FROM `t1` 1 0 0 0 +statements_digest 27ba28f6252e4ae0e9b14b36da536fbe SELECT ?, ... FROM t1 2 0 0 0 +statements_digest 81d03922612900032ec4b81934ab4841 SELECT ? FROM t2 1 0 0 0 +statements_digest adce8aec12b6b5046cd4bf55951014c7 SELECT ?, ... FROM t2 2 0 0 0 +statements_digest 59a1bd93c424b10802fe66bb6dcd94d2 INSERT INTO t1 VALUES (?) 1 1 0 0 +statements_digest 91b2da58b0eb49c35a38fbc49f5e491d INSERT INTO t2 VALUES (?) 1 1 0 0 +statements_digest 967114adbf91d8a4a99ec5e49e909ff4 INSERT INTO t3 VALUES (...) 4 4 0 0 +statements_digest 8f25e7a48487e0aa7377e816816bb658 INSERT INTO t4 VALUES (...) 1 1 0 0 +statements_digest 4e51253af793867fba66166de1f314f7 INSERT INTO t5 VALUES (...) 1 1 0 0 +statements_digest fa47b3109e117216cd10209690d28596 INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0 +statements_digest 72409f84bc236e6fe9f2f7b4d727f2d3 INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0 +statements_digest d40aaddb41ed794d65dd8273f0c75700 INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0 +statements_digest 57a82b28388e52e99fc64339dd30edde INSERT INTO t1 VALUES ( NULL ) 1 1 0 0 +statements_digest 6a56b694106442474cb0e5fb7575c8b9 INSERT INTO t6 VALUES (...) 5 5 0 0 +statements_digest c9abf55e296c4317dbaf2d14ef907ad7 SELECT ? + ? 3 0 0 0 +statements_digest 156304a0851a3e3626b39fb3da841a82 SELECT ? 1 0 0 0 +statements_digest 3b085ab0d2063dfca1a39212e3ea1831 CREATE SCHEMA statements_digest_temp 2 2 0 0 +statements_digest 09f9fabef2feb9a54ba01455e5ae83b9 DROP SCHEMA statements_digest_temp 2 0 0 0 +statements_digest 7910a63ffd31cbcb742e15270c8958c8 SELECT ? FROM no_such_table 1 0 0 1 +statements_digest fa34540a438bc672478b1162505ee28c CREATE TABLE dup_table ( c CHARACTER (?) ) 2 0 0 1 +statements_digest 2c720f176bb7c8510ff8aca8921b9945 DROP TABLE dup_table 1 0 0 0 +statements_digest 0c7d9fd8c27ab067511da41ca3bcdff3 INSERT INTO t11 VALUES (?) 1 1 1 0 +statements_digest 81681ff345065ed72bcd1e9407ab85e4 SHOW WARNINGS 1 0 0 0 +statements_digest d766f5823ae5d8e4cf4602b8e7a3fb80 PREPARE stmt FROM ? 1 0 0 0 +statements_digest 3ab1e87eabd9688edf919754cce6348b EXECUTE stmt 2 0 0 0 +statements_digest 470094469d250b9f45cab45bf610efe8 DEALLOCATE PREPARE stmt 1 0 0 0 +statements_digest 1b4d25358e08b35ad54e49dfe5eaf3e4 CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 0 0 0 +statements_digest 84554971243e91106214dcb8f4eaa89b CALL p1 ( ) 2 0 0 0 +statements_digest 77206e4bf30979c56752a7ed9150213a DROP PROCEDURE p1 1 0 0 0 +statements_digest 03b91dcdba6b0e29f7fb240ae4bcd97f CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 0 0 0 +statements_digest 72bc532f308f2dca62f5291df8c50e6f SELECT func (...) 2 0 0 0 +statements_digest 0b5a5297689c5036def6af8e8a8ce113 DROP FUNCTION func 1 0 0 0 +statements_digest d08331e42c67555ece50e46eef0f2b47 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 0 0 0 +statements_digest 754a49a4de995c5a729e9ab52f135f59 INSERT INTO t12 VALUES (?) 2 2 0 0 +statements_digest 68df17752bca7c2c8ee2a6a19a0674e7 DROP TRIGGER trg 1 0 0 0 #################################### # CLEANUP #################################### diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers.result b/mysql-test/suite/perfschema/r/statement_digest_consumers.result index 62776d0dba5..21e62e13b19 100644 --- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result +++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result @@ -125,43 +125,43 @@ DROP TRIGGER trg; #################################### SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest; schema_name digest digest_text count_star -statements_digest b7123a38bb99ce09f09d127df4e39b18 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 -statements_digest b84133205e24517207248a0eefded78a SELECT ? FROM t1 1 -statements_digest 88a673e6a76a2bd1ad72dddc7e9be037 SELECT ? FROM `t1` 1 -statements_digest a885b0a3ae7886d11bfdc7c51b3d7110 SELECT ?, ... FROM t1 2 -statements_digest e3a97cc772f0acebfe7ee5537dfcc881 SELECT ? FROM t2 1 -statements_digest 9ecf822210da222eae9b56a0017765fc SELECT ?, ... FROM t2 2 -statements_digest 98bbad9fba6ace6566d118333c00c67d INSERT INTO t1 VALUES (?) 1 -statements_digest 724ab5bcd5f11b3975a65331c89443c0 INSERT INTO t2 VALUES (?) 1 -statements_digest a351a420a8ef3b894177d2620be682ca INSERT INTO t3 VALUES (...) 4 -statements_digest f66804d1ba3de87895f9a82c6cef04d4 INSERT INTO t4 VALUES (...) 1 -statements_digest 797b00d27cc1a212f4f4d61d3ad11e66 INSERT INTO t5 VALUES (...) 1 -statements_digest 90427cb3f602eaa97b1cc97c0ef16d85 INSERT INTO t1 VALUES (?) /* , ... */ 2 -statements_digest 1691e787cfe88075cb3e9fd48ac4a52b INSERT INTO t3 VALUES (...) /* , ... */ 1 -statements_digest cf401a585c798da2f55f72b0a99ded18 INSERT INTO t5 VALUES (...) /* , ... */ 1 -statements_digest 1e25bc6303e3968077c586dab9c5562c INSERT INTO t1 VALUES ( NULL ) 1 -statements_digest 30f72e28c64b3e6ca888715a848cd085 INSERT INTO t6 VALUES (...) 5 -statements_digest 551dce993b267c981c5b3eb285c2fe57 SELECT ? + ? 3 -statements_digest d31e1af4dc7ed5fe3ff61c78db7b327e SELECT ? 1 -statements_digest 33003a7b4de282603814a057945694d3 CREATE SCHEMA statements_digest_temp 2 -statements_digest 6ce84f85f37b9996e3dcbed9d55b88dd DROP SCHEMA statements_digest_temp 2 -statements_digest 08c862f2422dd8464a3b7b96d9de1dfa SELECT ? FROM no_such_table 1 -statements_digest c41b789a3176e6dbd8157848c6ff4aaf CREATE TABLE dup_table ( c CHARACTER (?) ) 2 -statements_digest fe693f8cf543b249a89f9f76c363d9d5 DROP TABLE dup_table 1 -statements_digest 5a6a862982ca17eff9038f2d852d848f INSERT INTO t11 VALUES (?) 1 -statements_digest b72d811ed58c8f2ec01e110bcad3138b SHOW WARNINGS 1 -statements_digest 63e18c50006c39c70200e63e720a9f0a PREPARE stmt FROM ? 1 -statements_digest eac5a2c580910e14eb0894ef21a25353 EXECUTE stmt 2 -statements_digest 5f1eaa4567c93974669fc403159245db DEALLOCATE PREPARE stmt 1 -statements_digest acb8e84440f68ee053d486688dfc88b2 CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 -statements_digest 44c11865a2c9cd9f884bca10564ac818 CALL p1 ( ) 2 -statements_digest fb004af2d0db6f35a97ccdbbc51343ef DROP PROCEDURE p1 1 -statements_digest 6566febd24d7b17c53f75785ce94936c CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 -statements_digest 5bc097b58c334afe0875d7b74d0eb86e SELECT func (...) 2 -statements_digest 183cce493d199f32fad2174aab485298 DROP FUNCTION func 1 -statements_digest b0f05e1bd191be18730e2e24801a448d CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 -statements_digest 4a20ca3773c57af8a3949b76f446505a INSERT INTO t12 VALUES (?) 2 -statements_digest b345f3bef14924fea5ce7129cd374576 DROP TRIGGER trg 1 +statements_digest 0e98ee6a98e296530ec59c12dbc08dfe TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 +statements_digest 954f43425c3234acc8e194afd97e8a0a SELECT ? FROM t1 1 +statements_digest fc365a54bc19d746bd24c27aba46b990 SELECT ? FROM `t1` 1 +statements_digest 27ba28f6252e4ae0e9b14b36da536fbe SELECT ?, ... FROM t1 2 +statements_digest 81d03922612900032ec4b81934ab4841 SELECT ? FROM t2 1 +statements_digest adce8aec12b6b5046cd4bf55951014c7 SELECT ?, ... FROM t2 2 +statements_digest 59a1bd93c424b10802fe66bb6dcd94d2 INSERT INTO t1 VALUES (?) 1 +statements_digest 91b2da58b0eb49c35a38fbc49f5e491d INSERT INTO t2 VALUES (?) 1 +statements_digest 967114adbf91d8a4a99ec5e49e909ff4 INSERT INTO t3 VALUES (...) 4 +statements_digest 8f25e7a48487e0aa7377e816816bb658 INSERT INTO t4 VALUES (...) 1 +statements_digest 4e51253af793867fba66166de1f314f7 INSERT INTO t5 VALUES (...) 1 +statements_digest fa47b3109e117216cd10209690d28596 INSERT INTO t1 VALUES (?) /* , ... */ 2 +statements_digest 72409f84bc236e6fe9f2f7b4d727f2d3 INSERT INTO t3 VALUES (...) /* , ... */ 1 +statements_digest d40aaddb41ed794d65dd8273f0c75700 INSERT INTO t5 VALUES (...) /* , ... */ 1 +statements_digest 57a82b28388e52e99fc64339dd30edde INSERT INTO t1 VALUES ( NULL ) 1 +statements_digest 6a56b694106442474cb0e5fb7575c8b9 INSERT INTO t6 VALUES (...) 5 +statements_digest c9abf55e296c4317dbaf2d14ef907ad7 SELECT ? + ? 3 +statements_digest 156304a0851a3e3626b39fb3da841a82 SELECT ? 1 +statements_digest 3b085ab0d2063dfca1a39212e3ea1831 CREATE SCHEMA statements_digest_temp 2 +statements_digest 09f9fabef2feb9a54ba01455e5ae83b9 DROP SCHEMA statements_digest_temp 2 +statements_digest 7910a63ffd31cbcb742e15270c8958c8 SELECT ? FROM no_such_table 1 +statements_digest fa34540a438bc672478b1162505ee28c CREATE TABLE dup_table ( c CHARACTER (?) ) 2 +statements_digest 2c720f176bb7c8510ff8aca8921b9945 DROP TABLE dup_table 1 +statements_digest 0c7d9fd8c27ab067511da41ca3bcdff3 INSERT INTO t11 VALUES (?) 1 +statements_digest 81681ff345065ed72bcd1e9407ab85e4 SHOW WARNINGS 1 +statements_digest d766f5823ae5d8e4cf4602b8e7a3fb80 PREPARE stmt FROM ? 1 +statements_digest 3ab1e87eabd9688edf919754cce6348b EXECUTE stmt 2 +statements_digest 470094469d250b9f45cab45bf610efe8 DEALLOCATE PREPARE stmt 1 +statements_digest 1b4d25358e08b35ad54e49dfe5eaf3e4 CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 +statements_digest 84554971243e91106214dcb8f4eaa89b CALL p1 ( ) 2 +statements_digest 77206e4bf30979c56752a7ed9150213a DROP PROCEDURE p1 1 +statements_digest 03b91dcdba6b0e29f7fb240ae4bcd97f CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 +statements_digest 72bc532f308f2dca62f5291df8c50e6f SELECT func (...) 2 +statements_digest 0b5a5297689c5036def6af8e8a8ce113 DROP FUNCTION func 1 +statements_digest d08331e42c67555ece50e46eef0f2b47 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 +statements_digest 754a49a4de995c5a729e9ab52f135f59 INSERT INTO t12 VALUES (?) 2 +statements_digest 68df17752bca7c2c8ee2a6a19a0674e7 DROP TRIGGER trg 1 SELECT digest, digest_text FROM performance_schema.events_statements_current; digest digest_text #################################### diff --git a/mysql-test/suite/perfschema/r/statement_digest_long_query.result b/mysql-test/suite/perfschema/r/statement_digest_long_query.result index 611bbef4434..bb355304537 100644 --- a/mysql-test/suite/perfschema/r/statement_digest_long_query.result +++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result @@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 #################################### SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest; schema_name digest digest_text count_star -performance_schema 85f61b5db68f69a59a90190e8077e4af TRUNCATE TABLE events_statements_summary_by_digest 1 -performance_schema 0cc3fae5d60042494d108e9075b594d3 SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1 +performance_schema 9d35ff74210c6b30efa4559d627ed0f7 TRUNCATE TABLE events_statements_summary_by_digest 1 +performance_schema d78a04c1c42765b8552e0483c50ae9ff SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1 diff --git a/mysql-test/suite/plugins/r/cassandra.result b/mysql-test/suite/plugins/r/cassandra.result index f95044a057c..67ae2cab708 100644 --- a/mysql-test/suite/plugins/r/cassandra.result +++ b/mysql-test/suite/plugins/r/cassandra.result @@ -219,7 +219,7 @@ drop table t1; # CREATE TABLE t1 (my_primary_key varchar(10) PRIMARY KEY) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf10'; -ERROR HY000: Internal error: 'target column family has no key_alias defined, PRIMARY KEY column must be named 'rowkey'' +ERROR HY000: Internal error: target column family has no key_alias defined, PRIMARY KEY column must be named 'rowkey' CREATE TABLE t1 (rowkey varchar(10) PRIMARY KEY) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf10'; DROP TABLE t1; @@ -365,7 +365,7 @@ drop table t2; CREATE TABLE t2 (rowkey varchar(32) PRIMARY KEY, varint_col varbinary(2)) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf9'; select rowkey, hex(varint_col) from t2; -ERROR HY000: Internal error: 'Unable to convert value for field `varint_col` from Cassandra's data format. Source data is 4 bytes, 0x12345678' +ERROR HY000: Internal error: Unable to convert value for field `varint_col` from Cassandra's data format. Source data is 4 bytes, 0x12345678 drop table t2; # # Decimal datatype support @@ -557,7 +557,7 @@ delete from t1; drop table t1; CREATE TABLE t1 (rowkey varchar(10) PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cfd1'; select * from t1; -ERROR HY000: Internal error: 'Unable to convert value for field `dyn` from Cassandra's data format. Name length exceed limit of 16383: 'very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_v' +ERROR HY000: Internal error: Unable to convert value for field `dyn` from Cassandra's data format. Name length exceed limit of 16383: 'very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_v drop table t1; CREATE TABLE t1 (rowkey int PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cfd2'; diff --git a/mysql-test/suite/plugins/r/sql_error_log.result b/mysql-test/suite/plugins/r/sql_error_log.result new file mode 100644 index 00000000000..f3e6716302b --- /dev/null +++ b/mysql-test/suite/plugins/r/sql_error_log.result @@ -0,0 +1,45 @@ +drop procedure if exists test_error; +drop table if exists t1; +install plugin SQL_ERROR_LOG soname 'sql_errlog'; +show variables like 'sql_error_log%'; +Variable_name Value +sql_error_log_filename sql_errors.log +sql_error_log_rate 1 +sql_error_log_rotate OFF +sql_error_log_rotations 9 +sql_error_log_size_limit 1000000 +set global sql_error_log_rate=1; +select * from t_doesnt_exist; +ERROR 42S02: Table 'test.t_doesnt_exist' doesn't exist +syntax_error_query; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'syntax_error_query' at line 1 +CREATE PROCEDURE test_error() +BEGIN +DECLARE CONTINUE HANDLER +FOR 1146 +BEGIN +RESIGNAL SQLSTATE '40000' SET +MYSQL_ERRNO = 1000, +MESSAGE_TEXT = 'new message'; +END; +SELECT `c` FROM `temptab`; +END| +CALL test_error(); +ERROR 40000: new message +drop procedure test_error; +SET SQL_MODE = STRICT_ALL_TABLES; +create table t1(id int); +insert into t1 values ('aa'); +ERROR 22007: Incorrect integer value: 'aa' for column 'id' at row 1 +SET SQL_MODE = ''; +drop table t1; +uninstall plugin SQL_ERROR_LOG; +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown +TIME HOSTNAME ERROR 1146: Table 'test.t_doesnt_exist' doesn't exist : select * from t_doesnt_exist +TIME HOSTNAME ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'syntax_error_query' at line 1 : syntax_error_query +TIME HOSTNAME ERROR 1146: Table 'test.temptab' doesn't exist : SELECT `c` FROM `temptab` +TIME HOSTNAME ERROR 1000: new message : RESIGNAL SQLSTATE '40000' SET +MYSQL_ERRNO = 1000, +MESSAGE_TEXT = 'new message' +TIME HOSTNAME ERROR 1366: Incorrect integer value: 'aa' for column 'id' at row 1 : insert into t1 values ('aa') diff --git a/mysql-test/suite/plugins/t/sql_error_log.test b/mysql-test/suite/plugins/t/sql_error_log.test new file mode 100644 index 00000000000..8d04720aac3 --- /dev/null +++ b/mysql-test/suite/plugins/t/sql_error_log.test @@ -0,0 +1,55 @@ + +--source include/not_embedded.inc + +if (!$SQL_ERRLOG_SO) { + skip No SQL_ERROR_LOG plugin; +} + +--disable_warnings +drop procedure if exists test_error; +drop table if exists t1; +--enable_warnings + +install plugin SQL_ERROR_LOG soname 'sql_errlog'; + +show variables like 'sql_error_log%'; +set global sql_error_log_rate=1; +--error ER_NO_SUCH_TABLE +select * from t_doesnt_exist; +--error 1064 +syntax_error_query; + +delimiter |; + +CREATE PROCEDURE test_error() +BEGIN +DECLARE CONTINUE HANDLER +FOR 1146 +BEGIN +RESIGNAL SQLSTATE '40000' SET +MYSQL_ERRNO = 1000, +MESSAGE_TEXT = 'new message'; +END; +SELECT `c` FROM `temptab`; +END| + +delimiter ;| + +--error 1000 +CALL test_error(); +drop procedure test_error; + +SET SQL_MODE = STRICT_ALL_TABLES; +create table t1(id int); +--error 1366 +insert into t1 values ('aa'); +SET SQL_MODE = ''; +drop table t1; + +uninstall plugin SQL_ERROR_LOG; + +let $MYSQLD_DATADIR= `SELECT @@datadir`; +# replace the timestamp and the hostname with constant values +--replace_regex /[1-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [ 0-9][0-9]:[0-9][0-9]:[0-9][0-9] [^E]*/TIME HOSTNAME / +cat_file $MYSQLD_DATADIR/sql_errors.log; + diff --git a/mysql-test/suite/plugins/t/unix_socket.test b/mysql-test/suite/plugins/t/unix_socket.test index 72106fab46d..5869e2717c9 100644 --- a/mysql-test/suite/plugins/t/unix_socket.test +++ b/mysql-test/suite/plugins/t/unix_socket.test @@ -3,10 +3,23 @@ # get .result differences from CURRENT_USER(). --source include/not_as_root.inc +# The previous check verifies that the user does not have root permissions. +# However in some cases tests are run under a user named 'root', +# even although this user does not have real root permissions. +# This test should be skipped in this case, since it does not expect +# that there are records in mysql.user where user=<username> +if ($USER=="root") { + skip Cannot be run by user named 'root' even if it does not have all privileges; +} + if (!$AUTH_SOCKET_SO) { skip No auth_socket plugin; } +if (!$USER) { + skip USER variable is undefined; +} + let $plugindir=`SELECT @@global.plugin_dir`; eval install plugin unix_socket soname '$AUTH_SOCKET_SO'; diff --git a/mysql-test/suite/roles/create_and_drop_role.result b/mysql-test/suite/roles/create_and_drop_role.result index d4eac2756ec..2974dd20e22 100644 --- a/mysql-test/suite/roles/create_and_drop_role.result +++ b/mysql-test/suite/roles/create_and_drop_role.result @@ -34,3 +34,15 @@ ERROR HY000: Operation DROP ROLE failed for 'dummy' drop user dummy@''; select user, host, is_role from user where user like 'test%'; user host is_role +create role ''; +ERROR OP000: Invalid role specification ``. +create role r1; +drop user r1; +ERROR HY000: Operation DROP USER failed for 'r1'@'%' +drop role r1; +create role r1 with admin u1; +Warnings: +Note 1449 The user specified as a definer ('u1'@'%') does not exist +create user foo@bar; +drop user foo@bar; +drop role r1; diff --git a/mysql-test/suite/roles/create_and_drop_role.test b/mysql-test/suite/roles/create_and_drop_role.test index 3491986e666..38f040789e0 100644 --- a/mysql-test/suite/roles/create_and_drop_role.test +++ b/mysql-test/suite/roles/create_and_drop_role.test @@ -18,7 +18,6 @@ select user, host, is_role from user where user like 'test%'; drop role test_role1; drop role test_role2, test_role3; - create role test_role1; --error ER_CANNOT_USER create role test_role1; @@ -45,3 +44,27 @@ drop user dummy@''; --sorted_result select user, host, is_role from user where user like 'test%'; disconnect mysql; +connection default; + +# +# MDEV-5520 Connection lost on wrong CREATE ROLE +# +--error ER_INVALID_ROLE +create role ''; + +# +# MDEV-5523 Server crashes on DROP USER <rolename> +# +create role r1; +--error ER_CANNOT_USER +drop user r1; +drop role r1; + +# +# MDEV-5525 Assertion `status == 0' fails on creating user after granting it role admin option +# +create role r1 with admin u1; +create user foo@bar; +drop user foo@bar; +drop role r1; + diff --git a/mysql-test/suite/roles/show_grants_anon-5238.result b/mysql-test/suite/roles/grant_empty.result index 85be1ac92f3..dfc0f513396 100644 --- a/mysql-test/suite/roles/show_grants_anon-5238.result +++ b/mysql-test/suite/roles/grant_empty.result @@ -1,3 +1,5 @@ +grant '' to foo@localhost; +ERROR OP000: Invalid role specification ``. create user ''@localhost; create role r1; grant r1 to ''@localhost; diff --git a/mysql-test/suite/roles/show_grants_anon-5238.test b/mysql-test/suite/roles/grant_empty.test index adb22490233..e419fffa2ba 100644 --- a/mysql-test/suite/roles/show_grants_anon-5238.test +++ b/mysql-test/suite/roles/grant_empty.test @@ -1,4 +1,10 @@ # +# MDEV-5668 Assertion `granted_role->is_role()' fails on granting role with empty name +# +--error ER_INVALID_ROLE +grant '' to foo@localhost; + +# # MDEV-5238 Server crashes in find_role_grant_pair on SHOW GRANTS for an anonymous user # --source include/not_embedded.inc diff --git a/mysql-test/suite/roles/grant_proxy-5526.result b/mysql-test/suite/roles/grant_proxy-5526.result new file mode 100644 index 00000000000..7921969299a --- /dev/null +++ b/mysql-test/suite/roles/grant_proxy-5526.result @@ -0,0 +1,9 @@ +create role r1; +create user user; +grant proxy on r1 to user; +show grants for user; +Grants for user@% +GRANT USAGE ON *.* TO 'user'@'%' +GRANT PROXY ON 'r1'@'%' TO 'user'@'%' +drop user user; +drop role r1; diff --git a/mysql-test/suite/roles/grant_proxy-5526.test b/mysql-test/suite/roles/grant_proxy-5526.test new file mode 100644 index 00000000000..eadc763b966 --- /dev/null +++ b/mysql-test/suite/roles/grant_proxy-5526.test @@ -0,0 +1,11 @@ +--source include/not_embedded.inc +# +# MDEV-5526 Assertion `proxied_user->host.length' fails on GRANT PROXY ON <role> +# +create role r1; +create user user; +grant proxy on r1 to user; +show grants for user; +drop user user; +drop role r1; + diff --git a/mysql-test/suite/roles/grant_role_auto_create_user.result b/mysql-test/suite/roles/grant_role_auto_create_user.result new file mode 100644 index 00000000000..81b25e5f527 --- /dev/null +++ b/mysql-test/suite/roles/grant_role_auto_create_user.result @@ -0,0 +1,63 @@ +create database db; +create role auto_create; +grant all on db.* to auto_create; +grant auto_create to foo@localhost; +grant auto_create to bar@localhost identified by 'baz'; +set role 'auto_create'; +use db; +create table t1 (i int); +set role auto_create; +use db; +insert into t1 values (1); +drop user foo@localhost, bar@localhost; +set sql_mode = 'no_auto_create_user'; +grant auto_create to foo@localhost; +ERROR 28000: Can't find any matching row in the user table +grant auto_create to bar@localhost identified by 'baz'; +select user, host from mysql.user where user = 'bar'; +user host +bar localhost +set sql_mode = ''; +set role auto_create; +use db; +drop table t1; +create user foo@localhost; +set sql_mode = ''; +grant auto_create to bar2@localhost; +ERROR 28000: Access denied for user 'foo'@'localhost' +grant auto_create to foo2@localhost; +ERROR 28000: Access denied for user 'foo'@'localhost' +set sql_mode = 'no_auto_create_user'; +grant auto_create to bar2@localhost; +ERROR 28000: Access denied for user 'foo'@'localhost' +grant auto_create to foo2@localhost identified by 'pass'; +ERROR 28000: Access denied for user 'foo'@'localhost' +grant auto_create to foo@localhost; +set sql_mode = ''; +grant auto_create to bar@localhost; +ERROR 28000: Access denied for user 'foo'@'localhost' +grant auto_create to bar2@localhost; +ERROR 28000: Access denied for user 'foo'@'localhost' +grant auto_create to foo2@localhost identified by 'pass'; +ERROR 28000: Access denied for user 'foo'@'localhost' +set sql_mode = 'no_auto_create_user'; +grant auto_create to bar2@localhost; +ERROR 28000: Access denied for user 'foo'@'localhost' +grant auto_create to foo2@localhost identified by 'pass'; +ERROR 28000: Access denied for user 'foo'@'localhost' +grant auto_create to foo@localhost with admin option; +set sql_mode = ''; +grant auto_create to bar@localhost; +grant auto_create to bar2@localhost; +ERROR 42000: You are not allowed to create a user with GRANT +grant auto_create to foo2@localhost identified by 'pass'; +ERROR 42000: You are not allowed to create a user with GRANT +set sql_mode = 'no_auto_create_user'; +grant auto_create to bar2@localhost; +ERROR 28000: Can't find any matching row in the user table +grant auto_create to foo2@localhost identified by 'pass'; +ERROR 42000: You are not allowed to create a user with GRANT +drop user foo@localhost; +drop user bar@localhost; +drop role auto_create; +drop database db; diff --git a/mysql-test/suite/roles/grant_role_auto_create_user.test b/mysql-test/suite/roles/grant_role_auto_create_user.test new file mode 100644 index 00000000000..d2489a4ea74 --- /dev/null +++ b/mysql-test/suite/roles/grant_role_auto_create_user.test @@ -0,0 +1,121 @@ +# +# MDEV-5221 User auto-creation does not work upon GRANT <role> +# +--source include/not_embedded.inc + +create database db; +create role auto_create; +grant all on db.* to auto_create; + +grant auto_create to foo@localhost; +grant auto_create to bar@localhost identified by 'baz'; + +# Test if the users have been created and the role has been granted to them +--connect (con1,localhost,foo,,) +set role 'auto_create'; +use db; +create table t1 (i int); +--disconnect con1 + +--connect (con1,localhost,bar,baz,) +set role auto_create; +use db; +insert into t1 values (1); +--disconnect con1 + +--connection default +drop user foo@localhost, bar@localhost; + +set sql_mode = 'no_auto_create_user'; +--error ER_PASSWORD_NO_MATCH +grant auto_create to foo@localhost; +grant auto_create to bar@localhost identified by 'baz'; +select user, host from mysql.user where user = 'bar'; +set sql_mode = ''; + +--connect (con1,localhost,bar,baz,) +set role auto_create; +use db; +drop table t1; +--disconnect con1 + +--connection default + +create user foo@localhost; + +# test all possible cases with a user who has no rights to grant the role +--connect (con1, localhost, foo,,) + +set sql_mode = ''; +#try and grant roles, no rights however +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +grant auto_create to bar2@localhost; +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +grant auto_create to foo2@localhost; + +set sql_mode = 'no_auto_create_user'; +#try and grant roles, no rights however +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +grant auto_create to bar2@localhost; +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +grant auto_create to foo2@localhost identified by 'pass'; +--disconnect con1 +--connection default +grant auto_create to foo@localhost; + +--connect (con1, localhost, foo,,) + +#we now have the role granted to us, but we don't have insert privileges, +#we should not be able to create a new user + +set sql_mode = ''; +#also test that we can not grant a role without admin option +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +grant auto_create to bar@localhost; + +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +grant auto_create to bar2@localhost; +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +grant auto_create to foo2@localhost identified by 'pass'; + +set sql_mode = 'no_auto_create_user'; +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +grant auto_create to bar2@localhost; +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +grant auto_create to foo2@localhost identified by 'pass'; + +#test that we can grant a role with admin option to an existing user, but not +#create one + +--connection default +grant auto_create to foo@localhost with admin option; + +--disconnect con1 +--connect (con1, localhost, foo,,) + +#we now have the role granted to us, but we don't have insert privileges, +#we should not be able to create a new user + +set sql_mode = ''; +#also test that we can grant a role with admin option +grant auto_create to bar@localhost; + +#test that we don't create users if we don't have insert privileges +--error ER_CANT_CREATE_USER_WITH_GRANT +grant auto_create to bar2@localhost; +--error ER_CANT_CREATE_USER_WITH_GRANT +grant auto_create to foo2@localhost identified by 'pass'; + +set sql_mode = 'no_auto_create_user'; +--error ER_PASSWORD_NO_MATCH +grant auto_create to bar2@localhost; +--error ER_CANT_CREATE_USER_WITH_GRANT +grant auto_create to foo2@localhost identified by 'pass'; + + +--connection default +drop user foo@localhost; +drop user bar@localhost; +drop role auto_create; +drop database db; + diff --git a/mysql-test/suite/roles/password.result b/mysql-test/suite/roles/password.result index e41816bdef7..041a049ccec 100644 --- a/mysql-test/suite/roles/password.result +++ b/mysql-test/suite/roles/password.result @@ -1,14 +1,14 @@ create role r1; grant select on *.* to r1 identified by 'foobar'; -ERROR 28000: Can't find any matching row in the user table +drop user r1; grant select on *.* to r1 identified by ''; -ERROR 28000: Can't find any matching row in the user table +drop user r1; grant select on mysql.user to r1 identified by password '00000000000000000000000000000000000000000'; -ERROR 28000: Can't find any matching row in the user table +drop user r1; grant select on *.* to r1 identified via plugin; -ERROR 28000: Can't find any matching row in the user table +ERROR HY000: Plugin 'plugin' is not loaded grant select on mysql.user to r1 identified via plugin using 'param'; -ERROR 28000: Can't find any matching row in the user table +ERROR HY000: Plugin 'plugin' is not loaded grant select on *.* to r1 require subject 'foobar'; ERROR 28000: Can't find any matching row in the user table grant select on mysql.user to r1 require issuer 'foobar'; diff --git a/mysql-test/suite/roles/password.test b/mysql-test/suite/roles/password.test index 6b5073fae43..f638c5f39be 100644 --- a/mysql-test/suite/roles/password.test +++ b/mysql-test/suite/roles/password.test @@ -12,16 +12,18 @@ create role r1; ---error ER_PASSWORD_NO_MATCH +# IDENTIFIED does not apply to roles, using it forces username context grant select on *.* to r1 identified by 'foobar'; ---error ER_PASSWORD_NO_MATCH +drop user r1; grant select on *.* to r1 identified by ''; ---error ER_PASSWORD_NO_MATCH +drop user r1; grant select on mysql.user to r1 identified by password '00000000000000000000000000000000000000000'; ---error ER_PASSWORD_NO_MATCH +drop user r1; +--error ER_PLUGIN_IS_NOT_LOADED grant select on *.* to r1 identified via plugin; ---error ER_PASSWORD_NO_MATCH +--error ER_PLUGIN_IS_NOT_LOADED grant select on mysql.user to r1 identified via plugin using 'param'; + --error ER_PASSWORD_NO_MATCH grant select on *.* to r1 require subject 'foobar'; --error ER_PASSWORD_NO_MATCH diff --git a/mysql-test/suite/roles/ps.result b/mysql-test/suite/roles/ps.result new file mode 100644 index 00000000000..694dcb9446c --- /dev/null +++ b/mysql-test/suite/roles/ps.result @@ -0,0 +1 @@ +PREPARE stmt FROM 'SET ROLE NONE'; diff --git a/mysql-test/suite/roles/ps.test b/mysql-test/suite/roles/ps.test new file mode 100644 index 00000000000..f9bb6aaffac --- /dev/null +++ b/mysql-test/suite/roles/ps.test @@ -0,0 +1,4 @@ +# +# MDEV-5521 SET ROLE as prepared statement crashes the server +# +PREPARE stmt FROM 'SET ROLE NONE'; diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def index 5cc3916b614..de3091a56e5 100644 --- a/mysql-test/suite/rpl/disabled.def +++ b/mysql-test/suite/rpl/disabled.def @@ -10,7 +10,6 @@ # ############################################################################## -rpl_row_create_table : Bug#11759274 2010-02-27 andrei failed different way than earlier with bug#45576 rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table diff --git a/mysql-test/suite/rpl/r/create_or_replace_mix.result b/mysql-test/suite/rpl/r/create_or_replace_mix.result new file mode 100644 index 00000000000..99de4ba729d --- /dev/null +++ b/mysql-test/suite/rpl/r/create_or_replace_mix.result @@ -0,0 +1,162 @@ +include/rpl_init.inc [topology=1->2] +create table t2 (a int) engine=myisam; +insert into t2 values (0),(1),(2),(2); +create temporary table t3 (a_in_temporary int) engine=myisam; +# +# Check how create table and create or replace table are logged +# +create table t1 (to_be_deleted int); +CREATE TABLE t1 AS SELECT 1 AS f1; +CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1; +CREATE OR REPLACE table t1 like t2; +CREATE OR REPLACE table t1 like t3; +drop table t1; +binlog from server 1 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=myisam +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; insert into t2 values (0),(1),(2),(2) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create temporary table t3 (a_in_temporary int) engine=myisam +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 AS SELECT 1 AS f1 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t2 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t3 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +binlog from server 2 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t2 (a int) engine=myisam +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into t2 values (0),(1),(2),(2) +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create temporary table t3 (a_in_temporary int) engine=myisam +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1 (to_be_deleted int) +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 AS SELECT 1 AS f1 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t2 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t3 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +# +# Ensure that also failed create_or_replace are logged +# +create table t1 (a int); +create or replace table t1; +ERROR 42000: A table must have at least 1 column +drop table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' +create or replace table t1 (a int primary key) select a from t2; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +create table t1 (a int); +create or replace table t1 (a int primary key) select a from t2; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +binlog from server 1 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create or replace table t1 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # ROLLBACK +show tables; +Tables_in_test +t1 +t2 +drop table if exists t1,t2; +Warnings: +Note 1051 Unknown table 'test.t1' +# +# Ensure that CREATE are run as CREATE OR REPLACE on slave +# +create table t1 (server_2_to_be_delete int); +create table t1 (new_table int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `new_table` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +# +# Ensure that DROP TABLE is run as DROP IF NOT EXISTS +# +create table t1 (server_1_ver_1 int); +create table t4 (server_1_ver_2 int); +drop table t1; +drop table t1,t4; +create table t1 (server_2_ver_2 int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `server_2_ver_2` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +binlog from server 2 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1`,`t4` /* generated by server */ +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1 (server_2_ver_2 int) +drop table t1; +# +# Ensure that CREATE ... SELECT is recorded as one GTID on the slave +# +create table t1 (a int); +insert into t1 values (0),(1),(2); +create table t2 engine=myisam select * from t1; +create or replace table t2 engine=innodb select * from t1; +binlog from server 2 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1 (a int) +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM +slave-bin.000001 # Table_map # # table_id: # (test.t2) +slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB +slave-bin.000001 # Table_map # # table_id: # (test.t2) +slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +slave-bin.000001 # Xid # # COMMIT /* XID */ +drop table t1; +drop table t2,t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/create_or_replace_row.result b/mysql-test/suite/rpl/r/create_or_replace_row.result new file mode 100644 index 00000000000..7c3a27573e5 --- /dev/null +++ b/mysql-test/suite/rpl/r/create_or_replace_row.result @@ -0,0 +1,184 @@ +include/rpl_init.inc [topology=1->2] +create table t2 (a int) engine=myisam; +insert into t2 values (0),(1),(2),(2); +create temporary table t3 (a_in_temporary int) engine=myisam; +# +# Check how create table and create or replace table are logged +# +create table t1 (to_be_deleted int); +CREATE TABLE t1 AS SELECT 1 AS f1; +CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1; +CREATE OR REPLACE table t1 like t2; +CREATE OR REPLACE table t1 like t3; +drop table t1; +binlog from server 1 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=myisam +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE TABLE `t1` ( + `f1` int(1) NOT NULL DEFAULT '0' +) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `f1` int(1) NOT NULL DEFAULT '0' +) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t2 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `a_in_temporary` int(11) DEFAULT NULL +) +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +binlog from server 2 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t2 (a int) engine=myisam +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Table_map # # table_id: # (test.t2) +slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1 (to_be_deleted int) +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE TABLE `t1` ( + `f1` int(1) NOT NULL DEFAULT '0' +) +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `f1` int(1) NOT NULL DEFAULT '0' +) +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t2 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `a_in_temporary` int(11) DEFAULT NULL +) +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +# +# Ensure that also failed create_or_replace are logged +# +create table t1 (a int); +create or replace table t1; +ERROR 42000: A table must have at least 1 column +drop table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' +create or replace table t1 (a int primary key) select a from t2; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +create table t1 (a int); +create or replace table t1 (a int primary key) select a from t2; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +binlog from server 1 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create or replace table t1 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # ROLLBACK +show tables; +Tables_in_test +t1 +t2 +drop table if exists t1,t2; +Warnings: +Note 1051 Unknown table 'test.t1' +# +# Ensure that CREATE are run as CREATE OR REPLACE on slave +# +create table t1 (server_2_to_be_delete int); +create table t1 (new_table int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `new_table` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +# +# Ensure that DROP TABLE is run as DROP IF NOT EXISTS +# +create table t1 (server_1_ver_1 int); +create table t4 (server_1_ver_2 int); +drop table t1; +drop table t1,t4; +create table t1 (server_2_ver_2 int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `server_2_ver_2` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +binlog from server 2 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1`,`t4` /* generated by server */ +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1 (server_2_ver_2 int) +drop table t1; +# +# Ensure that CREATE ... SELECT is recorded as one GTID on the slave +# +create table t1 (a int); +insert into t1 values (0),(1),(2); +create table t2 engine=myisam select * from t1; +create or replace table t2 engine=innodb select * from t1; +binlog from server 2 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1 (a int) +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM +slave-bin.000001 # Table_map # # table_id: # (test.t2) +slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB +slave-bin.000001 # Table_map # # table_id: # (test.t2) +slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +slave-bin.000001 # Xid # # COMMIT /* XID */ +drop table t1; +drop table t2,t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/create_or_replace_statement.result b/mysql-test/suite/rpl/r/create_or_replace_statement.result new file mode 100644 index 00000000000..f5d77a0f697 --- /dev/null +++ b/mysql-test/suite/rpl/r/create_or_replace_statement.result @@ -0,0 +1,144 @@ +include/rpl_init.inc [topology=1->2] +create table t2 (a int) engine=myisam; +insert into t2 values (0),(1),(2),(2); +create temporary table t3 (a_in_temporary int) engine=myisam; +# +# Check how create table and create or replace table are logged +# +create table t1 (to_be_deleted int); +CREATE TABLE t1 AS SELECT 1 AS f1; +CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1; +CREATE OR REPLACE table t1 like t2; +CREATE OR REPLACE table t1 like t3; +drop table t1; +binlog from server 1 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=myisam +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; insert into t2 values (0),(1),(2),(2) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create temporary table t3 (a_in_temporary int) engine=myisam +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 AS SELECT 1 AS f1 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t2 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t3 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +binlog from server 2 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t2 (a int) engine=myisam +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into t2 values (0),(1),(2),(2) +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create temporary table t3 (a_in_temporary int) engine=myisam +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1 (to_be_deleted int) +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 AS SELECT 1 AS f1 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t2 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t3 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +# +# Ensure that also failed create_or_replace are logged +# +create table t1 (a int); +create or replace table t1; +ERROR 42000: A table must have at least 1 column +drop table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' +create or replace table t1 (a int primary key) select a from t2; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +create table t1 (a int); +create or replace table t1 (a int primary key) select a from t2; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +binlog from server 1 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create or replace table t1 +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; create or replace table t1 (a int primary key) select a from t2 +show tables; +Tables_in_test +t2 +drop table if exists t1,t2; +Warnings: +Note 1051 Unknown table 'test.t1' +# +# Ensure that CREATE are run as CREATE OR REPLACE on slave +# +create table t1 (server_2_to_be_delete int); +create table t1 (new_table int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `new_table` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +# +# Ensure that DROP TABLE is run as DROP IF NOT EXISTS +# +create table t1 (server_1_ver_1 int); +create table t4 (server_1_ver_2 int); +drop table t1; +drop table t1,t4; +create table t1 (server_2_ver_2 int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `server_2_ver_2` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +binlog from server 2 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1`,`t4` /* generated by server */ +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1 (server_2_ver_2 int) +drop table t1; +# +# Ensure that CREATE ... SELECT is recorded as one GTID on the slave +# +create table t1 (a int); +insert into t1 values (0),(1),(2); +create table t2 engine=myisam select * from t1; +create or replace table t2 engine=innodb select * from t1; +binlog from server 2 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1 (a int) +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into t1 values (0),(1),(2) +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t2 engine=myisam select * from t1 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create or replace table t2 engine=innodb select * from t1 +drop table t1; +drop table t2,t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result index 3b20282adff..257c16845dd 100644 --- a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result @@ -21,4 +21,7 @@ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp +DROP TEMPORARY TABLE tmp; +DROP TEMPORARY TABLE tmp1; +DROP TEMPORARY TABLE tmp2; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ddl.result b/mysql-test/suite/rpl/r/rpl_ddl.result index 246ae3790a6..0173bf1e28d 100644 --- a/mysql-test/suite/rpl/r/rpl_ddl.result +++ b/mysql-test/suite/rpl/r/rpl_ddl.result @@ -1617,6 +1617,7 @@ user use test; -------- switch to master ------- +DROP TEMPORARY TABLE mysqltest1.t22; DROP DATABASE mysqltest1; DROP DATABASE mysqltest3; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result index 404424f14a8..fd33221814d 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_basic.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_basic.result @@ -61,7 +61,13 @@ include/stop_slave.inc INSERT INTO t1 VALUES (5, "m1a"); INSERT INTO t2 VALUES (5, "i1a"); CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, +MASTER_USE_GTID=SLAVE_POS; +SET GLOBAL sql_slave_skip_counter=1; +ERROR HY000: When using GTID, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position. +CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, MASTER_USE_GTID=CURRENT_POS; +SET GLOBAL sql_slave_skip_counter=10; +ERROR HY000: When using GTID, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position. include/start_slave.inc SELECT * FROM t1 ORDER BY a; a b @@ -99,13 +105,13 @@ a b 5 j1a *** Now move C to D, after letting it fall a little behind *** include/stop_slave.inc -BEGIN; INSERT INTO t2 VALUES (6, "i6b"); INSERT INTO t2 VALUES (7, "i7b"); -COMMIT; +include/save_master_gtid.inc CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_4, MASTER_USE_GTID=CURRENT_POS; include/start_slave.inc +include/sync_with_master_gtid.inc SELECT * FROM t2 ORDER BY a; a b 1 i1 @@ -116,6 +122,7 @@ a b 6 i6b 7 i7b *** Now change everything back to what it was, to make rpl_end.inc happy +include/sync_with_master_gtid.inc include/stop_slave.inc CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_MYPORT; include/start_slave.inc @@ -123,10 +130,12 @@ include/wait_for_slave_to_start.inc include/stop_slave.inc CHANGE MASTER TO master_host = '127.0.0.1', master_port = SLAVE_MYPORT; include/start_slave.inc +include/sync_with_master_gtid.inc include/stop_slave.inc CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_3; include/start_slave.inc DROP TABLE t1,t2; +include/save_master_gtid.inc *** A few more checks for BINLOG_GTID_POS function *** SELECT BINLOG_GTID_POS(); ERROR 42000: Incorrect parameter count in the call to native function 'BINLOG_GTID_POS' @@ -163,6 +172,7 @@ NULL Warnings: Warning 1916 Got overflow when converting '18446744073709551616' to INT. Value truncated. *** Some tests of @@GLOBAL.gtid_binlog_state *** +include/sync_with_master_gtid.inc include/stop_slave.inc SET @old_state= @@GLOBAL.gtid_binlog_state; SET GLOBAL gtid_binlog_state = ''; @@ -196,10 +206,121 @@ SET GLOBAL gtid_binlog_state = @old_state; CREATE TABLE t1 (a INT PRIMARY KEY); SET gtid_seq_no=100; INSERT INTO t1 VALUES (1); +include/save_master_gtid.inc include/start_slave.inc +include/sync_with_master_gtid.inc SELECT * FROM t1; a 1 Gtid_IO_Pos = '0-1-100' +*** Test @@LAST_GTID and MASTER_GTID_WAIT() *** +DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +include/stop_slave.inc +SELECT @@last_gtid; +@@last_gtid + +SET gtid_seq_no=110; +SELECT @@last_gtid; +@@last_gtid + +BEGIN; +SELECT @@last_gtid; +@@last_gtid + +INSERT INTO t1 VALUES (2); +SELECT @@last_gtid; +@@last_gtid + +COMMIT; +SELECT @@last_gtid; +@@last_gtid +0-1-110 +SET @pos= '0-1-110'; +SELECT master_gtid_wait(NULL); +master_gtid_wait(NULL) +NULL +SELECT master_gtid_wait('', NULL); +master_gtid_wait('', NULL) +0 +SELECT master_gtid_wait(@pos, 0.5); +master_gtid_wait(@pos, 0.5) +-1 +SELECT * FROM t1 ORDER BY a; +a +SELECT master_gtid_wait(@pos); +include/start_slave.inc +master_gtid_wait(@pos) +0 +SELECT * FROM t1 ORDER BY a; +a +2 +include/stop_slave.inc +SET gtid_domain_id= 1; +INSERT INTO t1 VALUES (3); +SET @pos= '1-1-1,0-1-110'; +SELECT master_gtid_wait(@pos, 0); +master_gtid_wait(@pos, 0) +-1 +SELECT * FROM t1 WHERE a >= 3; +a +SELECT master_gtid_wait(@pos, -1); +include/start_slave.inc +master_gtid_wait(@pos, -1) +0 +SELECT * FROM t1 WHERE a >= 3; +a +3 +SELECT master_gtid_wait('1-1-1', 0); +master_gtid_wait('1-1-1', 0) +0 +SELECT master_gtid_wait('2-1-1,1-1-4,0-1-110'); +SELECT master_gtid_wait('0-1-1000', 0.5); +SELECT master_gtid_wait('0-1-2000'); +SELECT master_gtid_wait('2-1-10'); +SELECT master_gtid_wait('2-1-6', 1); +SELECT master_gtid_wait('2-1-5'); +SELECT master_gtid_wait('2-1-10'); +SELECT master_gtid_wait('2-1-5,1-1-4,0-1-110'); +SELECT master_gtid_wait('2-1-2'); +SELECT master_gtid_wait('1-1-1'); +master_gtid_wait('1-1-1') +0 +SELECT master_gtid_wait('0-1-109'); +SELECT master_gtid_wait('2-1-2', 0.5); +master_gtid_wait('2-1-2', 0.5) +-1 +KILL QUERY KILL_ID; +ERROR 70100: Query execution was interrupted +SET gtid_domain_id=2; +SET gtid_seq_no=2; +INSERT INTO t1 VALUES (4); +master_gtid_wait('2-1-2') +0 +KILL CONNECTION KILL_ID; +ERROR HY000: Lost connection to MySQL server during query +SET gtid_domain_id=1; +SET gtid_seq_no=4; +INSERT INTO t1 VALUES (5); +SET gtid_domain_id=2; +SET gtid_seq_no=5; +INSERT INTO t1 VALUES (6); +master_gtid_wait('2-1-5,1-1-4,0-1-110') +0 +master_gtid_wait('2-1-1,1-1-4,0-1-110') +0 +master_gtid_wait('0-1-1000', 0.5) +-1 +master_gtid_wait('2-1-6', 1) +-1 +master_gtid_wait('0-1-109') +0 +SET gtid_domain_id=2; +SET gtid_seq_no=10; +INSERT INTO t1 VALUES (7); +master_gtid_wait('2-1-10') +0 +master_gtid_wait('2-1-10') +0 DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_crash.result b/mysql-test/suite/rpl/r/rpl_gtid_crash.result index 209c83ebe17..fdbd1cc6898 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_crash.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_crash.result @@ -13,10 +13,14 @@ MASTER_USE_GTID=CURRENT_POS; INSERT INTO t1 VALUES (2,1); INSERT INTO t1 VALUES (3,1); include/start_slave.inc +include/save_master_gtid.inc SET SESSION debug_dbug="+d,crash_dispatch_command_before"; SELECT 1; Got one of the listed errors +include/sync_with_master_gtid.inc INSERT INTO t1 VALUES (1000, 3); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc DROP TABLE t1; *** Test crashing the master mysqld and check that binlog state is recovered. *** include/stop_slave.inc @@ -65,22 +69,32 @@ include/stop_slave.inc SET GLOBAL debug_dbug="+d,inject_crash_before_write_rpl_slave_state"; START SLAVE; INSERT INTO t1 VALUES (4); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc include/stop_slave.inc SET GLOBAL debug_dbug="+d,crash_commit_before"; START SLAVE; INSERT INTO t1 VALUES (5); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc include/stop_slave.inc SET GLOBAL debug_dbug="+d,crash_commit_after"; START SLAVE; INSERT INTO t1 VALUES (6); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc include/stop_slave.inc SET GLOBAL debug_dbug="+d,inject_crash_before_flush_rli"; START SLAVE; INSERT INTO t1 VALUES (7); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc include/stop_slave.inc SET GLOBAL debug_dbug="+d,inject_crash_after_flush_rli"; START SLAVE; INSERT INTO t1 VALUES (8); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a 1 diff --git a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result index 98a8c0b2d87..385a374888c 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result @@ -57,6 +57,7 @@ include/stop_slave.inc RESET MASTER; INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (4); +include/save_master_gtid.inc SET sql_log_bin = 0; INSERT INTO t1 VALUES (2); SET sql_log_bin = 1; @@ -84,6 +85,7 @@ Warning 1948 Specified value for @@gtid_slave_pos contains no value for replicat RESET MASTER; SET GLOBAL gtid_slave_pos = "0-1-1"; START SLAVE; +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a 1 @@ -93,6 +95,7 @@ a *** MDEV-4688: Empty value of @@GLOBAL.gtid_slave_pos *** include/stop_slave.inc INSERT INTO t1 VALUES (5); +include/save_master_gtid.inc SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,dummy_disable_default_dbug_output"; SET GLOBAL debug_dbug="+d,gtid_fail_after_record_gtid"; @@ -112,6 +115,7 @@ a 4 SET GLOBAL debug_dbug= @old_dbug; START SLAVE SQL_THREAD; +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a 1 @@ -136,6 +140,8 @@ SET GLOBAL gtid_slave_pos = "0-1-3"; START SLAVE; include/wait_for_slave_to_start.inc INSERT INTO t1 VALUES (6); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a 1 diff --git a/mysql-test/suite/rpl/r/rpl_gtid_ignored.result b/mysql-test/suite/rpl/r/rpl_gtid_ignored.result index 7d6e65bcb6f..80df3af9232 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_ignored.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_ignored.result @@ -66,5 +66,7 @@ a 9 DROP TABLE t1; SET GLOBAL gtid_strict_mode= @old_gtid_strict_mode; +SET debug_sync = "reset"; SET GLOBAL gtid_strict_mode= @old_gtid_strict_mode; +SET debug_sync = "reset"; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result b/mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result index 5a9acb157c6..9aee74d0b46 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result @@ -23,6 +23,7 @@ START SLAVE; include/wait_for_slave_to_start.inc INSERT INTO t1 VALUES (3, 2); INSERT INTO t1 VALUES (4, 2); +include/save_master_gtid.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # BEGIN GTID #-#-# @@ -31,6 +32,7 @@ slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4, 2) slave-bin.000001 # Query # # COMMIT +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a b 1 1 @@ -41,9 +43,11 @@ include/stop_slave.inc RESET SLAVE; INSERT INTO t1 VALUES (5, 1); INSERT INTO t1 VALUES (6, 1); +include/save_master_gtid.inc CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, master_use_gtid = current_pos; START SLAVE; +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a b 1 1 diff --git a/mysql-test/suite/rpl/r/rpl_gtid_startpos.result b/mysql-test/suite/rpl/r/rpl_gtid_startpos.result index 9be5903b2e9..9ff51ff6b8a 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_startpos.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_startpos.result @@ -43,10 +43,12 @@ SET sql_log_bin=1; *** Test that we give warning when explict @@gtid_slave_pos=xxx that conflicts with what is in our binary log *** include/stop_slave.inc INSERT INTO t1 VALUES(3); +include/save_master_gtid.inc SET GLOBAL gtid_slave_pos='0-1-3'; CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, MASTER_USE_GTID=CURRENT_POS; include/start_slave.inc +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER by a; a 1 @@ -54,6 +56,7 @@ a 3 include/stop_slave.inc INSERT INTO t1 VALUES (4); +include/save_master_gtid.inc INSERT INTO t1 VALUES (10); DELETE FROM t1 WHERE a=10; SET GLOBAL gtid_slave_pos='0-1-4'; @@ -62,6 +65,7 @@ Warning 1947 Specified GTID 0-1-4 conflicts with the binary log which contains a RESET MASTER; SET GLOBAL gtid_slave_pos='0-1-4'; START SLAVE; +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER by a; a 1 @@ -110,6 +114,8 @@ DROP TABLE t1; SET SQL_LOG_BIN=1; RESET SLAVE; SET GLOBAL gtid_slave_pos=""; +SET @save_slave_ddl_exec_mode=@@global.slave_ddl_exec_mode; +SET GLOBAL slave_ddl_exec_mode=STRICT; include/start_slave.inc SELECT * FROM t1 ORDER BY a; a @@ -125,6 +131,8 @@ STOP SLAVE IO_THREAD; CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS; include/start_slave.inc INSERT INTO t1 VALUES(3); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a 1 @@ -136,6 +144,8 @@ SET SQL_LOG_BIN=1; *** Test reconnecting slave with GTID after purge logs on master. *** FLUSH LOGS; INSERT INTO t1 VALUES (4); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc include/stop_slave.inc FLUSH LOGS; FLUSH LOGS; @@ -144,8 +154,10 @@ show binary logs; Log_name File_size master-bin.000004 # INSERT INTO t1 VALUES (5); +include/save_master_gtid.inc CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT; include/start_slave.inc +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a 1 @@ -160,7 +172,9 @@ SET GLOBAL gtid_slave_pos=""; RESET MASTER; TRUNCATE TABLE t1; INSERT INTO t1 VALUES (10); +include/save_master_gtid.inc include/start_slave.inc +include/sync_with_master_gtid.inc SELECT * FROM t1; a 10 @@ -225,4 +239,5 @@ a 1 2 DROP TABLE t1; +set @@global.slave_ddl_exec_mode=@save_slave_ddl_exec_mode; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result index 61c2fc0a0e9..ddcbaf8dffd 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result @@ -14,10 +14,12 @@ master-bin.000002 # INSERT INTO t1 VALUES (2); FLUSH LOGS; INSERT INTO t1 VALUES (3); +include/save_master_gtid.inc show binary logs; Log_name File_size master-bin.000002 # master-bin.000003 # +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a 1 @@ -43,6 +45,8 @@ master-bin.000003 # master-bin.000004 # master-bin.000005 # INSERT INTO t1 VALUES(5); +include/save_master_gtid.inc +include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; a 1 diff --git a/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result b/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result new file mode 100644 index 00000000000..573517d6af8 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result @@ -0,0 +1,14 @@ +include/master-slave.inc +[connection master] +SET @debug_saved= @@GLOBAL.DEBUG_DBUG; +CREATE TABLE t (i INT); +SET GLOBAL DEBUG_DBUG= "d,wait_after_binlog_EOF"; +INSERT INTO t VALUES (1); +INSERT INTO t VALUES (2); +FLUSH LOGS; +SET DEBUG_SYNC= 'now SIGNAL signal.rotate_finished'; +include/diff_tables.inc [master:t,slave:t] +SET @@GLOBAL.DEBUG_DBUG= @debug_saved; +SET DEBUG_SYNC= 'RESET'; +DROP TABLE t; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result index f6ce29101f8..9c19062255c 100644 --- a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result +++ b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result @@ -62,6 +62,32 @@ slave-relay-bin.000007 # Query # # # Dummy ev slave-relay-bin.000007 # Table_map # # table_id: # (test.t1) slave-relay-bin.000007 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000007 # Query # # COMMIT +*** MDEV-5754: MySQL 5.5 slaves cannot replicate from MariaDB 10.0 *** +CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +INSERT INTO t2 VALUES (1); +SET debug_sync='now WAIT_FOR master_queued1'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +INSERT INTO t2 VALUES (2); +SET debug_sync='now WAIT_FOR master_queued2'; +SET debug_sync='now SIGNAL master_cont1'; +SET debug_sync='RESET'; +SET debug_sync='RESET'; +SET debug_sync='RESET'; +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=# +master-bin.000003 # Table_map # # table_id: # (test.t2) +master-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000003 # Xid # # COMMIT /* XID */ +master-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=# +master-bin.000003 # Table_map # # table_id: # (test.t2) +master-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000003 # Xid # # COMMIT /* XID */ +SELECT * FROM t2 ORDER BY a; +a +1 +2 # Test that slave which cannot tolerate holes in binlog stream but # knows the event does not get dummy event include/stop_slave.inc @@ -95,5 +121,5 @@ select @@global.replicate_annotate_row_events; set @@global.debug_dbug= @old_slave_dbug; Clean up. set @@global.binlog_checksum = @old_master_binlog_checksum; -DROP TABLE t1; +DROP TABLE t1, t2; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mdev359.result b/mysql-test/suite/rpl/r/rpl_mdev359.result index c0c7bac1175..337a35a7a92 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev359.result +++ b/mysql-test/suite/rpl/r/rpl_mdev359.result @@ -8,4 +8,5 @@ SET DEBUG_SYNC= "now WAIT_FOR m1_ready"; SET GLOBAL rpl_semi_sync_master_enabled = OFF; SET DEBUG_SYNC= "now SIGNAL m1_cont"; DROP TABLE t1; +SET DEBUG_SYNC= "RESET"; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result index 6cd6aa09ede..bc245a073cd 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev382.result +++ b/mysql-test/suite/rpl/r/rpl_mdev382.result @@ -315,7 +315,7 @@ CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb; CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL, FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb; TRUNCATE `t``1`; -ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; select 'oops!'`.`t``2`, CONSTRAINT `t``2_ibfk_1` FOREIGN KEY (`c```) REFERENCES `db1``; select 'oops!'`.`t``1` (`a```)) +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; select 'oops!'`.`t``2`, CONSTRAINT `fk` FOREIGN KEY (`c```) REFERENCES `db1``; select 'oops!'`.`t``1` (`a```)) DROP TABLE `t``2`; DROP TABLE `t``1`; *** Test correct quoting of DELETE FROM statement binlogged for HEAP table that is emptied due to server restart diff --git a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result index f24f34fa0bf..5a258647b07 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result @@ -43,4 +43,5 @@ t5 CREATE TABLE `t5` ( `created` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2,t3,t5; +drop temporary table t4; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result index 6c419031f1f..da807748cee 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result @@ -2126,8 +2126,14 @@ DROP TABLE IF EXISTS tt_error_1; DROP TABLE IF EXISTS nt_error_1; DROP TABLE IF EXISTS tt_error_2; DROP TABLE IF EXISTS nt_error_2; +DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1; +DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1; DROP TABLE IF EXISTS nt_2; +DROP TEMPORARY TABLE IF EXISTS tt_tmp_2; +DROP TEMPORARY TABLE IF EXISTS nt_tmp_2; DROP TABLE IF EXISTS nt_1; +DROP TEMPORARY TABLE IF EXISTS tt_tmp_1; +DROP TEMPORARY TABLE IF EXISTS nt_tmp_1; DROP TABLE IF EXISTS tt_2; DROP TABLE IF EXISTS tt_1; SET @commands= ''; diff --git a/mysql-test/suite/rpl/r/rpl_old_master.result b/mysql-test/suite/rpl/r/rpl_old_master.result new file mode 100644 index 00000000000..df5bbe34256 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_old_master.result @@ -0,0 +1,27 @@ +include/master-slave.inc +[connection master] +include/stop_slave.inc +include/rpl_stop_server.inc [server_number=1] +include/rpl_start_server.inc [server_number=1] +SET @old_parallel= @@GLOBAL.slave_parallel_threads; +SET GLOBAL slave_parallel_threads=10; +CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4; +include/start_slave.inc +CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1); +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 4 +4 8 +5 16 +SELECT * FROM t2; +a +1 +include/stop_slave.inc +SET GLOBAL slave_parallel_threads=@old_parallel; +DROP TABLE t1; +include/start_slave.inc +DROP TABLE t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index b7fca7ea442..fc4c3a3787e 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -7,6 +7,7 @@ SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; include/start_slave.inc *** Test long-running query in domain 1 can run in parallel with short queries in domain 0 *** +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM; CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); @@ -114,6 +115,7 @@ SET GLOBAL slave_parallel_threads=10; SET debug_sync='RESET'; include/start_slave.inc *** Test that group-committed transactions on the master can replicate in parallel on the slave. *** +SET debug_sync='RESET'; FLUSH LOGS; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7); @@ -140,6 +142,7 @@ INSERT INTO t3 VALUES (6, foo(16, '')); SET debug_sync='now WAIT_FOR master_queued3'; SET debug_sync='now SIGNAL master_cont1'; +SET debug_sync='RESET'; SELECT * FROM t3 ORDER BY a; a b 1 1 @@ -212,6 +215,9 @@ slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16, slave-bin.000003 # Xid # # COMMIT /* XID */ *** Test STOP SLAVE in parallel mode *** include/stop_slave.inc +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; SET binlog_direct_non_transactional_updates=0; SET sql_log_bin=0; CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction"); @@ -226,10 +232,15 @@ INSERT INTO t3 VALUES(21, 21); INSERT INTO t3 VALUES(22, 22); SET binlog_format=@old_format; BEGIN; -INSERT INTO t2 VALUES (21); +INSERT INTO t2 VALUES (21); START SLAVE; +SET @old_dbug= @@GLOBAL.debug_dbug; +SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger"; STOP SLAVE; +SET debug_sync='now WAIT_FOR wait_for_done_waiting'; ROLLBACK; +SET GLOBAL debug_dbug=@old_dbug; +SET debug_sync='RESET'; include/wait_for_slave_to_stop.inc SELECT * FROM t1 WHERE a >= 20 ORDER BY a; a @@ -259,9 +270,467 @@ SET GLOBAL binlog_format=@old_format; SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; include/start_slave.inc +*** Test killing slave threads at various wait points *** +*** 1. Test killing transaction waiting in commit for previous transaction to commit *** +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +INSERT INTO t3 VALUES (31, foo(31, +'commit_before_prepare_ordered WAIT_FOR t2_waiting', +'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont')); +SET debug_sync='now WAIT_FOR master_queued1'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +SET binlog_format=statement; +BEGIN; +INSERT INTO t3 VALUES (32, foo(32, +'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont', +'')); +INSERT INTO t3 VALUES (33, foo(33, +'group_commit_waiting_for_prior SIGNAL t2_waiting', +'group_commit_waiting_for_prior_killed SIGNAL t2_killed')); +COMMIT; +SET debug_sync='now WAIT_FOR master_queued2'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +SET binlog_format=statement; +INSERT INTO t3 VALUES (34, foo(34, +'', +'')); +SET debug_sync='now WAIT_FOR master_queued3'; +SET debug_sync='now SIGNAL master_cont1'; +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; +a b +31 31 +32 32 +33 33 +34 34 +SET debug_sync='RESET'; +SET sql_log_bin=0; +CALL mtr.add_suppression("Query execution was interrupted"); +CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends"); +CALL mtr.add_suppression("Slave: Connection was killed"); +SET sql_log_bin=1; +SET debug_sync='now WAIT_FOR t2_query'; +SET debug_sync='now SIGNAL t2_cont'; +SET debug_sync='now WAIT_FOR t1_ready'; +KILL THD_ID; +SET debug_sync='now WAIT_FOR t2_killed'; +SET debug_sync='now SIGNAL t1_cont'; +include/wait_for_slave_sql_error.inc [errno=1317,1964] +STOP SLAVE IO_THREAD; +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; +a b +31 31 +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +RETURN x; +END +|| +SET sql_log_bin=1; +INSERT INTO t3 VALUES (39,0); +include/start_slave.inc +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; +a b +31 31 +32 32 +33 33 +34 34 +39 0 +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +IF d1 != '' THEN +SET debug_sync = d1; +END IF; +IF d2 != '' THEN +SET debug_sync = d2; +END IF; +RETURN x; +END +|| +SET sql_log_bin=1; +include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +include/start_slave.inc +*** 2. Same as (1), but without restarting IO thread after kill of SQL threads *** +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +INSERT INTO t3 VALUES (41, foo(41, +'commit_before_prepare_ordered WAIT_FOR t2_waiting', +'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont')); +SET debug_sync='now WAIT_FOR master_queued1'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +SET binlog_format=statement; +BEGIN; +INSERT INTO t3 VALUES (42, foo(42, +'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont', +'')); +INSERT INTO t3 VALUES (43, foo(43, +'group_commit_waiting_for_prior SIGNAL t2_waiting', +'group_commit_waiting_for_prior_killed SIGNAL t2_killed')); +COMMIT; +SET debug_sync='now WAIT_FOR master_queued2'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +SET binlog_format=statement; +INSERT INTO t3 VALUES (44, foo(44, +'', +'')); +SET debug_sync='now WAIT_FOR master_queued3'; +SET debug_sync='now SIGNAL master_cont1'; +SELECT * FROM t3 WHERE a >= 40 ORDER BY a; +a b +41 41 +42 42 +43 43 +44 44 +SET debug_sync='RESET'; +SET debug_sync='now WAIT_FOR t2_query'; +SET debug_sync='now SIGNAL t2_cont'; +SET debug_sync='now WAIT_FOR t1_ready'; +KILL THD_ID; +SET debug_sync='now WAIT_FOR t2_killed'; +SET debug_sync='now SIGNAL t1_cont'; +include/wait_for_slave_sql_error.inc [errno=1317,1964] +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +RETURN x; +END +|| +SET sql_log_bin=1; +INSERT INTO t3 VALUES (49,0); +START SLAVE SQL_THREAD; +SELECT * FROM t3 WHERE a >= 40 ORDER BY a; +a b +41 41 +42 42 +43 43 +44 44 +49 0 +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +IF d1 != '' THEN +SET debug_sync = d1; +END IF; +IF d2 != '' THEN +SET debug_sync = d2; +END IF; +RETURN x; +END +|| +SET sql_log_bin=1; +include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +include/start_slave.inc +*** 3. Same as (2), but not using gtid mode *** +include/stop_slave.inc +CHANGE MASTER TO master_use_gtid=no; +include/start_slave.inc +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +INSERT INTO t3 VALUES (51, foo(51, +'commit_before_prepare_ordered WAIT_FOR t2_waiting', +'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont')); +SET debug_sync='now WAIT_FOR master_queued1'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +SET binlog_format=statement; +BEGIN; +INSERT INTO t3 VALUES (52, foo(52, +'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont', +'')); +INSERT INTO t3 VALUES (53, foo(53, +'group_commit_waiting_for_prior SIGNAL t2_waiting', +'group_commit_waiting_for_prior_killed SIGNAL t2_killed')); +COMMIT; +SET debug_sync='now WAIT_FOR master_queued2'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +SET binlog_format=statement; +INSERT INTO t3 VALUES (54, foo(54, +'', +'')); +SET debug_sync='now WAIT_FOR master_queued3'; +SET debug_sync='now SIGNAL master_cont1'; +SELECT * FROM t3 WHERE a >= 50 ORDER BY a; +a b +51 51 +52 52 +53 53 +54 54 +SET debug_sync='RESET'; +SET debug_sync='now WAIT_FOR t2_query'; +SET debug_sync='now SIGNAL t2_cont'; +SET debug_sync='now WAIT_FOR t1_ready'; +KILL THD_ID; +SET debug_sync='now WAIT_FOR t2_killed'; +SET debug_sync='now SIGNAL t1_cont'; +include/wait_for_slave_sql_error.inc [errno=1317,1964] +SELECT * FROM t3 WHERE a >= 50 ORDER BY a; +a b +51 51 +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +RETURN x; +END +|| +SET sql_log_bin=1; +INSERT INTO t3 VALUES (59,0); +START SLAVE SQL_THREAD; +SELECT * FROM t3 WHERE a >= 50 ORDER BY a; +a b +51 51 +52 52 +53 53 +54 54 +59 0 +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +IF d1 != '' THEN +SET debug_sync = d1; +END IF; +IF d2 != '' THEN +SET debug_sync = d2; +END IF; +RETURN x; +END +|| +SET sql_log_bin=1; +include/stop_slave.inc +CHANGE MASTER TO master_use_gtid=slave_pos; +include/start_slave.inc +include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=4; +include/start_slave.inc +*** 4. Test killing thread that is waiting to start transaction until previous transaction commits *** +SET binlog_format=statement; +SET gtid_domain_id=2; +BEGIN; +INSERT INTO t3 VALUES (70, foo(70, +'rpl_parallel_start_waiting_for_prior SIGNAL t4_waiting', '')); +INSERT INTO t3 VALUES (60, foo(60, +'ha_write_row_end SIGNAL d2_query WAIT_FOR d2_cont2', +'rpl_parallel_end_of_group SIGNAL d2_done WAIT_FOR d2_cont')); +COMMIT; +SET gtid_domain_id=0; +SET debug_sync='now WAIT_FOR d2_query'; +SET gtid_domain_id=1; +BEGIN; +INSERT INTO t3 VALUES (61, foo(61, +'rpl_parallel_start_waiting_for_prior SIGNAL t3_waiting', +'rpl_parallel_start_waiting_for_prior_killed SIGNAL t3_killed')); +INSERT INTO t3 VALUES (62, foo(62, +'ha_write_row_end SIGNAL d1_query WAIT_FOR d1_cont2', +'rpl_parallel_end_of_group SIGNAL d1_done WAIT_FOR d1_cont')); +COMMIT; +SET gtid_domain_id=0; +SET debug_sync='now WAIT_FOR d1_query'; +SET gtid_domain_id=0; +INSERT INTO t3 VALUES (63, foo(63, +'ha_write_row_end SIGNAL d0_query WAIT_FOR d0_cont2', +'rpl_parallel_end_of_group SIGNAL d0_done WAIT_FOR d0_cont')); +SET debug_sync='now WAIT_FOR d0_query'; +SET gtid_domain_id=3; +BEGIN; +INSERT INTO t3 VALUES (68, foo(68, +'rpl_parallel_start_waiting_for_prior SIGNAL t2_waiting', '')); +INSERT INTO t3 VALUES (69, foo(69, +'ha_write_row_end SIGNAL d3_query WAIT_FOR d3_cont2', +'rpl_parallel_end_of_group SIGNAL d3_done WAIT_FOR d3_cont')); +COMMIT; +SET gtid_domain_id=0; +SET debug_sync='now WAIT_FOR d3_query'; +SET debug_sync='now SIGNAL d2_cont2'; +SET debug_sync='now WAIT_FOR d2_done'; +SET debug_sync='now SIGNAL d1_cont2'; +SET debug_sync='now WAIT_FOR d1_done'; +SET debug_sync='now SIGNAL d0_cont2'; +SET debug_sync='now WAIT_FOR d0_done'; +SET debug_sync='now SIGNAL d3_cont2'; +SET debug_sync='now WAIT_FOR d3_done'; +SET binlog_format=statement; +INSERT INTO t3 VALUES (64, foo(64, +'rpl_parallel_before_mark_start_commit SIGNAL t1_waiting WAIT_FOR t1_cont', '')); +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2 WAIT_FOR master_cont2'; +INSERT INTO t3 VALUES (65, foo(65, '', '')); +SET debug_sync='now WAIT_FOR master_queued2'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +INSERT INTO t3 VALUES (66, foo(66, '', '')); +SET debug_sync='now WAIT_FOR master_queued3'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued4'; +INSERT INTO t3 VALUES (67, foo(67, '', '')); +SET debug_sync='now WAIT_FOR master_queued4'; +SET debug_sync='now SIGNAL master_cont2'; +SELECT * FROM t3 WHERE a >= 60 ORDER BY a; +a b +60 60 +61 61 +62 62 +63 63 +64 64 +65 65 +66 66 +67 67 +68 68 +69 69 +70 70 +SET debug_sync='RESET'; +SET debug_sync='now SIGNAL d0_cont'; +SET debug_sync='now WAIT_FOR t1_waiting'; +SET debug_sync='now SIGNAL d3_cont'; +SET debug_sync='now WAIT_FOR t2_waiting'; +SET debug_sync='now SIGNAL d1_cont'; +SET debug_sync='now WAIT_FOR t3_waiting'; +SET debug_sync='now SIGNAL d2_cont'; +SET debug_sync='now WAIT_FOR t4_waiting'; +KILL THD_ID; +SET debug_sync='now WAIT_FOR t3_killed'; +SET debug_sync='now SIGNAL t1_cont'; +include/wait_for_slave_sql_error.inc [errno=1317,1927,1964] +STOP SLAVE IO_THREAD; +SELECT * FROM t3 WHERE a >= 60 AND a != 65 ORDER BY a; +a b +60 60 +61 61 +62 62 +63 63 +64 64 +68 68 +69 69 +70 70 +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +RETURN x; +END +|| +SET sql_log_bin=1; +UPDATE t3 SET b=b+1 WHERE a=60; +include/start_slave.inc +SELECT * FROM t3 WHERE a >= 60 ORDER BY a; +a b +60 61 +61 61 +62 62 +63 63 +64 64 +65 65 +66 66 +67 67 +68 68 +69 69 +70 70 +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +IF d1 != '' THEN +SET debug_sync = d1; +END IF; +IF d2 != '' THEN +SET debug_sync = d2; +END IF; +RETURN x; +END +|| +SET sql_log_bin=1; +include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +include/start_slave.inc +*** 5. Test killing thread that is waiting for queue of max length to shorten *** +SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued; +SET GLOBAL slave_parallel_max_queued=9000; +SET binlog_format=statement; +INSERT INTO t3 VALUES (80, foo(0, +'ha_write_row_end SIGNAL query_waiting WAIT_FOR query_cont', '')); +SET debug_sync='now WAIT_FOR query_waiting'; +SET @old_dbug= @@GLOBAL.debug_dbug; +SET GLOBAL debug_dbug="+d,rpl_parallel_wait_queue_max"; +SELECT * FROM t3 WHERE a >= 80 ORDER BY a; +a b +80 0 +81 10000 +SET debug_sync='now WAIT_FOR wait_queue_ready'; +KILL THD_ID; +SET debug_sync='now WAIT_FOR wait_queue_killed'; +SET debug_sync='now SIGNAL query_cont'; +include/wait_for_slave_sql_error.inc [errno=1317,1927,1964] +STOP SLAVE IO_THREAD; +SET GLOBAL debug_dbug=@old_dbug; +SET GLOBAL slave_parallel_max_queued= @old_max_queued; +INSERT INTO t3 VALUES (82,0); +SET debug_sync='RESET'; +include/start_slave.inc +SELECT * FROM t3 WHERE a >= 80 ORDER BY a; +a b +80 0 +81 10000 +82 0 +include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +include/start_slave.inc +*** MDEV-5788 Incorrect free of rgi->deferred_events in parallel replication *** +include/stop_slave.inc +SET GLOBAL replicate_ignore_table="test.t3"; +SET GLOBAL slave_parallel_threads=2; +include/start_slave.inc +INSERT INTO t3 VALUES (100, rand()); +INSERT INTO t3 VALUES (101, rand()); +INSERT INTO t3 VALUES (102, rand()); +INSERT INTO t3 VALUES (103, rand()); +INSERT INTO t3 VALUES (104, rand()); +INSERT INTO t3 VALUES (105, rand()); +include/stop_slave.inc +SET GLOBAL replicate_ignore_table=""; +include/start_slave.inc +INSERT INTO t3 VALUES (106, rand()); +INSERT INTO t3 VALUES (107, rand()); +SELECT * FROM t3 WHERE a >= 100 ORDER BY a; +a b +106 # +107 # include/stop_slave.inc SET GLOBAL slave_parallel_threads=@old_parallel_threads; include/start_slave.inc +SET DEBUG_SYNC= 'RESET'; DROP function foo; DROP TABLE t1,t2,t3; +SET DEBUG_SYNC= 'RESET'; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_parallel2.result b/mysql-test/suite/rpl/r/rpl_parallel2.result new file mode 100644 index 00000000000..49be484f419 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_parallel2.result @@ -0,0 +1,18 @@ +include/rpl_init.inc [topology=1->2] +*** MDEV-5509: Incorrect value for Seconds_Behind_Master if parallel replication *** +SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; +include/stop_slave.inc +SET GLOBAL slave_parallel_threads=5; +include/start_slave.inc +CREATE TABLE t1 (a INT PRIMARY KEY, b INT); +CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave"); +INSERT INTO t1 VALUES (1,sleep(2)); +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. +Seconds_Behind_Master should be zero here because the slave is fully caught up and idle. +Seconds_Behind_Master = '0' +include/stop_slave.inc +SET GLOBAL slave_parallel_threads=@old_parallel_threads; +include/start_slave.inc +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_parallel_no_log_slave_updates.result b/mysql-test/suite/rpl/r/rpl_parallel_no_log_slave_updates.result new file mode 100644 index 00000000000..0f0b6c9f02a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_parallel_no_log_slave_updates.result @@ -0,0 +1,124 @@ +include/rpl_init.inc [topology=1->2] +*** Test killing transaction waiting in commit for previous transaction to commit, when not using 2-phase commit *** +SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; +include/stop_slave.inc +SET GLOBAL slave_parallel_threads=10; +CHANGE MASTER TO master_use_gtid=slave_pos; +include/start_slave.inc +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; +SET sql_log_bin=0; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +RETURN x; +END +|| +SET sql_log_bin=1; +CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; +SET sql_log_bin=0; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +IF d1 != '' THEN +SET debug_sync = d1; +END IF; +IF d2 != '' THEN +SET debug_sync = d2; +END IF; +RETURN x; +END +|| +SET sql_log_bin=1; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +INSERT INTO t3 VALUES (31, foo(31, +'ha_commit_one_phase WAIT_FOR t2_waiting', +'commit_one_phase_2 SIGNAL t1_ready WAIT_FOR t1_cont')); +SET debug_sync='now WAIT_FOR master_queued1'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +SET binlog_format=statement; +BEGIN; +INSERT INTO t3 VALUES (32, foo(32, +'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont', +'')); +INSERT INTO t3 VALUES (33, foo(33, +'wait_for_prior_commit_waiting SIGNAL t2_waiting', +'wait_for_prior_commit_killed SIGNAL t2_killed')); +COMMIT; +SET debug_sync='now WAIT_FOR master_queued2'; +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +SET binlog_format=statement; +INSERT INTO t3 VALUES (34, foo(34, +'', +'')); +SET debug_sync='now WAIT_FOR master_queued3'; +SET debug_sync='now SIGNAL master_cont1'; +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; +a b +31 31 +32 32 +33 33 +34 34 +SET sql_log_bin=0; +CALL mtr.add_suppression("Query execution was interrupted"); +CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends"); +CALL mtr.add_suppression("Slave: Connection was killed"); +SET sql_log_bin=1; +SET debug_sync='now WAIT_FOR t2_query'; +SET debug_sync='now SIGNAL t2_cont'; +SET debug_sync='now WAIT_FOR t1_ready'; +KILL THD_ID; +SET debug_sync='now WAIT_FOR t2_killed'; +SET debug_sync='now SIGNAL t1_cont'; +include/wait_for_slave_sql_error.inc [errno=1317,1927,1963] +STOP SLAVE IO_THREAD; +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; +a b +31 31 +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +RETURN x; +END +|| +SET sql_log_bin=1; +INSERT INTO t3 VALUES (39,0); +include/start_slave.inc +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; +a b +31 31 +32 32 +33 33 +34 34 +39 0 +SET sql_log_bin=0; +DROP FUNCTION foo; +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) +RETURNS INT DETERMINISTIC +BEGIN +IF d1 != '' THEN +SET debug_sync = d1; +END IF; +IF d2 != '' THEN +SET debug_sync = d2; +END IF; +RETURN x; +END +|| +SET sql_log_bin=1; +include/stop_slave.inc +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +include/start_slave.inc +include/stop_slave.inc +SET GLOBAL slave_parallel_threads=@old_parallel_threads; +SET debug_sync = 'reset'; +include/start_slave.inc +DROP function foo; +DROP TABLE t3; +SET debug_sync = 'reset'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result index ecf6f5109f7..f2dbfa3cba4 100644 --- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -98,6 +98,7 @@ count(*) 103 unlock tables; drop table if exists t1,t2,t3,t4; +drop temporary table temp_table; End of 4.1 tests show binlog events in 'non existing_binlog_file'; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result index 393e2fdb851..9c04f580c07 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -1,23 +1,24 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc -CREATE TABLE t1 (a INT, b INT); +include/master-slave.inc +[connection master] +include/wait_for_slave_to_stop.inc +include/wait_for_slave_to_start.inc +include/rpl_reset.inc +CREATE TABLE t1 (a INT); +CREATE OR REPLACE TABLE t1 (a INT, b INT); CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE t1 (a INT, b INT) +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8 **** On Master **** SHOW CREATE TABLE t1; @@ -111,15 +112,10 @@ NULL 3 6 NULL 4 2 NULL 5 10 NULL 6 12 -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; ERROR 23000: Duplicate entry '2' for key 'b' -show binlog events from <binlog_start>; -Log_name Pos Event_type Server_id End_log_pos Info +include/show_binlog_events.inc CREATE TABLE t7 (a INT, b INT UNIQUE); INSERT INTO t7 SELECT a,b FROM tt3; ERROR 23000: Duplicate entry '2' for key 'b' @@ -128,23 +124,20 @@ a b 1 2 2 4 3 6 -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t7) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT SELECT * FROM t7 ORDER BY a,b; a b 1 2 2 4 3 6 -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc CREATE TEMPORARY TABLE tt4 (a INT, b INT); INSERT INTO tt4 VALUES (4,8), (5,10), (6,12); BEGIN; @@ -152,11 +145,11 @@ INSERT INTO t7 SELECT a,b FROM tt4; ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t7) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT SELECT * FROM t7 ORDER BY a,b; a b @@ -174,11 +167,7 @@ a b 4 8 5 10 6 12 -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc CREATE TABLE t8 LIKE t4; CREATE TABLE t9 LIKE tt4; CREATE TEMPORARY TABLE tt5 LIKE t4; @@ -197,9 +186,11 @@ Create Table CREATE TABLE `t9` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t8 LIKE t4 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `t9` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL @@ -219,15 +210,12 @@ Create Table CREATE TABLE `t9` ( ) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; STOP SLAVE; +include/wait_for_slave_to_stop.inc SET GLOBAL storage_engine=@storage_engine; START SLAVE; +include/wait_for_slave_to_start.inc ================ BUG#22864 ================ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc SET AUTOCOMMIT=0; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); @@ -270,37 +258,38 @@ a 1 2 3 -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `t3` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB master-bin.000001 # Table_map # # table_id: # (test.t3) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `t4` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB master-bin.000001 # Table_map # # table_id: # (test.t4) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT SHOW TABLES; Tables_in_test @@ -333,10 +322,7 @@ a 3 DROP TABLE IF EXISTS t1,t2,t3,t4; SET AUTOCOMMIT=1; -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; +include/rpl_reset.inc CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); CREATE TABLE t2 (a INT) ENGINE=INNODB; @@ -355,19 +341,21 @@ a 4 6 9 -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ SELECT * FROM t2 ORDER BY a; a @@ -377,11 +365,7 @@ a 6 9 TRUNCATE TABLE t2; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc BEGIN; INSERT INTO t2 SELECT a*a FROM t1; CREATE TEMPORARY TABLE tt2 @@ -394,8 +378,14 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back SELECT * FROM t2 ORDER BY a; a -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # ROLLBACK SELECT * FROM t2 ORDER BY a; a DROP TABLE t1,t2; @@ -412,35 +402,28 @@ a 1 2 DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc DROP DATABASE IF EXISTS mysqltest1; CREATE DATABASE mysqltest1; CREATE TABLE mysqltest1.without_select (f1 BIGINT); CREATE TABLE mysqltest1.with_select AS SELECT 1 AS f1; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # DROP DATABASE IF EXISTS mysqltest1 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # CREATE DATABASE mysqltest1 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE mysqltest1.without_select (f1 BIGINT) -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `mysqltest1`.`with_select` ( `f1` int(1) NOT NULL DEFAULT '0' ) master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT DROP DATABASE mysqltest1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TEMPORARY TABLE t7(c1 INT); CREATE TABLE t5(c1 INT); CREATE TABLE t4(c1 INT); @@ -456,9 +439,9 @@ CREATE TABLE IF NOT EXISTS bug48506_t3 LIKE t7; CREATE TABLE IF NOT EXISTS bug48506_t4 LIKE t7; SHOW TABLES LIKE 'bug48506%'; Tables_in_test (bug48506%) -bug48506_t4 DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3; DROP TEMPORARY TABLES t7; DROP TABLES t4, t5; DROP TABLES IF EXISTS bug48506_t4; +include/rpl_end.inc end of the tests diff --git a/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result index 9c8088b4657..280955c66ef 100644 --- a/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result @@ -2211,8 +2211,14 @@ DROP TABLE IF EXISTS tt_error_1; DROP TABLE IF EXISTS nt_error_1; DROP TABLE IF EXISTS tt_error_2; DROP TABLE IF EXISTS nt_error_2; +DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1; +DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1; DROP TABLE IF EXISTS nt_2; +DROP TEMPORARY TABLE IF EXISTS tt_tmp_2; +DROP TEMPORARY TABLE IF EXISTS nt_tmp_2; DROP TABLE IF EXISTS nt_1; +DROP TEMPORARY TABLE IF EXISTS tt_tmp_1; +DROP TEMPORARY TABLE IF EXISTS nt_tmp_1; DROP TABLE IF EXISTS tt_2; DROP TABLE IF EXISTS tt_1; SET @commands= ''; diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index d3d5b42c80a..83ec26486e0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -6,6 +6,8 @@ reset master; reset slave; start slave; include/wait_for_slave_to_start.inc +set @save_slave_ddl_exec_mode=@@global.slave_ddl_exec_mode; +set @@global.slave_ddl_exec_mode=STRICT; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; insert into t1 values (NULL); drop table t1; @@ -287,4 +289,5 @@ a b 5 1 6 1 drop table t1; +set @@global.slave_ddl_exec_mode=@save_slave_ddl_exec_mode; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result index 5dd5ff1b4ff..3b9733a18e8 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -6,6 +6,8 @@ reset master; reset slave; start slave; include/wait_for_slave_to_start.inc +set @save_slave_ddl_exec_mode=@@global.slave_ddl_exec_mode; +set @@global.slave_ddl_exec_mode=STRICT; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB; insert into t1 values (NULL); drop table t1; @@ -287,4 +289,5 @@ a b 5 1 6 1 drop table t1; +set @@global.slave_ddl_exec_mode=@save_slave_ddl_exec_mode; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result index 41fe0b1a9f3..1cf70ba7e67 100644 --- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result @@ -23,6 +23,7 @@ include/start_slave.inc show status like 'slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 0 +drop temporary table if exists t1; include/stop_slave.inc reset slave; include/check_slave_no_error.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result index 9872316dc97..a132b50a471 100644 --- a/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result +++ b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result @@ -172,7 +172,7 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002 slave-bin.000002 # Gtid # # GTID #-#-# -slave-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +slave-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ ******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 2 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info @@ -181,7 +181,7 @@ slave-bin.000002 # Gtid # # GTID #-#-# ******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 2,3 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +slave-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ ******** [slave] SHOW BINLOG EVENTS ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info diff --git a/mysql-test/suite/rpl/r/rpl_slave_status.result b/mysql-test/suite/rpl/r/rpl_slave_status.result index be978362c81..6257c8fb5b8 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_status.result +++ b/mysql-test/suite/rpl/r/rpl_slave_status.result @@ -5,6 +5,18 @@ include/master-slave.inc GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl'; [on slave] include/stop_slave.inc +set @save_relay_log_purge=@@global.relay_log_purge; +set @@global.relay_log_purge=0; +CHANGE MASTER TO master_user='rpl', master_password='rpl'; +select @@global.relay_log_purge; +@@global.relay_log_purge +0 +set @@global.relay_log_purge=1; +CHANGE MASTER TO master_user='rpl', master_password='rpl'; +select @@global.relay_log_purge; +@@global.relay_log_purge +1 +set @@global.relay_log_purge=@save_relay_log_purge; CHANGE MASTER TO master_user='rpl', master_password='rpl'; include/start_slave.inc ==== Do replication as new user ==== diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result index 80a3240021a..2401fda52f9 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_000001.result +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -48,6 +48,7 @@ select (@id := id) - id from t2; 0 kill @id; drop table t2; +drop temporary table t3; Got one of the listed errors include/wait_for_slave_sql_error_and_skip.inc [errno=1927] select count(*) from t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result index 7d3984bb383..9dc86c0bfa7 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result +++ b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result @@ -2220,8 +2220,14 @@ DROP TABLE IF EXISTS tt_error_1; DROP TABLE IF EXISTS nt_error_1; DROP TABLE IF EXISTS tt_error_2; DROP TABLE IF EXISTS nt_error_2; +DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1; +DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1; DROP TABLE IF EXISTS nt_2; +DROP TEMPORARY TABLE IF EXISTS tt_tmp_2; +DROP TEMPORARY TABLE IF EXISTS nt_tmp_2; DROP TABLE IF EXISTS nt_1; +DROP TEMPORARY TABLE IF EXISTS tt_tmp_1; +DROP TEMPORARY TABLE IF EXISTS nt_tmp_1; DROP TABLE IF EXISTS tt_2; DROP TABLE IF EXISTS tt_1; SET @commands= ''; diff --git a/mysql-test/suite/rpl/r/rpl_stm_innodb.result b/mysql-test/suite/rpl/r/rpl_stm_innodb.result index 0e9531317b9..6f54b232e71 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_stm_innodb.result @@ -79,6 +79,7 @@ COUNT(*) FLUSH LOGS; -------- switch to master -------- FLUSH LOGS; +DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2; DROP DATABASE mysqltest1; End of 5.1 tests # diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index 360a0e526de..da925035c9c 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -6,6 +6,8 @@ reset master; reset slave; start slave; include/wait_for_slave_to_start.inc +set @save_slave_ddl_exec_mode=@@global.slave_ddl_exec_mode; +set @@global.slave_ddl_exec_mode=STRICT; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; insert into t1 values (NULL); drop table t1; @@ -286,4 +288,5 @@ a b 5 1 6 1 drop table t1; +set @@global.slave_ddl_exec_mode=@save_slave_ddl_exec_mode; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result index 57d84eef52e..69e144b5cd1 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result +++ b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result @@ -154,7 +154,7 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002 slave-bin.000002 # Gtid # # GTID #-#-# -slave-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +slave-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ ******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 2 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info @@ -163,7 +163,7 @@ slave-bin.000002 # Gtid # # GTID #-#-# ******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 2,3 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +slave-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ ******** [slave] SHOW BINLOG EVENTS ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result index b1473c937a1..e5870cec2c9 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result @@ -23,6 +23,7 @@ include/start_slave.inc show status like 'slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 1 +drop temporary table if exists t1; include/stop_slave.inc reset slave; include/check_slave_no_error.inc diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result index 3d9bad18ab6..5959ee09993 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result @@ -113,7 +113,6 @@ ROLLBACK; [connection master] SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; -SET DEBUG_SYNC= 'RESET'; [connection slave] include/wait_for_slave_to_stop.inc [connection slave1] @@ -121,3 +120,4 @@ include/start_slave.inc [connection master] DROP TABLE t1, t2; include/rpl_end.inc +SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result index a0102baacfe..1933b0b82f8 100644 --- a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result +++ b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result @@ -62,7 +62,7 @@ slave-bin.000001 # Query # # use `test`; ALTER TABLE t1_tmp ADD COLUMN b INT slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t1_tmp` /* generated by server */ slave-bin.000001 # Gtid # # GTID #-#-# -slave-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F @@ -73,7 +73,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) slave-bin.000001 # Xid # # COMMIT /* XID */ slave-bin.000001 # Gtid # # GTID #-#-# -slave-bin.000001 # Query # # use `test`; DROP TABLE `t3`,`t1` /* generated by server */ +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t3`,`t1` /* generated by server */ # Bug#55478 Row events wrongly apply on the temporary table of the same name # ========================================================================== diff --git a/mysql-test/suite/rpl/t/create_or_replace.inc b/mysql-test/suite/rpl/t/create_or_replace.inc new file mode 100644 index 00000000000..dad705403ed --- /dev/null +++ b/mysql-test/suite/rpl/t/create_or_replace.inc @@ -0,0 +1,137 @@ +# Test CREATE OR REPLACE TABLE in replication +--source include/have_innodb.inc + +--let $rpl_topology=1->2 +--source include/rpl_init.inc + +# Create help tables +create table t2 (a int) engine=myisam; +insert into t2 values (0),(1),(2),(2); +create temporary table t3 (a_in_temporary int) engine=myisam; + +--echo # +--echo # Check how create table and create or replace table are logged +--echo # + +save_master_pos; +connection server_2; +sync_with_master; +create table t1 (to_be_deleted int); + +connection server_1; +CREATE TABLE t1 AS SELECT 1 AS f1; +CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1; +CREATE OR REPLACE table t1 like t2; +CREATE OR REPLACE table t1 like t3; +drop table t1; + +--echo binlog from server 1 +--source include/show_binlog_events.inc +save_master_pos; +connection server_2; +sync_with_master; +--echo binlog from server 2 +--source include/show_binlog_events.inc + +connection server_1; + +--echo # +--echo # Ensure that also failed create_or_replace are logged +--echo # + +--let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1) + +create table t1 (a int); +--error ER_TABLE_MUST_HAVE_COLUMNS +create or replace table t1; +drop table if exists t1; +# The following is not logged as t1 does not exists; +--error ER_DUP_ENTRY +create or replace table t1 (a int primary key) select a from t2; + +create table t1 (a int); +# This should be logged as we will delete t1 +--error ER_DUP_ENTRY +create or replace table t1 (a int primary key) select a from t2; + +--echo binlog from server 1 +--source include/show_binlog_events.inc +save_master_pos; +connection server_2; +sync_with_master; +show tables; +connection server_1; + +drop table if exists t1,t2; + +--echo # +--echo # Ensure that CREATE are run as CREATE OR REPLACE on slave +--echo # + +save_master_pos; +connection server_2; +sync_with_master; +create table t1 (server_2_to_be_delete int); +connection server_1; +create table t1 (new_table int); + +save_master_pos; +connection server_2; +sync_with_master; + +show create table t1; +connection server_1; +drop table t1; + +--echo # +--echo # Ensure that DROP TABLE is run as DROP IF NOT EXISTS +--echo # + +create table t1 (server_1_ver_1 int); +create table t4 (server_1_ver_2 int); + +save_master_pos; +connection server_2; +sync_with_master; +--let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1) + +# Drop the table on the slave +drop table t1; +connection server_1; +drop table t1,t4; +create table t1 (server_2_ver_2 int); +save_master_pos; +connection server_2; +sync_with_master; +show create table t1; +--echo binlog from server 2 +--source include/show_binlog_events.inc +connection server_1; +drop table t1; + +--echo # +--echo # Ensure that CREATE ... SELECT is recorded as one GTID on the slave +--echo # + +save_master_pos; +connection server_2; +sync_with_master; +--let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1) +connection server_1; + +create table t1 (a int); +insert into t1 values (0),(1),(2); +create table t2 engine=myisam select * from t1; +create or replace table t2 engine=innodb select * from t1; +save_master_pos; +connection server_2; +sync_with_master; +--echo binlog from server 2 +--source include/show_binlog_events.inc +connection server_1; +drop table t1; + +# Clean up +drop table t2,t3; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/create_or_replace_mix.cnf b/mysql-test/suite/rpl/t/create_or_replace_mix.cnf new file mode 100644 index 00000000000..03d69b2864f --- /dev/null +++ b/mysql-test/suite/rpl/t/create_or_replace_mix.cnf @@ -0,0 +1,9 @@ +!include suite/rpl/my.cnf + +[mysqld.1] +log-slave-updates +loose-innodb + +[mysqld.2] +log-slave-updates +loose-innodb diff --git a/mysql-test/suite/rpl/t/create_or_replace_mix.test b/mysql-test/suite/rpl/t/create_or_replace_mix.test new file mode 100644 index 00000000000..0cabef15ad7 --- /dev/null +++ b/mysql-test/suite/rpl/t/create_or_replace_mix.test @@ -0,0 +1,4 @@ +# Testing create or replace table in mixed mode. + +--source include/have_binlog_format_mixed.inc +--source create_or_replace.inc diff --git a/mysql-test/suite/rpl/t/create_or_replace_row.cnf b/mysql-test/suite/rpl/t/create_or_replace_row.cnf new file mode 100644 index 00000000000..03d69b2864f --- /dev/null +++ b/mysql-test/suite/rpl/t/create_or_replace_row.cnf @@ -0,0 +1,9 @@ +!include suite/rpl/my.cnf + +[mysqld.1] +log-slave-updates +loose-innodb + +[mysqld.2] +log-slave-updates +loose-innodb diff --git a/mysql-test/suite/rpl/t/create_or_replace_row.test b/mysql-test/suite/rpl/t/create_or_replace_row.test new file mode 100644 index 00000000000..88dd8fd2d74 --- /dev/null +++ b/mysql-test/suite/rpl/t/create_or_replace_row.test @@ -0,0 +1,4 @@ +# Testing create or replace table in mixed mode. + +--source include/have_binlog_format_row.inc +--source create_or_replace.inc diff --git a/mysql-test/suite/rpl/t/create_or_replace_statement.cnf b/mysql-test/suite/rpl/t/create_or_replace_statement.cnf new file mode 100644 index 00000000000..03d69b2864f --- /dev/null +++ b/mysql-test/suite/rpl/t/create_or_replace_statement.cnf @@ -0,0 +1,9 @@ +!include suite/rpl/my.cnf + +[mysqld.1] +log-slave-updates +loose-innodb + +[mysqld.2] +log-slave-updates +loose-innodb diff --git a/mysql-test/suite/rpl/t/create_or_replace_statement.test b/mysql-test/suite/rpl/t/create_or_replace_statement.test new file mode 100644 index 00000000000..2709e4142f4 --- /dev/null +++ b/mysql-test/suite/rpl/t/create_or_replace_statement.test @@ -0,0 +1,4 @@ +# Testing create or replace table in mixed mode. + +--source include/have_binlog_format_statement.inc +--source create_or_replace.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test index 72f1201c93c..b27250f908f 100644 --- a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test @@ -52,6 +52,8 @@ CREATE DATABASE IF NOT EXISTS mysqltest; USE mysqltest; CREATE TABLE IF NOT EXISTS t(c1 int); CREATE TABLE IF NOT EXISTS t1 LIKE t; +# The following will not be logged because t2 existed and we will not +# put the data of SELECT into the binary log CREATE TABLE IF NOT EXISTS t2 SELECT * FROM t; CREATE EVENT IF NOT EXISTS e ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR @@ -104,7 +106,7 @@ SELECT * FROM t1; SELECT * FROM t2; sync_slave_with_master; -# In these two statements, t1 and t2 are the base table. The recoreds of t2 +# In these two statements, t1 and t2 are the base table. The records of t2 # are inserted into it when CREATE TABLE ... SELECT was executed. SELECT * FROM t1; SELECT * FROM t2; diff --git a/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test index e1fd7abb47f..3107fdfaaa9 100644 --- a/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test @@ -38,4 +38,8 @@ CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp; source include/show_binlog_events.inc; +DROP TEMPORARY TABLE tmp; +DROP TEMPORARY TABLE tmp1; +DROP TEMPORARY TABLE tmp2; + --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_db.test b/mysql-test/suite/rpl/t/rpl_drop_db.test index ac859b4655a..a67850a66dd 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_db.test +++ b/mysql-test/suite/rpl/t/rpl_drop_db.test @@ -13,7 +13,7 @@ insert into mysqltest1.t1 values (1); select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; create table mysqltest1.t2 (n int); create table mysqltest1.t3 (n int); ---replace_result \\ / 66 39 +--replace_result \\ / 66 39 17 39 "File exists" "Directory not empty" --error 1010 drop database mysqltest1; use mysqltest1; @@ -30,7 +30,7 @@ while ($1) } --enable_query_log ---replace_result \\ / 66 39 +--replace_result \\ / 66 39 17 39 "File exists" "Directory not empty" --error 1010 drop database mysqltest1; use mysqltest1; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_basic.test b/mysql-test/suite/rpl/t/rpl_gtid_basic.test index 687c0d62cb1..3f2d5e1e321 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_basic.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_basic.test @@ -69,7 +69,15 @@ save_master_pos; connection server_4; --replace_result $MASTER_MYPORT MASTER_PORT eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, + MASTER_USE_GTID=SLAVE_POS; +# Test that sql_slave_skip_counter is prevented in GTID mode. +--error ER_SLAVE_SKIP_NOT_IN_GTID +SET GLOBAL sql_slave_skip_counter=1; +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, MASTER_USE_GTID=CURRENT_POS; +--error ER_SLAVE_SKIP_NOT_IN_GTID +SET GLOBAL sql_slave_skip_counter=10; --source include/start_slave.inc sync_with_master; SELECT * FROM t1 ORDER BY a; @@ -97,19 +105,16 @@ connection server_3; --source include/stop_slave.inc connection server_1; -BEGIN; INSERT INTO t2 VALUES (6, "i6b"); INSERT INTO t2 VALUES (7, "i7b"); -COMMIT; +--source include/save_master_gtid.inc connection server_3; --replace_result $SERVER_MYPORT_4 SERVER_MYPORT_4 eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_4, MASTER_USE_GTID=CURRENT_POS; --source include/start_slave.inc -# This time, let's sync up without reference to binlog on D. ---let $wait_condition= SELECT COUNT(*) = 7 FROM t2 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t2 ORDER BY a; --echo *** Now change everything back to what it was, to make rpl_end.inc happy @@ -118,8 +123,7 @@ connection server_2; # We need to sync up server_2 before switching. If it happened to have reached # the point 'UPDATE t2 SET b="j1a" WHERE a=5' it will fail to connect to # server_1, which is (deliberately) missing that transaction. ---let $wait_condition= SELECT COUNT(*) = 7 FROM t2 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc --source include/stop_slave.inc --replace_result $MASTER_MYPORT MASTER_MYPORT eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT; @@ -131,8 +135,7 @@ connection server_3; --replace_result $SLAVE_MYPORT SLAVE_MYPORT eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SLAVE_MYPORT; --source include/start_slave.inc ---let $wait_condition= SELECT COUNT(*) = 7 FROM t2 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc connection server_4; --source include/stop_slave.inc @@ -142,6 +145,7 @@ eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_3; connection server_1; DROP TABLE t1,t2; +--source include/save_master_gtid.inc --echo *** A few more checks for BINLOG_GTID_POS function *** --let $valid_binlog_name = query_get_value(SHOW BINARY LOGS,Log_name,1) @@ -163,6 +167,7 @@ eval SELECT BINLOG_GTID_POS('$valid_binlog_name',18446744073709551616); --echo *** Some tests of @@GLOBAL.gtid_binlog_state *** --connection server_2 +--source include/sync_with_master_gtid.inc --source include/stop_slave.inc --connection server_1 @@ -192,21 +197,183 @@ SET GLOBAL gtid_binlog_state = @old_state; CREATE TABLE t1 (a INT PRIMARY KEY); SET gtid_seq_no=100; INSERT INTO t1 VALUES (1); ---let $master_pos= `SELECT @@GLOBAL.gtid_binlog_pos` +--source include/save_master_gtid.inc --connection server_2 --source include/start_slave.inc # We cannot just use sync_with_master as we've done RESET MASTER, so # slave old-style position is wrong. # So sync on gtid position instead. ---let $wait_condition= SELECT @@GLOBAL.gtid_binlog_pos = '$master_pos' ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1; # Check that the IO gtid position in SHOW SLAVE STATUS is also correct. --let $status_items= Gtid_IO_Pos --source include/show_slave_status.inc +--echo *** Test @@LAST_GTID and MASTER_GTID_WAIT() *** + +--connection server_1 +DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +--save_master_pos + +--connection server_2 +--sync_with_master +--source include/stop_slave.inc + +--connect (m1,127.0.0.1,root,,test,$SERVER_MYPORT_1,) +SELECT @@last_gtid; +SET gtid_seq_no=110; +SELECT @@last_gtid; +BEGIN; +SELECT @@last_gtid; +INSERT INTO t1 VALUES (2); +SELECT @@last_gtid; +COMMIT; +SELECT @@last_gtid; +--let $pos= `SELECT @@gtid_binlog_pos` + +--connect (s1,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +eval SET @pos= '$pos'; +# Check NULL argument. +SELECT master_gtid_wait(NULL); +# Check empty argument returns immediately. +SELECT master_gtid_wait('', NULL); +# Let's check that we get a timeout +SELECT master_gtid_wait(@pos, 0.5); +SELECT * FROM t1 ORDER BY a; +# Now actually wait until the slave reaches the position +send SELECT master_gtid_wait(@pos); + +--connection server_2 +--source include/start_slave.inc + +--connection s1 +reap; +SELECT * FROM t1 ORDER BY a; + +# Test waiting on a domain that does not exist yet. +--source include/stop_slave.inc + +--connection server_1 +SET gtid_domain_id= 1; +INSERT INTO t1 VALUES (3); +--let $pos= `SELECT @@gtid_binlog_pos` + +--connection s1 +eval SET @pos= '$pos'; +SELECT master_gtid_wait(@pos, 0); +SELECT * FROM t1 WHERE a >= 3; +send SELECT master_gtid_wait(@pos, -1); + +--connection server_2 +--source include/start_slave.inc + +--connection s1 +reap; +SELECT * FROM t1 WHERE a >= 3; +# Waiting for only part of the position. +SELECT master_gtid_wait('1-1-1', 0); + +# Now test a lot of parallel master_gtid_wait() calls, completing in different +# order, and some of which time out or get killed on the way. + +--connection s1 +send SELECT master_gtid_wait('2-1-1,1-1-4,0-1-110'); + +--connect (s2,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +# This will time out. +send SELECT master_gtid_wait('0-1-1000', 0.5); + +--connect (s3,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +# This one we will kill +--let $kill1_id= `SELECT connection_id()` +send SELECT master_gtid_wait('0-1-2000'); + +--connect (s4,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +send SELECT master_gtid_wait('2-1-10'); + +--connect (s5,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +send SELECT master_gtid_wait('2-1-6', 1); + +# This one we will kill also. +--connect (s6,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +--let $kill2_id= `SELECT connection_id()` +send SELECT master_gtid_wait('2-1-5'); + +--connect (s7,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +send SELECT master_gtid_wait('2-1-10'); + +--connect (s8,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +send SELECT master_gtid_wait('2-1-5,1-1-4,0-1-110'); + +--connect (s9,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +send SELECT master_gtid_wait('2-1-2'); + +--connection server_2 +# This one completes immediately. +SELECT master_gtid_wait('1-1-1'); + +--connect (s10,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +send SELECT master_gtid_wait('0-1-109'); + +--connection server_2 +# This one should time out. +SELECT master_gtid_wait('2-1-2', 0.5); + +--replace_result $kill1_id KILL_ID +eval KILL QUERY $kill1_id; +--connection s3 +--error ER_QUERY_INTERRUPTED +reap; + +--connection server_1 +SET gtid_domain_id=2; +SET gtid_seq_no=2; +INSERT INTO t1 VALUES (4); + +--connection s9 +reap; + +--connection server_2 +--replace_result $kill2_id KILL_ID +eval KILL CONNECTION $kill2_id; + +--connection s6 +--error 2013 +reap; + +--connection server_1 +SET gtid_domain_id=1; +SET gtid_seq_no=4; +INSERT INTO t1 VALUES (5); +SET gtid_domain_id=2; +SET gtid_seq_no=5; +INSERT INTO t1 VALUES (6); + +--connection s8 +reap; +--connection s1 +reap; +--connection s2 +reap; +--connection s5 +reap; +--connection s10 +reap; + +--connection server_1 +SET gtid_domain_id=2; +SET gtid_seq_no=10; +INSERT INTO t1 VALUES (7); + +--connection s4 +reap; +--connection s7 +reap; + + --connection server_1 DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash.test b/mysql-test/suite/rpl/t/rpl_gtid_crash.test index 913a87f9862..e02816e1d30 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_crash.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_crash.test @@ -47,6 +47,7 @@ while ($1) dec $1; } --enable_query_log +--source include/save_master_gtid.inc SET SESSION debug_dbug="+d,crash_dispatch_command_before"; --error 2006,2013 @@ -61,15 +62,14 @@ EOF --source include/wait_until_connected_again.inc --connection server_2 ---let $wait_condition= SELECT COUNT(*) = 200 FROM t1 WHERE b=2 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc --connection server_1 INSERT INTO t1 VALUES (1000, 3); +--source include/save_master_gtid.inc --connection server_2 ---let $wait_condition= SELECT COUNT(*) = 1 FROM t1 WHERE b=3 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc --connection server_1 DROP TABLE t1; @@ -142,6 +142,7 @@ START SLAVE; --connection server_1 INSERT INTO t1 VALUES (4); +--source include/save_master_gtid.inc --connection server_2 --source include/wait_until_disconnected.inc @@ -153,8 +154,7 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc ---let $wait_condition= SELECT COUNT(*) = 4 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc # Crash the slave just before committing. --source include/stop_slave.inc @@ -166,6 +166,7 @@ START SLAVE; --connection server_1 INSERT INTO t1 VALUES (5); +--source include/save_master_gtid.inc --connection server_2 --source include/wait_until_disconnected.inc @@ -177,8 +178,7 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc ---let $wait_condition= SELECT COUNT(*) = 5 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc # Crash the slave just after committing. --source include/stop_slave.inc @@ -190,6 +190,7 @@ START SLAVE; --connection server_1 INSERT INTO t1 VALUES (6); +--source include/save_master_gtid.inc --connection server_2 --source include/wait_until_disconnected.inc @@ -201,8 +202,7 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc ---let $wait_condition= SELECT COUNT(*) = 6 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc # Crash the slave just before updating relay-log.info --source include/stop_slave.inc @@ -214,6 +214,7 @@ START SLAVE; --connection server_1 INSERT INTO t1 VALUES (7); +--source include/save_master_gtid.inc --connection server_2 --source include/wait_until_disconnected.inc @@ -225,8 +226,7 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc ---let $wait_condition= SELECT COUNT(*) = 7 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc # Crash the slave just after updating relay-log.info --source include/stop_slave.inc @@ -238,6 +238,7 @@ START SLAVE; --connection server_1 INSERT INTO t1 VALUES (8); +--source include/save_master_gtid.inc --connection server_2 --source include/wait_until_disconnected.inc @@ -249,8 +250,7 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc ---let $wait_condition= SELECT COUNT(*) = 8 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc # Check that everything was replicated correctly. diff --git a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test index d2a7445c0bc..31492b7c096 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test @@ -79,6 +79,7 @@ RESET MASTER; INSERT INTO t1 VALUES (2); # And this will be GTID 0-1-2 INSERT INTO t1 VALUES (4); +--source include/save_master_gtid.inc --connection slave SET sql_log_bin = 0; @@ -110,8 +111,7 @@ RESET MASTER; SET GLOBAL gtid_slave_pos = "0-1-1"; START SLAVE; ---let $wait_condition= SELECT COUNT(*) = 4 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; --echo *** MDEV-4688: Empty value of @@GLOBAL.gtid_slave_pos *** @@ -125,6 +125,7 @@ SELECT * FROM t1 ORDER BY a; --connection master # This will be GTID 0-1-3 INSERT INTO t1 VALUES (5); +--source include/save_master_gtid.inc --connection slave SET @old_dbug= @@GLOBAL.debug_dbug; @@ -141,8 +142,7 @@ SELECT @@GLOBAL.gtid_slave_pos; SELECT * FROM t1 ORDER BY a; SET GLOBAL debug_dbug= @old_dbug; START SLAVE SQL_THREAD; ---let $wait_condition= SELECT COUNT(*) = 5 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; @@ -167,10 +167,10 @@ START SLAVE; --connection master INSERT INTO t1 VALUES (6); +--source include/save_master_gtid.inc --connection slave ---let $wait_condition= SELECT COUNT(*) = 6 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_ignored.test b/mysql-test/suite/rpl/t/rpl_gtid_ignored.test index ee5ca92b55e..cb98be3c838 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_ignored.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_ignored.test @@ -130,7 +130,11 @@ SELECT * FROM t1 ORDER BY a; --connection server_1 DROP TABLE t1; SET GLOBAL gtid_strict_mode= @old_gtid_strict_mode; +SET debug_sync = "reset"; + --connection server_2 SET GLOBAL gtid_strict_mode= @old_gtid_strict_mode; +SET debug_sync = "reset"; --source include/rpl_end.inc + diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test index 4a0c76d5c1d..6c37ceaff31 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test @@ -28,6 +28,7 @@ drop table t1; --connection server_2 drop table t2; +--save_master_pos --connection server_3 --sync_with_master 0,'m2' diff --git a/mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test b/mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test index 1e33520efb5..a5caebf0276 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test @@ -32,12 +32,12 @@ START SLAVE; --connection server_2 INSERT INTO t1 VALUES (3, 2); INSERT INTO t1 VALUES (4, 2); +--source include/save_master_gtid.inc --source include/show_binlog_events.inc --connection server_1 ---let $wait_condition= SELECT COUNT(*) = 4 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; @@ -45,14 +45,14 @@ SELECT * FROM t1 ORDER BY a; RESET SLAVE; INSERT INTO t1 VALUES (5, 1); INSERT INTO t1 VALUES (6, 1); +--source include/save_master_gtid.inc --connection server_2 --replace_result $MASTER_MYPORT MASTER_PORT eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, master_use_gtid = current_pos; START SLAVE; ---let $wait_condition= SELECT COUNT(*) = 6 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_startpos.test b/mysql-test/suite/rpl/t/rpl_gtid_startpos.test index 0797eead0ee..100d75a8cdc 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_startpos.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_startpos.test @@ -67,6 +67,7 @@ SET sql_log_bin=1; --connection server_1 INSERT INTO t1 VALUES(3); +--source include/save_master_gtid.inc --connection server_2 SET GLOBAL gtid_slave_pos='0-1-3'; @@ -74,13 +75,13 @@ SET GLOBAL gtid_slave_pos='0-1-3'; eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, MASTER_USE_GTID=CURRENT_POS; --source include/start_slave.inc ---let $wait_condition= SELECT COUNT(*) = 3 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER by a; --source include/stop_slave.inc --connection server_1 INSERT INTO t1 VALUES (4); +--source include/save_master_gtid.inc --connection server_2 # Now add some local transactions that conflict with the GTID position @@ -93,8 +94,7 @@ SET GLOBAL gtid_slave_pos='0-1-4'; RESET MASTER; SET GLOBAL gtid_slave_pos='0-1-4'; START SLAVE; ---let $wait_condition= SELECT COUNT(*) = 4 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER by a; --connection server_1 @@ -165,7 +165,7 @@ SET GLOBAL gtid_slave_pos=""; SELECT * FROM t1 ORDER BY a; -# Same thing, but this time using SQL_LOG_BIN=0 to avoid polliting the +# Same thing, but this time using SQL_LOG_BIN=0 to avoid polluting the # slave binlog. --connection server_2 @@ -175,6 +175,9 @@ DROP TABLE t1; SET SQL_LOG_BIN=1; RESET SLAVE; SET GLOBAL gtid_slave_pos=""; +# Ensure that the slave fails because of missing table to be dropped +SET @save_slave_ddl_exec_mode=@@global.slave_ddl_exec_mode; +SET GLOBAL slave_ddl_exec_mode=STRICT; --source include/start_slave.inc --sync_with_master @@ -200,10 +203,10 @@ CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS; --connection server_1 INSERT INTO t1 VALUES(3); +--source include/save_master_gtid.inc --connection server_2 ---let $wait_condition= SELECT COUNT(*) = 3 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; SET SQL_LOG_BIN=0; call mtr.add_suppression("Slave: Table 't1' already exists error.* 1050"); @@ -215,10 +218,10 @@ SET SQL_LOG_BIN=1; --connection server_1 FLUSH LOGS; INSERT INTO t1 VALUES (4); +--source include/save_master_gtid.inc --connection server_2 ---let $wait_condition= SELECT COUNT(*) = 4 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc --source include/stop_slave.inc --connection server_1 @@ -228,13 +231,13 @@ FLUSH LOGS; --source include/wait_for_purge.inc --source include/show_binary_logs.inc INSERT INTO t1 VALUES (5); +--source include/save_master_gtid.inc --connection server_2 --replace_result $MASTER_MYPORT MASTER_PORT eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT; --source include/start_slave.inc ---let $wait_condition= SELECT COUNT(*) = 5 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; @@ -249,11 +252,11 @@ SET GLOBAL gtid_slave_pos=""; RESET MASTER; TRUNCATE TABLE t1; INSERT INTO t1 VALUES (10); # Will be GTID 0-1-2 +--source include/save_master_gtid.inc --connection server_2 --source include/start_slave.inc ---let $wait_condition= SELECT COUNT(*) = 1 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1; --let $value= query_get_value(SHOW SLAVE STATUS, "Using_Gtid", 1) @@ -349,6 +352,7 @@ SELECT * FROM t1 ORDER BY a; # Clean up. --connection server_1 DROP TABLE t1; - +--connection server_2 +set @@global.slave_ddl_exec_mode=@save_slave_ddl_exec_mode; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test index 925095c852b..1f0532f9922 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test @@ -39,6 +39,7 @@ FLUSH LOGS; INSERT INTO t1 VALUES (2); FLUSH LOGS; INSERT INTO t1 VALUES (3); +--source include/save_master_gtid.inc --source include/show_binary_logs.inc # Let the slave mysqld server start again. @@ -50,8 +51,7 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc ---let $wait_condition= SELECT COUNT(*) = 3 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; @@ -88,10 +88,10 @@ SHOW BINLOG EVENTS IN 'master-bin.000005' LIMIT 1,1; --source include/show_binary_logs.inc INSERT INTO t1 VALUES(5); +--source include/save_master_gtid.inc --connection server_2 ---let $wait_condition= SELECT COUNT(*) = 5 FROM t1 ---source include/wait_condition.inc +--source include/sync_with_master_gtid.inc SELECT * FROM t1 ORDER BY a; --echo *** Test that @@gtid_slave_pos and @@gtid_current_pos are correctly loaded even if slave threads have not started. *** diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test index 27dce9cd652..a1e52cf23da 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test @@ -367,7 +367,7 @@ DROP EVENT e1; - +--sync_slave_with_master # Check received heartbeat events while logs flushed on slave --connection slave --echo *** Flush logs on slave *** diff --git a/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test b/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test new file mode 100644 index 00000000000..3a4a24e1762 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test @@ -0,0 +1,51 @@ +# +# Whenever the mysql_binlog_send method (dump thread) reaches the +# end of file when reading events from the binlog, before checking +# if it should wait for more events, there was a test to check if +# the file being read was still active, i.e, it was the last known +# binlog. However, it was possible that something was written to +# the binary log and then a rotation would happen, after EOF was +# detected and before the check for active was performed. In this +# case, the end of the binary log would not be read by the dump +# thread, and this would cause the slave to lose updates. +# +# This test verifies that the problem has been fixed. It waits +# during this window while forcing a rotation in the binlog. +# +--source include/have_debug.inc +--source include/master-slave.inc + +--connection master + +SET @debug_saved= @@GLOBAL.DEBUG_DBUG; + +CREATE TABLE t (i INT); + +# When reaching the EOF the dump thread will wait before deciding if +# it should move to a new binlong file. +SET GLOBAL DEBUG_DBUG= "d,wait_after_binlog_EOF"; + +INSERT INTO t VALUES (1); + +--sleep 1 + +# A insert and a rotate happens before the decision +INSERT INTO t VALUES (2); +FLUSH LOGS; + +SET DEBUG_SYNC= 'now SIGNAL signal.rotate_finished'; + +--sync_slave_with_master + +# All the rows should be sent to the slave. +--let $diff_tables=master:t,slave:t +--source include/diff_tables.inc + +##Clean up +--connection master + +SET @@GLOBAL.DEBUG_DBUG= @debug_saved; +SET DEBUG_SYNC= 'RESET'; + +DROP TABLE t; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test index 99a371eac44..7a2f5f3e699 100644 --- a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test +++ b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test @@ -1,6 +1,8 @@ --source include/master-slave.inc --source include/have_debug.inc +--source include/have_debug_sync.inc --source include/have_binlog_format_row.inc +--source include/have_innodb.inc connection master; @@ -71,6 +73,52 @@ let $binlog_start= 0; let $binlog_limit=7,5; --source include/show_relaylog_events.inc + +--echo *** MDEV-5754: MySQL 5.5 slaves cannot replicate from MariaDB 10.0 *** + +# The problem was that for a group commit, we get commit id into the +# GTID event, and there was a bug in the code that replaces GTID with +# dummy that failed when commit id was present. +# +# So setup a group commit in InnoDB. + +--connection master +CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; +let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); + +--connect (con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,) +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +send INSERT INTO t2 VALUES (1); + +--connection master +SET debug_sync='now WAIT_FOR master_queued1'; + +--connect (con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,) +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +send INSERT INTO t2 VALUES (2); + +--connection master +SET debug_sync='now WAIT_FOR master_queued2'; +SET debug_sync='now SIGNAL master_cont1'; + +--connection con1 +REAP; +SET debug_sync='RESET'; +--connection con2 +REAP; +SET debug_sync='RESET'; +--connection master +SET debug_sync='RESET'; +let $binlog_limit= 0, 8; +--source include/show_binlog_events.inc +--save_master_pos + +--connection slave +--sync_with_master +SELECT * FROM t2 ORDER BY a; + + --echo # Test that slave which cannot tolerate holes in binlog stream but --echo # knows the event does not get dummy event @@ -106,6 +154,6 @@ set @@global.debug_dbug= @old_slave_dbug; --echo Clean up. connection master; set @@global.binlog_checksum = @old_master_binlog_checksum; -DROP TABLE t1; +DROP TABLE t1, t2; sync_slave_with_master; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mdev359.test b/mysql-test/suite/rpl/t/rpl_mdev359.test index 96c7ac859d9..3026c6d363e 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev359.test +++ b/mysql-test/suite/rpl/t/rpl_mdev359.test @@ -27,5 +27,6 @@ SET DEBUG_SYNC= "now SIGNAL m1_cont"; connection master; DROP TABLE t1; +SET DEBUG_SYNC= "RESET"; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test index c5b821ca906..f4a1615a20f 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test @@ -44,6 +44,7 @@ show create table t3; show create table t5; connection master; drop table t2,t3,t5; +drop temporary table t4; sync_slave_with_master; # End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_old_master.test b/mysql-test/suite/rpl/t/rpl_old_master.test new file mode 100644 index 00000000000..8f61d6979cd --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_old_master.test @@ -0,0 +1,49 @@ +# Test replicating off old master. +# We simulate old master by copying in pre-generated binlog files from earlier +# server versions. + +--source include/have_innodb.inc +--source include/master-slave.inc + +--connection slave +--source include/stop_slave.inc + +--connection master +--let $datadir= `SELECT @@datadir` + +--let $rpl_server_number= 1 +--source include/rpl_stop_server.inc + +--remove_file $datadir/master-bin.000001 +--copy_file $MYSQL_TEST_DIR/std_data/mariadb-5.5-binlog.000001 $datadir/master-bin.000001 + +--let $rpl_server_number= 1 +--source include/rpl_start_server.inc + +--source include/wait_until_connected_again.inc + +--connection slave +SET @old_parallel= @@GLOBAL.slave_parallel_threads; +SET GLOBAL slave_parallel_threads=10; +--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1 +eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4; +--source include/start_slave.inc + +--connection master +CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1); +--save_master_pos + +--connection slave +--sync_with_master +SELECT * FROM t1 ORDER BY a; +SELECT * FROM t2; + +--source include/stop_slave.inc +SET GLOBAL slave_parallel_threads=@old_parallel; +DROP TABLE t1; +--source include/start_slave.inc + +--connection master +DROP TABLE t2; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test index 5709cab19c0..a8884143c4d 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel.test +++ b/mysql-test/suite/rpl/t/rpl_parallel.test @@ -19,6 +19,7 @@ CHANGE MASTER TO master_use_gtid=slave_pos; --echo *** Test long-running query in domain 1 can run in parallel with short queries in domain 0 *** --connection server_1 +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM; CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); @@ -162,6 +163,7 @@ SET debug_sync='RESET'; --echo *** Test that group-committed transactions on the master can replicate in parallel on the slave. *** --connection server_1 +SET debug_sync='RESET'; FLUSH LOGS; --source include/wait_for_binlog_checkpoint.inc CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; @@ -229,6 +231,7 @@ REAP; REAP; --connection con_temp5 REAP; +SET debug_sync='RESET'; --connection server_1 SELECT * FROM t3 ORDER BY a; @@ -269,6 +272,10 @@ SELECT * FROM t3 ORDER BY a; --echo *** Test STOP SLAVE in parallel mode *** --connection server_2 --source include/stop_slave.inc +# Respawn all worker threads to clear any left-over debug_sync or other stuff. +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; --connection server_1 # Set up a couple of transactions. The first will be blocked halfway @@ -287,7 +294,7 @@ BEGIN; INSERT INTO t2 VALUES (20); --disable_warnings INSERT INTO t1 VALUES (20); ---disable_warnings +--enable_warnings INSERT INTO t2 VALUES (21); INSERT INTO t3 VALUES (20, 20); COMMIT; @@ -299,7 +306,7 @@ SET binlog_format=@old_format; # Start a connection that will block the replicated transaction halfway. --connection con_temp1 BEGIN; -INSERT INTO t2 VALUES (21); +INSERT INTO t2 VALUES (21); --connection server_2 START SLAVE; @@ -311,13 +318,20 @@ START SLAVE; --connection con_temp2 # Initiate slave stop. It will have to wait for the current event group # to complete. +# The dbug injection causes debug_sync to signal 'wait_for_done_waiting' +# when the SQL driver thread is ready. +SET @old_dbug= @@GLOBAL.debug_dbug; +SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger"; send STOP SLAVE; --connection con_temp1 +SET debug_sync='now WAIT_FOR wait_for_done_waiting'; ROLLBACK; --connection con_temp2 reap; +SET GLOBAL debug_dbug=@old_dbug; +SET debug_sync='RESET'; --connection server_2 --source include/wait_for_slave_to_stop.inc @@ -334,20 +348,778 @@ SELECT * FROM t3 WHERE a >= 20 ORDER BY a; --connection server_2 +# Respawn all worker threads to clear any left-over debug_sync or other stuff. +--source include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +--source include/start_slave.inc + + +--echo *** Test killing slave threads at various wait points *** +--echo *** 1. Test killing transaction waiting in commit for previous transaction to commit *** + +# Set up three transactions on the master that will be group-committed +# together so they can be replicated in parallel on the slave. +--connection con_temp3 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +send INSERT INTO t3 VALUES (31, foo(31, + 'commit_before_prepare_ordered WAIT_FOR t2_waiting', + 'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued1'; + +--connection con_temp4 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +SET binlog_format=statement; +BEGIN; +# This insert is just so we can get T2 to wait while a query is running that we +# can see in SHOW PROCESSLIST so we can get its thread_id to kill later. +INSERT INTO t3 VALUES (32, foo(32, + 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont', + '')); +# This insert sets up debug_sync points so that T2 will tell when it is at its +# wait point where we want to kill it - and when it has been killed. +INSERT INTO t3 VALUES (33, foo(33, + 'group_commit_waiting_for_prior SIGNAL t2_waiting', + 'group_commit_waiting_for_prior_killed SIGNAL t2_killed')); +send COMMIT; + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued2'; + +--connection con_temp5 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +SET binlog_format=statement; +send INSERT INTO t3 VALUES (34, foo(34, + '', + '')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued3'; +SET debug_sync='now SIGNAL master_cont1'; + +--connection con_temp3 +REAP; +--connection con_temp4 +REAP; +--connection con_temp5 +REAP; + +--connection server_1 +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; +SET debug_sync='RESET'; + +--connection server_2 +SET sql_log_bin=0; +CALL mtr.add_suppression("Query execution was interrupted"); +CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends"); +CALL mtr.add_suppression("Slave: Connection was killed"); +SET sql_log_bin=1; +# Wait until T2 is inside executing its insert of 32, then find it in SHOW +# PROCESSLIST to know its thread id for KILL later. +SET debug_sync='now WAIT_FOR t2_query'; +--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(32%' AND INFO NOT LIKE '%LIKE%'` +SET debug_sync='now SIGNAL t2_cont'; + +# Wait until T2 has entered its wait for T1 to commit, and T1 has +# progressed into its commit phase. +SET debug_sync='now WAIT_FOR t1_ready'; + +# Now kill the transaction T2. +--replace_result $thd_id THD_ID +eval KILL $thd_id; + +# Wait until T2 has reacted on the kill. +SET debug_sync='now WAIT_FOR t2_killed'; + +# Now we can allow T1 to proceed. +SET debug_sync='now SIGNAL t1_cont'; + +--let $slave_sql_errno= 1317,1964 +--source include/wait_for_slave_sql_error.inc +STOP SLAVE IO_THREAD; +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; + +# Now we have to disable the debug_sync statements, so they do not trigger +# when the events are retried. +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + +--connection server_1 +INSERT INTO t3 VALUES (39,0); +--save_master_pos + +--connection server_2 +--source include/start_slave.inc +--sync_with_master +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; +# Restore the foo() function. +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + IF d1 != '' THEN + SET debug_sync = d1; + END IF; + IF d2 != '' THEN + SET debug_sync = d2; + END IF; + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + + +--connection server_2 +# Respawn all worker threads to clear any left-over debug_sync or other stuff. +--source include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +--source include/start_slave.inc + + +--echo *** 2. Same as (1), but without restarting IO thread after kill of SQL threads *** + +# Set up three transactions on the master that will be group-committed +# together so they can be replicated in parallel on the slave. +--connection con_temp3 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +send INSERT INTO t3 VALUES (41, foo(41, + 'commit_before_prepare_ordered WAIT_FOR t2_waiting', + 'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued1'; + +--connection con_temp4 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +SET binlog_format=statement; +BEGIN; +# This insert is just so we can get T2 to wait while a query is running that we +# can see in SHOW PROCESSLIST so we can get its thread_id to kill later. +INSERT INTO t3 VALUES (42, foo(42, + 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont', + '')); +# This insert sets up debug_sync points so that T2 will tell when it is at its +# wait point where we want to kill it - and when it has been killed. +INSERT INTO t3 VALUES (43, foo(43, + 'group_commit_waiting_for_prior SIGNAL t2_waiting', + 'group_commit_waiting_for_prior_killed SIGNAL t2_killed')); +send COMMIT; + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued2'; + +--connection con_temp5 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +SET binlog_format=statement; +send INSERT INTO t3 VALUES (44, foo(44, + '', + '')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued3'; +SET debug_sync='now SIGNAL master_cont1'; + +--connection con_temp3 +REAP; +--connection con_temp4 +REAP; +--connection con_temp5 +REAP; + +--connection server_1 +SELECT * FROM t3 WHERE a >= 40 ORDER BY a; +SET debug_sync='RESET'; + +--connection server_2 +# Wait until T2 is inside executing its insert of 42, then find it in SHOW +# PROCESSLIST to know its thread id for KILL later. +SET debug_sync='now WAIT_FOR t2_query'; +--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(42%' AND INFO NOT LIKE '%LIKE%'` +SET debug_sync='now SIGNAL t2_cont'; + +# Wait until T2 has entered its wait for T1 to commit, and T1 has +# progressed into its commit phase. +SET debug_sync='now WAIT_FOR t1_ready'; + +# Now kill the transaction T2. +--replace_result $thd_id THD_ID +eval KILL $thd_id; + +# Wait until T2 has reacted on the kill. +SET debug_sync='now WAIT_FOR t2_killed'; + +# Now we can allow T1 to proceed. +SET debug_sync='now SIGNAL t1_cont'; + +--let $slave_sql_errno= 1317,1964 +--source include/wait_for_slave_sql_error.inc + +# Now we have to disable the debug_sync statements, so they do not trigger +# when the events are retried. +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + +--connection server_1 +INSERT INTO t3 VALUES (49,0); +--save_master_pos + +--connection server_2 +START SLAVE SQL_THREAD; +--sync_with_master +SELECT * FROM t3 WHERE a >= 40 ORDER BY a; +# Restore the foo() function. +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + IF d1 != '' THEN + SET debug_sync = d1; + END IF; + IF d2 != '' THEN + SET debug_sync = d2; + END IF; + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + + +--connection server_2 +# Respawn all worker threads to clear any left-over debug_sync or other stuff. +--source include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +--source include/start_slave.inc + + +--echo *** 3. Same as (2), but not using gtid mode *** + +--connection server_2 +--source include/stop_slave.inc +CHANGE MASTER TO master_use_gtid=no; +--source include/start_slave.inc + +--connection server_1 +# Set up three transactions on the master that will be group-committed +# together so they can be replicated in parallel on the slave. +--connection con_temp3 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +send INSERT INTO t3 VALUES (51, foo(51, + 'commit_before_prepare_ordered WAIT_FOR t2_waiting', + 'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued1'; + +--connection con_temp4 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +SET binlog_format=statement; +BEGIN; +# This insert is just so we can get T2 to wait while a query is running that we +# can see in SHOW PROCESSLIST so we can get its thread_id to kill later. +INSERT INTO t3 VALUES (52, foo(52, + 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont', + '')); +# This insert sets up debug_sync points so that T2 will tell when it is at its +# wait point where we want to kill it - and when it has been killed. +INSERT INTO t3 VALUES (53, foo(53, + 'group_commit_waiting_for_prior SIGNAL t2_waiting', + 'group_commit_waiting_for_prior_killed SIGNAL t2_killed')); +send COMMIT; + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued2'; + +--connection con_temp5 +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +SET binlog_format=statement; +send INSERT INTO t3 VALUES (54, foo(54, + '', + '')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued3'; +SET debug_sync='now SIGNAL master_cont1'; + +--connection con_temp3 +REAP; +--connection con_temp4 +REAP; +--connection con_temp5 +REAP; + +--connection server_1 +SELECT * FROM t3 WHERE a >= 50 ORDER BY a; +SET debug_sync='RESET'; + +--connection server_2 +# Wait until T2 is inside executing its insert of 52, then find it in SHOW +# PROCESSLIST to know its thread id for KILL later. +SET debug_sync='now WAIT_FOR t2_query'; +--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(52%' AND INFO NOT LIKE '%LIKE%'` +SET debug_sync='now SIGNAL t2_cont'; + +# Wait until T2 has entered its wait for T1 to commit, and T1 has +# progressed into its commit phase. +SET debug_sync='now WAIT_FOR t1_ready'; + +# Now kill the transaction T2. +--replace_result $thd_id THD_ID +eval KILL $thd_id; + +# Wait until T2 has reacted on the kill. +SET debug_sync='now WAIT_FOR t2_killed'; + +# Now we can allow T1 to proceed. +SET debug_sync='now SIGNAL t1_cont'; + +--let $slave_sql_errno= 1317,1964 +--source include/wait_for_slave_sql_error.inc +SELECT * FROM t3 WHERE a >= 50 ORDER BY a; + +# Now we have to disable the debug_sync statements, so they do not trigger +# when the events are retried. +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + +--connection server_1 +INSERT INTO t3 VALUES (59,0); +--save_master_pos + +--connection server_2 +START SLAVE SQL_THREAD; +--sync_with_master +SELECT * FROM t3 WHERE a >= 50 ORDER BY a; +# Restore the foo() function. +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + IF d1 != '' THEN + SET debug_sync = d1; + END IF; + IF d2 != '' THEN + SET debug_sync = d2; + END IF; + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + + +--source include/stop_slave.inc +CHANGE MASTER TO master_use_gtid=slave_pos; +--source include/start_slave.inc + +--connection server_2 +# Respawn all worker threads to clear any left-over debug_sync or other stuff. +--source include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=4; +--source include/start_slave.inc + + +--echo *** 4. Test killing thread that is waiting to start transaction until previous transaction commits *** + +# We set up four transactions T1, T2, T3, and T4 on the master. T2, T3, and T4 +# can run in parallel with each other (same group commit and commit id), +# but not in parallel with T1. +# +# We use four worker threads, each Ti will be queued on each their own +# worker thread. We will delay T1 commit, T3 will wait for T1 to begin +# commit before it can start. We will kill T3 during this wait, and +# check that everything works correctly. +# +# It is rather tricky to get the correct thread id of the worker to kill. +# We start by injecting four dummy transactions in a debug_sync-controlled +# manner to be able to get known thread ids for the workers in a pool with +# just 4 worker threads. Then we let in each of the real test transactions +# T1-T4 one at a time in a way which allows us to know which transaction +# ends up with which thread id. + +--connection server_1 +SET binlog_format=statement; +SET gtid_domain_id=2; +BEGIN; +# This debug_sync will linger on and be used to control T4 later. +INSERT INTO t3 VALUES (70, foo(70, + 'rpl_parallel_start_waiting_for_prior SIGNAL t4_waiting', '')); +INSERT INTO t3 VALUES (60, foo(60, + 'ha_write_row_end SIGNAL d2_query WAIT_FOR d2_cont2', + 'rpl_parallel_end_of_group SIGNAL d2_done WAIT_FOR d2_cont')); +COMMIT; +SET gtid_domain_id=0; + +--connection server_2 +SET debug_sync='now WAIT_FOR d2_query'; +--let $d2_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(60%' AND INFO NOT LIKE '%LIKE%'` + +--connection server_1 +SET gtid_domain_id=1; +BEGIN; +# These debug_sync's will linger on and be used to control T3 later. +INSERT INTO t3 VALUES (61, foo(61, + 'rpl_parallel_start_waiting_for_prior SIGNAL t3_waiting', + 'rpl_parallel_start_waiting_for_prior_killed SIGNAL t3_killed')); +INSERT INTO t3 VALUES (62, foo(62, + 'ha_write_row_end SIGNAL d1_query WAIT_FOR d1_cont2', + 'rpl_parallel_end_of_group SIGNAL d1_done WAIT_FOR d1_cont')); +COMMIT; +SET gtid_domain_id=0; + +--connection server_2 +SET debug_sync='now WAIT_FOR d1_query'; +--let $d1_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(62%' AND INFO NOT LIKE '%LIKE%'` + +--connection server_1 +SET gtid_domain_id=0; +INSERT INTO t3 VALUES (63, foo(63, + 'ha_write_row_end SIGNAL d0_query WAIT_FOR d0_cont2', + 'rpl_parallel_end_of_group SIGNAL d0_done WAIT_FOR d0_cont')); + +--connection server_2 +SET debug_sync='now WAIT_FOR d0_query'; +--let $d0_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(63%' AND INFO NOT LIKE '%LIKE%'` + +--connection server_1 +SET gtid_domain_id=3; +BEGIN; +# These debug_sync's will linger on and be used to control T2 later. +INSERT INTO t3 VALUES (68, foo(68, + 'rpl_parallel_start_waiting_for_prior SIGNAL t2_waiting', '')); +INSERT INTO t3 VALUES (69, foo(69, + 'ha_write_row_end SIGNAL d3_query WAIT_FOR d3_cont2', + 'rpl_parallel_end_of_group SIGNAL d3_done WAIT_FOR d3_cont')); +COMMIT; +SET gtid_domain_id=0; + +--connection server_2 +SET debug_sync='now WAIT_FOR d3_query'; +--let $d3_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(69%' AND INFO NOT LIKE '%LIKE%'` + +SET debug_sync='now SIGNAL d2_cont2'; +SET debug_sync='now WAIT_FOR d2_done'; +SET debug_sync='now SIGNAL d1_cont2'; +SET debug_sync='now WAIT_FOR d1_done'; +SET debug_sync='now SIGNAL d0_cont2'; +SET debug_sync='now WAIT_FOR d0_done'; +SET debug_sync='now SIGNAL d3_cont2'; +SET debug_sync='now WAIT_FOR d3_done'; + +# Now prepare the real transactions T1, T2, T3, T4 on the master. + +--connection con_temp3 +# Create transaction T1. +SET binlog_format=statement; +INSERT INTO t3 VALUES (64, foo(64, + 'rpl_parallel_before_mark_start_commit SIGNAL t1_waiting WAIT_FOR t1_cont', '')); + +# Create transaction T2, as a group commit leader on the master. +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2 WAIT_FOR master_cont2'; +send INSERT INTO t3 VALUES (65, foo(65, '', '')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued2'; + +--connection con_temp4 +# Create transaction T3, participating in T2's group commit. +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +send INSERT INTO t3 VALUES (66, foo(66, '', '')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued3'; + +--connection con_temp5 +# Create transaction T4, participating in group commit with T2 and T3. +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued4'; +send INSERT INTO t3 VALUES (67, foo(67, '', '')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued4'; +SET debug_sync='now SIGNAL master_cont2'; + +--connection con_temp3 +REAP; +--connection con_temp4 +REAP; +--connection con_temp5 +REAP; + +--connection server_1 +SELECT * FROM t3 WHERE a >= 60 ORDER BY a; +SET debug_sync='RESET'; + +--connection server_2 +# Now we have the four transactions pending for replication on the slave. +# Let them be queued for our three worker threads in a controlled fashion. +# We put them at a stage where T1 is delayed and T3 is waiting for T1 to +# commit before T3 can start. Then we kill T3. + +# Make the worker D0 free, and wait for T1 to be queued in it. +SET debug_sync='now SIGNAL d0_cont'; +SET debug_sync='now WAIT_FOR t1_waiting'; + +# Make the worker D3 free, and wait for T2 to be queued in it. +SET debug_sync='now SIGNAL d3_cont'; +SET debug_sync='now WAIT_FOR t2_waiting'; + +# Now release worker D1, and wait for T3 to be queued in it. +# T3 will wait for T1 to commit before it can start. +SET debug_sync='now SIGNAL d1_cont'; +SET debug_sync='now WAIT_FOR t3_waiting'; + +# Release worker D2. Wait for T4 to be queued, so we are sure it has +# received the debug_sync signal (else we might overwrite it with the +# next debug_sync). +SET debug_sync='now SIGNAL d2_cont'; +SET debug_sync='now WAIT_FOR t4_waiting'; + +# Now we kill the waiting transaction T3 in worker D1. +--replace_result $d1_thd_id THD_ID +eval KILL $d1_thd_id; + +# Wait until T3 has reacted on the kill. +SET debug_sync='now WAIT_FOR t3_killed'; + +# Now we can allow T1 to proceed. +SET debug_sync='now SIGNAL t1_cont'; + +--let $slave_sql_errno= 1317,1927,1964 +--source include/wait_for_slave_sql_error.inc +STOP SLAVE IO_THREAD; +# Since T2, T3, and T4 run in parallel, we can not be sure if T2 will have time +# to commit or not before the stop. However, T1 should commit, and T3/T4 may +# not have committed. (After slave restart we check that all become committed +# eventually). +SELECT * FROM t3 WHERE a >= 60 AND a != 65 ORDER BY a; + +# Now we have to disable the debug_sync statements, so they do not trigger +# when the events are retried. +SET debug_sync='RESET'; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + +--connection server_1 +UPDATE t3 SET b=b+1 WHERE a=60; +--save_master_pos + +--connection server_2 +--source include/start_slave.inc +--sync_with_master +SELECT * FROM t3 WHERE a >= 60 ORDER BY a; +# Restore the foo() function. +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + IF d1 != '' THEN + SET debug_sync = d1; + END IF; + IF d2 != '' THEN + SET debug_sync = d2; + END IF; + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + +--connection server_2 +# Respawn all worker threads to clear any left-over debug_sync or other stuff. +--source include/stop_slave.inc +SET GLOBAL binlog_format=@old_format; +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +--source include/start_slave.inc + + +--echo *** 5. Test killing thread that is waiting for queue of max length to shorten *** + +# Find the thread id of the driver SQL thread that we want to kill. +--let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%' +--source include/wait_condition.inc +--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%'` +SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued; +SET GLOBAL slave_parallel_max_queued=9000; + +--connection server_1 +--let bigstring= `SELECT REPEAT('x', 10000)` +SET binlog_format=statement; +# Create an event that will wait to be signalled. +INSERT INTO t3 VALUES (80, foo(0, + 'ha_write_row_end SIGNAL query_waiting WAIT_FOR query_cont', '')); + +--connection server_2 +SET debug_sync='now WAIT_FOR query_waiting'; +# Inject that the SQL driver thread will signal `wait_queue_ready' to debug_sync +# as it goes to wait for the event queue to become smaller than the value of +# @@slave_parallel_max_queued. +SET @old_dbug= @@GLOBAL.debug_dbug; +SET GLOBAL debug_dbug="+d,rpl_parallel_wait_queue_max"; + +--connection server_1 +--disable_query_log +# Create an event that will fill up the queue. +# The Xid event at the end of the event group will have to wait for the Query +# event with the INSERT to drain so the queue becomes shorter. However that in +# turn waits for the prior event group to continue. +eval INSERT INTO t3 VALUES (81, LENGTH('$bigstring')); +--enable_query_log +SELECT * FROM t3 WHERE a >= 80 ORDER BY a; + +--connection server_2 +SET debug_sync='now WAIT_FOR wait_queue_ready'; + +--replace_result $thd_id THD_ID +eval KILL $thd_id; + +SET debug_sync='now WAIT_FOR wait_queue_killed'; +SET debug_sync='now SIGNAL query_cont'; + +--let $slave_sql_errno= 1317,1927,1964 +--source include/wait_for_slave_sql_error.inc +STOP SLAVE IO_THREAD; + +SET GLOBAL debug_dbug=@old_dbug; +SET GLOBAL slave_parallel_max_queued= @old_max_queued; + +--connection server_1 +INSERT INTO t3 VALUES (82,0); +--save_master_pos + +--connection server_2 +SET debug_sync='RESET'; +--source include/start_slave.inc +--sync_with_master +SELECT * FROM t3 WHERE a >= 80 ORDER BY a; + + +--connection server_2 --source include/stop_slave.inc SET GLOBAL binlog_format=@old_format; SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; --source include/start_slave.inc +--echo *** MDEV-5788 Incorrect free of rgi->deferred_events in parallel replication *** + +--connection server_2 +# Use just two worker threads, so we are sure to get the rpl_group_info added +# to the free list, which is what triggered the bug. +--source include/stop_slave.inc +SET GLOBAL replicate_ignore_table="test.t3"; +SET GLOBAL slave_parallel_threads=2; +--source include/start_slave.inc + +--connection server_1 +INSERT INTO t3 VALUES (100, rand()); +INSERT INTO t3 VALUES (101, rand()); + +--save_master_pos + +--connection server_2 +--sync_with_master + +--connection server_1 +INSERT INTO t3 VALUES (102, rand()); +INSERT INTO t3 VALUES (103, rand()); +INSERT INTO t3 VALUES (104, rand()); +INSERT INTO t3 VALUES (105, rand()); + +--connection server_2 +--sync_with_master +--source include/stop_slave.inc +SET GLOBAL replicate_ignore_table=""; +--source include/start_slave.inc + +--connection server_1 +INSERT INTO t3 VALUES (106, rand()); +INSERT INTO t3 VALUES (107, rand()); +--save_master_pos + +--connection server_2 +--sync_with_master +--replace_column 2 # +SELECT * FROM t3 WHERE a >= 100 ORDER BY a; + --connection server_2 --source include/stop_slave.inc SET GLOBAL slave_parallel_threads=@old_parallel_threads; --source include/start_slave.inc +SET DEBUG_SYNC= 'RESET'; --connection server_1 DROP function foo; DROP TABLE t1,t2,t3; +SET DEBUG_SYNC= 'RESET'; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel2.test b/mysql-test/suite/rpl/t/rpl_parallel2.test new file mode 100644 index 00000000000..39b35063c7c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_parallel2.test @@ -0,0 +1,41 @@ +--source include/have_binlog_format_statement.inc +--let $rpl_topology=1->2 +--source include/rpl_init.inc + +--echo *** MDEV-5509: Incorrect value for Seconds_Behind_Master if parallel replication *** + +--connection server_2 +SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; +--source include/stop_slave.inc +SET GLOBAL slave_parallel_threads=5; +--source include/start_slave.inc + +--connection server_1 +CREATE TABLE t1 (a INT PRIMARY KEY, b INT); +CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave"); +--save_master_pos + +--connection server_2 +--sync_with_master + +--connection server_1 +INSERT INTO t1 VALUES (1,sleep(2)); +--save_master_pos + +--connection server_2 +--sync_with_master + +--echo Seconds_Behind_Master should be zero here because the slave is fully caught up and idle. +--let $status_items= Seconds_Behind_Master +--source include/show_slave_status.inc + + +--connection server_2 +--source include/stop_slave.inc +SET GLOBAL slave_parallel_threads=@old_parallel_threads; +--source include/start_slave.inc + +--connection server_1 +DROP TABLE t1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates-slave.opt b/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates-slave.opt new file mode 100644 index 00000000000..acd68493e0a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates-slave.opt @@ -0,0 +1 @@ +--log-slave-updates=0 diff --git a/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test b/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test new file mode 100644 index 00000000000..75db619d225 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test @@ -0,0 +1,201 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +--source include/have_binlog_format_statement.inc +--let $rpl_topology=1->2 +--source include/rpl_init.inc + +--echo *** Test killing transaction waiting in commit for previous transaction to commit, when not using 2-phase commit *** + +--connection server_2 +SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; +--source include/stop_slave.inc +SET GLOBAL slave_parallel_threads=10; +CHANGE MASTER TO master_use_gtid=slave_pos; +--source include/start_slave.inc + +--connection server_1 +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; +# Use a stored function to inject a debug_sync into the appropriate THD. +# The function does nothing on the master, and on the slave it injects the +# desired debug_sync action(s). +SET sql_log_bin=0; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; +CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; +--save_master_pos + +--connection server_2 +SET sql_log_bin=0; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + IF d1 != '' THEN + SET debug_sync = d1; + END IF; + IF d2 != '' THEN + SET debug_sync = d2; + END IF; + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; +--sync_with_master + + +# Set up three transactions on the master that will be group-committed +# together so they can be replicated in parallel on the slave. +--connect (con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,) +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; +SET binlog_format=statement; +send INSERT INTO t3 VALUES (31, foo(31, + 'ha_commit_one_phase WAIT_FOR t2_waiting', + 'commit_one_phase_2 SIGNAL t1_ready WAIT_FOR t1_cont')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued1'; + +--connect (con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,) +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; +SET binlog_format=statement; +BEGIN; +# This insert is just so we can get T2 to wait while a query is running that we +# can see in SHOW PROCESSLIST so we can get its thread_id to kill later. +INSERT INTO t3 VALUES (32, foo(32, + 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont', + '')); +# This insert sets up debug_sync points so that T2 will tell when it is at its +# wait point where we want to kill it - and when it has been killed. +INSERT INTO t3 VALUES (33, foo(33, + 'wait_for_prior_commit_waiting SIGNAL t2_waiting', + 'wait_for_prior_commit_killed SIGNAL t2_killed')); +send COMMIT; + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued2'; + +--connect (con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,) +SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3'; +SET binlog_format=statement; +send INSERT INTO t3 VALUES (34, foo(34, + '', + '')); + +--connection server_1 +SET debug_sync='now WAIT_FOR master_queued3'; +SET debug_sync='now SIGNAL master_cont1'; + +--connection con_temp3 +REAP; +--connection con_temp4 +REAP; +--connection con_temp5 +REAP; + +--connection server_1 +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; + +--connection server_2 +SET sql_log_bin=0; +CALL mtr.add_suppression("Query execution was interrupted"); +CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends"); +CALL mtr.add_suppression("Slave: Connection was killed"); +SET sql_log_bin=1; +# Wait until T2 is inside executing its insert of 32, then find it in SHOW +# PROCESSLIST to know its thread id for KILL later. +SET debug_sync='now WAIT_FOR t2_query'; +--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(32%' AND INFO NOT LIKE '%LIKE%'` +SET debug_sync='now SIGNAL t2_cont'; + +# Wait until T2 has entered its wait for T1 to commit, and T1 has +# progressed into its commit phase. +SET debug_sync='now WAIT_FOR t1_ready'; + +# Now kill the transaction T2. +--replace_result $thd_id THD_ID +eval KILL $thd_id; + +# Wait until T2 has reacted on the kill. +SET debug_sync='now WAIT_FOR t2_killed'; + +# Now we can allow T1 to proceed. +SET debug_sync='now SIGNAL t1_cont'; + +--let $slave_sql_errno= 1317,1927,1963 +--source include/wait_for_slave_sql_error.inc +STOP SLAVE IO_THREAD; +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; + +# Now we have to disable the debug_sync statements, so they do not trigger +# when the events are retried. +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + +--connection server_1 +INSERT INTO t3 VALUES (39,0); +--save_master_pos + +--connection server_2 +--source include/start_slave.inc +--sync_with_master +SELECT * FROM t3 WHERE a >= 30 ORDER BY a; +# Restore the foo() function. +SET sql_log_bin=0; +DROP FUNCTION foo; +--delimiter || +CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) + RETURNS INT DETERMINISTIC + BEGIN + IF d1 != '' THEN + SET debug_sync = d1; + END IF; + IF d2 != '' THEN + SET debug_sync = d2; + END IF; + RETURN x; + END +|| +--delimiter ; +SET sql_log_bin=1; + + +--connection server_2 +# Respawn all worker threads to clear any left-over debug_sync or other stuff. +--source include/stop_slave.inc +SET GLOBAL slave_parallel_threads=0; +SET GLOBAL slave_parallel_threads=10; +--source include/start_slave.inc + + +--connection server_2 +--source include/stop_slave.inc +SET GLOBAL slave_parallel_threads=@old_parallel_threads; +SET debug_sync = 'reset'; +--source include/start_slave.inc + +--connection server_1 +DROP function foo; +DROP TABLE t3; +SET debug_sync = 'reset'; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test index 4dd4fccc363..273786cf807 100644 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test @@ -176,6 +176,7 @@ unlock tables; #clean up connection master; drop table if exists t1,t2,t3,t4; +drop temporary table temp_table; sync_slave_with_master; --echo End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test index ef3c0758643..da73d753dcd 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -28,7 +28,8 @@ START SLAVE; --source include/rpl_reset.inc connection master; -CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t1 (a INT); +CREATE OR REPLACE TABLE t1 (a INT, b INT); CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; diff --git a/mysql-test/suite/rpl/t/rpl_slave_status.test b/mysql-test/suite/rpl/t/rpl_slave_status.test index d9da40d9d3f..fc82b3f8df6 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_status.test +++ b/mysql-test/suite/rpl/t/rpl_slave_status.test @@ -2,7 +2,7 @@ # # Verify that a slave without replication privileges has # Slave_IO_Running = No -# +# Check that relay_log_status doesn't change by CHANGE MASTER # ==== Method ==== # # We do the following steps: @@ -28,6 +28,17 @@ GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl'; --echo [on slave] sync_slave_with_master; source include/stop_slave.inc; + +# Test that relay_log_purge doesn't change because of CHANGE MASTER +set @save_relay_log_purge=@@global.relay_log_purge; +set @@global.relay_log_purge=0; +CHANGE MASTER TO master_user='rpl', master_password='rpl'; +select @@global.relay_log_purge; +set @@global.relay_log_purge=1; +CHANGE MASTER TO master_user='rpl', master_password='rpl'; +select @@global.relay_log_purge; +set @@global.relay_log_purge=@save_relay_log_purge; + CHANGE MASTER TO master_user='rpl', master_password='rpl'; source include/start_slave.inc; diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test index 0805308aa73..3a87a8f1ef9 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_000001.test +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -92,8 +92,8 @@ let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHE source include/wait_condition.inc; select (@id := id) - id from t2; kill @id; -# We don't drop t3 as this is a temporary table drop table t2; +drop temporary table t3; connection master; # The get_lock function causes warning for unsafe statement. --disable_warnings diff --git a/mysql-test/suite/rpl/t/rpl_stm_log.test b/mysql-test/suite/rpl/t/rpl_stm_log.test index 7e7e1d4033f..23130528465 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_log.test +++ b/mysql-test/suite/rpl/t/rpl_stm_log.test @@ -4,7 +4,5 @@ let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_log.test - # End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012: Delete me --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stop_slave.test index 7e57359877b..d9d7f39c321 100644 --- a/mysql-test/suite/rpl/t/rpl_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test @@ -107,7 +107,6 @@ ROLLBACK; --source include/rpl_connection_master.inc SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; -SET DEBUG_SYNC= 'RESET'; --source include/rpl_connection_slave.inc source include/wait_for_slave_to_stop.inc; @@ -122,3 +121,4 @@ DROP TABLE t1, t2; eval SET GLOBAL debug_dbug= '$debug_save'; --enable_query_log --source include/rpl_end.inc +SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/suite/storage_engine/alter_tablespace.result b/mysql-test/suite/storage_engine/alter_tablespace.result index cca154d9611..b54d7c99e9e 100644 --- a/mysql-test/suite/storage_engine/alter_tablespace.result +++ b/mysql-test/suite/storage_engine/alter_tablespace.result @@ -13,7 +13,7 @@ SELECT a FROM t1; ERROR HY000: Tablespace has been discarded for table 't1' ALTER TABLE t1 IMPORT TABLESPACE; Warnings: -Warning 1810 <STORAGE_ENGINE>: IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification +Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification SELECT a FROM t1; a 1 diff --git a/mysql-test/suite/sys_vars/r/back_log_basic.result b/mysql-test/suite/sys_vars/r/back_log_basic.result index 5cfb0da65d6..d68e72a8a4a 100644 --- a/mysql-test/suite/sys_vars/r/back_log_basic.result +++ b/mysql-test/suite/sys_vars/r/back_log_basic.result @@ -1,20 +1,20 @@ select @@global.back_log; @@global.back_log -50 +150 select @@session.back_log; ERROR HY000: Variable 'back_log' is a GLOBAL variable show global variables like 'back_log'; Variable_name Value -back_log 50 +back_log 150 show session variables like 'back_log'; Variable_name Value -back_log 50 +back_log 150 select * from information_schema.global_variables where variable_name='back_log'; VARIABLE_NAME VARIABLE_VALUE -BACK_LOG 50 +BACK_LOG 150 select * from information_schema.session_variables where variable_name='back_log'; VARIABLE_NAME VARIABLE_VALUE -BACK_LOG 50 +BACK_LOG 150 set global back_log=1; ERROR HY000: Variable 'back_log' is a read only variable set session back_log=1; diff --git a/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result b/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result index 937a3b164fa..64028e537bf 100644 --- a/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result +++ b/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result @@ -9,7 +9,7 @@ SELECT @global_start_value; select @old_session_opt_switch:=@@session.optimizer_switch, @old_global_opt_switch:=@@global.optimizer_switch; @old_session_opt_switch:=@@session.optimizer_switch @old_global_opt_switch:=@@global.optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off '#--------------------FN_DYNVARS_028_01------------------------#' SET @@session.engine_condition_pushdown = 0; Warnings: @@ -212,7 +212,7 @@ select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off set @@session.engine_condition_pushdown = TRUE; Warnings: Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead @@ -220,7 +220,7 @@ select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off set @@session.engine_condition_pushdown = FALSE; Warnings: Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead @@ -228,7 +228,7 @@ select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off set @@global.engine_condition_pushdown = TRUE; Warnings: Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead @@ -236,7 +236,7 @@ select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off set @@global.engine_condition_pushdown = FALSE; Warnings: Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead @@ -244,31 +244,31 @@ select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off set @@session.optimizer_switch = "engine_condition_pushdown=on"; select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off set @@session.optimizer_switch = "engine_condition_pushdown=off"; select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off set @@global.optimizer_switch = "engine_condition_pushdown=on"; select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off set @@global.optimizer_switch = "engine_condition_pushdown=off"; select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off SET @@session.engine_condition_pushdown = @session_start_value; Warnings: Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead @@ -287,4 +287,4 @@ select @@session.engine_condition_pushdown, @@global.engine_condition_pushdown, @@session.optimizer_switch, @@global.optimizer_switch; @@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch -0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result index ce57dbb2fdc..6f1c4c21d17 100644 --- a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result @@ -160,8 +160,12 @@ compress_pages_compressed disabled compress_pages_decompressed disabled compression_pad_increments disabled compression_pad_decrements disabled -index_splits disabled -index_merges disabled +index_page_splits disabled +index_page_merge_attempts disabled +index_page_merge_successful disabled +index_page_reorg_attempts disabled +index_page_reorg_successful disabled +index_page_discards disabled adaptive_hash_searches disabled adaptive_hash_searches_btree disabled adaptive_hash_pages_added disabled diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result index ce57dbb2fdc..6f1c4c21d17 100644 --- a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result @@ -160,8 +160,12 @@ compress_pages_compressed disabled compress_pages_decompressed disabled compression_pad_increments disabled compression_pad_decrements disabled -index_splits disabled -index_merges disabled +index_page_splits disabled +index_page_merge_attempts disabled +index_page_merge_successful disabled +index_page_reorg_attempts disabled +index_page_reorg_successful disabled +index_page_discards disabled adaptive_hash_searches disabled adaptive_hash_searches_btree disabled adaptive_hash_pages_added disabled diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result index ce57dbb2fdc..6f1c4c21d17 100644 --- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result @@ -160,8 +160,12 @@ compress_pages_compressed disabled compress_pages_decompressed disabled compression_pad_increments disabled compression_pad_decrements disabled -index_splits disabled -index_merges disabled +index_page_splits disabled +index_page_merge_attempts disabled +index_page_merge_successful disabled +index_page_reorg_attempts disabled +index_page_reorg_successful disabled +index_page_discards disabled adaptive_hash_searches disabled adaptive_hash_searches_btree disabled adaptive_hash_pages_added disabled diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result index ce57dbb2fdc..6f1c4c21d17 100644 --- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result @@ -160,8 +160,12 @@ compress_pages_compressed disabled compress_pages_decompressed disabled compression_pad_increments disabled compression_pad_decrements disabled -index_splits disabled -index_merges disabled +index_page_splits disabled +index_page_merge_attempts disabled +index_page_merge_successful disabled +index_page_reorg_attempts disabled +index_page_reorg_successful disabled +index_page_discards disabled adaptive_hash_searches disabled adaptive_hash_searches_btree disabled adaptive_hash_pages_added disabled diff --git a/mysql-test/suite/sys_vars/r/last_gtid_basic.result b/mysql-test/suite/sys_vars/r/last_gtid_basic.result new file mode 100644 index 00000000000..d39b6595f04 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/last_gtid_basic.result @@ -0,0 +1,9 @@ +SELECT @@global.last_gtid; +ERROR HY000: Variable 'last_gtid' is a SESSION variable +SET GLOBAL last_gtid= 10; +ERROR HY000: Variable 'last_gtid' is a read only variable +SET SESSION last_gtid= 20; +ERROR HY000: Variable 'last_gtid' is a read only variable +SELECT @@session.last_gtid; +@@session.last_gtid + diff --git a/mysql-test/suite/sys_vars/r/old_mode_basic.result b/mysql-test/suite/sys_vars/r/old_mode_basic.result new file mode 100644 index 00000000000..052221d796e --- /dev/null +++ b/mysql-test/suite/sys_vars/r/old_mode_basic.result @@ -0,0 +1,178 @@ +SET @global_start_value = @@global.old_mode; +SELECT @global_start_value; +@global_start_value + +SET @session_start_value = @@session.old_mode; +SELECT @session_start_value; +@session_start_value + +'#--------------------FN_DYNVARS_152_01------------------------#' +SET @@global.old_mode = "NO_PROGRESS_INFO"; +SET @@global.old_mode = DEFAULT; +SELECT @@global.old_mode; +@@global.old_mode + +SET @@session.old_mode = "NO_PROGRESS_INFO"; +SET @@session.old_mode = DEFAULT; +SELECT @@session.old_mode; +@@session.old_mode + +'#---------------------FN_DYNVARS_152_02-------------------------#' +SET @@global.old_mode = NULL; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'NULL' +SET @@global.old_mode = ''; +SELECT @@global.old_mode; +@@global.old_mode + +SET @@global.old_mode = ' '; +SELECT @@global.old_mode; +@@global.old_mode + +SET @@session.old_mode = NULL; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'NULL' +SET @@session.old_mode = ''; +SELECT @@session.old_mode; +@@session.old_mode + +SET @@session.old_mode = ' '; +SELECT @@session.old_mode; +@@session.old_mode + +'#--------------------FN_DYNVARS_152_03------------------------#' +SET @@global.old_mode = NO_PROGRESS_INFO; +SELECT @@global.old_mode; +@@global.old_mode +NO_PROGRESS_INFO +SET @@global.old_mode = NO_DUP_KEY_WARNINGS_WITH_IGNORE; +SELECT @@global.old_mode; +@@global.old_mode +NO_DUP_KEY_WARNINGS_WITH_IGNORE +SET @@global.old_mode = OFF; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'OFF' +SET @@session.old_mode = NO_PROGRESS_INFO; +SELECT @@session.old_mode; +@@session.old_mode +NO_PROGRESS_INFO +SET @@session.old_mode = NO_DUP_KEY_WARNINGS_WITH_IGNORE; +SELECT @@session.old_mode; +@@session.old_mode +NO_DUP_KEY_WARNINGS_WITH_IGNORE +SET @@session.old_mode = OFF; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'OFF' +SET @@global.old_mode = '?'; +ERROR 42000: Variable 'old_mode' can't be set to the value of '?' +SELECT @@global.old_mode; +@@global.old_mode +NO_DUP_KEY_WARNINGS_WITH_IGNORE +'#--------------------FN_DYNVARS_152_04-------------------------#' +SET @@global.old_mode = -1; +ERROR 42000: Variable 'old_mode' can't be set to the value of '-1' +SET @@global.old_mode = ASCII; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'ASCII' +SET @@global.old_mode = NON_TRADITIONAL; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'NON_TRADITIONAL' +SET @@global.old_mode = 'OF'; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'OF' +SET @@global.old_mode = NONE; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'NONE' +SET @@session.old_mode = -1; +ERROR 42000: Variable 'old_mode' can't be set to the value of '-1' +SET @@session.old_mode = ANSI_SINGLE_QUOTES; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'ANSI_SINGLE_QUOTES' +SET @@session.old_mode = 'ON'; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'ON' +SET @@session.old_mode = 'OF'; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'OF' +SET @@session.old_mode = DISABLE; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'DISABLE' +'#-------------------FN_DYNVARS_152_05----------------------------#' +SELECT @@session.old_mode = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='old_mode'; +@@session.old_mode = VARIABLE_VALUE +1 +'#----------------------FN_DYNVARS_152_06------------------------#' +SELECT @@global.old_mode = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='old_mode'; +@@global.old_mode = VARIABLE_VALUE +1 +'#---------------------FN_DYNVARS_152_07-------------------------#' +SET @@global.old_mode = 0; +SELECT @@global.old_mode; +@@global.old_mode + +SET @@global.old_mode = 1; +SELECT @@global.old_mode; +@@global.old_mode +NO_DUP_KEY_WARNINGS_WITH_IGNORE +SET @@global.old_mode = 2; +SELECT @@global.old_mode; +@@global.old_mode +NO_PROGRESS_INFO +SET @@global.old_mode = 4; +SELECT @@global.old_mode; +@@global.old_mode +ZERO_DATE_TIME_CAST +SET @@global.old_mode = 8; +ERROR 42000: Variable 'old_mode' can't be set to the value of '8' +SELECT @@global.old_mode; +@@global.old_mode +ZERO_DATE_TIME_CAST +SET @@global.old_mode = 0.4; +ERROR 42000: Incorrect argument type to variable 'old_mode' +'#---------------------FN_DYNVARS_152_08----------------------#' +SET @@global.old_mode = TRUE; +SELECT @@global.old_mode; +@@global.old_mode +NO_DUP_KEY_WARNINGS_WITH_IGNORE +SET @@global.old_mode = FALSE; +SELECT @@global.old_mode; +@@global.old_mode + +'#---------------------FN_DYNVARS_152_09----------------------#' +SET old_mode = 'NO_PROGRESS_INFO'; +SET session.old_mode = 'ANSI'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'old_mode = 'ANSI'' at line 1 +SET global.old_mode = 'ANSI'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'old_mode = 'ANSI'' at line 1 +SET session old_mode = 1; +SELECT @@old_mode; +@@old_mode +NO_DUP_KEY_WARNINGS_WITH_IGNORE +SET global old_mode = 0; +SELECT @@global.old_mode; +@@global.old_mode + +'#---------------------FN_DYNVARS_152_10----------------------#' +SET @@session.old_mode = 'NO_PROGRESS_INFO,NO_DUP_KEY_WARNINGS_WITH_IGNORE'; +SELECT @@session.old_mode; +@@session.old_mode +NO_DUP_KEY_WARNINGS_WITH_IGNORE,NO_PROGRESS_INFO +SET @@global.old_mode = 'NO_DUP_KEY_WARNINGS_WITH_IGNORE,NO_PROGRESS_INFO'; +SELECT @@global.old_mode; +@@global.old_mode +NO_DUP_KEY_WARNINGS_WITH_IGNORE,NO_PROGRESS_INFO +SET @@session.old_mode = 'NO_PROGRESS_INFO,NO_SUCH_MODE'; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'NO_SUCH_MODE' +SET @@old_mode=','; +SELECT @@old_mode; +@@old_mode + +SET @@old_mode=',,,,NO_PROGRESS_INFO,,,'; +SELECT @@old_mode; +@@old_mode +NO_PROGRESS_INFO +SET @@old_mode=',,,,FOOBAR,,,,,'; +ERROR 42000: Variable 'old_mode' can't be set to the value of 'FOOBAR' +SELECT @@old_mode; +@@old_mode +NO_PROGRESS_INFO +SET @@global.old_mode = @global_start_value; +SELECT @@global.old_mode; +@@global.old_mode + +SET @@session.old_mode = @session_start_value; +SELECT @@session.old_mode; +@@session.old_mode + diff --git a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result index 8a9c49def85..99b1d6296a8 100644 --- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result +++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result @@ -1,25 +1,25 @@ SET @start_global_value = @@global.optimizer_switch; SELECT @start_global_value; @start_global_value -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off select @@global.optimizer_switch; @@global.optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off select @@session.optimizer_switch; @@session.optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off show global variables like 'optimizer_switch'; Variable_name Value -optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off show session variables like 'optimizer_switch'; Variable_name Value -optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off select * from information_schema.global_variables where variable_name='optimizer_switch'; VARIABLE_NAME VARIABLE_VALUE -OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off select * from information_schema.session_variables where variable_name='optimizer_switch'; VARIABLE_NAME VARIABLE_VALUE -OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off set global optimizer_switch=10; set session optimizer_switch=5; select @@global.optimizer_switch; @@ -67,4 +67,4 @@ ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'foobar' SET @@global.optimizer_switch = @start_global_value; SELECT @@global.optimizer_switch; @@global.optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off diff --git a/mysql-test/suite/sys_vars/r/progress_report_time_basic.result b/mysql-test/suite/sys_vars/r/progress_report_time_basic.result index 7aab917b4f8..b8e8c39f451 100644 --- a/mysql-test/suite/sys_vars/r/progress_report_time_basic.result +++ b/mysql-test/suite/sys_vars/r/progress_report_time_basic.result @@ -1,22 +1,22 @@ SET @start_global_value = @@global.progress_report_time; select @@global.progress_report_time; @@global.progress_report_time -56 +5 select @@session.progress_report_time; @@session.progress_report_time -56 +5 show global variables like 'progress_report_time'; Variable_name Value -progress_report_time 56 +progress_report_time 5 show session variables like 'progress_report_time'; Variable_name Value -progress_report_time 56 +progress_report_time 5 select * from information_schema.global_variables where variable_name='progress_report_time'; VARIABLE_NAME VARIABLE_VALUE -PROGRESS_REPORT_TIME 56 +PROGRESS_REPORT_TIME 5 select * from information_schema.session_variables where variable_name='progress_report_time'; VARIABLE_NAME VARIABLE_VALUE -PROGRESS_REPORT_TIME 56 +PROGRESS_REPORT_TIME 5 set global progress_report_time=10; select @@global.progress_report_time; @@global.progress_report_time diff --git a/mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_basic.result b/mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_basic.result new file mode 100644 index 00000000000..e758e61f648 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_basic.result @@ -0,0 +1,39 @@ +SET @start_value = @@global.slave_ddl_exec_mode; +SELECT @@global.slave_ddl_exec_mode; +@@global.slave_ddl_exec_mode +IDEMPOTENT +SELECT @@slave_ddl_exec_mode = @@GLOBAL.slave_ddl_exec_mode; +@@slave_ddl_exec_mode = @@GLOBAL.slave_ddl_exec_mode +1 +1 Expected +SELECT COUNT(@@slave_ddl_exec_mode); +COUNT(@@slave_ddl_exec_mode) +1 +1 Expected +SELECT COUNT(@@local.slave_ddl_exec_mode); +ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT COUNT(@@SESSION.slave_ddl_exec_mode); +ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT COUNT(@@GLOBAL.slave_ddl_exec_mode); +COUNT(@@GLOBAL.slave_ddl_exec_mode) +1 +1 Expected +SELECT slave_ddl_exec_mode = @@SESSION.version; +ERROR 42S22: Unknown column 'slave_ddl_exec_mode' in 'field list' +Expected error 'Readonly variable' +SET @@GLOBAL.slave_ddl_exec_mode=STRICT; +SELECT @@GLOBAL.slave_ddl_exec_mode; +@@GLOBAL.slave_ddl_exec_mode +STRICT +SET @@GLOBAL.slave_ddl_exec_mode=IDEMPOTENT; +SELECT @@GLOBAL.slave_ddl_exec_mode; +@@GLOBAL.slave_ddl_exec_mode +IDEMPOTENT +SET @@GLOBAL.slave_ddl_exec_mode=XXX; +ERROR 42000: Variable 'slave_ddl_exec_mode' can't be set to the value of 'XXX' +SELECT @@GLOBAL.slave_ddl_exec_mode; +@@GLOBAL.slave_ddl_exec_mode +IDEMPOTENT +SET @@global.slave_ddl_exec_mode= @start_value; diff --git a/mysql-test/suite/sys_vars/r/slave_domain_parallel_threads_basic.result b/mysql-test/suite/sys_vars/r/slave_domain_parallel_threads_basic.result new file mode 100644 index 00000000000..9e53d9bd891 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/slave_domain_parallel_threads_basic.result @@ -0,0 +1,13 @@ +SET @save_slave_domain_parallel_threads= @@GLOBAL.slave_domain_parallel_threads; +SELECT @@GLOBAL.slave_domain_parallel_threads as 'must be zero because of default'; +must be zero because of default +0 +SELECT @@SESSION.slave_domain_parallel_threads as 'no session var'; +ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable +SET GLOBAL slave_domain_parallel_threads= 0; +SET GLOBAL slave_domain_parallel_threads= DEFAULT; +SET GLOBAL slave_domain_parallel_threads= 10; +SELECT @@GLOBAL.slave_domain_parallel_threads; +@@GLOBAL.slave_domain_parallel_threads +10 +SET GLOBAL slave_domain_parallel_threads = @save_slave_domain_parallel_threads; diff --git a/mysql-test/suite/sys_vars/r/version_malloc_library_basic.result b/mysql-test/suite/sys_vars/r/version_malloc_library_basic.result new file mode 100644 index 00000000000..5895b8122d9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/version_malloc_library_basic.result @@ -0,0 +1,53 @@ +'#---------------------BS_STVARS_053_01----------------------#' +SELECT COUNT(@@GLOBAL.version_malloc_library); +COUNT(@@GLOBAL.version_malloc_library) +1 +1 Expected +'#---------------------BS_STVARS_053_02----------------------#' +SET @@GLOBAL.version_malloc_library=1; +ERROR HY000: Variable 'version_malloc_library' is a read only variable +Expected error 'Read only variable' +SELECT COUNT(@@GLOBAL.version_malloc_library); +COUNT(@@GLOBAL.version_malloc_library) +1 +1 Expected +'#---------------------BS_STVARS_053_03----------------------#' +SELECT @@GLOBAL.version_malloc_library = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='version_malloc_library'; +@@GLOBAL.version_malloc_library = VARIABLE_VALUE +1 +1 Expected +SELECT COUNT(@@GLOBAL.version_malloc_library); +COUNT(@@GLOBAL.version_malloc_library) +1 +1 Expected +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='version_malloc_library'; +COUNT(VARIABLE_VALUE) +1 +1 Expected +'#---------------------BS_STVARS_053_04----------------------#' +SELECT @@version_malloc_library = @@GLOBAL.version_malloc_library; +@@version_malloc_library = @@GLOBAL.version_malloc_library +1 +1 Expected +'#---------------------BS_STVARS_053_05----------------------#' +SELECT COUNT(@@version_malloc_library); +COUNT(@@version_malloc_library) +1 +1 Expected +SELECT COUNT(@@local.version_malloc_library); +ERROR HY000: Variable 'version_malloc_library' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT COUNT(@@SESSION.version_malloc_library); +ERROR HY000: Variable 'version_malloc_library' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT COUNT(@@GLOBAL.version_malloc_library); +COUNT(@@GLOBAL.version_malloc_library) +1 +1 Expected +SELECT version_malloc_library = @@SESSION.version; +ERROR 42S22: Unknown column 'version_malloc_library' in 'field list' +Expected error 'Readonly variable' diff --git a/mysql-test/suite/sys_vars/t/identity_func.test b/mysql-test/suite/sys_vars/t/identity_func.test index 6f7b6bac18e..ff93607a2cd 100644 --- a/mysql-test/suite/sys_vars/t/identity_func.test +++ b/mysql-test/suite/sys_vars/t/identity_func.test @@ -1,9 +1,3 @@ ---source include/not_windows_embedded.inc -# remove this when -# Bug#53947 InnoDB: Assertion failure in thread 4224 in file -# .\sync\sync0sync.c line 324 -# is fixed - #################### mysql-test\t\identity_func.test ########################## # # # Variable Name: identity # diff --git a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func.test b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func.test index 082507efd07..89c1c80a6dc 100644 --- a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func.test +++ b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func.test @@ -1,9 +1,3 @@ ---source include/not_windows_embedded.inc -# remove this when -# Bug#53947 InnoDB: Assertion failure in thread 4224 in file -# .\sync\sync0sync.c line 324 -# is fixed - ################# mysql-test\t\innodb_autoinc_lock_mode_func.test ############ # # # Variable Name: innodb_autoinc_lock_mode # diff --git a/mysql-test/suite/sys_vars/t/last_gtid_basic.test b/mysql-test/suite/sys_vars/t/last_gtid_basic.test new file mode 100644 index 00000000000..85fbf079bfb --- /dev/null +++ b/mysql-test/suite/sys_vars/t/last_gtid_basic.test @@ -0,0 +1,11 @@ +--source include/not_embedded.inc + +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@global.last_gtid; + +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET GLOBAL last_gtid= 10; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET SESSION last_gtid= 20; + +SELECT @@session.last_gtid; diff --git a/mysql-test/suite/sys_vars/t/last_insert_id_func.test b/mysql-test/suite/sys_vars/t/last_insert_id_func.test index bb3adbc1c64..2309c539bd9 100644 --- a/mysql-test/suite/sys_vars/t/last_insert_id_func.test +++ b/mysql-test/suite/sys_vars/t/last_insert_id_func.test @@ -1,9 +1,3 @@ ---source include/not_windows_embedded.inc -# remove this when -# Bug#53947 InnoDB: Assertion failure in thread 4224 in file -# .\sync\sync0sync.c line 324 -# is fixed - ################# mysql-test\t\last_insert_id_func.test ####################### # # # Variable Name: last_insert_id # diff --git a/mysql-test/suite/sys_vars/t/old_mode_basic.test b/mysql-test/suite/sys_vars/t/old_mode_basic.test new file mode 100644 index 00000000000..93a93960836 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/old_mode_basic.test @@ -0,0 +1,247 @@ +#################### mysql-test\t\sql_mode_basic.test ######################### +# # +# Variable Name: old_mode # +# Scope: GLOBAL | SESSION # +# Access Type: Dynamic # +# Data Type: enumeration # +# Default Value: YES # +# Valid Values : NO_DUP_KEY_WARNINGS_WITH_IGNORE, NO_PROGRESS_INFO # +# # +# # +# Description: Test Cases of Dynamic System Variable old_mode # +# that checks the behavior of this variable in the following ways# +# * Default Value # +# * Valid & Invalid values # +# * Scope & Access method # +# * Data Integrity # +# # +# # +############################################################################### + +--source include/load_sysvars.inc + +################################################################ +# START OF sql_mode TESTS # +################################################################ + + +################################################################### +# Saving initial value of sql_mode in a temporary variable # +################################################################### + +SET @global_start_value = @@global.old_mode; +SELECT @global_start_value; + +SET @session_start_value = @@session.old_mode; +SELECT @session_start_value; + +--echo '#--------------------FN_DYNVARS_152_01------------------------#' +################################################################ +# Display the DEFAULT value of old_mode # +################################################################ + +SET @@global.old_mode = "NO_PROGRESS_INFO"; +SET @@global.old_mode = DEFAULT; +SELECT @@global.old_mode; + +SET @@session.old_mode = "NO_PROGRESS_INFO"; +SET @@session.old_mode = DEFAULT; +SELECT @@session.old_mode; + +--echo '#---------------------FN_DYNVARS_152_02-------------------------#' +######################################################### +# Check if NULL or empty value is accepeted # +######################################################### + +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = NULL; + +# resets sql mode to nothing +SET @@global.old_mode = ''; +SELECT @@global.old_mode; + +SET @@global.old_mode = ' '; +SELECT @@global.old_mode; + +--Error ER_WRONG_VALUE_FOR_VAR +SET @@session.old_mode = NULL; + +SET @@session.old_mode = ''; +SELECT @@session.old_mode; + +SET @@session.old_mode = ' '; +SELECT @@session.old_mode; + + +--echo '#--------------------FN_DYNVARS_152_03------------------------#' +######################################################################## +# Change the value of old_mode to a valid value # +######################################################################## + +# sql modes ref: http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html + +# check valid values for global + +SET @@global.old_mode = NO_PROGRESS_INFO; +SELECT @@global.old_mode; +SET @@global.old_mode = NO_DUP_KEY_WARNINGS_WITH_IGNORE; +SELECT @@global.old_mode; + +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = OFF; + +#check valid values for session +SET @@session.old_mode = NO_PROGRESS_INFO; +SELECT @@session.old_mode; +SET @@session.old_mode = NO_DUP_KEY_WARNINGS_WITH_IGNORE; +SELECT @@session.old_mode; + +--Error ER_WRONG_VALUE_FOR_VAR +SET @@session.old_mode = OFF; + +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = '?'; +SELECT @@global.old_mode; + +--echo '#--------------------FN_DYNVARS_152_04-------------------------#' +########################################################################### +# Change the value of old_mode to invalid value # +########################################################################### + +# invalid values for global +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = -1; +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = ASCII; +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = NON_TRADITIONAL; +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = 'OF'; +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = NONE; + +#invalid values for session + +--Error ER_WRONG_VALUE_FOR_VAR +SET @@session.old_mode = -1; +--Error ER_WRONG_VALUE_FOR_VAR +SET @@session.old_mode = ANSI_SINGLE_QUOTES; +--Error ER_WRONG_VALUE_FOR_VAR +SET @@session.old_mode = 'ON'; +--Error ER_WRONG_VALUE_FOR_VAR +SET @@session.old_mode = 'OF'; +--Error ER_WRONG_VALUE_FOR_VAR +SET @@session.old_mode = DISABLE; + + +--echo '#-------------------FN_DYNVARS_152_05----------------------------#' +######################################################################### +# Check if the value in session Table matches value in variable # +######################################################################### + +SELECT @@session.old_mode = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES +WHERE VARIABLE_NAME='old_mode'; + +--echo '#----------------------FN_DYNVARS_152_06------------------------#' +######################################################################### +# Check if the value in GLOBAL Table matches value in variable # +######################################################################### + +SELECT @@global.old_mode = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='old_mode'; + + +--echo '#---------------------FN_DYNVARS_152_07-------------------------#' +################################################################### +# Check if numbers can be used on variable # +################################################################### + +# test if variable accepts 0,1,2 +SET @@global.old_mode = 0; +SELECT @@global.old_mode; + +SET @@global.old_mode = 1; +SELECT @@global.old_mode; + +SET @@global.old_mode = 2; +SELECT @@global.old_mode; + +SET @@global.old_mode = 4; +SELECT @@global.old_mode; + +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = 8; +SELECT @@global.old_mode; + +# use of decimal values + +--Error ER_WRONG_TYPE_FOR_VAR +SET @@global.old_mode = 0.4; + +--echo '#---------------------FN_DYNVARS_152_08----------------------#' +################################################################### +# Check if TRUE and FALSE values can be used on variable # +################################################################### + +SET @@global.old_mode = TRUE; +SELECT @@global.old_mode; +SET @@global.old_mode = FALSE; +SELECT @@global.old_mode; + +--echo '#---------------------FN_DYNVARS_152_09----------------------#' +######################################################################### +# Check if old_mode can be accessed with and without @@ sign # +######################################################################### + +SET old_mode = 'NO_PROGRESS_INFO'; + +--Error ER_PARSE_ERROR +SET session.old_mode = 'ANSI'; +--Error ER_PARSE_ERROR +SET global.old_mode = 'ANSI'; + +SET session old_mode = 1; +SELECT @@old_mode; + +SET global old_mode = 0; +SELECT @@global.old_mode; + +--echo '#---------------------FN_DYNVARS_152_10----------------------#' +####################################################################### +# Check if old_mode values can be combined as specified # +####################################################################### + +SET @@session.old_mode = 'NO_PROGRESS_INFO,NO_DUP_KEY_WARNINGS_WITH_IGNORE'; +SELECT @@session.old_mode; + +SET @@global.old_mode = 'NO_DUP_KEY_WARNINGS_WITH_IGNORE,NO_PROGRESS_INFO'; +SELECT @@global.old_mode; + +#try combining invalid mode with correct mode +--Error ER_WRONG_VALUE_FOR_VAR +SET @@session.old_mode = 'NO_PROGRESS_INFO,NO_SUCH_MODE'; + +#zero-length values are ok +SET @@old_mode=','; +SELECT @@old_mode; +SET @@old_mode=',,,,NO_PROGRESS_INFO,,,'; +SELECT @@old_mode; +--Error ER_WRONG_VALUE_FOR_VAR +SET @@old_mode=',,,,FOOBAR,,,,,'; +SELECT @@old_mode; + +############################## +# Restore initial value # +############################## + +SET @@global.old_mode = @global_start_value; +SELECT @@global.old_mode; + +SET @@session.old_mode = @session_start_value; +SELECT @@session.old_mode; + +################################################################ +# END OF old_mode TESTS # +################################################################ diff --git a/mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_basic.test b/mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_basic.test new file mode 100644 index 00000000000..64f8a75f443 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_basic.test @@ -0,0 +1,67 @@ +############## mysql-test\t\slave_ddl_exec_mode_basic.test #################### +# # +# Variable Name: slave_ddl_exec_mode # +# Scope: GLOBAL & SESSION # +# Access Type: Dynamic # +# Data Type: Numeric # +# Default Value: 1 # +# Range: 1 - 65536 # +# # +# # +# Description: Test Cases of Dynamic System Variable slave_ddl_exec_mode # +# that checks the behavior of this variable in the following ways# +# * Default Value # +# * Valid & Invalid values # +# * Scope & Access method # +# * Data Integrity # +# # +############################################################################### + +--source include/not_embedded.inc +--source include/load_sysvars.inc + +######################################################################## +# START OF slave_ddl_exec_mode TESTS # +######################################################################## + +SET @start_value = @@global.slave_ddl_exec_mode; + +SELECT @@global.slave_ddl_exec_mode; + +SELECT @@slave_ddl_exec_mode = @@GLOBAL.slave_ddl_exec_mode; +--echo 1 Expected + +SELECT COUNT(@@slave_ddl_exec_mode); +--echo 1 Expected + +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT COUNT(@@local.slave_ddl_exec_mode); +--echo Expected error 'Variable is a GLOBAL variable' + +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT COUNT(@@SESSION.slave_ddl_exec_mode); +--echo Expected error 'Variable is a GLOBAL variable' + +SELECT COUNT(@@GLOBAL.slave_ddl_exec_mode); +--echo 1 Expected + +--Error ER_BAD_FIELD_ERROR +SELECT slave_ddl_exec_mode = @@SESSION.version; +--echo Expected error 'Readonly variable' + + +SET @@GLOBAL.slave_ddl_exec_mode=STRICT; +SELECT @@GLOBAL.slave_ddl_exec_mode; + +SET @@GLOBAL.slave_ddl_exec_mode=IDEMPOTENT; +SELECT @@GLOBAL.slave_ddl_exec_mode; + +--error ER_WRONG_VALUE_FOR_VAR +SET @@GLOBAL.slave_ddl_exec_mode=XXX; +SELECT @@GLOBAL.slave_ddl_exec_mode; + +SET @@global.slave_ddl_exec_mode= @start_value; + +######################################################################## +# END OF slave_ddl_exec_mode TESTS # +######################################################################## diff --git a/mysql-test/suite/sys_vars/t/slave_domain_parallel_threads_basic.test b/mysql-test/suite/sys_vars/t/slave_domain_parallel_threads_basic.test new file mode 100644 index 00000000000..7be48fbd4c5 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/slave_domain_parallel_threads_basic.test @@ -0,0 +1,14 @@ +--source include/not_embedded.inc + +SET @save_slave_domain_parallel_threads= @@GLOBAL.slave_domain_parallel_threads; + +SELECT @@GLOBAL.slave_domain_parallel_threads as 'must be zero because of default'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@SESSION.slave_domain_parallel_threads as 'no session var'; + +SET GLOBAL slave_domain_parallel_threads= 0; +SET GLOBAL slave_domain_parallel_threads= DEFAULT; +SET GLOBAL slave_domain_parallel_threads= 10; +SELECT @@GLOBAL.slave_domain_parallel_threads; + +SET GLOBAL slave_domain_parallel_threads = @save_slave_domain_parallel_threads; diff --git a/mysql-test/suite/sys_vars/t/storage_engine_basic.test b/mysql-test/suite/sys_vars/t/storage_engine_basic.test index 2d1e94e6620..964166daae7 100644 --- a/mysql-test/suite/sys_vars/t/storage_engine_basic.test +++ b/mysql-test/suite/sys_vars/t/storage_engine_basic.test @@ -1,9 +1,3 @@ ---source include/not_windows_embedded.inc -# remove this when -# Bug#53947 InnoDB: Assertion failure in thread 4224 in file -# .\sync\sync0sync.c line 324 -# is fixed - ############## mysql-test\t\storage_engine_basic.test ################## # # # # diff --git a/mysql-test/suite/sys_vars/t/tx_isolation_func.test b/mysql-test/suite/sys_vars/t/tx_isolation_func.test index 3a78d46e527..7072de6b086 100644 --- a/mysql-test/suite/sys_vars/t/tx_isolation_func.test +++ b/mysql-test/suite/sys_vars/t/tx_isolation_func.test @@ -1,9 +1,3 @@ ---source include/not_windows_embedded.inc -# remove this when -# Bug#53947 InnoDB: Assertion failure in thread 4224 in file -# .\sync\sync0sync.c line 324 -# is fixed - ############# mysql-test\t\tx_isolation_func.test ####################################### # # # Variable Name: tx_isolation # diff --git a/mysql-test/suite/sys_vars/t/version_malloc_library_basic.test b/mysql-test/suite/sys_vars/t/version_malloc_library_basic.test new file mode 100644 index 00000000000..6318ca4abd5 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/version_malloc_library_basic.test @@ -0,0 +1,90 @@ +################## mysql-test\t\version_malloc_library.test ################### +# # +# Variable Name: version_malloc_library # +# Scope: Global # +# Access Type: Static # +# Data Type: String # +# # +# Description:Test Cases of Dynamic System Variable version # +# that checks the behavior of this variable in the following ways # +# * Value Check # +# * Scope Check # +# # +############################################################################### + +--echo '#---------------------BS_STVARS_053_01----------------------#' +#################################################################### +# Displaying default value # +#################################################################### +SELECT COUNT(@@GLOBAL.version_malloc_library); +--echo 1 Expected + + +--echo '#---------------------BS_STVARS_053_02----------------------#' +#################################################################### +# Check if Value can set # +#################################################################### + +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@GLOBAL.version_malloc_library=1; +--echo Expected error 'Read only variable' + +SELECT COUNT(@@GLOBAL.version_malloc_library); +--echo 1 Expected + + + + +--echo '#---------------------BS_STVARS_053_03----------------------#' +################################################################# +# Check if the value in GLOBAL Table matches value in variable # +################################################################# + +SELECT @@GLOBAL.version_malloc_library = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='version_malloc_library'; +--echo 1 Expected + +SELECT COUNT(@@GLOBAL.version_malloc_library); +--echo 1 Expected + +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='version_malloc_library'; +--echo 1 Expected + + + +--echo '#---------------------BS_STVARS_053_04----------------------#' +############################################################################### +# Check if accessing variable with and without GLOBAL point to same variable # +############################################################################### +SELECT @@version_malloc_library = @@GLOBAL.version_malloc_library; +--echo 1 Expected + + + +--echo '#---------------------BS_STVARS_053_05----------------------#' +############################################################################### +# Check if version_malloc_library can be accessed with and without @@ sign # +############################################################################### + +SELECT COUNT(@@version_malloc_library); +--echo 1 Expected + +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT COUNT(@@local.version_malloc_library); +--echo Expected error 'Variable is a GLOBAL variable' + +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT COUNT(@@SESSION.version_malloc_library); +--echo Expected error 'Variable is a GLOBAL variable' + +SELECT COUNT(@@GLOBAL.version_malloc_library); +--echo 1 Expected + +--Error ER_BAD_FIELD_ERROR +SELECT version_malloc_library = @@SESSION.version; +--echo Expected error 'Readonly variable' + + diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index 4514928e592..8631789f15f 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -316,4 +316,9 @@ ERROR HY000: The value specified for computed column 'd' in table 't1' ignored INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a'); ERROR HY000: The value specified for computed column 'd' in table 't1' ignored drop table t1; +# +# MDEV-5611: self-referencing virtual column +# +create table t1 (a int, b int as (b is null) virtual); +ERROR HY000: A computed column cannot be based on a computed column # end of 5.3 tests diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index 9c8443218fa..a4c1fc06ce9 100644 --- a/mysql-test/suite/vcol/t/vcol_misc.test +++ b/mysql-test/suite/vcol/t/vcol_misc.test @@ -275,4 +275,11 @@ UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a'); drop table t1; +--echo # +--echo # MDEV-5611: self-referencing virtual column +--echo # + +--error ER_VCOL_BASED_ON_VCOL +create table t1 (a int, b int as (b is null) virtual); + --echo # end of 5.3 tests diff --git a/mysql-test/t/aborted_clients.test b/mysql-test/t/aborted_clients.test index fafcfb6b3e9..20ddc9991e6 100644 --- a/mysql-test/t/aborted_clients.test +++ b/mysql-test/t/aborted_clients.test @@ -1,28 +1,28 @@ -# Test case for MDEV-246, lp:992983
-# Check that ordinary connect/disconnect does not increase aborted_clients
-# status variable, but KILL connection does
-
--- source include/not_embedded.inc
--- source include/count_sessions.inc
-
-FLUSH STATUS;
-# Connect/Disconnect look that aborted_clients stays 0
-connect (con1,localhost,root,,);
-disconnect con1;
-connection default;
--- source include/wait_until_count_sessions.inc
-# Check that there is 0 aborted clients so far
-SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
-
-# Kill a connection, check that aborted_clients is incremented
-connect(con2,localhost,root,,);
---disable_reconnect
---error ER_CONNECTION_KILLED
-KILL CONNECTION_ID();
-disconnect con2;
-connection default;
--- source include/wait_until_count_sessions.inc
-
-# aborted clients must be 1 now
-SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
-FLUSH STATUS;
+# Test case for MDEV-246, lp:992983 +# Check that ordinary connect/disconnect does not increase aborted_clients +# status variable, but KILL connection does + +-- source include/not_embedded.inc +-- source include/count_sessions.inc + +FLUSH STATUS; +# Connect/Disconnect look that aborted_clients stays 0 +connect (con1,localhost,root,,); +disconnect con1; +connection default; +-- source include/wait_until_count_sessions.inc +# Check that there is 0 aborted clients so far +SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients'; + +# Kill a connection, check that aborted_clients is incremented +connect(con2,localhost,root,,); +--disable_reconnect +--error ER_CONNECTION_KILLED +KILL CONNECTION_ID(); +disconnect con2; +connection default; +-- source include/wait_until_count_sessions.inc + +# aborted clients must be 1 now +SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients'; +FLUSH STATUS; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 2053e2d9d59..3050fc0378d 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1258,7 +1258,7 @@ CREATE TABLE t1 ( id INT(11) NOT NULL, x_param INT(11) DEFAULT NULL, PRIMARY KEY (id) -); +) ENGINE=MYISAM; ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT, ADD COLUMN IF NOT EXISTS lol INT AFTER id; @@ -1277,6 +1277,45 @@ CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); SHOW CREATE TABLE t1; DROP TABLE t1; +CREATE TABLE t1 ( + id INT(11) NOT NULL, + x_param INT(11) DEFAULT NULL, + PRIMARY KEY (id) +) ENGINE=INNODB; + +CREATE TABLE t2 ( + id INT(11) NOT NULL) ENGINE=INNODB; + +ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT, + ADD COLUMN IF NOT EXISTS lol INT AFTER id; +ALTER TABLE t1 ADD COLUMN IF NOT EXISTS lol INT AFTER id; +ALTER TABLE t1 DROP COLUMN IF EXISTS lol; +ALTER TABLE t1 DROP COLUMN IF EXISTS lol; + +ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); +ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); +ALTER TABLE t1 MODIFY IF EXISTS lol INT; + +DROP INDEX IF EXISTS x_param ON t1; +DROP INDEX IF EXISTS x_param ON t1; +CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); +CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); +SHOW CREATE TABLE t1; + +ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS fk(id) REFERENCES t1(id); +ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS fk(id) REFERENCES t1(id); +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk; +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk; +SHOW CREATE TABLE t2; +ALTER TABLE t2 ADD FOREIGN KEY (id) REFERENCES t1(id); +ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS t2_ibfk_1(id) REFERENCES t1(id); +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1; +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1; +SHOW CREATE TABLE t2; + +DROP TABLE t2; +DROP TABLE t1; + --echo # --echo # Bug#11938817 ALTER BEHAVIOR DIFFERENT THEN DOCUMENTED --echo # diff --git a/mysql-test/t/alter_table_autoinc-5574.test b/mysql-test/t/alter_table_autoinc-5574.test new file mode 100644 index 00000000000..95c2b8d81bb --- /dev/null +++ b/mysql-test/t/alter_table_autoinc-5574.test @@ -0,0 +1,12 @@ +# +# MDEV-5574 Set AUTO_INCREMENT below max value of column +# +--source include/have_innodb.inc +create table t1(a int(10)unsigned not null auto_increment primary key, +b varchar(255) not null) engine=innodb default charset=utf8; +insert into t1 values(1,'aaa'),(2,'bbb'); +alter table t1 auto_increment=1; +insert into t1 values(NULL, 'ccc'); +select * from t1; +drop table t1; + diff --git a/mysql-test/t/alter_table_trans.test b/mysql-test/t/alter_table_trans.test index 9096a392af4..29b9b4c212f 100644 --- a/mysql-test/t/alter_table_trans.test +++ b/mysql-test/t/alter_table_trans.test @@ -13,3 +13,23 @@ drop table if exists t1,t2; CREATE TABLE t1 (a INT, INDEX(a)) engine=innodb; ALTER TABLE t1 RENAME TO t2, DISABLE KEYS; DROP TABLE t2; + +# +# MDEV-5406 add index to an innodb table with a uniqueness violation crashes mysqld +# + +CREATE TABLE t1 ( + col4 text NOT NULL, + col2 int(11) NOT NULL DEFAULT '0', + col3 int(11) DEFAULT NULL, + extra int(11) DEFAULT NULL, + KEY idx (col4(10)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +insert t1 values (repeat('1', 8193),3,1,1); +insert t1 values (repeat('3', 8193),3,1,1); +--error ER_DUP_ENTRY +ALTER TABLE t1 ADD PRIMARY KEY (col4(10)) , ADD UNIQUE KEY uidx (col3); +DROP TABLE t1; + + diff --git a/mysql-test/t/assign_key_cache-5405.test b/mysql-test/t/assign_key_cache-5405.test new file mode 100644 index 00000000000..2839e040bd3 --- /dev/null +++ b/mysql-test/t/assign_key_cache-5405.test @@ -0,0 +1,27 @@ +# +# MDEV-5405 RQG induced crash in mi_assign_to_key_cache in safe mutex unlock +# +--source include/have_debug_sync.inc +create table t1 (f int, key(f)) engine=myisam; +set global kc1.key_buffer_size = 65536; + +connect (con1, localhost, root); + +set debug_sync='assign_key_cache_op_unlock wait_for op_locked'; +send cache index t1 in kc1; + +connection default; +sleep 1; +set debug_sync='assign_key_cache_op_lock signal op_locked wait_for assigned'; +send cache index t1 in kc1; + +connection con1; +reap; +set debug_sync='now signal assigned'; +disconnect con1; +connection default; +reap; + +drop table t1; +set global kc1.key_buffer_size = 0; +set debug_sync='reset'; diff --git a/mysql-test/t/auth_rpl.test b/mysql-test/t/auth_rpl.test index c413a84b53c..0ff024c73e7 100644 --- a/mysql-test/t/auth_rpl.test +++ b/mysql-test/t/auth_rpl.test @@ -1,66 +1,66 @@ ---source include/have_plugin_auth.inc
---source include/not_embedded.inc
---source include/master-slave.inc
-
-#
-# Check that replication slave can connect to master using an account
-# which authenticates with an external authentication plugin (bug#12897501).
-
-#
-# First stop the slave to guarantee that nothing is replicated.
-#
---connection slave
---echo [connection slave]
---source include/stop_slave.inc
-#
-# Create an replication account on the master.
-#
---connection master
---echo [connection master]
-CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user';
-GRANT REPLICATION SLAVE ON *.* TO plug_user;
-FLUSH PRIVILEGES;
-
-#
-# Now go to slave and change the replication user.
-#
---connection slave
---echo [connection slave]
---let $master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1)
-CHANGE MASTER TO
- MASTER_USER= 'plug_user',
- MASTER_PASSWORD= 'plug_user';
-
-#
-# Start slave with new replication account - this should trigger connection
-# to the master server.
-#
---source include/start_slave.inc
-
-# Replicate all statements executed on master, in this case,
-# (creation of the plug_user account).
-#
---connection master
---sync_slave_with_master
---echo # Slave in-sync with master now.
-
-SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
-
-#
-# Now we can stop the slave and clean up.
-#
-# Note: it is important that slave is stopped at this
-# moment - otherwise master's cleanup statements
-# would be replicated on slave!
-#
---echo # Cleanup (on slave).
---source include/stop_slave.inc
-eval CHANGE MASTER TO MASTER_USER='$master_user';
-DROP USER 'plug_user';
-
---echo # Cleanup (on master).
---connection master
-DROP USER 'plug_user';
-
---let $rpl_only_running_threads= 1
---source include/rpl_end.inc
+--source include/have_plugin_auth.inc +--source include/not_embedded.inc +--source include/master-slave.inc + +# +# Check that replication slave can connect to master using an account +# which authenticates with an external authentication plugin (bug#12897501). + +# +# First stop the slave to guarantee that nothing is replicated. +# +--connection slave +--echo [connection slave] +--source include/stop_slave.inc +# +# Create an replication account on the master. +# +--connection master +--echo [connection master] +CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user'; +GRANT REPLICATION SLAVE ON *.* TO plug_user; +FLUSH PRIVILEGES; + +# +# Now go to slave and change the replication user. +# +--connection slave +--echo [connection slave] +--let $master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1) +CHANGE MASTER TO + MASTER_USER= 'plug_user', + MASTER_PASSWORD= 'plug_user'; + +# +# Start slave with new replication account - this should trigger connection +# to the master server. +# +--source include/start_slave.inc + +# Replicate all statements executed on master, in this case, +# (creation of the plug_user account). +# +--connection master +--sync_slave_with_master +--echo # Slave in-sync with master now. + +SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user'; + +# +# Now we can stop the slave and clean up. +# +# Note: it is important that slave is stopped at this +# moment - otherwise master's cleanup statements +# would be replicated on slave! +# +--echo # Cleanup (on slave). +--source include/stop_slave.inc +eval CHANGE MASTER TO MASTER_USER='$master_user'; +DROP USER 'plug_user'; + +--echo # Cleanup (on master). +--connection master +DROP USER 'plug_user'; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 008610569e2..b6c37cacd8a 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -2,6 +2,9 @@ # Test of cast function # +# For TIME->DATETIME conversion +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); + select CAST(1-2 AS UNSIGNED); select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER); select CAST('10 ' as unsigned integer); diff --git a/mysql-test/t/comments.test b/mysql-test/t/comments.test index ce4f4d50675..6cf69635d1e 100644 --- a/mysql-test/t/comments.test +++ b/mysql-test/t/comments.test @@ -27,6 +27,8 @@ select 1 # The rest of the row will be ignored select 1 /*M! +1 */; select 1 /*M!50000 +1 */; select 1 /*M!50300 +1 */; +select 2 /*M!99999 +1 */; +select 2 /*M!100000 +1 */; select 2 /*M!999999 +1 */; --error ER_PARSE_ERROR select 2 /*M!0000 +1 */; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index ebcad5f4af4..8bb7339ce83 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -2014,6 +2014,8 @@ create table t1 (a int, b int); create table t1 (a int, b int) select 2,2; --error ER_TABLE_EXISTS_ERROR create table t1 like t2; +--error ER_LOCK_WAIT_TIMEOUT +create or replace table t1 (a int, b int) select 2,2; disconnect user1; connection default; select * from t1; diff --git a/mysql-test/t/create_or_replace-master.opt b/mysql-test/t/create_or_replace-master.opt new file mode 100644 index 00000000000..e94228f2f33 --- /dev/null +++ b/mysql-test/t/create_or_replace-master.opt @@ -0,0 +1 @@ +--log-output=TABLE,FILE --general-log=1 --slow-query-log=1 diff --git a/mysql-test/t/create_or_replace.test b/mysql-test/t/create_or_replace.test new file mode 100644 index 00000000000..88fbdb179e0 --- /dev/null +++ b/mysql-test/t/create_or_replace.test @@ -0,0 +1,293 @@ +# +# Check CREATE OR REPLACE ALTER TABLE +# + +--source include/have_innodb.inc +--source include/have_metadata_lock_info.inc +--disable_warnings +drop table if exists t1,t2,t3; +--enable_warnings + +# +# Create help table +# + +CREATE TABLE t2 (a int); +INSERT INTO t2 VALUES(1),(2),(3); + +--echo # +--echo # Check first syntax and wrong usage +--echo # + +--error ER_WRONG_USAGE +CREATE OR REPLACE TABLE IF NOT EXISTS t1 (a int); +--error ER_WRONG_USAGE +create or replace trigger trg before insert on t1 for each row set @a:=1; + +# check that we don't try to create a log table in use +--error ER_BAD_LOG_STATEMENT +create or replace table mysql.general_log (a int); +--error ER_BAD_LOG_STATEMENT +create or replace table mysql.slow_log (a int); + +--echo # +--echo # Usage when table doesn't exist +--echo # + +CREATE OR REPLACE TABLE t1 (a int); +--error ER_TABLE_EXISTS_ERROR +CREATE TABLE t1 (a int); +DROP TABLE t1; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int); +--error ER_TABLE_EXISTS_ERROR +CREATE TEMPORARY TABLE t1 (a int, b int, c int); +DROP TEMPORARY TABLE t1; + +--echo # +--echo # Testing with temporary tables +--echo # + +CREATE OR REPLACE TABLE t1 (a int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int); +SHOW CREATE TABLE t1; +DROP TEMPORARY TABLE t1; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +# Test also with InnoDB +create temporary table t1 (i int) engine=InnoDB; +create or replace temporary table t1 (a int, b int) engine=InnoDB; +create or replace temporary table t1 (j int); +show create table t1; +drop table t1; + +# Using lock tables on normal tables with create or replace on temp tables +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int) engine= innodb; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int) engine= innodb; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int) engine=myisam; +SHOW CREATE TABLE t1; +DROP TEMPORARY TABLE t1; +SHOW CREATE TABLE t1; +# Verify that table is still locked +--error ER_TABLE_NOT_LOCKED +CREATE OR REPLACE TABLE t2 (a int); +DROP TABLE t1; +UNLOCK TABLES; + +# +# Using CREATE SELECT +# + +CREATE OR REPLACE TEMPORARY TABLE t1 (a int) SELECT * from t2; +SELECT * FROM t1; +CREATE OR REPLACE TEMPORARY TABLE t1 (b int) SELECT * from t2; +SELECT * FROM t1; +SHOW CREATE TABLE t1; +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 AS SELECT a FROM t2; +CREATE TEMPORARY TABLE IF NOT EXISTS t1(a int, b int) SELECT 1,2 FROM t2; +DROP TABLE t1; + +CREATE TABLE t1 (a int); +CREATE OR REPLACE TABLE t1 AS SELECT 1; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +create table t1 (a int); +--error ER_UPDATE_TABLE_USED +create or replace table t1 as select * from t1; +--error ER_UPDATE_TABLE_USED +create or replace table t1 as select a from (select a from t1) as t3; +--error ER_UPDATE_TABLE_USED +create or replace table t1 as select a from t2 where t2.a in (select a from t1); +drop table t1; + +--echo # +--echo # Testing with normal tables +--echo # + +CREATE OR REPLACE TABLE t1 (a int); +CREATE OR REPLACE TABLE t1 (a int, b int); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 (a int) SELECT * from t2; +SELECT * FROM t1; +TRUNCATE TABLE t1; +CREATE TABLE IF NOT EXISTS t1 (a int) SELECT * from t2; +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (i int); +CREATE OR REPLACE TABLE t1 AS SELECT 1; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +# Using lock tables with CREATE OR REPLACE +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write,t2 write; +CREATE OR REPLACE TABLE t1 (a int, b int); +# Verify if table is still locked +SELECT * FROM t1; +INSERT INTO t1 values(1,1); +CREATE OR REPLACE TABLE t1 (a int, b int, c int); +INSERT INTO t1 values(1,1,1); +--error ER_TABLE_NOT_LOCKED +CREATE OR REPLACE TABLE t3 (a int); +UNLOCK TABLES; +DROP TABLE t1; + +# Using lock tables with CREATE OR REPLACE ... SELECT +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write,t2 write; +CREATE OR REPLACE TABLE t1 (a int, b int) select a,1 from t2; +# Verify if table is still locked +SELECT * FROM t2; +SELECT * FROM t1; +SELECT * FROM t1; +INSERT INTO t1 values(1,1,1); +CREATE OR REPLACE TABLE t1 (a int, b int, c int, d int); +INSERT INTO t1 values(1,1,1,1); +--error ER_TABLE_NOT_LOCKED +CREATE OR REPLACE TABLE t3 (a int); +UNLOCK TABLES; +DROP TABLE t1; + +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write,t2 write, t1 as t1_read read; +CREATE OR REPLACE TABLE t1 (a int, b int) select a,1 from t2; +SELECT * FROM t1; +SELECT * FROM t2; +--error ER_TABLE_NOT_LOCKED +SELECT * FROM t1 as t1_read; +DROP TABLE t1; +UNLOCK TABLES; + +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLE t1 WRITE; +CREATE OR REPLACE TABLE t1 AS SELECT 1; +SELECT * from t1; +--error ER_TABLE_NOT_LOCKED +SELECT * from t2; +DROP TABLE t1; + +--echo # +--echo # Test also with InnoDB (transactional engine) +--echo # + +create table t1 (i int) engine=innodb; +lock table t1 write; +create or replace table t1 (j int); +unlock tables; +show create table t1; +drop table t1; + +create table t1 (i int) engine=InnoDB; +lock table t1 write, t2 write; +create or replace table t1 (j int) engine=innodb; +unlock tables; +drop table t1; + +create table t1 (i int) engine=InnoDB; +create table t3 (i int) engine=InnoDB; +insert into t3 values(1),(2),(3); +lock table t1 write, t2 write, t3 write; +create or replace table t1 (a int, i int) engine=innodb select t2.a,t3.i from t2,t3; +unlock tables; +select * from t1 order by a,i; +drop table t1,t3; + +--echo # +--echo # Testing CREATE .. LIKE +--echo # + +create or replace table t1 like t2; +create or replace table t1 like t2; +show create table t1; +drop table t1; +create table t1 (b int); +lock tables t1 write, t2 read; +create or replace table t1 like t2; +SELECT * FROM t1; +INSERT INTO t1 values(1); +CREATE OR REPLACE TABLE t1 like t2; +INSERT INTO t1 values(2); +unlock tables; +show create table t1; +drop table t1; + +create or replace table t1 like t2; +--error ER_NONUNIQ_TABLE +create or replace table t1 like t1; +drop table t1; + +CREATE TEMPORARY TABLE t1 like t2; +--error ER_NONUNIQ_TABLE +CREATE OR REPLACE TABLE t1 like t1; +--error ER_NONUNIQ_TABLE +CREATE OR REPLACE TABLE t1 like t1; +drop table t1; + +CREATE TEMPORARY TABLE t1 like t2; +CREATE OR REPLACE TEMPORARY TABLE t3 like t1; +--error ER_NONUNIQ_TABLE +CREATE OR REPLACE TEMPORARY TABLE t3 like t3; +drop table t1,t3; + +--echo # +--echo # Test with prepared statements +--echo # + +prepare stmt1 from 'create or replace table t1 select * from t2'; +execute stmt1; +select * from t1; +execute stmt1; +select * from t1; +drop table t1; +execute stmt1; +select * from t1; +deallocate prepare stmt1; +drop table t1; + +--echo # +--echo # Test with views +--echo # + +create view t1 as select 1; +create table if not exists t1 (a int); +--error ER_IT_IS_A_VIEW +create or replace table t1 (a int); +--error ER_IT_IS_A_VIEW +drop table t1; +drop view t1; + +--echo # +--echo # MDEV-5602 CREATE OR REPLACE obtains stricter locks than the +--echo # connection had before +--echo # + +create table t1 (a int); +lock table t1 write, t2 read; +--replace_column 1 # +select * from information_schema.metadata_lock_info; +create or replace table t1 (i int); +--replace_column 1 # +select * from information_schema.metadata_lock_info; +create or replace table t1 like t2; +--replace_column 1 # +select * from information_schema.metadata_lock_info; +create or replace table t1 select 1 as f1; +--replace_column 1 # +select * from information_schema.metadata_lock_info; +drop table t1; +unlock tables; + +# +# Cleanup +# +DROP TABLE t2; diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index 7e6990f4754..972543aefc2 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -32,6 +32,8 @@ ORDER BY variable_name; # SET date_format='%d.%m.%Y'; # SET date_format='%m-%d-%Y'; # +# --error ER_WRONG_VALUE_FOR_VAR +# SET datetime_format= NULL; # set datetime_format= '%Y%m%d%H%i%s'; # set datetime_format= '%Y-%m-%d %H:%i:%s'; # set datetime_format= '%m-%d-%y %H:%i:%s.%f'; diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index 559a8b76280..4b1d7604b9d 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -394,6 +394,35 @@ WHERE tmp.b; SELECT * FROM ( SELECT 100 a, subsel.b FROM ( SELECT 200 b ) subsel ) tmp WHERE tmp.a; + +--echo # +--echo # MDEV-5356: Server crashes in Item_equal::contains on 2nd +--echo # execution of a PS +--echo # +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,2),(3,4); + +CREATE TABLE t2 (c INT); +INSERT INTO t2 VALUES (5),(6); + +CREATE TABLE t3 (d INT); +INSERT INTO t3 VALUES (7),(8); + +CREATE PROCEDURE pr() + UPDATE t3, + (SELECT c FROM + (SELECT 1 FROM t1 WHERE a=72 AND NOT b) sq, + t2 + ) sq2 + SET d=sq2.c; + +CALL pr(); +CALL pr(); +CALL pr(); + +drop procedure pr; +drop table t1,t2,t3; + --echo # End of 5.3 tests --echo # diff --git a/mysql-test/t/derived_view.test b/mysql-test/t/derived_view.test index 3da58d8ae23..61e11cebad4 100644 --- a/mysql-test/t/derived_view.test +++ b/mysql-test/t/derived_view.test @@ -1591,6 +1591,118 @@ EXPLAIN EXTENDED SELECT a FROM v1 WHERE a > 100 ORDER BY b; DROP VIEW v1; DROP TABLE t1; +# +# MDEV-5414: RAND() in a subselect : different behavior in MariaDB and MySQL +# +CREATE TABLE IF NOT EXISTS `galleries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `year` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `pictures` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `width` float DEFAULT NULL, + `height` float DEFAULT NULL, + `year` int(4) DEFAULT NULL, + `technique` varchar(50) DEFAULT NULL, + `comment` varchar(2000) DEFAULT NULL, + `gallery_id` int(11) NOT NULL, + `type` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `gallery_id` (`gallery_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; + +ALTER TABLE `pictures` + ADD CONSTRAINT `pictures_ibfk_1` FOREIGN KEY (`gallery_id`) REFERENCES `galleries` (`id`); + +INSERT INTO `galleries` (`id`, `name`, `year`) VALUES +(1, 'Quand le noir et blanc invite le taupe', 2013), +(2, 'Une touche de couleur', 2012), +(3, 'Éclats', 2011), +(4, 'Gris béton', 2010), +(5, 'Expression du spalter', 2010), +(6, 'Zénitude', 2009), +(7, 'La force du rouge', 2008), +(8, 'Sphères', NULL), +(9, 'Centre', 2009), +(10, 'Nébuleuse', NULL); + +INSERT INTO `pictures` (`id`, `name`, `width`, `height`, `year`, `technique`, `comment`, `gallery_id`, `type`) VALUES +(1, 'Éclaircie', 72.5, 100, NULL, NULL, NULL, 1, 1), +(2, 'Architecture', 81, 100, NULL, NULL, NULL, 1, 1), +(3, 'Nouveau souffle', 72.5, 100, NULL, NULL, NULL, 1, 1), +(4, 'Échanges (2)', 89, 116, NULL, NULL, NULL, 1, 1), +(5, 'Échanges', 89, 116, NULL, NULL, NULL, 1, 1), +(6, 'Fenêtre de vie', 81, 116, NULL, NULL, NULL, 1, 1), +(7, 'Architecture', 81, 100, NULL, NULL, NULL, 1, 1), +(8, 'Nouveau souffle (2)', 72.5, 100, NULL, NULL, NULL, 1, 1), +(9, 'Fluidité', 89, 116, NULL, NULL, NULL, 1, 1), +(10, 'Nouveau Monde', 89, 125, NULL, NULL, NULL, 1, 1), +(11, 'Mirage', 73, 100, NULL, NULL, NULL, 1, 1), +(12, 'Équilibre', 72.5, 116, NULL, NULL, NULL, 2, 1), +(13, 'Fusion', 72.5, 116, NULL, NULL, NULL, 2, 1), +(14, 'Étincelles', NULL, NULL, NULL, NULL, NULL, 3, 1), +(15, 'Régénérescence', NULL, NULL, NULL, NULL, NULL, 3, 1), +(16, 'Chaleur', 80, 80, NULL, NULL, NULL, 4, 1), +(17, 'Création', 90, 90, NULL, NULL, NULL, 4, 1), +(18, 'Horizon', 92, 73, NULL, NULL, NULL, 4, 1), +(19, 'Labyrinthe', 81, 100, NULL, NULL, NULL, 4, 1), +(20, 'Miroir', 80, 116, NULL, NULL, NULL, 5, 1), +(21, 'Libération', 81, 116, NULL, NULL, NULL, 5, 1), +(22, 'Éclats', 81, 116, NULL, NULL, NULL, 5, 1), +(23, 'Zénitude', 116, 89, NULL, NULL, NULL, 6, 1), +(24, 'Écritures lointaines', 90, 90, NULL, NULL, NULL, 7, 1), +(25, 'Émergence', 80, 80, NULL, NULL, NULL, 7, 1), +(26, 'Liberté', 50, 50, NULL, NULL, NULL, 7, 1), +(27, 'Silhouettes amérindiennes', 701, 70, NULL, NULL, NULL, 7, 1), +(28, 'Puissance', 81, 100, NULL, NULL, NULL, 8, 1), +(29, 'Source', 73, 116, NULL, NULL, NULL, 8, 1), +(30, 'Comme une ville qui prend vie', 50, 100, 2008, NULL, NULL, 9, 1), +(31, 'Suspension azur', 80, 80, NULL, NULL, NULL, 9, 1), +(32, 'Nébuleuse', 70, 70, NULL, NULL, NULL, 10, 1), +(33, 'Œuvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(34, 'Œuvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(35, 'Œuvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(36, 'Œuvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(37, 'Œuvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2), +(38, 'Œuvre commandée 120 P', 114, 195, NULL, NULL, NULL, 1, 2); + +# Now we only lest explain to be sure that table materialized. If +# in the future merged derived table will be processed in a way that +# rand() can be called only once then other way of testing correctness +# of this query should be put here. +explain +SELECT g.id AS gallery_id, + g.name AS gallery_name, + p.id AS picture_id, + p.name AS picture_name, + g.p_random AS r1, + g.p_random AS r2, + g.p_random AS r3 +FROM +( + SELECT gal.id, + gal.name, + ( + SELECT pi.id + FROM pictures pi + WHERE pi.gallery_id = gal.id + ORDER BY RAND() + LIMIT 1 + ) AS p_random + FROM galleries gal +) g +LEFT JOIN pictures p + ON p.id = g.p_random +ORDER BY gallery_name ASC +; + +drop table galleries, pictures; + --echo # --echo # end of 5.3 tests --echo # diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index 71643a25c5a..952609be7e0 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -750,4 +750,42 @@ INSERT INTO t1 VALUES (1111, 2222), (3333, 4444); SELECT DISTINCT CONCAT(a,b) AS c FROM t1 ORDER BY 1; DROP TABLE t1; +--echo # +--echo # Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN. +--echo # Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK +--echo # + +SET @tmp_table_size_save= @@tmp_table_size; +SET @@tmp_table_size= 1024; + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +INSERT INTO t1 SELECT a+8 FROM t1; +INSERT INTO t1 SELECT a+16 FROM t1; +INSERT INTO t1 SELECT a+32 FROM t1; +INSERT INTO t1 SELECT a+64 FROM t1; +INSERT INTO t1 VALUE(NULL); +SELECT COUNT(DISTINCT a) FROM t1; +SELECT COUNT(DISTINCT (a+0)) FROM t1; +DROP TABLE t1; + +create table tb( +id int auto_increment primary key, +v varchar(32)) +engine=myisam charset=gbk; +insert into tb(v) values("aaa"); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); + +update tb set v=concat(v, id); +select count(distinct case when id<=64 then id end) from tb; +select count(distinct case when id<=63 then id end) from tb; +drop table tb; + +SET @@tmp_table_size= @tmp_table_size_save; + --echo End of 5.5 tests diff --git a/mysql-test/t/dyncol.test b/mysql-test/t/dyncol.test index 4fba43b2cce..39070cc90d7 100644 --- a/mysql-test/t/dyncol.test +++ b/mysql-test/t/dyncol.test @@ -248,8 +248,10 @@ select column_get(column_create(1, "20010203"), 1 as datetime); select column_get(column_create(1, 0), 1 as datetime); select column_get(column_create(1, "2001021"), 1 as datetime); +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); select column_get(column_create(1, "8:46:06.23434" AS time), 1 as datetime); select column_get(column_create(1, "-808:46:06.23434" AS time), 1 as datetime); +SET timestamp=DEFAULT; set @@sql_mode="allow_invalid_dates"; select column_get(column_create(1, "2011-02-30 18:46:06.23434" AS CHAR), 1 as datetime); diff --git a/mysql-test/t/error_simulation.test b/mysql-test/t/error_simulation.test index ea7dd12fb9e..58ead1e3ced 100644 --- a/mysql-test/t/error_simulation.test +++ b/mysql-test/t/error_simulation.test @@ -103,7 +103,7 @@ CREATE TABLE t2(f1 INT); INSERT INTO t1 VALUES (1),(2); INSERT INTO t2 VALUES (1),(2); SET SESSION debug_dbug="+d,bug11747970_raise_error"; ---error 1105 +--error ER_QUERY_INTERRUPTED INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); SET SESSION debug_dbug = DEFAULT; DROP TABLE t1,t2; diff --git a/mysql-test/t/events_trans.test b/mysql-test/t/events_trans.test index 4cf2583ac96..6d829379fea 100644 --- a/mysql-test/t/events_trans.test +++ b/mysql-test/t/events_trans.test @@ -146,3 +146,4 @@ SELECT * FROM t2; ROLLBACK WORK TO SAVEPOINT A; DROP TABLE t1, t2; +DROP EVENT e1; diff --git a/mysql-test/t/flush-innodb-notembedded.test b/mysql-test/t/flush-innodb-notembedded.test new file mode 100644 index 00000000000..d08a0647ff5 --- /dev/null +++ b/mysql-test/t/flush-innodb-notembedded.test @@ -0,0 +1,69 @@ +--source include/have_innodb.inc +--source include/not_embedded.inc + +--echo # Test 7: Check privileges required. +--echo # + +CREATE DATABASE db1; +CREATE TABLE db1.t1 (a INT) engine= InnoDB; +GRANT RELOAD, SELECT, LOCK TABLES ON *.* TO user1@localhost; +GRANT CREATE, DROP ON *.* TO user2@localhost; +GRANT RELOAD, SELECT ON *.* TO user3@localhost; +GRANT SELECT, LOCK TABLES ON *.* TO user4@localhost; +GRANT RELOAD, LOCK TABLES ON *.* TO user5@localhost; + +--echo # Connection con1 as user1 +--connect(con1, localhost, user1) +FLUSH TABLE db1.t1 FOR EXPORT; +UNLOCK TABLES; +--disconnect con1 +--source include/wait_until_disconnected.inc + +--echo # Connection default +--connection default + +--echo # Connection con1 as user2 +--connect(con1, localhost, user2) +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +FLUSH TABLE db1.t1 FOR EXPORT; +--disconnect con1 +--source include/wait_until_disconnected.inc + +--echo # Connection default +--connection default + +--echo # Connection con1 as user3 +--connect(con1, localhost, user3) +--error ER_DBACCESS_DENIED_ERROR +FLUSH TABLE db1.t1 FOR EXPORT; +--disconnect con1 +--source include/wait_until_disconnected.inc + +--echo # Connection default +--connection default + +--echo # Connection con1 as user4 +--connect(con1, localhost, user4) +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +FLUSH TABLE db1.t1 FOR EXPORT; +--disconnect con1 +--source include/wait_until_disconnected.inc + +--echo # Connection default +--connection default + +--echo # Connection con1 as user5 +--connect(con1, localhost, user5) +--error ER_TABLEACCESS_DENIED_ERROR +FLUSH TABLE db1.t1 FOR EXPORT; +--disconnect con1 +--source include/wait_until_disconnected.inc + +--echo # Connection default +--connection default +DROP USER user1@localhost, user2@localhost, user3@localhost, + user4@localhost, user5@localhost; +DROP TABLE db1.t1; +DROP DATABASE db1; + +--echo # End of 5.6 tests diff --git a/mysql-test/t/flush-innodb.test b/mysql-test/t/flush-innodb.test index 207032b1acb..7a877b977ce 100644 --- a/mysql-test/t/flush-innodb.test +++ b/mysql-test/t/flush-innodb.test @@ -7,3 +7,472 @@ CREATE TABLE t1 ( m MEDIUMTEXT ) ENGINE=InnoDB; INSERT INTO t1 VALUES ( REPEAT('i',1048576) ); DROP TABLE t1; + +--echo +--echo # +--echo # WL#6168: FLUSH TABLES ... FOR EXPORT -- parser +--echo # +--echo + +--echo # Requires innodb_file_per_table +SET @old_innodb_file_per_table= @@GLOBAL.innodb_file_per_table; +SET GLOBAL innodb_file_per_table= 1; + +--echo # new "EXPORT" keyword is a valid user variable name: + +SET @export = 10; + +--echo # new "EXPORT" keyword is a valid SP parameter name: + +CREATE PROCEDURE p1(export INT) BEGIN END; +DROP PROCEDURE p1; + +--echo # new "EXPORT" keyword is a valid local variable name: + +DELIMITER |; +CREATE PROCEDURE p1() +BEGIN + DECLARE export INT; +END| +DELIMITER ;| +DROP PROCEDURE p1; + +--echo # new "EXPORT" keyword is a valid SP name: + +CREATE PROCEDURE export() BEGIN END; +DROP PROCEDURE export; + +--echo # new FLUSH TABLES ... FOR EXPORT syntax: + +--error ER_PARSE_ERROR +FLUSH TABLES FOR EXPORT; +--error ER_PARSE_ERROR +FLUSH TABLES WITH EXPORT; + + +CREATE TABLE t1 (i INT) engine=InnoDB; +CREATE TABLE t2 LIKE t1; + +--error ER_PARSE_ERROR +FLUSH TABLES t1,t2 WITH EXPORT; + +FLUSH TABLES t1, t2 FOR EXPORT; +UNLOCK TABLES; + +--echo # case check +FLUSH TABLES t1, t2 for ExPoRt; +UNLOCK TABLES; +--echo # With LOCAL keyword +FLUSH LOCAL TABLES t1, t2 FOR EXPORT; +UNLOCK TABLES; +--echo # Tables with fully qualified names +FLUSH LOCAL TABLES test.t1, test.t2 for ExPoRt; +UNLOCK TABLES; + +DROP TABLES t1, t2; + +--echo # new "EXPORT" keyword is a valid table name: + +CREATE TABLE export (i INT) engine=InnoDB; + +--echo # it's ok to lock the "export" table for export: + +FLUSH TABLE export FOR EXPORT; +UNLOCK TABLES; + +DROP TABLE export; + + +--echo # +--echo # WL#6169 FLUSH TABLES ... FOR EXPORT -- runtime +--echo # + +--echo # Test 1: Views, temporary tables, non-existent tables +--echo # + +CREATE VIEW v1 AS SELECT 1; +CREATE TEMPORARY TABLE t1 (a INT); + +--error ER_WRONG_OBJECT +FLUSH TABLES v1 FOR EXPORT; +--error ER_NO_SUCH_TABLE +FLUSH TABLES t1 FOR EXPORT; +--error ER_NO_SUCH_TABLE +FLUSH TABLES non_existent FOR EXPORT; + +DROP TEMPORARY TABLE t1; +DROP VIEW v1; + +--echo # Test 2: Blocked by update transactions, blocks updates. +--echo # + +CREATE TABLE t1 (a INT PRIMARY KEY, b INT) engine= InnoDB; +CREATE TABLE t2 (a INT) engine= InnoDB; + +--echo # Connection con1 +--connect (con1, localhost, root) +START TRANSACTION; +INSERT INTO t1 VALUES (1, 1); + +--echo # Connection default +--connection default +--echo # Should be blocked +--echo # Sending: +--send FLUSH TABLES t1 FOR EXPORT + +--echo # Connection con1 +--connection con1 +let $wait_condition= + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = "Waiting for table metadata lock" AND + info = "FLUSH TABLES t1 FOR EXPORT"; +--source include/wait_condition.inc +COMMIT; + +--echo # Connection default +--connection default +--echo # Reaping: FLUSH TABLES t1 FOR EXPORT +--reap + +--echo # Connection con1 +--connection con1 +--echo # Should not be blocked +INSERT INTO t2 VALUES (1); +--echo # Should be blocked +--echo # Sending: +--send INSERT INTO t1 VALUES (2, 2) + +--echo # Connection default +--connection default +let $wait_condition= + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = "Waiting for table metadata lock" AND + info = "INSERT INTO t1 VALUES (2, 2)"; +--source include/wait_condition.inc +UNLOCK TABLES; + +--echo # Connection con1 +--connection con1 +--echo # Reaping: INSERT INTO t1 VALUES (2, 2); +--reap + +--echo # Test 3: Read operations should not be affected. +--echo # + +START TRANSACTION; +SELECT * FROM t1; + +--echo # Connection default +--connection default +--echo # Should not be blocked +FLUSH TABLES t1 FOR EXPORT; + +--echo # Connection con1 +--connection con1 +COMMIT; +--echo # Should not be blocked +SELECT * FROM t1; + +--echo # Connection default +--connection default +UNLOCK TABLES; + +--echo # Test 4: Blocked by DDL, blocks DDL. +--echo # + +START TRANSACTION; +SELECT * FROM t1; + +--echo # Connection con2 +--connect (con2, localhost, root) +--echo # Sending: +--send ALTER TABLE t1 ADD INDEX i1(b) + +--echo # Connection con1 +--connection con1 +let $wait_condition= + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = "Waiting for table metadata lock" AND + info = "ALTER TABLE t1 ADD INDEX i1(b)"; +--source include/wait_condition.inc +--echo # Should be blocked +--send FLUSH TABLE t1 FOR EXPORT + +--echo # Connection default +--connection default +let $wait_condition= + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = "Waiting for table metadata lock" AND + info = "FLUSH TABLE t1 FOR EXPORT"; +--source include/wait_condition.inc +COMMIT; + +--echo # Connection con2 +--connection con2 +--echo # Reaping ALTER TABLE ... +--reap + +--echo # Connection con1 +--connection con1 +--echo # Reaping FLUSH TABLE t1 FOR EXPORT +--reap +UNLOCK TABLES; + +--echo # Connection default +--connection default +FLUSH TABLE t1 FOR EXPORT; + +--echo # Connection con2 +--connection con2 +--echo # Should be blocked +--send DROP TABLE t1 + +--echo # Connection default +--connection default +let $wait_condition= + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = "Waiting for table metadata lock" AND + info = "DROP TABLE t1"; +--source include/wait_condition.inc +UNLOCK TABLES; + +--echo # Connection con2 +--connection con2 +--echo # Reaping DROP TABLE t1 +--reap +--disconnect con2 +--source include/wait_until_disconnected.inc + +--echo # Connection default +--connection default +DROP TABLE t2; + +--echo # Test 5: Compatibilty with FLUSH TABLES WITH READ LOCK +--echo # + +CREATE TABLE t1(a INT) engine= InnoDB; +FLUSH TABLES WITH READ LOCK; + +--echo # Connection con1 +--connection con1 +--echo # This should not block +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; + +--echo # Connection default +--connection default +UNLOCK TABLES; +DROP TABLE t1; + +--echo # Test 6: Unsupported storage engines. +--echo # + +CREATE TABLE t1(a INT) engine= MEMORY; +--error ER_ILLEGAL_HA +FLUSH TABLE t1 FOR EXPORT; +DROP TABLE t1; + +--echo # Connection con1 +--connection con1 +--disconnect con1 +--source include/wait_until_disconnected.inc + +--echo # Connection defalt +--connection default + +--echo # Test 7: Check privileges required. +--echo # in flush-innodb-notembedded.test + +--echo # Test 8: FLUSH TABLE <table_list> FOR EXPORT is incompatible +--echo # with itself (to avoid race conditions in metadata +--echo # file handling). +--echo # + +CREATE TABLE t1 (a INT) engine= InnoDB; +CREATE TABLE t2 (a INT) engine= InnoDB; + +--echo # Connection con1 +--connect (con1, localhost, root) +FLUSH TABLE t1 FOR EXPORT; + +--echo # Connection default +--connection default +--echo # This should not block +FLUSH TABLE t2 FOR EXPORT; +UNLOCK TABLES; +--echo # This should block +--echo # Sending: +--send FLUSH TABLE t1 FOR EXPORT + +--echo # Connection con1 +--connection con1 +let $wait_condition= + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = "Waiting for table metadata lock" AND + info = "FLUSH TABLE t1 FOR EXPORT"; +--source include/wait_condition.inc +UNLOCK TABLES; + +--echo # Connection default +--connection default +--echo # Reaping: FLUSH TABLE t1 FOR EXPORT +--reap +UNLOCK TABLES; + +--echo # Test 9: LOCK TABLES ... READ is not affected +--echo # + +LOCK TABLE t1 READ; + +--echo # Connection con1 +--connection con1 +--echo # Should not block +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; + +--echo # Connection default +--connection default +UNLOCK TABLES; +FLUSH TABLE t1 FOR EXPORT; + +--echo # Connection con1 +--connection con1 +--echo # Should not block +LOCK TABLE t1 READ; +UNLOCK TABLES; + +--echo # Connection default +--connection default +UNLOCK TABLES; + +--echo # Connection con1 +--connection con1 +--disconnect con1 +--source include/wait_until_disconnected.inc + +--echo # Connection default +--connection default +DROP TABLE t1, t2; + +--echo # Test 10: Lock is released if transaction is started after doing +--echo # 'flush table..' in same session + +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +FLUSH TABLE t1 FOR EXPORT; +--echo # error as active locks already exist +--error ER_LOCK_OR_ACTIVE_TRANSACTION +FLUSH TABLE t1 FOR EXPORT; +--echo # active locks will be released due to start transaction +START TRANSACTION; +--echo # passes as start transaction released ealier locks +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; +DROP TABLE t1; + +--echo # Test 11: Test 'flush table with fully qualified table names +--echo # and with syntax local/NO_WRITE_TO_BINLOG + +--echo # Connection con1 +--connect (con1, localhost, root) + +--echo # Connection default +--connection default +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +INSERT INTO t1 VALUES (100),(200); +FLUSH LOCAL TABLES test.t1 FOR EXPORT; +--echo # Connection con1 +--connection con1 +--echo # Should be blocked +--echo # Sending: +--send FLUSH LOCAL TABLES t1 FOR EXPORT + +--echo # Connection default +--connection default +let $wait_condition= + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = "Waiting for table metadata lock" AND + info = "FLUSH LOCAL TABLES t1 FOR EXPORT"; +--source include/wait_condition.inc +UNLOCK TABLE; + +--echo # Connection con1 +--connection con1 +--echo # Reaping: FLUSH LOCAL TABLES t1 FOR EXPORT +--reap +SELECT * FROM t1 ORDER BY i; + +--echo # Connection default +--connection default +--echo # Should be blocked +--echo # Sending: +--send FLUSH NO_WRITE_TO_BINLOG TABLES test.t1 FOR EXPORT + +--echo # Connection con1 +--connection con1 +let $wait_condition= + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = "Waiting for table metadata lock" AND + info = "FLUSH NO_WRITE_TO_BINLOG TABLES test.t1 FOR EXPORT"; +--source include/wait_condition.inc +UNLOCK TABLES; + +--echo # Connection default +--connection default +--echo # Reaping: FLUSH NO_WRITE_TO_BINLOG TABLES test.t1 FOR EXPORT +--reap +SELECT * FROM t1 ORDER BY i; +UNLOCK TABLE; +DROP TABLE t1; + +--echo # Test 12: Active transaction get committed if user execute +--echo # "FLUSH TABLE ... FOR EXPORT" or "LOCK TABLE.." + +--echo # Connection default +--connection default +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +INSERT INTO t1 VALUES (100),(200); +START TRANSACTION; +INSERT INTO t1 VALUES (300); +--echo # 'flush table..' commit active transaction from same session +FLUSH LOCAL TABLES test.t1 FOR EXPORT; +ROLLBACK; +SELECT * FROM t1 ORDER BY i; +START TRANSACTION; +INSERT INTO t1 VALUES (400); +--echo # 'lock table ..' commit active transaction from same session +LOCK TABLES test.t1 READ; +ROLLBACK; +SELECT * FROM t1 ORDER BY i; +UNLOCK TABLES; +DROP TABLE t1; + +--echo # Test 13: Verify "FLUSH TABLE ... FOR EXPORT" and "LOCK TABLE.." +--echo # in same session +--echo # Connection default + +--connection default +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +--echo # Lock table +LOCK TABLES test.t1 WRITE; +--echo # 'lock table ..' completes even if table lock is acquired +--echo # in same session using 'lock table'. Previous locks are released. +LOCK TABLES test.t1 READ; +--echo # 'flush table ..' gives error if table lock is acquired +--echo # in same session using 'lock table ..' +--error ER_LOCK_OR_ACTIVE_TRANSACTION +FLUSH TABLES test.t1 FOR EXPORT; +--echo # 'lock table ..' completes even if table lock is acquired +--echo # in same session using 'flush table'. Previous locks are released. +LOCK TABLES test.t1 WRITE; +UNLOCK TABLES; +DROP TABLE t1; + +--connection con1 +--disconnect con1 +--source include/wait_until_disconnected.inc +--connection default + +--echo # Reset innodb_file_per_table +SET GLOBAL innodb_file_per_table= @old_innodb_file_per_table; + +--echo # End of 5.6 tests diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 936b93b49c9..7643676ea61 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -49,9 +49,9 @@ select grp,group_concat(c order by grp desc) from t1 group by grp order by grp; # Test transfer to real values -select grp, group_concat(a separator "")+0 from t1 group by grp;
-select grp, group_concat(a separator "")+0.0 from t1 group by grp;
-select grp, ROUND(group_concat(a separator "")) from t1 group by grp;
+select grp, group_concat(a separator "")+0 from t1 group by grp; +select grp, group_concat(a separator "")+0.0 from t1 group by grp; +select grp, ROUND(group_concat(a separator "")) from t1 group by grp; drop table t1; # Test NULL values diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index cf5f00c3ee1..363f089e8d7 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -981,10 +981,13 @@ DROP TABLE D; # # Bug #39656: Behaviour different for agg functions with & without where - # ONLY_FULL_GROUP_BY +# MDEV-5617 mysqld crashes when running a query with ONLY_FULL_GROUP_BY # CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,1), (1,2), (1,3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (3),(4); SET SQL_MODE='ONLY_FULL_GROUP_BY'; @@ -1000,11 +1003,18 @@ SELECT COUNT(*) FROM t1 a JOIN t1 b ON a.a= b.a; SELECT COUNT(*), (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a) FROM t1 outr; +--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS +SELECT COUNT(*) FROM t1 outr, (SELECT b, count(*) FROM t2) as t3; + +SELECT COUNT(*) FROM t1 outr where (1,1) in (SELECT a, count(*) FROM t2); + SELECT COUNT(*) FROM t1 a JOIN t1 outr ON a.a= (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a); +SELECT * FROM (SELECT a FROM t1 GROUP BY a) sq JOIN t2 ON a = b; + SET SQL_MODE=default; -DROP TABLE t1; +DROP TABLE t1,t2; ### diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 22ebb6248e2..a7ae99cd2d0 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -298,6 +298,14 @@ DROP TABLE t1; SELECT INET_NTOA(0); SELECT '1' IN ('1', INET_NTOA(0)); +# +# MDEV-5655 Server crashes on NAME_CONST containing AND/OR expressions +# +--error ER_WRONG_ARGUMENTS +SELECT NAME_CONST('a', -(1 OR 2)) OR 1; +--error ER_WRONG_ARGUMENTS +SELECT NAME_CONST('a', -(1 AND 2)) AND 1; +SELECT NAME_CONST('a', -(1)) OR 1; --echo # --echo # Bug #52165: Assertion failed: file .\dtoa.c, line 465 @@ -549,6 +557,3 @@ select release_lock(repeat('a', 193)); --echo # End of 5.5 tests --echo # ---echo # ---echo # End of tests ---echo # diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 9b1d71db10d..c889dec927e 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1103,7 +1103,9 @@ drop table t1; # # lp:731815 Crash/valgrind warning Item::send with 5.1-micro # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); select convert_tz(timediff('0000-00-00 00:00:00', cast('2008-03-26 07:09:06' as datetime)), 'UTC', 'Europe/Moscow'); +SET timestamp=DEFAULT; # # lp:736370 Datetime functions in subquery context cause wrong result and bogus warnings in mysql-5.1-micr @@ -1425,12 +1427,14 @@ SHOW COLUMNS FROM t1; SELECT * FROM t1; DROP TABLE t1; +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); CREATE TABLE t1 AS SELECT TIMESTAMP('00:00:00','10:10:10'), TIMESTAMP(TIME('00:00:00'),'10:10:10'); SHOW COLUMNS FROM t1; SELECT * FROM t1; DROP TABLE t1; +SET timestamp=DEFAULT; --echo # --echo # MDEV-4869 Wrong result of MAKETIME(0, 0, -0.1) @@ -1440,6 +1444,7 @@ SELECT MAKETIME(0, 0, -0.1); --echo # --echo # MDEV-4857 Wrong result of HOUR('1 00:00:00') --echo # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT HOUR('1 02:00:00'), HOUR('26:00:00'); SELECT HOUR(TIME'1 02:00:00'), HOUR(TIME'26:00:00'); SELECT HOUR(TIME('1 02:00:00')), HOUR(TIME('26:00:00')); @@ -1449,7 +1454,26 @@ SELECT EXTRACT(HOUR FROM '1 02:00:00'), EXTRACT(HOUR FROM '26:00:00'); SELECT EXTRACT(HOUR FROM TIME'1 02:00:00'), EXTRACT(HOUR FROM TIME'26:00:00'); SELECT EXTRACT(HOUR FROM TIME('1 02:00:00')), EXTRACT(HOUR FROM TIME('26:00:00')); SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00')); +SET timestamp=DEFAULT; +--echo # +--echo # MDEV-5458 RQG hits 'sql/tztime.cc:799: my_time_t sec_since_epoch(int, int, int, int, int, int): Assertion `mon > 0 && mon < 13' failed.' +--echo # +SET TIMESTAMP=UNIX_TIMESTAMP('2014-01-22 18:19:20'); +CREATE TABLE t1 (t TIME); +INSERT INTO t1 VALUES ('03:22:30'),('18:30:05'); +SELECT CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') FROM t1; +SELECT GREATEST(t, CURRENT_DATE()) FROM t1; +DROP TABLE t1; +SET TIMESTAMP=DEFAULT; + +--echo # +--echo # MDEV-5504 Server crashes in String::length on SELECT with MONTHNAME, GROUP BY, ROLLUP +--echo # +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (1),(2); +SELECT 1 FROM t1 GROUP BY MONTHNAME(0) WITH ROLLUP; +DROP TABLE t1; --echo # --echo # MDEV-4838 Wrong metadata for DATE_ADD('string', INVERVAL) @@ -1457,3 +1481,33 @@ SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00')); --enable_metadata SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE); --disable_metadata + +--echo # +--echo # MDEV-5450 Assertion `cached_field_ type == MYSQL_TYPE_STRING || ltime.time_type == MYSQL_TIMESTAMP_NONE || mysql_type_to_time_type(cached_field_type) == ltime.time_type' fails with IF, ISNULL, ADDDATE +--echo # + +CREATE TABLE t1 (a DATETIME, b DATE); +INSERT INTO t1 VALUES (NULL, '2012-12-21'); +SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1; +SELECT CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) FROM t1; +SELECT CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) FROM t1; +SELECT CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +SELECT IF(1,ADDTIME(IFNULL(a,b),0),1) FROM t1; +SELECT CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) FROM t1; +SELECT CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) FROM t1; +SELECT CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +DROP TABLE t1; + +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); +CREATE TABLE t1 (a DATETIME, b TIME); +INSERT INTO t1 VALUES (NULL, '00:20:12'); +SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1; +SELECT CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) FROM t1; +SELECT CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) FROM t1; +SELECT CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +SELECT IF(1,ADDTIME(IFNULL(a,b),0),1) FROM t1; +SELECT CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) FROM t1; +SELECT CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) FROM t1; +SELECT CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +DROP TABLE t1; +SET timestamp=DEFAULT; diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test index d021bb0b53d..0c6410b5a75 100644 --- a/mysql-test/t/gis-precise.test +++ b/mysql-test/t/gis-precise.test @@ -325,3 +325,6 @@ SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 0.0 -3.0 ))' ), 3 ))); +# MDEV-5615 crash in Gcalc_function::add_operation +select astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1)); + diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index c1153d5071d..c38706959e4 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -1434,6 +1434,24 @@ SELECT 1 FROM g1 WHERE a >= ANY DROP TABLE g1; --echo # +--echo # Bug#16451878 GEOMETRY QUERY CRASHES SERVER +--echo # + +--echo # should not crash +SELECT ASTEXT(0x0100000000030000000100000000000010); + +--echo #should not crash +SELECT ENVELOPE(0x0100000000030000000100000000000010); + +--echo #should not crash +SELECT + GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1); + +--echo #should not crash +SELECT + GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1); + +--echo # --echo # MDEV-3819 missing constraints for spatial column types --echo # diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index f88b6fbb2fe..8ee17d2b2d3 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1,5 +1,3 @@ ---source include/have_innodb.inc - # Initialise --disable_warnings drop table if exists t1,t2,t3; @@ -1336,7 +1334,7 @@ INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10), (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); let $query0=SELECT col1 AS field1, col1 AS field2 - FROM t1 GROUP BY field1, field2; + FROM t1 GROUP BY field1, field2+0; # Needs to be range to exercise bug --eval EXPLAIN $query0; @@ -1366,7 +1364,9 @@ LIMIT 3; explain select col1 f1, col1 f2 from t1 order by f2, f1; -select col1 f1, col1 f2 from t1 order by f2, f1; +explain +select col1 f1, col1 f2 from t1 order by f2, f1+0; +select col1 f1, col1 f2 from t1 order by f2, f1+0; explain select col1 f1, col1 f2 from t1 group by f2 order by f2, f1; @@ -1386,12 +1386,12 @@ INSERT INTO t2(col1, col2) VALUES (11,10),(12,9),(13,8),(14,7),(15,6),(16,5),(17,4),(18,3),(19,2),(20,1); explain -select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3; -select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3; +select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3+0; +select col1 f1, col2 f2, col1 f3 from t2 group by f1, f2, f3+0; explain -select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3; -select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3; +select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3+0; +select col1 f1, col2 f2, col1 f3 from t2 order by f1, f2, f3+0; DROP VIEW v1; DROP TABLE t1, t2; @@ -1644,30 +1644,6 @@ FROM t1 JOIN t2 ON c = b GROUP BY b WITH ROLLUP; DROP TABLE t1,t2; --echo # ---echo # Test of MDEV-4002 ---echo # - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY, - d1 DOUBLE, - d2 DOUBLE, - i INT NOT NULL DEFAULT '0', - KEY (i) -) ENGINE=InnoDB; - -INSERT INTO t1 VALUES (1,1.0,1.1,1),(2,2.0,2.2,2); - -PREPARE stmt FROM " -SELECT DISTINCT i, GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) -FROM t1 a1 NATURAL JOIN t1 a2 GROUP BY i WITH ROLLUP -"; - -EXECUTE stmt; -EXECUTE stmt; - -DROP TABLE t1; - ---echo # --echo # Bug #58782 --echo # Missing rows with SELECT .. WHERE .. IN subquery --echo # with full GROUP BY and no aggr diff --git a/mysql-test/t/group_by_innodb.test b/mysql-test/t/group_by_innodb.test index 0d5e5e9ae30..df213cc189f 100644 --- a/mysql-test/t/group_by_innodb.test +++ b/mysql-test/t/group_by_innodb.test @@ -4,6 +4,8 @@ --source include/have_innodb.inc +set @save_ext_key_optimizer_switch=@@optimizer_switch; + --echo # --echo # MDEV-3992 Server crash or valgrind errors in test_if_skip_sort_order/test_if_cheaper_ordering --echo # on GROUP BY with indexes on InnoDB table @@ -15,6 +17,8 @@ CREATE TABLE t1 ( KEY (pk) ) ENGINE=InnoDB; +set optimizer_switch='extended_keys=on'; + INSERT INTO t1 VALUES (1,'a'),(2,'b'); EXPLAIN @@ -35,4 +39,31 @@ WHERE a = 'r' OR pk = 183 GROUP BY field1, field1; drop table t1; +set optimizer_switch=@save_ext_key_optimizer_switch; + +--echo # +--echo # MDEV-4002 Server crash or valgrind errors in Item_func_group_concat::setup and Item_func_group_concat::add +--echo # + +CREATE TABLE t1 ( + pk INT NOT NULL PRIMARY KEY, + d1 DOUBLE, + d2 DOUBLE, + i INT NOT NULL DEFAULT '0', + KEY (i) +) ENGINE=InnoDB; + +INSERT INTO t1 VALUES (1,1.0,1.1,1),(2,2.0,2.2,2); + +PREPARE stmt FROM " +SELECT DISTINCT i, GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) +FROM t1 a1 NATURAL JOIN t1 a2 GROUP BY i WITH ROLLUP +"; + +EXECUTE stmt; +EXECUTE stmt; + +DROP TABLE t1; + --echo End of 5.5 tests + diff --git a/mysql-test/t/group_by_null.test b/mysql-test/t/group_by_null.test new file mode 100644 index 00000000000..b3fa2a003ec --- /dev/null +++ b/mysql-test/t/group_by_null.test @@ -0,0 +1,7 @@ +# +# MDEV-5461 Assertion `length <= column->length' fails in write_block_record with functions in select list, GROUP BY, ORDER BY +# +create table t1 (a int); +insert into t1 values (1),(2); +select max('foo') from t1 group by values(a), extractvalue('bar','qux') order by "v"; +drop table t1; diff --git a/mysql-test/t/information_schema-big.test b/mysql-test/t/information_schema-big.test index 5e73c867143..717c22f8f6a 100644 --- a/mysql-test/t/information_schema-big.test +++ b/mysql-test/t/information_schema-big.test @@ -14,9 +14,10 @@ DROP VIEW IF EXISTS v1; --echo # ---echo # Bug#18925: subqueries with MIN/MAX functions on INFORMARTION_SCHEMA +--echo # Bug#18925: subqueries with MIN/MAX functions on INFORMATION_SCHEMA --echo # +--sorted_result SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -32,6 +33,7 @@ SELECT t.table_name, c1.column_name c2.column_name LIKE '%SCHEMA%' ) AND t.table_name NOT LIKE 'innodb%'; +--sorted_result SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index ed0be41c279..a1ca0bce1d1 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1796,5 +1796,61 @@ drop database mysqltest; --echo # End of 5.5 tests --echo # +--echo # +--echo # MDEV-5723: mysqldump -uroot unusable for multi-database operations, checks all databases +--echo # + +--disable_warnings +drop database if exists db1; +--enable_warnings + +connect (con1,localhost,root,,); +connection con1; + +create database db1; +use db1; +create table t1 (a int); +create table t2 (a int); +create table t3 (a int); + +create database mysqltest; +use mysqltest; +create table t1 (a int); +create table t2 (a int); +create table t3 (a int); + +flush tables; +flush status; + +SELECT + LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA +FROM + INFORMATION_SCHEMA.FILES +WHERE + FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL AND + LOGFILE_GROUP_NAME IN (SELECT DISTINCT LOGFILE_GROUP_NAME + FROM INFORMATION_SCHEMA.FILES + WHERE + FILE_TYPE = 'DATAFILE' AND + TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME + FROM INFORMATION_SCHEMA.PARTITIONS + WHERE TABLE_SCHEMA IN ('db1') + ) + ) +GROUP BY + LOGFILE_GROUP_NAME, FILE_NAME, ENGINE +ORDER BY + LOGFILE_GROUP_NAME; + +--echo # This must have Opened_tables=3, not 6. +show status like 'Opened_tables'; + +drop database mysqltest; +drop database db1; + +connection default; +disconnect con1; + # Wait till all disconnects are completed --source include/wait_until_count_sessions.inc + diff --git a/mysql-test/t/innodb_ext_key.test b/mysql-test/t/innodb_ext_key.test index d62217dd54f..9f3a89ff948 100644 --- a/mysql-test/t/innodb_ext_key.test +++ b/mysql-test/t/innodb_ext_key.test @@ -663,6 +663,34 @@ ORDER BY rev_timestamp ASC LIMIT 10; DROP TABLE t1,t2,t3; +--echo # +--echo # MDEV-5424 SELECT using ORDER BY DESC and LIMIT produces unexpected +--echo # results (InnoDB/XtraDB) +--echo # + +create table t1 (a bigint not null unique auto_increment, b varchar(10), primary key (a), key (b(2))) engine = myisam default character set utf8; +create table t2 (a bigint not null unique auto_increment, b varchar(10), primary key (a), key (b(2))) engine = innodb default character set utf8; + +insert into t1 (b) values (null), (null), (null); +insert into t2 (b) values (null), (null), (null); + +set optimizer_switch='extended_keys=on'; +explain select a from t1 where b is null order by a desc limit 2; +select a from t1 where b is null order by a desc limit 2; +explain select a from t2 where b is null order by a desc limit 2; +select a from t2 where b is null order by a desc limit 2; +set optimizer_switch='extended_keys=off'; +explain select a from t2 where b is null order by a desc limit 2; +select a from t2 where b is null order by a desc limit 2; + +explain select a from t2 where b is null order by a desc; +select a from t2 where b is null order by a desc; + +explain select a from t2 where b is null order by a desc,a,a; +select a from t2 where b is null order by a desc,a,a; + +drop table t1, t2; + set optimizer_switch=@save_optimizer_switch; set optimizer_switch=@save_ext_key_optimizer_switch; diff --git a/mysql-test/t/innodb_icp.test b/mysql-test/t/innodb_icp.test index d6caa36a88e..acb8238e01f 100644 --- a/mysql-test/t/innodb_icp.test +++ b/mysql-test/t/innodb_icp.test @@ -45,6 +45,34 @@ ORDER BY e; DROP TABLE t1,t2,t3; +--echo # +--echo # MDEV-5337: Wrong result in mariadb 5.5.32 with ORDER BY + LIMIT when index_condition_pushdown=on +--echo # MDEV-5512: Wrong result (WHERE clause ignored) with multiple clauses using Percona-XtraDB engine +--echo # + +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t2 (pk int primary key, + key1 char(32), + key2 char(32), + key(key1), + key(key2) +) engine=innodb; + +insert into t2 select + A.a+10*B.a+100*C.a, + concat('rare-', A.a+10*B.a), + concat('rare-', A.a+10*B.a) +from + t1 A, t1 B, t1 C; +update t2 set key1='frequent-val' where pk between 100 and 350; +select * from t2 ignore key(PRIMARY) +where key1='frequent-val' and key2 between 'rare-400' and 'rare-450' order by pk limit 2; + +drop table t1, t2; + + set optimizer_switch=@innodb_icp_tmp; set storage_engine= @save_storage_engine; diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index f9b9fcf266d..ff8396fd7fd 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -555,3 +555,21 @@ INSERT IGNORE t1 (a, a) SELECT 1,1; INSERT IGNORE t1 (a, a) SELECT 1,1 UNION SELECT 2,2; DROP TABLE t1; + +--echo # +--echo # MDEV-5168: Ensure that we can disable duplicate key warnings +--echo # from INSERT IGNORE +--echo # + +create table t1 (f1 int unique, f2 int unique); +insert into t1 values (1,12); +insert into t1 values (2,13); +--error ER_DUP_ENTRY +insert into t1 values (1,12); +insert ignore into t1 values (1,12); +set @@old_mode="NO_DUP_KEY_WARNINGS_WITH_IGNORE"; +insert ignore into t1 values (1,12); +insert ignore into t1 values (1,12) on duplicate key update f2=13; +set @@old_mode=""; +insert ignore into t1 values (1,12); +DROP TABLE t1; diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test index 54b2a3c82ea..e07a3665920 100644 --- a/mysql-test/t/join.test +++ b/mysql-test/t/join.test @@ -1185,3 +1185,18 @@ SELECT t1.a FROM t1 NATURAL STRAIGHT_JOIN t2 ORDER BY t1.a; SELECT t1.a FROM t1 NATURAL STRAIGHT_JOIN t2 ORDER BY t1.a; DROP TABLE t1,t2; + +--echo # +--echo # MDEV-5635: join of a const table with non-const tables +--echo # + +CREATE TABLE t1 (a varchar(3) NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo'); + +CREATE TABLE t2 (b varchar(3), c varchar(3), INDEX(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('bar', 'bar'),( 'qux', 'qux'); + +SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2 + WHERE t2_2.c = t2_1.c AND t2_2.b = t2_1.b AND ( a IS NULL OR t2_1.c = a ); + +DROP TABLE t1,t2; diff --git a/mysql-test/t/lowercase_table2.test b/mysql-test/t/lowercase_table2.test index 30433d15be4..2fcb38c229e 100644 --- a/mysql-test/t/lowercase_table2.test +++ b/mysql-test/t/lowercase_table2.test @@ -251,7 +251,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; --echo # Check that still there is an entry for table in TDC. show open tables like 't_bug44738_%'; --echo # So attempt to create table with the same name should fail. ---error ER_FILE_NOT_FOUND +--error ER_TABLE_EXISTS_ERROR create table t_bug44738_UPPERCASE (i int); --echo # And should succeed after FLUSH TABLES. flush tables; diff --git a/mysql-test/t/lowercase_table4-master.opt b/mysql-test/t/lowercase_table4-master.opt index c0a1981fa7c..ac4d3211e89 100644 --- a/mysql-test/t/lowercase_table4-master.opt +++ b/mysql-test/t/lowercase_table4-master.opt @@ -1 +1 @@ ---lower-case-table-names=2
+--lower-case-table-names=2 diff --git a/mysql-test/t/lowercase_table4.test b/mysql-test/t/lowercase_table4.test index d13b1a16be1..435ff0dae66 100644 --- a/mysql-test/t/lowercase_table4.test +++ b/mysql-test/t/lowercase_table4.test @@ -1,108 +1,108 @@ ---source include/have_case_insensitive_file_system.inc
---source include/have_innodb.inc
-
---echo #
---echo # Bug#46941 crash with lower_case_table_names=2 and
---echo # foreign data dictionary confusion
---echo #
-
-CREATE DATABASE XY;
-USE XY;
-
-#
-# Logs are disabled, since the number of creates tables
-# and subsequent select statements may vary between
-# versions
-#
---disable_query_log
---disable_result_log
-
-let $tcs = `SELECT @@table_open_cache + 1`;
-
-let $i = $tcs;
-
-while ($i)
-{
- eval CREATE TABLE XY.T_$i (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT,
- primary key(a, b), unique(b)) ENGINE=InnoDB;
- dec $i;
-}
-
-eval ALTER TABLE XY.T_$tcs ADD INDEX I1 (c, b),
- ADD CONSTRAINT C1 FOREIGN KEY (c, b) REFERENCES XY.T_1 (a, b);
-
-eval ALTER TABLE XY.T_$tcs ADD INDEX I2 (b),
- ADD CONSTRAINT C2 FOREIGN KEY (b) REFERENCES XY.T_1(a);
-
-let $i = $tcs;
-while ($i)
-{
- eval SELECT * FROM XY.T_$i LIMIT 1;
- dec $i;
-}
-
-DROP DATABASE XY;
-CREATE DATABASE XY;
-USE XY;
-eval CREATE TABLE XY.T_$tcs (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT,
- PRIMARY KEY(a, b), UNIQUE(b)) ENGINE=InnoDB;
-#
-# The bug causes this SELECT to err
-eval SELECT * FROM XY.T_$tcs LIMIT 1;
-
---enable_query_log
---enable_result_log
-DROP DATABASE XY;
-USE TEST;
-
---echo #
---echo # Bug55222 Mysqldump table names case bug in REFERENCES clause
---echo # InnoDB did not handle lower_case_table_names=2 for
---echo # foreign_table_names and referenced_table_names.
---echo #
-
-SHOW VARIABLES LIKE 'lower_case_table_names';
-
---disable_warnings
-DROP TABLE IF EXISTS `Table2`;
-DROP TABLE IF EXISTS `Table1`;
---disable_warnings
-
-CREATE TABLE `Table1`(c1 INT PRIMARY KEY) ENGINE=InnoDB;
-CREATE TABLE `Table2`(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
-ALTER TABLE `Table2` ADD CONSTRAINT fk1 FOREIGN KEY(c2) REFERENCES `Table1`(c1);
-query_vertical SHOW CREATE TABLE `Table2`;
-query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
-DROP TABLE `Table2`;
-DROP TABLE `Table1`;
-
---disable_warnings
-DROP TABLE IF EXISTS Product_Order;
-DROP TABLE IF EXISTS Product;
-DROP TABLE IF EXISTS Customer;
---enable_warnings
-
-CREATE TABLE Product (Category INT NOT NULL, Id INT NOT NULL,
- Price DECIMAL, PRIMARY KEY(Category, Id)) ENGINE=InnoDB;
-CREATE TABLE Customer (Id INT NOT NULL, PRIMARY KEY (Id)) ENGINE=InnoDB;
-CREATE TABLE Product_Order (No INT NOT NULL AUTO_INCREMENT,
- Product_Category INT NOT NULL,
- Product_Id INT NOT NULL,
- Customer_Id INT NOT NULL,
- PRIMARY KEY(No),
- INDEX (Product_Category, Product_Id),
- FOREIGN KEY (Product_Category, Product_Id)
- REFERENCES Product(Category, Id) ON UPDATE CASCADE ON DELETE RESTRICT,
- INDEX (Customer_Id),
- FOREIGN KEY (Customer_Id)
- REFERENCES Customer(Id)
- ) ENGINE=INNODB;
-
-query_vertical SHOW CREATE TABLE Product_Order;
-query_vertical SHOW CREATE TABLE Product;
-query_vertical SHOW CREATE TABLE Customer;
-query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
-DROP TABLE Product_Order;
-DROP TABLE Product;
-DROP TABLE Customer;
-
+--source include/have_case_insensitive_file_system.inc +--source include/have_innodb.inc + +--echo # +--echo # Bug#46941 crash with lower_case_table_names=2 and +--echo # foreign data dictionary confusion +--echo # + +CREATE DATABASE XY; +USE XY; + +# +# Logs are disabled, since the number of creates tables +# and subsequent select statements may vary between +# versions +# +--disable_query_log +--disable_result_log + +let $tcs = `SELECT @@table_open_cache + 1`; + +let $i = $tcs; + +while ($i) +{ + eval CREATE TABLE XY.T_$i (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT, + primary key(a, b), unique(b)) ENGINE=InnoDB; + dec $i; +} + +eval ALTER TABLE XY.T_$tcs ADD INDEX I1 (c, b), + ADD CONSTRAINT C1 FOREIGN KEY (c, b) REFERENCES XY.T_1 (a, b); + +eval ALTER TABLE XY.T_$tcs ADD INDEX I2 (b), + ADD CONSTRAINT C2 FOREIGN KEY (b) REFERENCES XY.T_1(a); + +let $i = $tcs; +while ($i) +{ + eval SELECT * FROM XY.T_$i LIMIT 1; + dec $i; +} + +DROP DATABASE XY; +CREATE DATABASE XY; +USE XY; +eval CREATE TABLE XY.T_$tcs (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT, + PRIMARY KEY(a, b), UNIQUE(b)) ENGINE=InnoDB; +# +# The bug causes this SELECT to err +eval SELECT * FROM XY.T_$tcs LIMIT 1; + +--enable_query_log +--enable_result_log +DROP DATABASE XY; +USE TEST; + +--echo # +--echo # Bug55222 Mysqldump table names case bug in REFERENCES clause +--echo # InnoDB did not handle lower_case_table_names=2 for +--echo # foreign_table_names and referenced_table_names. +--echo # + +SHOW VARIABLES LIKE 'lower_case_table_names'; + +--disable_warnings +DROP TABLE IF EXISTS `Table2`; +DROP TABLE IF EXISTS `Table1`; +--disable_warnings + +CREATE TABLE `Table1`(c1 INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE `Table2`(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB; +ALTER TABLE `Table2` ADD CONSTRAINT fk1 FOREIGN KEY(c2) REFERENCES `Table1`(c1); +query_vertical SHOW CREATE TABLE `Table2`; +query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test'; +DROP TABLE `Table2`; +DROP TABLE `Table1`; + +--disable_warnings +DROP TABLE IF EXISTS Product_Order; +DROP TABLE IF EXISTS Product; +DROP TABLE IF EXISTS Customer; +--enable_warnings + +CREATE TABLE Product (Category INT NOT NULL, Id INT NOT NULL, + Price DECIMAL, PRIMARY KEY(Category, Id)) ENGINE=InnoDB; +CREATE TABLE Customer (Id INT NOT NULL, PRIMARY KEY (Id)) ENGINE=InnoDB; +CREATE TABLE Product_Order (No INT NOT NULL AUTO_INCREMENT, + Product_Category INT NOT NULL, + Product_Id INT NOT NULL, + Customer_Id INT NOT NULL, + PRIMARY KEY(No), + INDEX (Product_Category, Product_Id), + FOREIGN KEY (Product_Category, Product_Id) + REFERENCES Product(Category, Id) ON UPDATE CASCADE ON DELETE RESTRICT, + INDEX (Customer_Id), + FOREIGN KEY (Customer_Id) + REFERENCES Customer(Id) + ) ENGINE=INNODB; + +query_vertical SHOW CREATE TABLE Product_Order; +query_vertical SHOW CREATE TABLE Product; +query_vertical SHOW CREATE TABLE Customer; +query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test'; +DROP TABLE Product_Order; +DROP TABLE Product; +DROP TABLE Customer; + diff --git a/mysql-test/t/myisam_optimize.test b/mysql-test/t/myisam_optimize.test index 2d630f7dbd0..5f0b8fc7666 100644 --- a/mysql-test/t/myisam_optimize.test +++ b/mysql-test/t/myisam_optimize.test @@ -44,4 +44,5 @@ disconnect con2; connection default; drop table t1; +set debug_sync='reset'; diff --git a/mysql-test/t/mysql_tzinfo_to_sql_symlink.test b/mysql-test/t/mysql_tzinfo_to_sql_symlink.test index d29d40f5679..1ba4e91be3c 100644 --- a/mysql-test/t/mysql_tzinfo_to_sql_symlink.test +++ b/mysql-test/t/mysql_tzinfo_to_sql_symlink.test @@ -8,8 +8,32 @@ --exec mkdir $MYSQLTEST_VARDIR/zoneinfo --exec ln -s $MYSQLTEST_VARDIR/zoneinfo $MYSQLTEST_VARDIR/zoneinfo/posix --copy_file std_data/zoneinfo/GMT $MYSQLTEST_VARDIR/zoneinfo/GMT +--copy_file std_data/words.dat $MYSQLTEST_VARDIR/zoneinfo/garbage +--copy_file std_data/words.dat $MYSQLTEST_VARDIR/zoneinfo/ignored.tab +--echo # Verbose run +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_TZINFO_TO_SQL --verbose $MYSQLTEST_VARDIR/zoneinfo 2>&1 + +--echo # Silent run --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo 2>&1 +--echo # +--echo # Testing with explicit timezonefile +--echo # + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo/GMT XXX 2>&1 + +--echo # +--echo # Testing --leap +--echo # + +--exec $MYSQL_TZINFO_TO_SQL --leap $MYSQLTEST_VARDIR/zoneinfo/GMT 2>&1 + +# +# Cleanup +# + --exec rm -rf $MYSQLTEST_VARDIR/zoneinfo diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test index efb1551150f..0261928ac08 100644 --- a/mysql-test/t/mysql_upgrade.test +++ b/mysql-test/t/mysql_upgrade.test @@ -41,6 +41,11 @@ GRANT ALL ON *.* TO mysqltest1@'%'; DROP USER mysqltest1@'%'; +# +# check that we get proper error messages if wrong user + +--error 1 +--exec $MYSQL_UPGRADE --force --user=mysqltest1 --password=sakila 2>&1 # # Bug #26639 mysql_upgrade exits successfully even if external command failed diff --git a/mysql-test/t/mysqld--help.test b/mysql-test/t/mysqld--help.test index ae75069d103..2104159b3e9 100644 --- a/mysql-test/t/mysqld--help.test +++ b/mysql-test/t/mysqld--help.test @@ -21,7 +21,8 @@ perl; @skipvars=qw/basedir open-files-limit general-log-file log plugin-dir log-slow-queries pid-file slow-query-log-file log-basename datadir slave-load-tmpdir tmpdir socket thread-pool-size - wsrep-node-name/; + large-files-support lower-case-file-system system-time-zone + wsrep-node-name version.*/; # Plugins which may or may not be there: @plugins=qw/innodb ndb archive blackhole federated partition ndbcluster diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 1ddce574a88..6e717e85122 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -2440,6 +2440,21 @@ SET @@global.log_output= @old_log_output_state; SET @@global.slow_query_log= @old_slow_query_log_state; SET @@global.general_log= @old_general_log_state; +--echo # MDEV-5481 mysqldump fails to dump geometry types properly + +create table t1 (g GEOMETRY) CHARSET koi8r; +create table t2 (g GEOMETRY) CHARSET koi8r; +insert into t1 values (point(1,1)), (point(2,2)); +--exec $MYSQL_DUMP --hex-blob --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1 +--echo ################################################## +--cat_file $file +--echo ################################################## +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET koi8r +--remove_file $file +select astext(g) from t2; +drop table t1, t2; + --echo # --echo # End of 5.1 tests --echo # diff --git a/mysql-test/t/not_embedded_server.test b/mysql-test/t/not_embedded_server.test index 5b99c37ee29..0878a78b885 100644 --- a/mysql-test/t/not_embedded_server.test +++ b/mysql-test/t/not_embedded_server.test @@ -18,10 +18,8 @@ SHOW VARIABLES like 'slave_skip_errors'; --echo # Bug#58026: massive recursion and crash in regular expression handling --echo # ---disable_result_log ---error ER_STACK_OVERRUN_NEED_MORE +--error ER_STACK_OVERRUN_NEED_MORE,ER_REGEXP_ERROR SELECT '1' RLIKE RPAD('1', 10000, '('); ---enable_result_log # End of 5.1 tests diff --git a/mysql-test/t/old-mode.test b/mysql-test/t/old-mode.test index 182c166ebbc..483549886db 100644 --- a/mysql-test/t/old-mode.test +++ b/mysql-test/t/old-mode.test @@ -25,3 +25,42 @@ drop table t1,t2; --replace_result "Writing to net" "NULL" --replace_regex /localhost[:0-9]*/localhost/ SHOW PROCESSLIST; + +--echo # +--echo # MDEV-5372 Make "CAST(time_expr AS DATETIME)" compatible with the SQL Standard) +--echo # +set @@old_mode=zero_date_time_cast; +SELECT CAST(TIME'-10:30:30' AS DATETIME); +SELECT CAST(TIME'10:20:30' AS DATETIME); +SELECT CAST(TIME'830:20:30' AS DATETIME); +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 VALUES (TIME'-10:20:30'); +INSERT INTO t1 VALUES (TIME'10:20:30'); +INSERT INTO t1 VALUES (TIME'830:20:30'); +SELECT * FROM t1; +DROP TABLE t1; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES (TIME'-10:20:30'); +INSERT INTO t1 VALUES (TIME'10:20:30'); +INSERT INTO t1 VALUES (TIME'830:20:30'); +SELECT * FROM t1; +DROP TABLE t1; +CREATE TABLE t1 (a TIME); +INSERT INTO t1 VALUES (TIME'-10:20:30'); +INSERT INTO t1 VALUES (TIME'10:20:30'); +INSERT INTO t1 VALUES (TIME'830:20:30'); +SELECT a, CAST(a AS DATETIME), TO_DAYS(a) FROM t1; +DROP TABLE t1; +# Note, it was actually a bug that TO_DAYS('830:20:30') returned NULL +# for a column, while 3 for an expression. We won't fix this, +# it's "old_mode" anyway. +SELECT TO_DAYS(TIME'-10:20:30'); +SELECT TO_DAYS(TIME'10:20:30'); +SELECT TO_DAYS(TIME'830:20:30'); + +# This is to cover Item_temporal_hybrid_func::fix_temporal_type in old_mode: +CREATE TABLE t1 (a DATETIME, b TIME); +INSERT INTO t1 VALUES (NULL, '00:20:12'); +INSERT INTO t1 VALUES (NULL, '-00:20:12'); +SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1; +DROP TABLE t1; diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index d573c3b5b8a..c4a85e4b111 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -261,6 +261,9 @@ desc,b desc; explain select * from t1 where a = 2 and b > 0 order by a desc,b desc; explain select * from t1 where a = 2 and b < 2 order by a desc,b desc; explain select * from t1 where a = 1 order by b desc; +explain select * from t1 where a = 2 and b > 0 order by a desc,b desc,b,a; +explain select * from t1 where a = 2 and b < 2 order by a desc,a,b desc,a,b; + select * from t1 where a = 1 order by b desc; # # Test things when we don't have NULL keys @@ -1913,6 +1916,35 @@ SELECT t1.a FROM t1 LEFT JOIN t2 ON t1.a=t2.a ORDER BY t1.a LIMIT 100; DROP TABLE t1,t2; +--echo # +--echo # MDEV-4974 memory leak in 5.5.32-MariaDB-1~wheezy-log +--echo # +set sort_buffer_size=default; +set max_sort_length=default; +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t2 (b int, + col1 varchar(255), + col2 varchar(255) + ) character set utf8; + +insert into t2 select + A.a+10*B.a, + concat('wow-wow-col1-value-', A.a+10*B.a+100*C.a), + concat('wow-wow-col2-value-', A.a+10*B.a+100*C.a) +from + t1 A, t1 B, t1 C where C.a < 8; + +create table t3 as +select distinct A.col1 as XX, B.col1 as YY +from + t2 A, t2 B +where A.b = B.b +order by A.col2, B.col2 limit 10, 1000000; + +drop table t1,t2,t3; + --echo End of 5.5 tests diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 713b3ed7347..7eb541ab331 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -2530,6 +2530,338 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 2; SELECT * from t1 order by i; DROP TABLE t1; +--echo # +--echo # MDEV-5177: ha_partition and innodb index intersection produce fewer rows (MySQL Bug#70703) +--echo # +create table t1 ( + a int not null, + b int not null, + pk int not null, + primary key (pk), + key(a), + key(b) +) partition by hash(pk) partitions 10; + +insert into t1 values (1,2,4); # both +insert into t1 values (1,0,17); # left +insert into t1 values (1,2,25); # both + +insert into t1 values (10,20,122); +insert into t1 values (10,20,123); + +# Now, fill in some data so that the optimizer choses index_merge +create table t2 (a int); +insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +insert into t1 select 1,2, 200 + A.a + 10*B.a + 100*C.a from t2 A, t2 B, t2 C; + +insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a, + 10+A.a + 10*B.a + 100*C.a + 1000*D.a, + 2000 + A.a + 10*B.a + 100*C.a + 1000*D.a + from t2 A, t2 B, t2 C ,t2 D; + +# This should show index_merge, using intersect +explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ; +# 794 rows in output +create temporary table t3 as +select * from t1 where a=1 and b=2 and pk between 1 and 999 ; +select count(*) from t3; +drop table t3; + +# 802 rows in output +create temporary table t3 as +select * from t1 ignore index(a,b) where a=1 and b=2 and pk between 1 and 999 ; +select count(*) from t3; +drop table t3; + +drop table t1,t2; + +--echo # +--echo # MDEV-5555: Incorrect index_merge on BTREE indices +--echo # + +CREATE TABLE t1 ( + id bigint(20) unsigned NOT NULL, + id2 bigint(20) unsigned NOT NULL, + dob date DEFAULT NULL, + address char(100) DEFAULT NULL, + city char(35) DEFAULT NULL, + hours_worked_per_week smallint(5) unsigned DEFAULT NULL, + weeks_worked_last_year tinyint(3) unsigned DEFAULT NULL, + KEY dob (dob), + KEY address (address), + KEY city (city), + KEY hours_worked_per_week (hours_worked_per_week), + KEY weeks_worked_last_year (weeks_worked_last_year) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +PARTITION BY KEY (id) PARTITIONS 5; + +--echo # Insert some rows +--disable_query_log +INSERT INTO t1 VALUES (123,123,'2001-04-14','address123','city123',40,51), +(127,127,'1977-03-30','address127','city127',0,0), +(131,131,'1985-07-29','address131','city131',50,52), +(135,135,'1997-01-20','address135','city135',0,0), +(139,139,'1963-04-27','address139','city139',27,52), +(143,143,'1979-01-28','address143','city143',40,52), +(147,147,'1985-08-28','address147','city147',0,0), +(151,151,'1997-01-24','address151','city151',40,52), +(156,156,'1975-02-19','address156','city156',46,52), +(158,158,'1996-07-06','address158','city158',46,8), +(164,164,'1925-12-30','address164','city164',0,0), +(166,166,'2010-12-30','address166','city166',0,0), +(172,172,'1996-08-15','address172','city172',0,0), +(174,174,'2008-05-20','address174','city174',40,52), +(180,180,'1969-09-05','address180','city180',25,52), +(182,182,'1977-08-11','address182','city182',40,8), +(188,188,'2012-03-29','address188','city188',0,0), +(190,190,'1978-02-19','address190','city190',0,0), +(215,215,'1982-02-07','address215','city215',40,36), +(223,223,'2005-02-11','address223','city223',55,52), +(247,247,'2005-07-02','address247','city247',30,51), +(255,255,'1997-08-15','address255','city255',0,0), +(2,2,'1973-05-05','address2','city2',25,52), +(4,4,'2012-07-21','address4','city4',40,12), +(6,6,'1982-07-15','address6','city6',0,0), +(8,8,'1979-02-16','address8','city8',0,0), +(10,10,'1955-10-06','address10','city10',60,52), +(12,12,'1977-08-09','address12','city12',40,52), +(14,14,'2005-03-28','address14','city14',0,0), +(16,16,'1949-11-07','address16','city16',40,52), +(18,18,'2012-01-04','address18','city18',0,0), +(20,20,'2011-01-23','address20','city20',0,0), +(22,22,'1954-10-14','address22','city22',20,52), +(24,24,'2010-01-22','address24','city24',0,0), +(26,26,'1999-08-15','address26','city26',0,0), +(28,28,'1964-07-05','address28','city28',10,20), +(30,30,'2004-10-13','address30','city30',0,0), +(32,32,'2007-06-08','address32','city32',0,0), +(34,34,'1977-02-23','address34','city34',40,52), +(36,36,'2007-06-11','address36','city36',75,52), +(38,38,'1932-04-12','address38','city38',0,0), +(40,40,'1968-11-16','address40','city40',0,0), +(42,42,'1996-10-01','address42','city42',38,52), +(44,44,'1977-08-23','address44','city44',18,6), +(46,46,'1978-11-23','address46','city46',0,0), +(48,48,'1998-02-27','address48','city48',0,0), +(50,50,'1923-09-08','address50','city50',40,52), +(52,52,'1964-09-09','address52','city52',0,0), +(55,55,'2001-01-27','address55','city55',40,40), +(56,56,'1938-08-28','address56','city56',48,52), +(59,59,'1967-12-19','address59','city59',40,52), +(60,60,'1969-06-30','address60','city60',40,46), +(63,63,'2002-04-05','address63','city63',0,0), +(64,64,'1972-11-21','address64','city64',48,52), +(67,67,'1988-04-04','address67','city67',0,0), +(68,68,'1964-07-14','address68','city68',4,16), +(71,71,'1998-03-09','address71','city71',0,0), +(72,72,'1960-10-28','address72','city72',35,52), +(75,75,'1968-04-14','address75','city75',40,52), +(76,76,'1977-05-13','address76','city76',0,0), +(79,79,'1982-12-19','address79','city79',0,0), +(80,80,'1966-01-07','address80','city80',15,12), +(83,83,'1947-02-09','address83','city83',10,18), +(84,84,'1976-06-23','address84','city84',40,52), +(87,87,'2000-10-24','address87','city87',25,4), +(88,88,'2002-05-23','address88','city88',20,52), +(91,91,'2000-11-28','address91','city91',60,52), +(92,92,'1965-07-17','address92','city92',40,52), +(95,95,'1977-09-16','address95','city95',30,52), +(96,96,'1994-09-26','address96','city96',0,0), +(99,99,'2008-02-19','address99','city99',0,0), +(100,100,'1953-01-07','address100','city100',0,0), +(103,103,'2010-12-29','address103','city103',0,0), +(104,104,'1990-12-03','address104','city104',40,52), +(107,107,'2003-10-27','address107','city107',0,0), +(108,108,'1998-03-05','address108','city108',40,17), +(111,111,'2002-10-18','address111','city111',0,0), +(112,112,'1960-04-02','address112','city112',0,0), +(115,115,'1989-05-28','address115','city115',40,52), +(116,116,'1985-10-25','address116','city116',15,52), +(119,119,'1974-04-15','address119','city119',0,0), +(120,120,'1926-03-21','address120','city120',0,0), +(157,157,'1972-03-23','address157','city157',0,0), +(159,159,'2002-11-08','address159','city159',0,0), +(165,165,'1998-07-10','address165','city165',0,0), +(167,167,'1973-11-16','address167','city167',0,0), +(173,173,'1966-06-26','address173','city173',0,0), +(175,175,'1957-02-02','address175','city175',0,0), +(181,181,'1964-11-16','address181','city181',45,26), +(183,183,'1943-12-02','address183','city183',0,0), +(189,189,'1986-06-30','address189','city189',0,0), +(191,191,'2005-05-14','address191','city191',0,0), +(196,196,'1961-03-23','address196','city196',0,0), +(197,197,'1955-07-13','address197','city197',0,0), +(198,198,'2006-11-26','address198','city198',0,0), +(199,199,'1978-02-06','address199','city199',0,0), +(208,208,'2012-04-13','address208','city208',48,52), +(210,210,'1989-08-18','address210','city210',0,0), +(211,211,'1982-08-17','address211','city211',40,52), +(212,212,'1919-08-29','address212','city212',0,0), +(213,213,'1987-03-25','address213','city213',0,0), +(228,228,'1988-05-05','address228','city228',40,52), +(229,229,'1936-10-15','address229','city229',0,0), +(230,230,'1973-08-19','address230','city230',40,52), +(231,231,'2002-06-18','address231','city231',50,52), +(240,240,'2011-10-17','address240','city240',60,52), +(242,242,'1981-07-24','address242','city242',0,0), +(243,243,'1978-10-12','address243','city243',0,0), +(244,244,'2003-01-15','address244','city244',0,0), +(245,245,'1950-09-26','address245','city245',0,0), +(125,125,'1939-08-02','address125','city125',28,32), +(126,126,'1984-02-10','address126','city126',0,0), +(129,129,'1992-01-20','address129','city129',0,0), +(130,130,'1992-09-18','address130','city130',0,0), +(133,133,'1996-05-07','address133','city133',24,20), +(134,134,'1987-07-13','address134','city134',0,0), +(137,137,'2004-03-10','address137','city137',0,0), +(138,138,'1989-02-10','address138','city138',0,0), +(141,141,'1970-03-21','address141','city141',0,0), +(142,142,'1984-05-25','address142','city142',40,50), +(145,145,'1959-05-24','address145','city145',0,0), +(146,146,'1946-07-28','address146','city146',35,16), +(149,149,'1993-09-16','address149','city149',0,0), +(150,150,'1975-12-18','address150','city150',0,0), +(153,153,'1993-12-20','address153','city153',0,0), +(155,155,'1934-10-29','address155','city155',0,0), +(161,161,'1969-11-04','address161','city161',50,50), +(163,163,'1976-05-03','address163','city163',40,52), +(169,169,'1982-12-19','address169','city169',0,0), +(171,171,'1976-07-01','address171','city171',0,0), +(177,177,'2002-11-16','address177','city177',0,0), +(179,179,'1964-02-05','address179','city179',40,32), +(185,185,'1981-02-06','address185','city185',0,0), +(187,187,'1962-06-04','address187','city187',40,52), +(216,216,'1996-05-21','address216','city216',48,52), +(248,248,'1963-09-06','address248','city248',0,0), +(256,256,'1966-07-14','address256','city256',0,0), +(53,53,'1992-05-25','address53','city53',0,0), +(57,57,'2003-11-12','address57','city57',25,20), +(61,61,'1953-01-29','address61','city61',0,0), +(65,65,'1975-05-02','address65','city65',10,10), +(69,69,'1938-03-20','address69','city69',0,0), +(73,73,'1969-05-05','address73','city73',0,0), +(77,77,'1996-05-19','address77','city77',0,0), +(81,81,'1985-06-22','address81','city81',0,0), +(85,85,'2002-10-10','address85','city85',0,0), +(89,89,'1958-06-16','address89','city89',0,0), +(93,93,'1962-06-16','address93','city93',0,0), +(97,97,'1964-10-08','address97','city97',0,0), +(101,101,'1986-06-11','address101','city101',40,52), +(105,105,'1999-05-14','address105','city105',40,45), +(109,109,'2000-05-23','address109','city109',0,0), +(113,113,'1960-08-03','address113','city113',8,15), +(117,117,'1982-02-15','address117','city117',50,36), +(121,121,'1998-10-18','address121','city121',24,52), +(192,192,'1964-07-24','address192','city192',40,52), +(193,193,'1973-05-03','address193','city193',0,0), +(194,194,'1980-01-14','address194','city194',40,52), +(195,195,'1975-07-15','address195','city195',45,52), +(200,200,'2006-03-09','address200','city200',0,0), +(201,201,'2008-05-20','address201','city201',3,28), +(202,202,'2000-06-30','address202','city202',12,52), +(203,203,'1992-07-08','address203','city203',50,52), +(204,204,'1988-07-05','address204','city204',14,40), +(205,205,'1950-10-29','address205','city205',0,0), +(206,206,'1962-11-25','address206','city206',0,0), +(207,207,'1946-06-03','address207','city207',0,0), +(214,214,'1973-12-14','address214','city214',0,0), +(217,217,'1945-11-06','address217','city217',40,36), +(218,218,'2007-07-20','address218','city218',0,0), +(219,219,'1979-10-05','address219','city219',0,0), +(220,220,'1992-06-20','address220','city220',10,12), +(221,221,'2007-03-26','address221','city221',50,52), +(222,222,'1989-12-24','address222','city222',0,0), +(224,224,'1975-07-14','address224','city224',0,0), +(225,225,'1976-02-23','address225','city225',20,52), +(226,226,'1974-06-22','address226','city226',0,0), +(227,227,'2004-01-16','address227','city227',0,0), +(232,232,'1958-01-01','address232','city232',0,0), +(233,233,'1966-08-03','address233','city233',40,32), +(234,234,'1975-10-22','address234','city234',40,52), +(235,235,'1983-10-25','address235','city235',0,0), +(236,236,'1974-03-07','address236','city236',0,0), +(237,237,'1965-12-31','address237','city237',45,20), +(238,238,'1971-10-16','address238','city238',0,0), +(239,239,'1989-07-19','address239','city239',0,0), +(246,246,'1960-07-08','address246','city246',0,0), +(249,249,'1943-07-01','address249','city249',40,30), +(250,250,'1983-10-15','address250','city250',30,52), +(251,251,'1979-07-03','address251','city251',0,0), +(252,252,'1985-10-04','address252','city252',15,4), +(253,253,'1966-10-24','address253','city253',0,0), +(254,254,'1956-02-02','address254','city254',0,0), +(1,1,'2003-11-23','address1','city1',40,52), +(3,3,'1938-01-23','address3','city3',0,0), +(5,5,'2006-12-27','address5','city5',40,48), +(7,7,'1969-04-09','address7','city7',0,0), +(9,9,'2006-06-14','address9','city9',0,0), +(11,11,'1999-01-12','address11','city11',40,52), +(13,13,'1968-01-13','address13','city13',50,12), +(15,15,'1960-04-11','address15','city15',0,0), +(17,17,'2006-10-13','address17','city17',40,52), +(19,19,'1950-08-19','address19','city19',0,0), +(21,21,'2000-05-01','address21','city21',40,30), +(23,23,'1952-06-09','address23','city23',40,52), +(25,25,'1934-12-08','address25','city25',32,40), +(27,27,'1995-04-19','address27','city27',40,45), +(29,29,'1986-01-14','address29','city29',44,52), +(31,31,'1978-04-19','address31','city31',10,20), +(33,33,'1989-11-23','address33','city33',25,10), +(35,35,'2012-01-02','address35','city35',8,48), +(37,37,'2005-08-24','address37','city37',40,42), +(39,39,'1973-11-02','address39','city39',40,52), +(41,41,'2011-10-12','address41','city41',20,30), +(43,43,'1960-12-24','address43','city43',0,0), +(45,45,'1990-04-17','address45','city45',35,40), +(47,47,'1964-04-02','address47','city47',0,0), +(49,49,'1957-01-25','address49','city49',40,52), +(51,51,'1970-10-20','address51','city51',0,0), +(54,54,'1987-09-30','address54','city54',0,0), +(58,58,'1975-05-07','address58','city58',0,0), +(62,62,'1972-08-03','address62','city62',40,52), +(66,66,'1995-11-04','address66','city66',0,0), +(70,70,'1985-10-19','address70','city70',40,52), +(74,74,'1969-06-09','address74','city74',0,0), +(78,78,'2003-01-16','address78','city78',66,52), +(82,82,'2012-04-29','address82','city82',50,30), +(86,86,'2008-02-03','address86','city86',0,0), +(90,90,'1973-05-15','address90','city90',35,12), +(94,94,'1987-10-28','address94','city94',40,50), +(98,98,'1973-06-10','address98','city98',65,50), +(102,102,'2009-09-13','address102','city102',0,0), +(106,106,'1986-07-03','address106','city106',0,0), +(110,110,'1982-06-10','address110','city110',35,52), +(114,114,'1963-10-08','address114','city114',48,52), +(118,118,'1948-03-07','address118','city118',0,0), +(122,122,'1997-12-19','address122','city122',0,0), +(124,124,'1966-03-25','address124','city124',0,0), +(128,128,'1968-08-13','address128','city128',0,0), +(132,132,'1989-09-25','address132','city132',20,20), +(136,136,'1993-09-02','address136','city136',0,0), +(140,140,'1981-05-31','address140','city140',48,52), +(144,144,'1960-09-15','address144','city144',0,0), +(148,148,'1945-02-13','address148','city148',40,38), +(152,152,'2010-11-13','address152','city152',20,52), +(154,154,'1950-11-07','address154','city154',55,52), +(160,160,'1981-01-17','address160','city160',0,0), +(162,162,'2001-03-19','address162','city162',0,0), +(168,168,'2003-03-28','address168','city168',0,0), +(170,170,'1977-06-18','address170','city170',50,52), +(176,176,'1967-04-15','address176','city176',30,50), +(178,178,'1989-10-25','address178','city178',60,12), +(184,184,'2004-04-21','address184','city184',0,0), +(186,186,'1952-11-08','address186','city186',50,48), +(209,209,'1943-03-15','address209','city209',40,30), +(241,241,'1979-12-02','address241','city241',0,0), +(257,257,'2010-03-06','address257','city257',40,47); +--enable_query_log + +select * from t1 where hours_worked_per_week = 40 and weeks_worked_last_year = 52 and dob < '1949-11-21'; +select * from t1 IGNORE INDEX(dob, weeks_worked_last_year, hours_worked_per_week) where hours_worked_per_week = 40 and weeks_worked_last_year = 52 and dob < '1949-11-21'; + +drop table t1; + # # Test ALTER TABLE ADD/DROP PARTITION IF EXISTS # diff --git a/mysql-test/t/partition_debug_sync.test b/mysql-test/t/partition_debug_sync.test index 3ca21c2185a..90f1d4173ff 100644 --- a/mysql-test/t/partition_debug_sync.test +++ b/mysql-test/t/partition_debug_sync.test @@ -131,5 +131,6 @@ UNLOCK TABLES; --echo # Default connection default; +SET DEBUG_SYNC = 'RESET'; DROP TABLE t1, t2; diff --git a/mysql-test/t/partition_exchange.test b/mysql-test/t/partition_exchange.test index d7dfd6f543e..e538bee16cd 100644 --- a/mysql-test/t/partition_exchange.test +++ b/mysql-test/t/partition_exchange.test @@ -439,7 +439,7 @@ CREATE TABLE t LIKE general_log; ALTER TABLE t PARTITION BY RANGE (UNIX_TIMESTAMP(event_time) DIV 1) (PARTITION p0 VALUES LESS THAN (123456789), PARTITION pMAX VALUES LESS THAN MAXVALUE); ---error ER_WRONG_USAGE +--error ER_BAD_LOG_STATEMENT ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE general_log; ALTER TABLE general_log ENGINE = CSV; SET @@global.general_log = @old_general_log_state; diff --git a/mysql-test/t/perror.test b/mysql-test/t/perror.test index 2b9907c0542..69f1cb3257e 100644 --- a/mysql-test/t/perror.test +++ b/mysql-test/t/perror.test @@ -27,7 +27,7 @@ enable_query_log; --exec $MY_PERROR 1062 2>&1 # test errors that contain characters to escape in the text. ---exec $MY_PERROR 1076 2>&1 +--exec $MY_PERROR 1408 2>&1 --exec $MY_PERROR 1459 2>&1 --exec $MY_PERROR 1461 2>&1 diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test index eda70dafc30..fb608ee5bf8 100644 --- a/mysql-test/t/plugin.test +++ b/mysql-test/t/plugin.test @@ -121,7 +121,7 @@ SET @OLD_SQL_MODE=@@SQL_MODE; SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS'; --echo #illegal value fixed -CREATE TABLE t1 (a int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS; +CREATE TABLE t1 (a int, b int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS; show create table t1; --echo #alter table diff --git a/mysql-test/t/plugin_vars.test b/mysql-test/t/plugin_vars.test new file mode 100644 index 00000000000..8ba8fe2ec0e --- /dev/null +++ b/mysql-test/t/plugin_vars.test @@ -0,0 +1,56 @@ +--echo # +--echo # MDEV-5345 - Deadlock between mysql_change_user(), SHOW VARIABLES and +--echo # INSTALL PLUGIN +--echo # + +# Prepare test +delimiter |; +CREATE PROCEDURE p_install(x INT) +BEGIN + DECLARE CONTINUE HANDLER FOR 1126 BEGIN END; + WHILE x DO + SET x= x - 1; + INSTALL PLUGIN no_such_plugin SONAME 'no_such_object'; + END WHILE; +END| + +CREATE PROCEDURE p_show_vars(x INT) +WHILE x DO + SET x= x - 1; + SHOW VARIABLES; +END WHILE| +delimiter ;| + +connect(con1, localhost, root,,); +connect(con2, localhost, root,,); + +# Start test +connection con1; +--send CALL p_install(100) + +connection con2; +--send CALL p_show_vars(100) + +connection default; + +disable_result_log; +let $i= 100; +while ($i) +{ + change_user; + dec $i; +} + +# Cleanup +connection con1; +reap; +connection con2; +reap; +connection default; +enable_result_log; + +disconnect con1; +disconnect con2; +USE test; +DROP PROCEDURE p_install; +DROP PROCEDURE p_show_vars; diff --git a/mysql-test/t/processlist.test b/mysql-test/t/processlist.test index c7b775cf992..7a2b33699d5 100644 --- a/mysql-test/t/processlist.test +++ b/mysql-test/t/processlist.test @@ -32,4 +32,4 @@ connection default; select command, time < 5 from information_schema.processlist where id != connection_id(); disconnect con1; - +set debug_sync='reset'; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 5f4c815a192..9775a8dc28e 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -3594,4 +3594,42 @@ EXECUTE stmt; DROP TABLE t1,t2; + +--echo # +--echo # MDEV-5369: Wrong result (0 instead of NULL) on 2nd execution of +--echo # PS with LEFT JOIN, TEMPTABLE view +--echo # + + +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0),(8); + +CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM; +CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; + +SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk; + +PREPARE stmt FROM "SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk"; +EXECUTE stmt; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; + +DROP VIEW v2; +DROP TABLE t1, t2; + +--echo # End of 5.3 tests + +--echo # +--echo # MDEV-5505: Assertion `! is_set()' fails on PREPARE SELECT +--echo # with out of range in GROUP BY +--echo # +CREATE TABLE t1 (a INT); + +--error ER_DATA_OUT_OF_RANGE +PREPARE stmt FROM "SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1"; +--error ER_DATA_OUT_OF_RANGE +SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1; + +drop table t1; + --echo # End of 5.3 tests diff --git a/mysql-test/t/ps_ddl.test b/mysql-test/t/ps_ddl.test index c34800976c7..21355ca42b7 100644 --- a/mysql-test/t/ps_ddl.test +++ b/mysql-test/t/ps_ddl.test @@ -1610,7 +1610,7 @@ call p_verify_reprepare_count(0); # Base table with name of table to be created exists --error ER_TABLE_EXISTS_ERROR execute stmt; -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); --error ER_TABLE_EXISTS_ERROR execute stmt; call p_verify_reprepare_count(0); @@ -1622,7 +1622,7 @@ execute stmt; call p_verify_reprepare_count(0); --error ER_TABLE_EXISTS_ERROR execute stmt; -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); drop temporary table t2; --error ER_TABLE_EXISTS_ERROR execute stmt; @@ -1641,7 +1641,7 @@ drop table t2; create view t2 as select 1; --error ER_TABLE_EXISTS_ERROR,9999 execute stmt; -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); --error ER_TABLE_EXISTS_ERROR,9999 execute stmt; call p_verify_reprepare_count(0); diff --git a/mysql-test/t/quick_select_4161.test b/mysql-test/t/quick_select_4161.test index 1e746754b41..87323087622 100644 --- a/mysql-test/t/quick_select_4161.test +++ b/mysql-test/t/quick_select_4161.test @@ -50,4 +50,5 @@ connection default; disconnect killee; drop table t1; +set debug_sync='reset'; diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index e346511db42..5d744dba77a 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -1639,3 +1639,24 @@ SELECT * FROM v3; DROP TABLE t1; DROP VIEW v3; +--echo # +--echo # MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not +--echo # +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2(a int); +insert into t2 select A.a + B.a* 10 + C.a * 100 from t1 A, t1 B, t1 C; +alter table t2 add key(a); +--echo # Should have "range checked for each table" for second table: +explain select * from t1, t2 where t2.a < t1.a; +--echo # Should have "range checked for each table" for second table: +explain select * from t1, t2 where t1.a > t2.a; + +create table t3 (a int primary key, b int); +insert into t3 select a,a from t1; +--echo # The second table should use 'range': +explain select * from t3, t2 where t2.a < t3.b and t3.a=1; +--echo # The second table should use 'range': +explain select * from t3, t2 where t3.b > t2.a and t3.a=1; +drop table t1,t2,t3; + diff --git a/mysql-test/t/range_vs_index_merge.test b/mysql-test/t/range_vs_index_merge.test index fb8fd778559..7ecca454f4c 100644 --- a/mysql-test/t/range_vs_index_merge.test +++ b/mysql-test/t/range_vs_index_merge.test @@ -454,6 +454,8 @@ SELECT * FROM City WHERE Name LIKE 'Pa%'; # index merge retrievals over: # 2. key1 and key3 # 3. key2 and key3 +set @tmp_range_vs_index_merge=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; EXPLAIN SELECT * FROM City @@ -578,6 +580,7 @@ SELECT * FROM City DROP INDEX Population ON City; DROP INDEX Name ON City; +set optimizer_switch=@tmp_range_vs_index_merge; # The pattern of the WHERE condition used in the following query is # (key1|2_p1=c AND range(key1_p2)) OR (key1|2_p1=c AND range(key2_p2)) diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test index 6536c052019..5b78a352863 100644 --- a/mysql-test/t/repair.test +++ b/mysql-test/t/repair.test @@ -190,3 +190,23 @@ set @@autocommit= 0; repair table t1, t2; set @@autocommit= default; drop tables t1, t2; + +--echo # +--echo # Check that we have decent error messages when using crashed +--echo # .frm file from MySQL 3.23 +--echo # + +--echo # Test with a saved table from 3.23 +let $MYSQLD_DATADIR= `select @@datadir`; +--copy_file std_data/host_old.frm $MYSQLD_DATADIR/test/t1.frm +--copy_file std_data/host_old.MYD $MYSQLD_DATADIR/test/t1.MYD +--copy_file std_data/host_old.MYI $MYSQLD_DATADIR/test/t1.MYI + +--error ER_GET_ERRNO +select count(*) from t1; +check table t1; +repair table t1; +repair table t1 use_frm; +select count(*) from t1; +check table t1; +drop table t1; diff --git a/mysql-test/t/repair_symlink-5543.test b/mysql-test/t/repair_symlink-5543.test new file mode 100644 index 00000000000..bad65a4175a --- /dev/null +++ b/mysql-test/t/repair_symlink-5543.test @@ -0,0 +1,26 @@ +# +# MDEV-5543 MyISAM repair unsafe usage of TMD files +# +--source include/have_symlink.inc +--source include/not_windows.inc +--source include/have_maria.inc + +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR'; +insert t1 values (1); +--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +repair table t1; +drop table t1; + +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR'; +insert t2 values (1); +--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +repair table t2; +drop table t2; + +--list_files $MYSQL_TMP_DIR foobar5543 +--system rm $MYSQL_TMP_DIR/t1.TMD $MYSQL_TMP_DIR/t2.TMD + diff --git a/mysql-test/t/rpl_mysqldump_slave.test b/mysql-test/t/rpl_mysqldump_slave.test index 3f39fe19c0a..77fc4a050cc 100644 --- a/mysql-test/t/rpl_mysqldump_slave.test +++ b/mysql-test/t/rpl_mysqldump_slave.test @@ -27,4 +27,13 @@ connection slave; # Execute mysqldump with --dump-slave ,--apply-slave-statements and --include-master-host-port --exec $MYSQL_DUMP_SLAVE --compact --dump-slave --apply-slave-statements --include-master-host-port test +# +# MDEV-5624 mysqldump --dump-slave option does not restart the replication if the dump has failed +# +start slave; +--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/ +--error 2 +--exec $MYSQL_DUMP_SLAVE --compact --dump-slave no_such_db +start slave; + --source include/rpl_end.inc diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index e043ec4d143..d6bca6b19b1 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -195,3 +195,16 @@ SELECT FOUND_ROWS(); DROP TABLE t1; # End of 4.1 tests + +# +# MDEV-5549 Wrong row counter in found_rows() result +# +create table t1 (f1 int primary key, f2 tinyint) engine=myisam; +insert t1 values (10,3),(11,2),(12,3); +create table t2 (f3 int primary key) engine=myisam; +insert t2 values (11),(12),(13); +#explain select f1 from t1,t2 where f1=f3 and f2=3 order by f1; +select f1 from t1,t2 where f1=f3 and f2=3 order by f1; +select found_rows(); +drop table t1, t2; + diff --git a/mysql-test/t/selectivity.test b/mysql-test/t/selectivity.test index 6b38e8594ee..b67a15667e8 100644 --- a/mysql-test/t/selectivity.test +++ b/mysql-test/t/selectivity.test @@ -749,6 +749,26 @@ SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE SQL_MODE != ''; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; --echo # +--echo # Bug mdev-5630: always true conjunctive condition +--echo # when optimizer_use_condition_selectivity=3 +--echo # + +set use_stat_tables = 'preferably'; +set optimizer_use_condition_selectivity = 3; + +CREATE TABLE t1 (a int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (10); + +CREATE TABLE t2 (id int, flag char(1), INDEX(id)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (100,'0'),(101,'1'); + +ANALYZE TABLE t1, t2; + +SELECT * FROM t1, t2 WHERE id = a AND ( a = 16 OR flag AND a != 6 ); + +DROP TABLE t1,t2; + +--echo # --echo # Bug mdev-4429: join with range condition whose selectivity == 0 --echo # when optimizer_use_condition_selectivity=3 --echo # diff --git a/mysql-test/t/sp-bugs.test b/mysql-test/t/sp-bugs.test index 1ec154f1c69..8e6a25709aa 100644 --- a/mysql-test/t/sp-bugs.test +++ b/mysql-test/t/sp-bugs.test @@ -238,3 +238,59 @@ DROP FUNCTION testf_bug11763507; --echo #END OF BUG#11763507 test. +--echo # +--echo # MDEV-5531 double call procedure in one session +--echo # + +CREATE TABLE `t1` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `create_ts` int(10) unsigned DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +DELIMITER $$; + +CREATE PROCEDURE test_5531 (IN step TINYINT(1)) +BEGIN + DECLARE counts INT DEFAULT 0; + DECLARE cur1 CURSOR FOR + + SELECT ct.id + FROM (SELECT NULL) AS z + JOIN ( + SELECT id + FROM `t1` + LIMIT 10 + ) AS ct + JOIN (SELECT NULL) AS x ON( + EXISTS( + SELECT 1 + FROM `t1` + WHERE id=ct.id + LIMIT 1 + ) + ); + + IF step=1 THEN + TRUNCATE t1; + REPEAT + INSERT INTO `t1` + (create_ts) VALUES + (UNIX_TIMESTAMP()); + + SET counts=counts+1; + UNTIL counts>150 END REPEAT; + + SET max_sp_recursion_depth=1; + + CALL test_5531(2); + SET max_sp_recursion_depth=2; + CALL test_5531(2); + ELSEIF step=2 THEN + OPEN cur1; CLOSE cur1; + END IF; +END $$ +DELIMITER ;$$ +CALL test_5531(1); +DROP PROCEDURE test_5531; +DROP TABLE t1; diff --git a/mysql-test/t/stat_tables_par.test b/mysql-test/t/stat_tables_par.test index 6c4e1be6e48..7305d1453a8 100644 --- a/mysql-test/t/stat_tables_par.test +++ b/mysql-test/t/stat_tables_par.test @@ -144,7 +144,7 @@ disconnect con1; disconnect con2; set debug_sync='RESET'; -select * from mysql.index_stats where table_name='lineitem' order by index_name; +select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity; # # Test for parallel statistics collection and update (innodb) @@ -217,7 +217,7 @@ connection con2; set debug_sync='open_and_process_table WAIT_FOR parker'; set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2'; use dbt3_s001; ---send select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 +--send select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity; connection con1; --disable_result_log diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test index a114af6a66b..d56b3df3505 100644 --- a/mysql-test/t/subselect4.test +++ b/mysql-test/t/subselect4.test @@ -1850,6 +1850,41 @@ SELECT * FROM t1 AS t WHERE a='r' AND (c,b) NOT IN (SELECT c,b FROM t2 WHERE (c,b)=(t.c,t.b)); DROP TABLE t1, t2; + +--echo # +--echo # MDEV-5468: assertion failure with a simplified condition in subselect +--echo # + +CREATE TABLE t1 (a int, b int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1); + +CREATE TABLE t2 ( pk int PRIMARY KEY, c INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1,4), (2,6); + +SELECT ( SELECT MAX(b) FROM t1, t2 WHERE pk = a AND b < from_sq.c ) AS select_sq, + COUNT( DISTINCT from_sq.c ) +FROM ( SELECT DISTINCT t2_1.* FROM t2 AS t2_1, t2 AS t2_2 ) AS from_sq +GROUP BY select_sq ; + +DROP TABLE t1,t2; + + +CREATE TABLE t1 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,'BE','BEL'); + +CREATE TABLE t2 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1,'BE','BEL'), (2,'MX','MEX'); +CREATE VIEW v2 AS SELECT DISTINCT * FROM t2; + +SELECT * FROM t1 AS outer_t1, v2 +WHERE v2.a3 = outer_t1.a3 + AND EXISTS ( SELECT * FROM t1 WHERE a2 < v2.a2 AND id = outer_t1.id ) + AND outer_t1.a3 < 'J' +ORDER BY v2.id; + +DROP VIEW v2; +DROP TABLE t1,t2; + --echo # --echo # MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT --echo # diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test index 536606175bb..1b0076fd1e6 100644 --- a/mysql-test/t/subselect_sj.test +++ b/mysql-test/t/subselect_sj.test @@ -2489,6 +2489,24 @@ INSERT INTO t1 VALUES ('mysql'),('information_schema'); SELECT * FROM t1 WHERE db IN (SELECT `SCHEMA_NAME` FROM information_schema.SCHEMATA); DROP TABLE t1; +--echo # +--echo # MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin +--echo # +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (2),(3); + +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (8),(9); + +CREATE TABLE t3 (c INT, INDEX(c)); +INSERT INTO t2 VALUES (5),(6); + +PREPARE stmt FROM +"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )"; +EXECUTE stmt; +EXECUTE stmt; + +DROP TABLE t1,t2,t3; --echo # --echo # MySQL Bug#13340270: assertion table->sort.record_pointers == __null @@ -2634,6 +2652,7 @@ INSERT INTO t2 VALUES ('x'); CREATE TABLE t3 (c3 VARCHAR(1)) ENGINE=MyISAM; INSERT INTO t3 VALUES ('x'),('d'); +--sorted_result SELECT * FROM t1, t2 WHERE pk IN ( SELECT pk FROM t1 LEFT JOIN t3 ON (c1 = c3 ) ) ORDER BY c2, c1; --echo # This should show that "t1 left join t3" is still in the semi-join nest: diff --git a/mysql-test/t/subselect_sj2.test b/mysql-test/t/subselect_sj2.test index 18221c90bc0..9d9e7848415 100644 --- a/mysql-test/t/subselect_sj2.test +++ b/mysql-test/t/subselect_sj2.test @@ -1245,6 +1245,24 @@ SELECT * FROM t1 WHERE ( 1, 1 ) IN ( DROP TABLE t1,t2,t3; +--echo # +--echo # MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with materialization+semijoin +--echo # +CREATE TABLE t1 (a INT) engine=innodb; +INSERT INTO t1 VALUES (8),(9); + +CREATE TABLE t2 (b INT) engine=innodb; +INSERT INTO t2 VALUES (2),(3); + +CREATE TABLE t3 (c INT, INDEX(c)) engine=innodb; +INSERT INTO t2 VALUES (4),(5); + +explain +SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) ); +SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) ); + +DROP TABLE t1,t2,t3; + --source include/have_innodb.inc --disable_warnings diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test index 58831c4ffb3..52a73d24822 100644 --- a/mysql-test/t/subselect_sj_mat.test +++ b/mysql-test/t/subselect_sj_mat.test @@ -1725,6 +1725,26 @@ INSERT INTO t1 VALUES (1,3,5),(2,4,6); SELECT * FROM t1 WHERE 8 IN (SELECT MIN(pk) FROM t1) AND (pk = a OR pk = b); DROP TABLE t1; +--echo # +--echo # MDEV-5368: Server crashes in Item_in_subselect::optimize on 2nd +--echo # execution of PS with IN subqueries, materialization+semijoin +--echo # +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(3); + +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (8),(9); + +PREPARE stmt FROM " +SELECT * FROM t1 WHERE 1 IN ( SELECT b FROM v2 WHERE 2 IN ( SELECT MAX(a) FROM t1 ) ) +"; + +EXECUTE stmt; +EXECUTE stmt; +DROP TABLE t1, t2; +DROP VIEW v2; + --echo # End of 5.3 tests @@ -1750,5 +1770,25 @@ WHERE ( alias2.c2, alias1.c1 ) IN ( SELECT c4, c3 FROM t2 ) AND alias1.c1 IN ( S DROP TABLE t1,t2; set join_cache_level=@tmp_mdev5056; +--echo # +--echo # MDEV-5368: Server crashes in Item_in_subselect::optimize on 2nd +--echo # execution of PS with IN subqueries, materialization+semijoin +--echo # +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(3); + +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (8),(9); + +PREPARE stmt FROM " +SELECT * FROM t1 WHERE 1 IN ( SELECT b FROM v2 WHERE 2 IN ( SELECT MAX(a) FROM t1 ) ) +"; + +EXECUTE stmt; +EXECUTE stmt; +DROP TABLE t1, t2; +DROP VIEW v2; + --echo # End of 5.5 tests diff --git a/mysql-test/t/temporal_literal.test b/mysql-test/t/temporal_literal.test index a8380fd95da..4bb7eb8d609 100644 --- a/mysql-test/t/temporal_literal.test +++ b/mysql-test/t/temporal_literal.test @@ -195,6 +195,7 @@ DROP TABLE t1; --echo # --echo # TIME literals in no-zero date context --echo # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT TO_DAYS(TIME'00:00:00'); SELECT TO_SECONDS(TIME'00:00:00'); SELECT DAYOFYEAR(TIME'00:00:00'); @@ -204,6 +205,7 @@ SELECT WEEKDAY(TIME'00:00:00'); SELECT CONVERT_TZ(TIME'00:00:00','+00:00','+01:00'); SELECT DATE_ADD(TIME'00:00:00', INTERVAL 1 HOUR); SELECT TIMESTAMPDIFF(SECOND,TIME'00:00:00', TIME'00:00:00'); +SET timestamp=DEFAULT; --echo # --echo # Testing Item_func::fix_fields() diff --git a/mysql-test/t/timezone2.test b/mysql-test/t/timezone2.test index 7764b39bf33..7a38610ad95 100644 --- a/mysql-test/t/timezone2.test +++ b/mysql-test/t/timezone2.test @@ -294,8 +294,16 @@ DROP TABLE t1; --echo # MDEV-4653 Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5') --echo # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5'); SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5'); +SET timestamp=DEFAULT; + +--echo # +--echo # MDEV-5506 safe_mutex: Trying to lock unitialized mutex at safemalloc.c on server shutdown after SELECT with CONVERT_TZ +--echo # +SELECT CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' ); + --echo # --echo # End of 5.3 tests diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test index 9ecd5d22a81..1daeec03a08 100644 --- a/mysql-test/t/type_time.test +++ b/mysql-test/t/type_time.test @@ -94,10 +94,12 @@ DROP TABLE t1; --echo # Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values --echo # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); CREATE TABLE t1(f1 TIME); INSERT INTO t1 VALUES ('23:38:57'); SELECT TIMESTAMP(f1,'1') FROM t1; DROP TABLE t1; +SET timestamp=DEFAULT; --echo End of 5.1 tests @@ -126,7 +128,9 @@ drop table t1; --echo # --echo # MDEV-4634 Crash in CONVERT_TZ --echo # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5'); +SET timestamp=DEFAULT; --echo # --echo # MDEV-4652 Wrong result for CONCAT(GREATEST(TIME('00:00:01'),TIME('00:00:00'))) diff --git a/mysql-test/t/udf_debug_sync.test b/mysql-test/t/udf_debug_sync.test new file mode 100644 index 00000000000..593500c1e18 --- /dev/null +++ b/mysql-test/t/udf_debug_sync.test @@ -0,0 +1,40 @@ +--source include/have_debug_sync.inc +--source include/have_udf.inc + +# +# MDEV-5616 - Deadlock between CREATE/DROP FUNCTION and SELECT from view +# +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO"; +CREATE VIEW v1 AS SELECT myfunc_int(1); +connect(con1, localhost, root,,); + +connection con1; +SET debug_sync='mysql_create_function_after_lock SIGNAL locked WAIT_FOR go'; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +send_eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_SO"; + +connection default; +SET debug_sync='now WAIT_FOR locked'; +SET debug_sync='find_udf_before_lock SIGNAL go'; +SELECT * FROM v1; +FLUSH TABLES; + +connection con1; +reap; +SET debug_sync='mysql_drop_function_after_lock SIGNAL locked WAIT_FOR go'; +send DROP FUNCTION myfunc_double; + +connection default; +SET debug_sync='now WAIT_FOR locked'; +SET debug_sync='find_udf_before_lock SIGNAL go'; +SELECT * FROM v1; + +connection con1; +reap; +disconnect con1; + +connection default; +SET debug_sync='RESET'; +DROP VIEW v1; +DROP FUNCTION myfunc_int; diff --git a/mysql-test/t/union_crash-714.test b/mysql-test/t/union_crash-714.test new file mode 100644 index 00000000000..6c31a2202cb --- /dev/null +++ b/mysql-test/t/union_crash-714.test @@ -0,0 +1,9 @@ +# +# MDEV-714 LP:1020645 - crash (sig 11) with union query +# +--source include/have_debug.inc +create table t1 (i tinyint); +set debug_dbug='+d,bug11747970_raise_error'; +--error ER_QUERY_INTERRUPTED +insert into t1 (i) select i from t1 union select i from t1; +drop table t1; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 5cb9d920c0c..633624bf4bf 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -141,7 +141,7 @@ drop view v100; drop view t1; # try to drop VIEW with DROP TABLE --- error ER_BAD_TABLE_ERROR +-- error ER_IT_IS_A_VIEW drop table v1; # try to drop table with DROP VIEW @@ -4873,6 +4873,51 @@ deallocate prepare stmt; drop view v1; drop table t1,t2; +# +# MDEV-5414: RAND() in a subselect : different behavior in MariaDB and MySQL +# +create table t1 (a int); +insert into t1 values (1),(2); + +create view v1 (a,r) as select a,rand() from t1; + + +create table t2 select a, r as r1, r as r2, r as r3 from v1; + +select a, r1 = r2, r2 = r3 from t2; + +drop view v1; +drop table t1,t2; + +--echo # +--echo # MDEV-5515: 2nd execution of a prepared statement returns wrong results +--echo # +CREATE TABLE t1 (i1 INT, j1 INT NOT NULL, PRIMARY KEY (i1)); + +INSERT INTO t1 VALUES (30,300),(40,400); + +CREATE TABLE t2 (i2 INT); +INSERT INTO t2 VALUES (50),(60); + +CREATE TABLE t3 (c3 VARCHAR(20), i3 INT); +INSERT INTO t3 VALUES ('a',10),('b',2); + +CREATE TABLE t4 (i4 INT); +INSERT INTO t4 VALUES (1),(2); + +DROP VIEW IF EXISTS v1; +CREATE VIEW v1 AS select coalesce(j1,i3) AS v1_field1 from t2 join t3 left join t1 on ( i1 = i2 ); + +CREATE VIEW v2 AS select v1_field1 from t4 join v1; + +prepare my_stmt from "select v1_field1 from v2"; +execute my_stmt; +execute my_stmt; +deallocate prepare my_stmt; + +DROP VIEW v1,v2; +DROP TABLE t1,t2,t3,t4; + --echo # ----------------------------------------------------------------- --echo # -- End of 5.3 tests. --echo # ----------------------------------------------------------------- diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index cdc6bd6f91e..e84e3ac247f 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -673,6 +673,11 @@ SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)/a','<b />'); SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)//a','<b />'); SELECT ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b'); +# +# MDEV-5689 ExtractValue(xml, 'substring(/x,/y)') crashes +# MySQL bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED WITH MALFORMED XPATH EXP +# +SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)'); --echo # --echo # Bug#62429 XML: ExtractValue, UpdateXML max arg length 127 chars diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index 754991e9014..25f1c403a61 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -118,6 +118,15 @@ } { + pthread memalign memory loss2 + Memcheck:Leak + fun:memalign + fun:tls_get_addr_tail + ... + fun:*ha_initialize_handlerton* +} + +{ pthread pthread_key_create Memcheck:Leak fun:malloc @@ -1209,3 +1218,12 @@ ... obj:*/libodbc.so* } + +{ + XtraDB uses gcc __thread variables + Memcheck:Leak + fun:memalign + fun:* + fun:__tls_get_addr +} + diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index caca9e55610..f0d25dae6b9 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -89,3 +89,7 @@ ADD_EXECUTABLE(thr_lock thr_lock.c) TARGET_LINK_LIBRARIES(thr_lock mysys) SET_TARGET_PROPERTIES(thr_lock PROPERTIES COMPILE_FLAGS "-DMAIN") +INSTALL_DEBUG_SYMBOLS(mysys) +IF(MSVC) + INSTALL_DEBUG_TARGET(mysys DESTINATION ${INSTALL_LIBDIR}/debug) +ENDIF() diff --git a/mysys/file_logger.c b/mysys/file_logger.c index 4c07b8c7854..da8b5c8d531 100644 --- a/mysys/file_logger.c +++ b/mysys/file_logger.c @@ -16,6 +16,7 @@ #include "my_global.h" #include <my_sys.h> +#include <m_string.h> #include <mysql/service_logger.h> #include <my_pthread.h> diff --git a/mysys/hash.c b/mysys/hash.c index 25210d3fcfe..4ef731cde15 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -40,12 +40,12 @@ static void movelink(HASH_LINK *array,uint pos,uint next_link,uint newlink); static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, size_t length); -static my_hash_value_type calc_hash(const HASH *hash, - const uchar *key, size_t length) +my_hash_value_type my_hash_sort(const CHARSET_INFO *cs, const uchar *key, + size_t length) { - ulong nr1=1, nr2=4; - hash->charset->coll->hash_sort(hash->charset,(uchar*) key,length,&nr1,&nr2); - return (my_hash_value_type)nr1; + ulong nr1= 1, nr2= 4; + cs->coll->hash_sort(cs, (uchar*) key, length, &nr1, &nr2); + return (my_hash_value_type) nr1; } /** @@ -78,6 +78,7 @@ my_bool my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset, ulong size, size_t key_offset, size_t key_length, my_hash_get_key get_key, + my_hash_function hash_function, void (*free_element)(void*), uint flags) { my_bool res; @@ -89,6 +90,7 @@ my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset, hash->key_length=key_length; hash->blength=1; hash->get_key=get_key; + hash->hash_function= hash_function ? hash_function : my_hash_sort; hash->free=free_element; hash->flags=flags; hash->charset=charset; @@ -200,7 +202,8 @@ static uint my_hash_rec_mask(const HASH *hash, HASH_LINK *pos, { size_t length; uchar *key= (uchar*) my_hash_key(hash, pos->data, &length, 0); - return my_hash_mask(calc_hash(hash, key, length), buffmax, maxlength); + return my_hash_mask(hash->hash_function(hash->charset, key, length), buffmax, + maxlength); } @@ -214,7 +217,7 @@ my_hash_value_type rec_hashnr(HASH *hash,const uchar *record) { size_t length; uchar *key= (uchar*) my_hash_key(hash, record, &length, 0); - return calc_hash(hash,key,length); + return hash->hash_function(hash->charset, key, length); } @@ -234,12 +237,6 @@ uchar* my_hash_search_using_hash_value(const HASH *hash, key, length, &state); } -my_hash_value_type my_calc_hash(const HASH *hash, - const uchar *key, size_t length) -{ - return calc_hash(hash, key, length ? length : hash->key_length); -} - /* Search after a record based on a key @@ -254,7 +251,8 @@ uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, uchar *res; if (my_hash_inited(hash)) res= my_hash_first_from_hash_value(hash, - calc_hash(hash, key, length ? length : hash->key_length), + hash->hash_function(hash->charset, key, + length ? length : hash->key_length), key, length, current_record); else res= 0; @@ -644,9 +642,9 @@ my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, /* Search after record with key */ - idx= my_hash_mask(calc_hash(hash, old_key, (old_key_length ? - old_key_length : - hash->key_length)), + idx= my_hash_mask(hash->hash_function(hash->charset, old_key, + (old_key_length ? old_key_length : + hash->key_length)), blength, records); new_index= my_hash_mask(rec_hashnr(hash, record), blength, records); if (idx == new_index) diff --git a/mysys/ma_dyncol.c b/mysys/ma_dyncol.c index 3c77e5f820a..7a7459673f5 100644 --- a/mysys/ma_dyncol.c +++ b/mysys/ma_dyncol.c @@ -117,7 +117,7 @@ my_bool mariadb_dyncol_has_names(DYNAMIC_COLUMN *str) { if (str->length < 1) return FALSE; - return test(str->str[0] & DYNCOL_FLG_NAMES); + return MY_TEST(str->str[0] & DYNCOL_FLG_NAMES); } static enum enum_dyncol_func_result diff --git a/mysys/md5.c.THIS b/mysys/md5.c.THIS index b4c2cb569fb..829eea50d22 100644 --- a/mysys/md5.c.THIS +++ b/mysys/md5.c.THIS @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2013, 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 diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index 3fa6ec28f7d..a3cbaff68b0 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -179,7 +179,7 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize, DBUG_ASSERT(seek_offset == 0); } else - info->seek_not_done= test(seek_offset != pos); + info->seek_not_done= MY_TEST(seek_offset != pos); } info->disk_writes= 0; @@ -1281,10 +1281,6 @@ read_append_buffer: size_t transfer_len; DBUG_ASSERT(info->append_read_pos <= info->write_pos); - /* - TODO: figure out if the assert below is needed or correct. - */ - DBUG_ASSERT(pos_in_file == info->end_of_file); copy_len=MY_MIN(Count, len_in_buff); memcpy(Buffer, info->append_read_pos, copy_len); info->append_read_pos += copy_len; diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c index 9a7ed0e01d2..22def2e0923 100644 --- a/mysys/mf_iocache2.c +++ b/mysys/mf_iocache2.c @@ -467,7 +467,7 @@ process_flags: { register int iarg; size_t length2; - char buff[17]; + char buff[32]; iarg = va_arg(args, int); if (*fmt == 'd') @@ -502,7 +502,7 @@ process_flags: { register long iarg; size_t length2; - char buff[17]; + char buff[32]; iarg = va_arg(args, long); if (*++fmt == 'd') diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index 1ee71e55b68..d4c4f8c9997 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -1,5 +1,4 @@ -/* - Copyright (c) 2000, 2011, Oracle and/or its affiliates +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -5651,7 +5650,7 @@ int flush_partitioned_key_cache_blocks(PARTITIONED_KEY_CACHE_CB *keycache, if ((type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE) && !((*dirty_part_map) & ((ulonglong) 1 << i))) continue; - err|= test(flush_simple_key_cache_blocks(partition, file, 0, type)); + err|= MY_TEST(flush_simple_key_cache_blocks(partition, file, 0, type)); } *dirty_part_map= 0; diff --git a/mysys/mf_qsort.c b/mysys/mf_qsort.c index e681ac9cec4..3e91c0ac0b0 100644 --- a/mysys/mf_qsort.c +++ b/mysys/mf_qsort.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000-2002, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/mf_radix.c b/mysys/mf_radix.c index 7ae4ac9211f..11c4ac45a93 100644 --- a/mysys/mf_radix.c +++ b/mysys/mf_radix.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/mf_same.c b/mysys/mf_same.c index b4af4cbf1b6..244dc650d8b 100644 --- a/mysys/mf_same.c +++ b/mysys/mf_same.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2001, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/mf_soundex.c b/mysys/mf_soundex.c index b3718f20b3f..2784d112805 100644 --- a/mysys/mf_soundex.c +++ b/mysys/mf_soundex.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002, 2004, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/mf_tempdir.c b/mysys/mf_tempdir.c index 4f4513490ea..2fbbedc4e89 100644 --- a/mysys/mf_tempdir.c +++ b/mysys/mf_tempdir.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 @@ -43,7 +43,7 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist) pathlist=getenv("TMP"); #endif if (!pathlist || !pathlist[0]) - pathlist=(char*) DEFAULT_TMPDIR; + pathlist= DEFAULT_TMPDIR; } do { diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c index 5ff139bc92a..62b3e09747f 100644 --- a/mysys/mf_tempfile.c +++ b/mysys/mf_tempfile.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 @@ -111,7 +111,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, sizeof(prefix_buff)-7),"XXXXXX") - prefix_buff); if (!dir && ! (dir =getenv("TMPDIR"))) - dir=DEFAULT_TMPDIR; + dir= DEFAULT_TMPDIR; if (strlen(dir)+ pfx_len > FN_REFLEN-2) { errno=my_errno= ENAMETOOLONG; diff --git a/mysys/mf_wcomp.c b/mysys/mf_wcomp.c index 74e6fccb5a1..fe64d06f2db 100644 --- a/mysys/mf_wcomp.c +++ b/mysys/mf_wcomp.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2003, 2004 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/mulalloc.c b/mysys/mulalloc.c index 2caac6997ee..9384ed744ad 100644 --- a/mysys/mulalloc.c +++ b/mysys/mulalloc.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002, 2003, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/my_access.c b/mysys/my_access.c index 1b63b827592..68cd01d33e6 100644 --- a/mysys/my_access.c +++ b/mysys/my_access.c @@ -1,5 +1,5 @@ -/* Copyright (C) 2000 MySQL AB - Copyright (c) 2012, Monty Program Ab +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates + Copyright (c) 2012, 2014, SkySQL Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_aes.c.THIS b/mysys/my_aes.c.THIS index 5c52a0b1ab5..7074f700413 100644 --- a/mysys/my_aes.c.THIS +++ b/mysys/my_aes.c.THIS @@ -1,4 +1,5 @@ -/* Copyright (C) 2002 MySQL AB +/* Copyright (c) 2002, 2006 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index d61c7e171d0..fc30185eb5a 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -61,7 +61,7 @@ void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc= 32; mem_root->block_size= (block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1; - if (test(my_flags & MY_THREAD_SPECIFIC)) + if (MY_TEST(my_flags & MY_THREAD_SPECIFIC)) mem_root->block_size|= 1; mem_root->error_handler= 0; diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c index 3105f4b1daf..67c478659b5 100644 --- a/mysys/my_bitmap.c +++ b/mysys/my_bitmap.c @@ -167,10 +167,10 @@ static inline uint get_first_set(my_bitmap_map value, uint word_pos) } -my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, - my_bool thread_safe __attribute__((unused))) +my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, + my_bool thread_safe __attribute__((unused))) { - DBUG_ENTER("bitmap_init"); + DBUG_ENTER("my_bitmap_init"); if (!buf) { uint size_in_bytes= bitmap_buffer_size(n_bits); @@ -202,9 +202,9 @@ my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, } -void bitmap_free(MY_BITMAP *map) +void my_bitmap_free(MY_BITMAP *map) { - DBUG_ENTER("bitmap_free"); + DBUG_ENTER("my_bitmap_free"); if (map->bitmap) { if (map->mutex) diff --git a/mysys/my_conio.c b/mysys/my_conio.c index 85ea99196a4..0af5706cace 100644 --- a/mysys/my_conio.c +++ b/mysys/my_conio.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2005, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/my_copy.c b/mysys/my_copy.c index 58cacb9639d..8af572b5518 100644 --- a/mysys/my_copy.c +++ b/mysys/my_copy.c @@ -66,7 +66,7 @@ int my_copy(const char *from, const char *to, myf MyFlags) from_file=to_file= -1; DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */ if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */ - new_file_stat= test(my_stat((char*) to, &new_stat_buff, MYF(0))); + new_file_stat= MY_TEST(my_stat((char*) to, &new_stat_buff, MYF(0))); if ((from_file=my_open(from,O_RDONLY | O_SHARE,MyFlags)) >= 0) { diff --git a/mysys/my_crc32.c b/mysys/my_crc32.c index 27800098f12..0981c75755d 100644 --- a/mysys/my_crc32.c +++ b/mysys/my_crc32.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2004 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/my_delete.c b/mysys/my_delete.c index bd81f98ed62..e99c7ff5fcb 100644 --- a/mysys/my_delete.c +++ b/mysys/my_delete.c @@ -151,4 +151,3 @@ error: DBUG_RETURN(-1); } #endif - diff --git a/mysys/my_div.c b/mysys/my_div.c index 29f04a7a01b..660b87e5ab4 100644 --- a/mysys/my_div.c +++ b/mysys/my_div.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002, 2004, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/my_error.c b/mysys/my_error.c index 1200385a43d..5d16091e0be 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c index f1a4d078440..ede434f2c32 100644 --- a/mysys/my_fopen.c +++ b/mysys/my_fopen.c @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 1985-2011 Monty Program Ab +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates + Copyright (c) 1985, 2011, Monty Program Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_gethwaddr.c b/mysys/my_gethwaddr.c index aa63138b48c..208f2ff902a 100644 --- a/mysys/my_gethwaddr.c +++ b/mysys/my_gethwaddr.c @@ -134,7 +134,7 @@ err: #elif defined(_WIN32) #include <winsock2.h> #include <iphlpapi.h> -#pragma comment(lib, "iphlpapi.lib")
+#pragma comment(lib, "iphlpapi.lib") #define ETHER_ADDR_LEN 6 diff --git a/mysys/my_getpagesize.c b/mysys/my_getpagesize.c index 2c2804dfab8..e1c1fcb168d 100644 --- a/mysys/my_getpagesize.c +++ b/mysys/my_getpagesize.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000-2003, 2006 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c index 79ec58d3c5c..fbdcef88bda 100644 --- a/mysys/my_getwd.c +++ b/mysys/my_getwd.c @@ -157,12 +157,12 @@ int test_if_hard_path(register const char *dir_name) my_bool has_path(const char *name) { - return test(strchr(name, FN_LIBCHAR)) + return MY_TEST(strchr(name, FN_LIBCHAR)) #if FN_LIBCHAR != '/' - || test(strchr(name,'/')) + || MY_TEST(strchr(name, '/')) #endif #ifdef FN_DEVCHAR - || test(strchr(name, FN_DEVCHAR)) + || MY_TEST(strchr(name, FN_DEVCHAR)) #endif ; } diff --git a/mysys/my_libwrap.c b/mysys/my_libwrap.c index dea4bca114e..1cbfa83030b 100644 --- a/mysys/my_libwrap.c +++ b/mysys/my_libwrap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_lockmem.c b/mysys/my_lockmem.c index 2e036936c70..3e27564f100 100644 --- a/mysys/my_lockmem.c +++ b/mysys/my_lockmem.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index 2f3a5276a59..e533230106e 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2010, Oracle and/or its affiliates - Copyright (c) 2009, 2013, Monty Program Ab. + Copyright (c) 2000, 2013, Oracle and/or its affiliates + Copyright (c) 2009, 2014, SkySQL Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -112,9 +112,10 @@ void *my_malloc(size_t size, myf my_flags) } else { - MALLOC_STORE_SIZE(point, void*, size, test(my_flags & MY_THREAD_SPECIFIC)); + MALLOC_STORE_SIZE(point, void*, size, + MY_TEST(my_flags & MY_THREAD_SPECIFIC)); update_malloc_size(size + MALLOC_PREFIX_SIZE, - test(my_flags & MY_THREAD_SPECIFIC)); + MY_TEST(my_flags & MY_THREAD_SPECIFIC)); DBUG_EXECUTE_IF("simulate_out_of_memory", { /* my_free() handles memory accounting */ @@ -158,7 +159,7 @@ void *my_realloc(void *oldpoint, size_t size, myf my_flags) Test that the new and old area are the same, if not MY_THREAD_MOVE is given */ - DBUG_ASSERT((test(my_flags & MY_THREAD_SPECIFIC) == old_flags) || + DBUG_ASSERT((MY_TEST(my_flags & MY_THREAD_SPECIFIC) == old_flags) || (my_flags & MY_THREAD_MOVE)); if ((point= sf_realloc(MALLOC_FIX_POINTER_FOR_FREE(oldpoint), size + MALLOC_PREFIX_SIZE, my_flags)) == NULL) @@ -177,13 +178,14 @@ void *my_realloc(void *oldpoint, size_t size, myf my_flags) } else { - MALLOC_STORE_SIZE(point, void*, size, test(my_flags & MY_THREAD_SPECIFIC)); - if (test(my_flags & MY_THREAD_SPECIFIC) != old_flags) + MALLOC_STORE_SIZE(point, void*, size, + MY_TEST(my_flags & MY_THREAD_SPECIFIC)); + if (MY_TEST(my_flags & MY_THREAD_SPECIFIC) != old_flags) { /* memory moved between system and thread specific */ update_malloc_size(-(longlong) old_size - MALLOC_PREFIX_SIZE, old_flags); update_malloc_size((longlong) size + MALLOC_PREFIX_SIZE, - test(my_flags & MY_THREAD_SPECIFIC)); + MY_TEST(my_flags & MY_THREAD_SPECIFIC)); } else update_malloc_size((longlong)size - (longlong)old_size, old_flags); diff --git a/mysys/my_memmem.c b/mysys/my_memmem.c index 5184037ed39..5806c502b2b 100644 --- a/mysys/my_memmem.c +++ b/mysys/my_memmem.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2006, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/my_mkdir.c b/mysys/my_mkdir.c index 0e77180cd75..5e9691f5b91 100644 --- a/mysys/my_mkdir.c +++ b/mysys/my_mkdir.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2001, 2006 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/my_once.c b/mysys/my_once.c index b9232db9b2e..dfd5de81ac7 100644 --- a/mysys/my_once.c +++ b/mysys/my_once.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 diff --git a/mysys/my_rename.c b/mysys/my_rename.c index 8a9e6eb3dfd..09e7eafa980 100644 --- a/mysys/my_rename.c +++ b/mysys/my_rename.c @@ -27,19 +27,18 @@ int my_rename(const char *from, const char *to, myf MyFlags) DBUG_ENTER("my_rename"); DBUG_PRINT("my",("from %s to %s MyFlags %lu", from, to, MyFlags)); -#if defined(HAVE_RENAME) #if defined(__WIN__) - /* - On windows we can't rename over an existing file: - Remove any conflicting files: - */ - (void) my_delete(to, MYF(0)); -#endif + if (!MoveFileEx(from, to, MOVEFILE_COPY_ALLOWED | + MOVEFILE_REPLACE_EXISTING)) + { + my_osmaperr(GetLastError()); +#elif defined(HAVE_RENAME) if (rename(from,to)) + { #else if (link(from, to) || unlink(from)) -#endif { +#endif my_errno=errno; error = -1; if (MyFlags & (MY_FAE+MY_WME)) diff --git a/mysys/my_symlink2.c b/mysys/my_symlink2.c index e8ac1dedec1..fcaf78ccff6 100644 --- a/mysys/my_symlink2.c +++ b/mysys/my_symlink2.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2001, 2003, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/my_wincond.c b/mysys/my_wincond.c index f88e33e17f3..6674a5d394d 100644 --- a/mysys/my_wincond.c +++ b/mysys/my_wincond.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 @@ -289,7 +289,7 @@ int pthread_cond_signal(pthread_cond_t *cond) int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - struct timespec *abstime) + const struct timespec *abstime) { if (have_native_conditions) { diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c index d7d7817d400..81fd0e7277c 100644 --- a/mysys/my_winthread.c +++ b/mysys/my_winthread.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c index f0447da42f6..5d19647c989 100644 --- a/mysys/safemalloc.c +++ b/mysys/safemalloc.c @@ -209,7 +209,7 @@ size_t sf_malloc_usable_size(void *ptr, my_bool *is_thread_specific) { struct st_irem *irem= (struct st_irem *)ptr - 1; DBUG_ENTER("sf_malloc_usable_size"); - *is_thread_specific= test(irem->flags & MY_THREAD_SPECIFIC); + *is_thread_specific= MY_TEST(irem->flags & MY_THREAD_SPECIFIC); DBUG_PRINT("exit", ("size: %lu flags: %lu", (ulong) irem->datasize, (ulong)irem->flags)); DBUG_RETURN(irem->datasize); diff --git a/mysys/test_dir.c b/mysys/test_dir.c index 0ac559568b1..364562a6972 100644 --- a/mysys/test_dir.c +++ b/mysys/test_dir.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2006 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/test_xml.c b/mysys/test_xml.c index e5ff42ab2f5..56b50611498 100644 --- a/mysys/test_xml.c +++ b/mysys/test_xml.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002 MySQL AB + Use is subject to license terms 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 diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index 7fd87edda6c..d0bb2f1ef4c 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -1,6 +1,5 @@ -/* - Copyright (c) 2000, 2011, Oracle and/or its affiliates - Copyright (c) 2012, Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates + Copyright (c) 2012, 2014, SkySQL Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index c70aa342802..18af5f47b10 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -174,12 +174,12 @@ static int safe_mutex_lazy_init_deadlock_detection(safe_mutex_t *mp) 128, offsetof(safe_mutex_deadlock_t, id), sizeof(mp->id), - 0, 0, HASH_UNIQUE); + 0, 0, 0, HASH_UNIQUE); my_hash_init2(mp->used_mutex, 64, &my_charset_bin, 128, offsetof(safe_mutex_t, id), sizeof(mp->id), - 0, 0, HASH_UNIQUE); + 0, 0, 0, HASH_UNIQUE); return 0; } diff --git a/mysys/tree.c b/mysys/tree.c index fe2d3f45d57..a9fc542faf6 100644 --- a/mysys/tree.c +++ b/mysys/tree.c @@ -127,7 +127,7 @@ void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit, tree->offset_to_key=0; /* use key through pointer */ tree->size_of_element+=sizeof(void*); } - if (!(tree->with_delete= test(my_flags & MY_TREE_WITH_DELETE))) + if (!(tree->with_delete= MY_TEST(my_flags & MY_TREE_WITH_DELETE))) { init_alloc_root(&tree->mem_root, default_alloc_size, 0, MYF(my_flags)); tree->mem_root.min_malloc= sizeof(TREE_ELEMENT)+tree->size_of_element; diff --git a/packaging/WiX/CPackWixConfig.cmake b/packaging/WiX/CPackWixConfig.cmake index e8edd8a835f..c782b7cd17a 100644 --- a/packaging/WiX/CPackWixConfig.cmake +++ b/packaging/WiX/CPackWixConfig.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2013, 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
diff --git a/packaging/WiX/custom_ui.wxs b/packaging/WiX/custom_ui.wxs index 6e243832e12..d49e4210b12 100644 --- a/packaging/WiX/custom_ui.wxs +++ b/packaging/WiX/custom_ui.wxs @@ -2,7 +2,7 @@ xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!--
- Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2014, 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
@@ -30,7 +30,7 @@ <Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" Disabled="yes" />
<Control Id="Description" Type="Text" X="135" Y="80" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgDescription)" />
<Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgTitle)" />
- <Control Id="CopyrightText" Type="Text" X="135" Y="200" Width="220" Height="40" Transparent="yes" Text="Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved." />
+ <Control Id="CopyrightText" Type="Text" X="135" Y="200" Width="220" Height="40" Transparent="yes" Text="Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved." />
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
</Dialog>
diff --git a/packaging/WiX/mysql_server.wxs.in b/packaging/WiX/mysql_server.wxs.in index 752dc15304e..1802baedf3b 100644 --- a/packaging/WiX/mysql_server.wxs.in +++ b/packaging/WiX/mysql_server.wxs.in @@ -2,7 +2,7 @@ xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!--
- Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2013, 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
@@ -70,10 +70,10 @@ Installed
</Custom>
</InstallExecuteSequence>
- <InstallUISequence>
+ <InstallUISequence>
<!-- App search is what does FindInstallLocation, and it is dependent on FindRelatedProducts -->
<AppSearch After="FindRelatedProducts"/>
- </InstallUISequence>
+ </InstallUISequence>
<!-- Find previous installation -->
<Property Id="INSTALLDIR">
@@ -83,31 +83,43 @@ Name="InstallLocation"
Type="raw" />
</Property>
- <Property Id="OLDERVERSION">
- <RegistrySearch Id="FindOlderVersion"
- Root="HKLM"
- Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[OLDERVERSIONBEINGUPGRADED]"
- Name="DisplayVersion"
- Type="raw" />
- </Property>
- <Property Id="DATADIR">
+ <?if @Platform@ != "x64" ?>
+ <Property Id="OLDERVERSION">
+ <RegistrySearch Id="FindOlderVersion"
+ Root="HKLM"
+ Win64 = "no"
+ Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[OLDERVERSIONBEINGUPGRADED]"
+ Name="DisplayVersion"
+ Type="raw" />
+ </Property>
+ <?else ?>
+ <Property Id="OLDERVERSION">
+ <RegistrySearch Id="FindOlderVersion"
+ Root="HKLM"
+ Win64 = "yes"
+ Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[OLDERVERSIONBEINGUPGRADED]"
+ Name="DisplayVersion"
+ Type="raw" />
+ </Property>
+ <?endif ?>
+ <Property Id="DATADIR">
<RegistrySearch Id="FindDataDir"
Root="HKLM"
Key="SOFTWARE\MySQL AB\[ProductName]"
Name="DataLocation"
Type="raw" />
</Property>
- <Property Id="INSTALLDIR2">
+ <Property Id="INSTALLDIR2">
<RegistrySearch Id="FindInstallLocation2"
Root="HKLM"
Key="SOFTWARE\MySQL AB\[ProductName]"
Name="Location"
Type="raw" />
</Property>
- <CustomAction Id="SetInstallDir2" Property="INSTALLDIR" Value="[INSTALLDIR2]" />
- <InstallUISequence>
- <Custom Action="SetInstallDir2" After="AppSearch">INSTALLDIR2</Custom>
- </InstallUISequence>
+ <CustomAction Id="SetInstallDir2" Property="INSTALLDIR" Value="[INSTALLDIR2]" />
+ <InstallUISequence>
+ <Custom Action="SetInstallDir2" After="AppSearch">INSTALLDIR2</Custom>
+ </InstallUISequence>
<!-- UI -->
diff --git a/packaging/rpm-oel/CMakeLists.txt b/packaging/rpm-oel/CMakeLists.txt new file mode 100644 index 00000000000..fb1a1c1600c --- /dev/null +++ b/packaging/rpm-oel/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2012, 2013, 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 + + +IF(UNIX) + SET(prefix ${CMAKE_INSTALL_PREFIX}) + + SET(SPECFILENAME "mysql.spec") + IF("${VERSION}" MATCHES "-ndb-") + STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}") + SET(SPECFILENAME "mysql-cluster-${NDBVERSION}.spec") + ENDIF() + + # Left in current directory, to be taken during build + CONFIGURE_FILE(mysql.spec.in ${CMAKE_CURRENT_BINARY_DIR}/${SPECFILENAME} @ONLY) + + FOREACH(fedfile my.cnf my_config.h mysql_config.sh + mysqld.service mysql-systemd-start mysql.conf + filter-requires.sh filter-provides.sh + mysql-embedded-check.c mysql.init) + CONFIGURE_FILE(${fedfile} ${CMAKE_CURRENT_BINARY_DIR}/${fedfile} COPYONLY) + ENDFOREACH() +ENDIF() + diff --git a/packaging/rpm-oel/filter-provides.sh b/packaging/rpm-oel/filter-provides.sh new file mode 100644 index 00000000000..bc166bd82d0 --- /dev/null +++ b/packaging/rpm-oel/filter-provides.sh @@ -0,0 +1,6 @@ +#! /bin/bash +# + +/usr/lib/rpm/perl.prov $* | +sed -e '/perl(hostnames)/d' -e '/perl(lib::mtr.*/d' -e '/perl(lib::v1.*/d' -e '/perl(mtr_.*/d' -e '/perl(My::.*/d' + diff --git a/packaging/rpm-oel/filter-requires.sh b/packaging/rpm-oel/filter-requires.sh new file mode 100644 index 00000000000..521eb0ca7d9 --- /dev/null +++ b/packaging/rpm-oel/filter-requires.sh @@ -0,0 +1,6 @@ +#! /bin/bash +# + +/usr/lib/rpm/perl.req $* | +sed -e '/perl(hostnames)/d' -e '/perl(lib::mtr.*/d' -e '/perl(lib::v1.*/d' -e '/perl(mtr_.*/d' -e '/perl(My::.*/d' + diff --git a/packaging/rpm-oel/my.cnf b/packaging/rpm-oel/my.cnf new file mode 100644 index 00000000000..b8ee584d485 --- /dev/null +++ b/packaging/rpm-oel/my.cnf @@ -0,0 +1,31 @@ +# For advice on how to change settings please see +# http://dev.mysql.com/doc/refman/5.5/en/server-configuration-defaults.html + +[mysqld] +# +# Remove leading # and set to the amount of RAM for the most important data +# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. +# innodb_buffer_pool_size = 128M +# +# Remove leading # to turn on a very important data integrity option: logging +# changes to the binary log between backups. +# log_bin +# +# Remove leading # to set options mainly useful for reporting servers. +# The server defaults are faster for transactions and fast SELECTs. +# Adjust sizes as needed, experiment to find the optimal values. +# join_buffer_size = 128M +# sort_buffer_size = 2M +# read_rnd_buffer_size = 2M +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock + +# Disabling symbolic-links is recommended to prevent assorted security risks +symbolic-links=0 + +# Recommended in standard MySQL setup +#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES + +[mysqld_safe] +log-error=/var/log/mysqld.log +pid-file=/var/run/mysqld/mysqld.pid diff --git a/packaging/rpm-oel/my_config.h b/packaging/rpm-oel/my_config.h new file mode 100644 index 00000000000..75dc5e1d754 --- /dev/null +++ b/packaging/rpm-oel/my_config.h @@ -0,0 +1,30 @@ +/* + * Fedora supports multi arch: having 32 and 64 versions of MySQL + * installed at the same time. my_config.h will differ due arch + * dependent defs creating a file conflict. We move arch specific + * headers to arch specific file names and include the correct arch + * specific file by installing this generic file. + * + */ + +#if defined(__i386__) +#include "my_config_i386.h" +#elif defined(__ia64__) +#include "my_config_ia64.h" +#elif defined(__powerpc__) +#include "my_config_ppc.h" +#elif defined(__powerpc64__) +#include "my_config_ppc64.h" +#elif defined(__s390x__) +#include "my_config_s390x.h" +#elif defined(__s390__) +#include "my_config_s390.h" +#elif defined(__sparc__) && defined(__arch64__) +#include "my_config_sparc64.h" +#elif defined(__sparc__) +#include "my_config_sparc.h" +#elif defined(__x86_64__) +#include "my_config_x86_64.h" +#else +#error "This MySQL devel package does not work your architecture?" +#endif diff --git a/packaging/rpm-oel/mysql-embedded-check.c b/packaging/rpm-oel/mysql-embedded-check.c new file mode 100644 index 00000000000..8bf8ca53dad --- /dev/null +++ b/packaging/rpm-oel/mysql-embedded-check.c @@ -0,0 +1,26 @@ +/* simple test program to see if we can link the embedded server library */ + +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> + +#include "mysql.h" + +MYSQL *mysql; + +static char *server_options[] = \ + { "mysql_test", "--defaults-file=my.cnf", NULL }; +int num_elements = (sizeof(server_options) / sizeof(char *)) - 1; + +static char *server_groups[] = { "libmysqld_server", + "libmysqld_client", NULL }; + +int main(int argc, char **argv) +{ + mysql_library_init(num_elements, server_options, server_groups); + mysql = mysql_init(NULL); + mysql_close(mysql); + mysql_library_end(); + + return 0; +} diff --git a/packaging/rpm-oel/mysql-systemd-start b/packaging/rpm-oel/mysql-systemd-start new file mode 100644 index 00000000000..9cb2a25c990 --- /dev/null +++ b/packaging/rpm-oel/mysql-systemd-start @@ -0,0 +1,52 @@ +#! /bin/bash +# +# Scripts to run by MySQL systemd service +# +# Needed argument: pre | post +# +# pre mode : try to run mysql_install_db and fix perms and SELinux contexts +# post mode : ping server until answer is received +# + +install_db () { + # Note: something different than datadir=/var/lib/mysql requires SELinux policy changes (in enforcing mode) + datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p') + + # Restore log, dir, perms and SELinux contexts + [ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1 + log=/var/log/mysqld.log + [ -e $log ] || touch $log + chmod 0640 $log + chown mysql:mysql $log || exit 1 + if [ -x /usr/sbin/restorecon ]; then + /usr/sbin/restorecon "$datadir" + /usr/sbin/restorecon $log + fi + + # If special mysql dir is in place, skip db install + [ -d "$datadir/mysql" ] && exit 0 + + # Create initial db + /usr/bin/mysql_install_db --rpm --datadir="$datadir" --user=mysql + exit 0 +} + +pinger () { + # Wait for ping to answer to signal startup completed, + # might take a while in case of e.g. crash recovery + # MySQL systemd service will timeout script if no answer + while /bin/true ; do + sleep 1 + mysqladmin ping >/dev/null 2>&1 && break + done + exit 0 +} + +# main +case $1 in + "pre") install_db ;; + "post") pinger ;; +esac + +exit 0 + diff --git a/packaging/rpm-oel/mysql.conf b/packaging/rpm-oel/mysql.conf new file mode 100644 index 00000000000..74cd5f836e7 --- /dev/null +++ b/packaging/rpm-oel/mysql.conf @@ -0,0 +1 @@ +d /var/run/mysqld 0755 mysql mysql - diff --git a/packaging/rpm-oel/mysql.init b/packaging/rpm-oel/mysql.init new file mode 100644 index 00000000000..d6f8f023850 --- /dev/null +++ b/packaging/rpm-oel/mysql.init @@ -0,0 +1,209 @@ +#!/bin/sh +# +# mysqld This shell script takes care of starting and stopping +# the MySQL subsystem (mysqld). +# +# chkconfig: - 64 36 +# description: MySQL database server. +# processname: mysqld +# config: /etc/my.cnf +# pidfile: /var/run/mysqld/mysqld.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + + +exec="/usr/bin/mysqld_safe" +prog="mysqld" + +# Set timeouts here so they can be overridden from /etc/sysconfig/mysqld +STARTTIMEOUT=120 +STOPTIMEOUT=60 + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + + +# extract value of a MySQL option from config files +# Usage: get_mysql_option SECTION VARNAME DEFAULT +# result is returned in $result +# We use my_print_defaults which prints all options from multiple files, +# with the more specific ones later; hence take the last match. +get_mysql_option(){ + result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1` + if [ -z "$result" ]; then + # not found, use default + result="$3" + fi +} + +get_mysql_option mysqld datadir "/var/lib/mysql" +datadir="$result" +get_mysql_option mysqld socket "$datadir/mysql.sock" +socketfile="$result" +get_mysql_option mysqld_safe log-error "/var/log/mysqld.log" +errlogfile="$result" +get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid" +mypidfile="$result" + + +start(){ + [ -x $exec ] || exit 5 + # check to see if it's already running + RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` + if [ $? = 0 ]; then + # already running, do nothing + action $"Starting $prog: " /bin/true + ret=0 + elif echo "$RESPONSE" | grep -q "Access denied for user" + then + # already running, do nothing + action $"Starting $prog: " /bin/true + ret=0 + else + # prepare for start + touch "$errlogfile" + chown mysql:mysql "$errlogfile" + chmod 0640 "$errlogfile" + [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" + if [ ! -d "$datadir/mysql" ] ; then + # First, make sure $datadir is there with correct permissions + if [ ! -e "$datadir" -a ! -h "$datadir" ] + then + mkdir -p "$datadir" || exit 1 + fi + chown mysql:mysql "$datadir" + chmod 0755 "$datadir" + [ -x /sbin/restorecon ] && /sbin/restorecon "$datadir" + # Now create the database + action $"Initializing MySQL database: " /usr/bin/mysql_install_db --rpm --datadir="$datadir" --user=mysql + ret=$? + chown -R mysql:mysql "$datadir" + if [ $ret -ne 0 ] ; then + return $ret + fi + fi + chown mysql:mysql "$datadir" + chmod 0755 "$datadir" + # Pass all the options determined above, to ensure consistent behavior. + # In many cases mysqld_safe would arrive at the same conclusions anyway + # but we need to be sure. (An exception is that we don't force the + # log-error setting, since this script doesn't really depend on that, + # and some users might prefer to configure logging to syslog.) + # Note: set --basedir to prevent probes that might trigger SELinux + # alarms, per bug #547485 + $exec --datadir="$datadir" --socket="$socketfile" \ + --pid-file="$mypidfile" \ + --basedir=/usr --user=mysql >/dev/null 2>&1 & + safe_pid=$! + # Spin for a maximum of N seconds waiting for the server to come up; + # exit the loop immediately if mysqld_safe process disappears. + # Rather than assuming we know a valid username, accept an "access + # denied" response as meaning the server is functioning. + ret=0 + TIMEOUT="$STARTTIMEOUT" + while [ $TIMEOUT -gt 0 ]; do + RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` && break + echo "$RESPONSE" | grep -q "Access denied for user" && break + if ! /bin/kill -0 $safe_pid 2>/dev/null; then + echo "MySQL Daemon failed to start." + ret=1 + break + fi + sleep 1 + let TIMEOUT=${TIMEOUT}-1 + done + if [ $TIMEOUT -eq 0 ]; then + echo "Timeout error occurred trying to start MySQL Daemon." + ret=1 + fi + if [ $ret -eq 0 ]; then + action $"Starting $prog: " /bin/true + touch $lockfile + else + action $"Starting $prog: " /bin/false + fi + fi + return $ret +} + +stop(){ + if [ ! -f "$mypidfile" ]; then + # not running; per LSB standards this is "ok" + action $"Stopping $prog: " /bin/true + return 0 + fi + MYSQLPID=`cat "$mypidfile"` + if [ -n "$MYSQLPID" ]; then + /bin/kill "$MYSQLPID" >/dev/null 2>&1 + ret=$? + if [ $ret -eq 0 ]; then + TIMEOUT="$STOPTIMEOUT" + while [ $TIMEOUT -gt 0 ]; do + /bin/kill -0 "$MYSQLPID" >/dev/null 2>&1 || break + sleep 1 + let TIMEOUT=${TIMEOUT}-1 + done + if [ $TIMEOUT -eq 0 ]; then + echo "Timeout error occurred trying to stop MySQL Daemon." + ret=1 + action $"Stopping $prog: " /bin/false + else + rm -f $lockfile + rm -f "$socketfile" + action $"Stopping $prog: " /bin/true + fi + else + action $"Stopping $prog: " /bin/false + fi + else + # failed to read pidfile, probably insufficient permissions + action $"Stopping $prog: " /bin/false + ret=4 + fi + return $ret +} + +restart(){ + stop + start +} + +condrestart(){ + [ -e $lockfile ] && restart || : +} + + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status -p "$mypidfile" $prog + ;; + restart) + restart + ;; + condrestart|try-restart) + condrestart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac + +exit $? diff --git a/packaging/rpm-oel/mysql.spec.in b/packaging/rpm-oel/mysql.spec.in new file mode 100644 index 00000000000..47a11053b28 --- /dev/null +++ b/packaging/rpm-oel/mysql.spec.in @@ -0,0 +1,1556 @@ +# Copyright (c) 2000, 2013, 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; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + + +# NOTE: "vendor" is used in upgrade/downgrade check, so you can't +# change these, has to be exactly as is. + +%global mysql_vendor Oracle and/or its affiliates +%global mysqldatadir /var/lib/mysql + +# By default, a build will include the bundeled "yaSSL" library for SSL. +%{?with_ssl: %global ssl_option -DWITH_SSL=%{with_ssl}} + +# Regression tests may take a long time, override the default to skip them +%{!?runselftest:%global runselftest 0} + +%{!?with_systemd: %global systemd 0} +%{!?with_debuginfo: %global nodebuginfo 1} +%{!?product_suffix: %global product_suffix community} +%{!?feature_set: %global feature_set community} +%{!?compilation_comment_release: %global compilation_comment_release MySQL Community Server - (GPL)} +%{!?compilation_comment_debug: %global compilation_comment_debug MySQL Community Server - Debug (GPL)} +%{!?src_base: %global src_base mysql} + +%global libmysqld_so_major 0 +%global libmysqld_so_long 0.0.1 + +# Version for compat libs +%global compatver 5.1.72 + +%global src_dir %{src_base}-%{version} + +# No debuginfo for now, ships /usr/sbin/mysqld-debug and libmysqlcliet-debug.a +%if 0%{?nodebuginfo} +%global _enable_debug_package 0 +%global debug_package %{nil} +%global __os_install_post /usr/lib/rpm/brp-compress %{nil} +%endif + +# multiarch +%global multiarchs ppc %{power64} %{ix86} x86_64 %{sparc} + +%if 0%{?commercial} +%global license_files_server %{src_dir}/LICENSE.mysql +%global license_type Commercial +%else +%global license_files_server %{src_dir}/COPYING %{src_dir}/README +%global license_type GPLv2 +%endif + + +Name: mysql-%{product_suffix} +Summary: A very fast and reliable SQL database server +Group: Applications/Databases +Version: @VERSION@ +Release: 1%{?dist} +License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{?license_type} license as shown in the Description field. +Source0: https://cdn.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz +URL: http://www.mysql.com/ +Packager: MySQL Release Engineering <mysql-build@oss.oracle.com> +Vendor: %{mysql_vendor} +Source1: mysql-systemd-start +Source2: mysqld.service +Source3: mysql.conf +Source4: my_config.h +Source5: mysql_config.sh +Source6: mysql-embedded-check.c +Source7: https://cdn.mysql.com/Downloads/MySQL-5.5/mysql-%{compatver}.tar.gz +Source90: filter-provides.sh +Source91: filter-requires.sh +BuildRequires: cmake +BuildRequires: perl +BuildRequires: time +BuildRequires: libaio-devel +BuildRequires: ncurses-devel +BuildRequires: openssl-devel +BuildRequires: zlib-devel +%if 0%{?systemd} +BuildRequires: systemd-units +%endif +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +# https://fedoraproject.org/wiki/EPEL:Packaging#Generic_Filtering_on_EPEL6 +%global __perl_provides %{SOURCE90} +%global __perl_requires %{SOURCE91} + +%description +The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, +and robust SQL (Structured Query Language) database server. MySQL Server +is intended for mission-critical, heavy-load production systems as well +as for embedding into mass-deployed software. MySQL is a trademark of +%{mysql_vendor} + +The MySQL software has Dual Licensing, which means you can use the MySQL +software free of charge under the GNU General Public License +(http://www.gnu.org/licenses/). You can also purchase commercial MySQL +licenses from %{mysql_vendor} if you do not wish to be bound by the terms of +the GPL. See the chapter "Licensing and Support" in the manual for +further info. + +The MySQL web site (http://www.mysql.com/) provides the latest +news and information about the MySQL software. Also please see the +documentation and the manual for more information. + +%package server +Summary: A very fast and reliable SQL database server +Group: Applications/Databases +Requires: coreutils +Requires: grep +Requires: procps +Requires: shadow-utils +Requires: net-tools +%if 0%{?commercial} +Obsoletes: mysql-community-server < %{version}-%{release} +Requires: mysql-enterprise-client%{?_isa} = %{version}-%{release} +Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-client%{?_isa} = %{version}-%{release} +Requires: mysql-community-common%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-server < %{version}-%{release} +Provides: mysql-server = %{version}-%{release} +Provides: mysql-server%{?_isa} = %{version}-%{release} +%if 0%{?systemd} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%else +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +%endif + +%description server +The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, +and robust SQL (Structured Query Language) database server. MySQL Server +is intended for mission-critical, heavy-load production systems as well +as for embedding into mass-deployed software. MySQL is a trademark of +%{mysql_vendor} + +The MySQL software has Dual Licensing, which means you can use the MySQL +software free of charge under the GNU General Public License +(http://www.gnu.org/licenses/). You can also purchase commercial MySQL +licenses from %{mysql_vendor} if you do not wish to be bound by the terms of +the GPL. See the chapter "Licensing and Support" in the manual for +further info. + +The MySQL web site (http://www.mysql.com/) provides the latest news and +information about the MySQL software. Also please see the documentation +and the manual for more information. + +This package includes the MySQL server binary as well as related utilities +to run and administer a MySQL server. + +%package client +Summary: MySQL database client applications and tools +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-client < %{version}-%{release} +Requires: mysql-enterprise-libs%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-libs%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql < %{version}-%{release} +Provides: mysql = %{version}-%{release} +Provides: mysql%{?_isa} = %{version}-%{release} + +%description client +This package contains the standard MySQL clients and administration +tools. + +%package common +Summary: MySQL database common files for server and client libs +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-common < %{version}-%{release} +%endif +Provides: mysql-common = %{version}-%{release} +Provides: mysql-common%{?_isa} = %{version}-%{release} + +%description common +This packages contains common files needed by MySQL client library, +MySQL database server, and MySQL embedded server. + + +%package test +Summary: Test suite for the MySQL database server +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-test < %{version}-%{release} +Requires: mysql-enterprise-server%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-server%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-test < %{version}-%{release} +Provides: mysql-test = %{version}-%{release} +Provides: mysql-test%{?_isa} = %{version}-%{release} + + +%description test +This package contains the MySQL regression test suite for MySQL +database server. + + +%package devel +Summary: Development header files and libraries for MySQL database client applications +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-devel < %{version}-%{release} +Requires: mysql-enterprise-libs%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-libs%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-devel < %{version}-%{release} +Provides: mysql-devel = %{version}-%{release} +Provides: mysql-devel%{?_isa} = %{version}-%{release} + +%description devel +This package contains the development header files and libraries necessary +to develop MySQL client applications. + +%package libs +Summary: Shared libraries for MySQL database client applications +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-libs < %{version}-%{release} +Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-common%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-libs < %{version}-%{release} +Provides: mysql-libs = %{version}-%{release} +Provides: mysql-libs%{?_isa} = %{version}-%{release} + +%description libs +This package contains the shared libraries for MySQL client +applications. + +%package libs-compat +Summary: Shared compat libraries for MySQL 5.1 database client applications +Group: Applications/Databases +Obsoletes: mysql-libs-compat < %{version}-%{release} +Provides: mysql-libs-compat = %{version}-%{release} +Provides: mysql-libs-compat%{?_isa} = %{version}-%{release} + +%description libs-compat +This package contains the shared compat libraries for MySQL 5.1 client +applications. + +%package embedded +Summary: MySQL embedded library +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-embedded < %{version}-%{release} +Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-common%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-embedded < %{version}-%{release} +Provides: mysql-embedded = %{version}-%{release} +Provides: mysql-emdedded%{?_isa} = %{version}-%{release} + +%description embedded +This package contains the mysql server as an embedded library. + +The embedded MySQL server library makes it possible to run a full-featured +MySQL server inside the client application. The main benefits are increased +speed and more simple management for embedded applications. + +The API is identical for the embedded MySQL version and the +client/server version. + +For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ + +%package embedded-devel +Summary: Development header files and libraries for MySQL as an embeddable library +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-embedded-devel < %{version}-%{release} +Requires: mysql-enterprise-devel%{?_isa} = %{version}-%{release} +Requires: mysql-enterprise-embedded%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-devel%{?_isa} = %{version}-%{release} +Requires: mysql-community-embedded%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-embedded-devel < %{version}-%{release} +Provides: mysql-embedded-devel = %{version}-%{release} +Provides: mysql-embedded-devel%{?_isa} = %{version}-%{release} + +%description embedded-devel +This package contains files needed for developing applicatison using +the embedded version of the MySQL server. + +%prep +%setup -q -T -a 0 -a 7 -c -n %{src_dir} +cd %{src_dir} + +%build +# Fail quickly and obviously if user tries to build as root +%if 0%{?runselftest} +if [ "x$(id -u)" = "x0" ] ; then + echo "The MySQL regression tests may fail if run as root." + echo "If you really need to build the RPM as root, use" + echo "--define='runselftest 0' to skip the regression tests." + exit 1 +fi +%endif + +# Build compat libs +( +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv" +export CXXFLAGS="$CFLAGS -felide-constructors -fno-rtti -fno-exceptions" +pushd mysql-%{compatver} +%configure \ + --with-readline \ + --with-ssl=%{_prefix} \ + --without-debug \ + --enable-shared \ + --with-embedded-server \ + --localstatedir=/var/lib/mysql \ + --with-unix-socket-path=/var/lib/mysql/mysql.sock \ + --with-mysqld-user="mysql" \ + --with-extra-charsets=all \ + --with-big-tables \ + --with-pic \ + --with-plugin-innobase \ + --with-plugin-innodb_plugin \ + --with-plugin-partition \ + --enable-local-infile \ + --enable-largefile \ + --enable-thread-safe-client \ + --disable-dependency-tracking +make %{?_smp_mflags} +popd +) + +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" + +# Build debug versions of mysqld and libmysqld.a +mkdir debug +( + cd debug + # Attempt to remove any optimisation flags from the debug build + CFLAGS=$(echo "${CFLAGS}" | sed -e 's/-O2 / /' -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /') + CXXFLAGS=$(echo "${CFLAGS}" | sed -e 's/-O2 / /' -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /') + cmake ../%{src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=Debug \ + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DFEATURE_SET="%{feature_set}" \ + %{?ssl_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \ + -DMYSQL_SERVER_SUFFIX="%{?server_suffix}" + echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG + make %{?_smp_mflags} VERBOSE=1 +) + +# Build full release +mkdir release +( + cd release + cmake ../%{src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DFEATURE_SET="%{feature_set}" \ + %{?ssl_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" \ + -DMYSQL_SERVER_SUFFIX="%{?server_suffix}" + echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG + make %{?_smp_mflags} VERBOSE=1 + +# Need to build libmysqld.so for distros +mkdir libmysqld/work +pushd libmysqld/work + +ar -x ../libmysqld.a +[ -e ../../extra/yassl/libyassl.a ] && ar -x ../../extra/yassl/libyassl.a +rm -f sql_binlog.cc.o rpl_utility.cc.o +%{__cc} $CFLAGS $LDFLAGS -DEMBEDDED_LIBRARY -shared -Wl,-soname,libmysqld.so.%{libmysqld_so_major} \ + -o libmysqld.so.%{libmysqld_so_long} *.o \ + -lpthread -laio -lcrypt -lssl -lcrypto -lz -lrt -lstdc++ -ldl -lm -lc + +# Compile check +cp %{SOURCE6} . +ln -s libmysqld.so.%{libmysqld_so_long} libmysqld.so.%{libmysqld_so_major} +%{__cc} -I../../../%{src_dir}/include -I../../include $CFLAGS \ + mysql-embedded-check.c libmysqld.so.%{libmysqld_so_major} +LD_LIBRARY_PATH=. ldd ./a.out +) + +%install +# Install compat libs +for dir in libmysql libmysql_r ; do + pushd mysql-%{compatver}/$dir + make DESTDIR=%{buildroot} install + popd +done +rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient{,_r}.{a,la,so} + +MBD=$RPM_BUILD_DIR/%{src_dir} + +# Ensure that needed directories exists +install -d -m 0755 %{buildroot}%{_datadir}/mysql/SELinux/RHEL4 +install -d -m 0755 %{buildroot}/var/lib/mysql +install -d -m 0755 %{buildroot}/var/run/mysqld + +# Install all binaries +cd $MBD/release +make DESTDIR=%{buildroot} install + +# Install logrotate and autostart +install -D -m 0644 $MBD/release/support-files/mysql-log-rotate %{buildroot}%{_sysconfdir}/logrotate.d/mysql +install -D -m 0644 $MBD/release/packaging/rpm-oel/my.cnf %{buildroot}%{_sysconfdir}/my.cnf +%if 0%{?systemd} +install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/mysql-systemd-start +install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/mysqld.service +%else +install -D -m 0755 $MBD/release/packaging/rpm-oel/mysql.init %{buildroot}%{_sysconfdir}/init.d/mysqld +%endif +install -D -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/mysql.conf + +install -m 0755 $MBD/release/libmysqld/work/libmysqld.so.%{libmysqld_so_long} \ + %{buildroot}%{_libdir}/mysql/libmysqld.so.%{libmysqld_so_long} +ln -s libmysqld.so.%{libmysqld_so_long} %{buildroot}%{_libdir}/mysql/libmysqld.so.%{libmysqld_so_major} +ln -s libmysqld.so.%{libmysqld_so_long} %{buildroot}%{_libdir}/mysql/libmysqld.so + + +# Make library links +install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf + +# multiarch support +%ifarch %{multiarchs} +mv %{buildroot}/%{_includedir}/mysql/my_config.h \ + %{buildroot}/%{_includedir}/mysql/my_config_%{_arch}.h +install -p -m 0644 %{SOURCE4} %{buildroot}/%{_includedir}/mysql/my_config.h +mv %{buildroot}/%{_bindir}/mysql_config %{buildroot}/%{_bindir}/mysql_config-%{__isa_bits} +install -p -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/mysql_config +%endif + +# Install SELinux files in datadir +install -m 0644 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \ + %{buildroot}%{_datadir}/mysql/SELinux/RHEL4 + +# Remove files pages we explicitly do not want to package +rm -rf %{buildroot}%{_datadir}/mysql/solaris +rm -rf %{buildroot}%{_infodir}/mysql.info* +rm -rf %{buildroot}%{_datadir}/mysql/binary-configure +rm -rf %{buildroot}%{_datadir}/mysql/mysql.server +rm -rf %{buildroot}%{_datadir}/mysql/mysqld_multi.server +rm -f %{buildroot}%{_datadir}/mysql/{ndb-config-2-node,config*}.ini +rm -f %{buildroot}%{_datadir}/mysql/my-*.cnf +%if 0%{?systemd} +rm -rf %{buildroot}%{_sysconfdir}/init.d/mysqld +%endif +rm -rf %{buildroot}%{_bindir}/mysql_embedded +rm -rf %{buildroot}%{_bindir}/mysql_setpermission +rm -rf %{buildroot}%{_mandir}/man1/mysql_setpermission.1* + +%check +%if 0%{?runselftest} +pushd release +make test VERBOSE=1 +export MTR_BUILD_THREAD=auto +pushd mysql-test +./mtr \ + --mem --parallel=auto --force --retry=0 \ + --mysqld=--binlog-format=mixed \ + --suite-timeout=720 --testcase-timeout=30 +rm -rf var/* +%endif + +%pre server +/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : +/usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /bin/bash \ + -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : + +%post server +datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p') +/bin/chmod 0755 "$datadir" +/bin/touch /var/log/mysqld.log +%if 0%{?systemd} +%systemd_post mysqld.service +/sbin/service mysqld enable >/dev/null 2>&1 || : +%else +/sbin/chkconfig --add mysqld +%endif + +%preun server +%if 0%{?systemd} +%systemd_preun mysqld.service +%else +if [ "$1" = 0 ]; then + /sbin/service mysqld stop >/dev/null 2>&1 || : + /sbin/chkconfig --del mysqld +fi +%endif + +%postun server +%if 0%{?systemd} +%systemd_postun_with_restart mysqld.service +%else +if [ $1 -ge 1 ]; then + /sbin/service mysqld condrestart >/dev/null 2>&1 || : +fi +%endif + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%post libs-compat -p /sbin/ldconfig + +%postun libs-compat -p /sbin/ldconfig + +%post embedded -p /sbin/ldconfig + +%postun embedded -p /sbin/ldconfig + +%files server +%defattr(-, root, root, -) +%doc %{?license_files_server} %{src_dir}/Docs/ChangeLog +%doc %{src_dir}/Docs/INFO_SRC* +%doc release/Docs/INFO_BIN* +%attr(644, root, root) %{_mandir}/man1/innochecksum.1* +%attr(644, root, root) %{_mandir}/man1/my_print_defaults.1* +%attr(644, root, root) %{_mandir}/man1/myisam_ftdump.1* +%attr(644, root, root) %{_mandir}/man1/myisamchk.1* +%attr(644, root, root) %{_mandir}/man1/myisamlog.1* +%attr(644, root, root) %{_mandir}/man1/myisampack.1* +%attr(644, root, root) %{_mandir}/man1/mysql_convert_table_format.1* +%attr(644, root, root) %{_mandir}/man1/mysql_fix_extensions.1* +%attr(644, root, root) %{_mandir}/man8/mysqld.8* +%attr(644, root, root) %{_mandir}/man1/mysqld_multi.1* +%attr(644, root, root) %{_mandir}/man1/mysqld_safe.1* +%attr(644, root, root) %{_mandir}/man1/mysqldumpslow.1* +%attr(644, root, root) %{_mandir}/man1/mysql_install_db.1* +%attr(644, root, root) %{_mandir}/man1/mysql_plugin.1* +%attr(644, root, root) %{_mandir}/man1/mysql_secure_installation.1* +%attr(644, root, root) %{_mandir}/man1/mysql_upgrade.1* +%attr(644, root, root) %{_mandir}/man1/mysqlhotcopy.1* +%attr(644, root, root) %{_mandir}/man1/mysqlman.1* +%attr(644, root, root) %{_mandir}/man1/mysql.server.1* +%attr(644, root, root) %{_mandir}/man1/mysqltest.1* +%attr(644, root, root) %{_mandir}/man1/mysql_tzinfo_to_sql.1* +%attr(644, root, root) %{_mandir}/man1/mysql_zap.1* +%attr(644, root, root) %{_mandir}/man1/mysqlbug.1* +%attr(644, root, root) %{_mandir}/man1/perror.1* +%attr(644, root, root) %{_mandir}/man1/replace.1* +%attr(644, root, root) %{_mandir}/man1/resolve_stack_dump.1* +%attr(644, root, root) %{_mandir}/man1/resolveip.1* + +%config(noreplace) %{_sysconfdir}/my.cnf + +%attr(755, root, root) %{_bindir}/innochecksum +%attr(755, root, root) %{_bindir}/my_print_defaults +%attr(755, root, root) %{_bindir}/myisam_ftdump +%attr(755, root, root) %{_bindir}/myisamchk +%attr(755, root, root) %{_bindir}/myisamlog +%attr(755, root, root) %{_bindir}/myisampack +%attr(755, root, root) %{_bindir}/mysql_convert_table_format +%attr(755, root, root) %{_bindir}/mysql_fix_extensions +%attr(755, root, root) %{_bindir}/mysql_install_db +%attr(755, root, root) %{_bindir}/mysql_plugin +%attr(755, root, root) %{_bindir}/mysql_secure_installation +%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql +%attr(755, root, root) %{_bindir}/mysql_upgrade +%attr(755, root, root) %{_bindir}/mysql_zap +%attr(755, root, root) %{_bindir}/mysqlbug +%attr(755, root, root) %{_bindir}/mysqld_multi +%attr(755, root, root) %{_bindir}/mysqld_safe +%attr(755, root, root) %{_bindir}/mysqldumpslow +%attr(755, root, root) %{_bindir}/mysqlhotcopy +%attr(755, root, root) %{_bindir}/mysqltest +%attr(755, root, root) %{_bindir}/perror +%attr(755, root, root) %{_bindir}/replace +%attr(755, root, root) %{_bindir}/resolve_stack_dump +%attr(755, root, root) %{_bindir}/resolveip +%if 0%{?systemd} +%attr(755, root, root) %{_bindir}/mysql-systemd-start +%endif +%attr(755, root, root) %{_sbindir}/mysqld +%attr(755, root, root) %{_sbindir}/mysqld-debug + +%{_libdir}/mysql/plugin + +%attr(644, root, root) %{_datadir}/mysql/fill_help_tables.sql +%attr(644, root, root) %{_datadir}/mysql/mysql_system_tables.sql +%attr(644, root, root) %{_datadir}/mysql/mysql_system_tables_data.sql +%attr(644, root, root) %{_datadir}/mysql/mysql_test_data_timezone.sql +%attr(644, root, root) %{_datadir}/mysql/mysql-log-rotate +%attr(644, root, root) %{_datadir}/mysql/SELinux/RHEL4/mysql.fc +%attr(644, root, root) %{_datadir}/mysql/SELinux/RHEL4/mysql.te +%attr(644, root, root) %{_datadir}/mysql/magic +%attr(644, root, root) %{_prefix}/lib/tmpfiles.d/mysql.conf +%if 0%{?systemd} +%attr(644, root, root) %{_unitdir}/mysql.service +%else +%attr(755, root, root) %{_sysconfdir}/init.d/mysqld +%endif +%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql +%dir %attr(755, mysql, mysql) /var/lib/mysql +%dir %attr(755, mysql, mysql) /var/run/mysqld + +%files common +%defattr(-, root, root, -) +%{_datadir}/mysql/charsets/ +%{_datadir}/mysql/errmsg-utf8.txt +%{_datadir}/mysql/czech/ +%{_datadir}/mysql/danish/ +%{_datadir}/mysql/dutch/ +%{_datadir}/mysql/english/ +%{_datadir}/mysql/estonian/ +%{_datadir}/mysql/french/ +%{_datadir}/mysql/german/ +%{_datadir}/mysql/greek/ +%{_datadir}/mysql/hungarian/ +%{_datadir}/mysql/italian/ +%{_datadir}/mysql/japanese/ +%{_datadir}/mysql/korean/ +%{_datadir}/mysql/norwegian-ny/ +%{_datadir}/mysql/norwegian/ +%{_datadir}/mysql/polish/ +%{_datadir}/mysql/portuguese/ +%{_datadir}/mysql/romanian/ +%{_datadir}/mysql/russian/ +%{_datadir}/mysql/serbian/ +%{_datadir}/mysql/slovak/ +%{_datadir}/mysql/spanish/ +%{_datadir}/mysql/swedish/ +%{_datadir}/mysql/ukrainian/ + +%files client +%defattr(-, root, root, -) +%attr(755, root, root) %{_bindir}/msql2mysql +%attr(755, root, root) %{_bindir}/mysql +%attr(755, root, root) %{_bindir}/mysql_find_rows +%attr(755, root, root) %{_bindir}/mysql_waitpid +%attr(755, root, root) %{_bindir}/mysqlaccess +# XXX: This should be moved to %{_sysconfdir} +%attr(644, root, root) %{_bindir}/mysqlaccess.conf +%attr(755, root, root) %{_bindir}/mysqladmin +%attr(755, root, root) %{_bindir}/mysqlbinlog +%attr(755, root, root) %{_bindir}/mysqlcheck +%attr(755, root, root) %{_bindir}/mysqldump +%attr(755, root, root) %{_bindir}/mysqlimport +%attr(755, root, root) %{_bindir}/mysqlshow +%attr(755, root, root) %{_bindir}/mysqlslap +%attr(755, root, root) %{_bindir}/mysql_config +%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits} + +%attr(644, root, root) %{_mandir}/man1/msql2mysql.1* +%attr(644, root, root) %{_mandir}/man1/mysql.1* +%attr(644, root, root) %{_mandir}/man1/mysql_find_rows.1* +%attr(644, root, root) %{_mandir}/man1/mysql_waitpid.1* +%attr(644, root, root) %{_mandir}/man1/mysqlaccess.1* +%attr(644, root, root) %{_mandir}/man1/mysqladmin.1* +%attr(644, root, root) %{_mandir}/man1/mysqlbinlog.1* +%attr(644, root, root) %{_mandir}/man1/mysqlcheck.1* +%attr(644, root, root) %{_mandir}/man1/mysqldump.1* +%attr(644, root, root) %{_mandir}/man1/mysqlimport.1* +%attr(644, root, root) %{_mandir}/man1/mysqlshow.1* +%attr(644, root, root) %{_mandir}/man1/mysqlslap.1* + +%files devel +%defattr(-, root, root, -) +%attr(644, root, root) %{_mandir}/man1/comp_err.1* +%attr(644, root, root) %{_mandir}/man1/mysql_config.1* +%attr(755, root, root) %{_bindir}/mysql_config +%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits} +%{_includedir}/mysql +%{_datadir}/aclocal/mysql.m4 +%{_libdir}/mysql/libmysqlclient.a +%{_libdir}/mysql/libmysqlclient_r.a +%{_libdir}/mysql/libmysqlservices.a +%{_libdir}/mysql/libmysqlclient_r.so +%{_libdir}/mysql/libmysqlclient.so + +%files libs +%defattr(-, root, root, -) +%dir %attr(755, root, root) %{_libdir}/mysql +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%{_libdir}/mysql/libmysqlclient.so.18* +%{_libdir}/mysql/libmysqlclient_r.so.18* + +%files libs-compat +%defattr(-, root, root, -) +%dir %attr(755, root, root) %{_libdir}/mysql +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%{_libdir}/mysql/libmysqlclient.so.16 +%{_libdir}/mysql/libmysqlclient.so.16.0.0 +%{_libdir}/mysql/libmysqlclient_r.so.16 +%{_libdir}/mysql/libmysqlclient_r.so.16.0.0 + +%files test +%defattr(-, root, root, -) +%attr(-, root, root) %{_datadir}/mysql-test +%attr(755, root, root) %{_bindir}/mysql_client_test +%attr(755, root, root) %{_bindir}/mysql_client_test_embedded +%attr(755, root, root) %{_bindir}/mysqltest_embedded +%attr(644, root, root) %{_mandir}/man1/mysql_client_test.1* +%attr(644, root, root) %{_mandir}/man1/mysql-stress-test.pl.1* +%attr(644, root, root) %{_mandir}/man1/mysql-test-run.pl.1* +%attr(644, root, root) %{_mandir}/man1/mysql_client_test_embedded.1* +%attr(644, root, root) %{_mandir}/man1/mysqltest_embedded.1* + +%files embedded +%defattr(-, root, root, -) +%dir %attr(755, root, root) %{_libdir}/mysql +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%attr(644, root, root) %{_libdir}/mysql/libmysqld.so.* + +%files embedded-devel +%defattr(-, root, root, -) +%attr(644, root, root) %{_libdir}/mysql/libmysqld.a +%attr(644, root, root) %{_libdir}/mysql/libmysqld-debug.a +%attr(755, root, root) %{_libdir}/mysql/libmysqld.so + +%changelog +* Fri Oct 25 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.15-1 +- Fixed uln advanced rpm libyassl.a error +- Updated to 5.6.15 + +* Wed Oct 16 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.14-3 +- Fixed mysql_install_db usage +- Improved handling of plugin directory + +* Fri Sep 27 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.14-2 +- Refresh mysql-install patch and service renaming + +* Mon Sep 16 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.14-1 +- Updated to 5.6.14 + +* Wed Sep 04 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.13-5 +- Support upgrade from 5.5 ULN packages to 5.6 + +* Tue Aug 27 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.13-4 +- Enhanced perl filtering +- Added openssl-devel to buildreq + +* Wed Aug 21 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.13-3 +- Removed mysql_embedded binary to resolve multilib conflict issue + +* Fri Aug 16 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.13-2 +- Fixed Provides and Obsoletes issues in server, test packages + +* Wed Aug 14 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.13-1 +- Updated to 5.6.13 + +* Mon Aug 05 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.12-9 +- Added files list to embedded packages + +* Thu Aug 01 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.12-8 +- Updated libmysqld.a with libmysqld.so in embedded package + +* Mon Jul 29 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.12-7 +- Updated test package dependency from client to server + +* Wed Jul 24 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.12-6 +- Added libs-compat dependency under libs package to resolve server + installation conflicts issue. + +* Wed Jul 17 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.12-5 +- Removed libmysqlclient.so.16 from libs package + +* Fri Jul 05 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.12-4 +- Adjusted to work on OEL6 + +* Wed Jun 26 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.12-3 +- Move libs to mysql/ +- Basic multi arch support +- Fix changelog dates + +* Thu Jun 20 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.12-2 +- Major cleanup + +* Tue Jun 04 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.12-1 +- Updated to 5.6.12 + +* Mon Nov 05 2012 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Allow to override the default to use the bundled yaSSL by an option like + --define="with_ssl /path/to/ssl" + +* Wed Oct 10 2012 Bjorn Munch <bjorn.munch@oracle.com> + +- Replace old my-*.cnf config file examples with template my-default.cnf + +* Fri Oct 05 2012 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Let the installation use the new option "--random-passwords" of "mysql_install_db". + (Bug# 12794345 Ensure root password) +- Fix an inconsistency: "new install" vs "upgrade" are told from the (non)existence + of "$mysql_datadir/mysql" (holding table "mysql.user" and other system stuff). + +* Tue Jul 24 2012 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Add a macro "runselftest": + if set to 1 (default), the test suite will be run during the RPM build; + this can be oveeridden via the command line by adding + --define "runselftest 0" + Failures of the test suite will NOT make the RPM build fail! + +* Mon Jul 16 2012 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Add the man page for the "mysql_config_editor". + +* Mon Jun 11 2012 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Make sure newly added "SPECIFIC-ULN/" directory does not disturb packaging. + +* Wed Feb 29 2012 Brajmohan Saxena <brajmohan.saxena@oracle.com> + +- Removal all traces of the readline library from mysql (BUG 13738013) + +* Wed Sep 28 2011 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Fix duplicate mentioning of "mysql_plugin" and its manual page, + it is better to keep alphabetic order in the files list (merging!). + +* Wed Sep 14 2011 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Let the RPM capabilities ("obsoletes" etc) ensure that an upgrade may replace + the RPMs of any configuration (of the current or the preceding release series) + by the new ones. This is done by not using the implicitly generated capabilities + (which include the configuration name) and relying on more generic ones which + just list the function ("server", "client", ...). + The implicit generation cannot be prevented, so all these capabilities must be + explicitly listed in "Obsoletes:" + +* Tue Sep 13 2011 Jonathan Perkin <jonathan.perkin@oracle.com> + +- Add support for Oracle Linux 6 and Red Hat Enterprise Linux 6. Due to + changes in RPM behaviour ($RPM_BUILD_ROOT is removed prior to install) + this necessitated a move of the libmygcc.a installation to the install + phase, which is probably where it belonged in the first place. + +* Tue Sep 13 2011 Joerg Bruehe <joerg.bruehe@oracle.com> + +- "make_win_bin_dist" and its manual are dropped, cmake does it different. + +* Thu Sep 08 2011 Daniel Fischer <daniel.fischer@oracle.com> + +- Add mysql_plugin man page. + +* Tue Aug 30 2011 Tor Didriksen <tor.didriksen@oracle.com> + +- Set CXX=g++ by default to add a dependency on libgcc/libstdc++. + Also, remove the use of the -fno-exceptions and -fno-rtti flags. + TODO: update distro_buildreq/distro_requires + +* Tue Aug 30 2011 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Add the manual page for "mysql_plugin" to the server package. + +* Fri Aug 19 2011 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Null-upmerge the fix of bug#37165: This spec file is not affected. +- Replace "/var/lib/mysql" by the spec file variable "%{mysqldatadir}". + +* Fri Aug 12 2011 Daniel Fischer <daniel.fischer@oracle.com> + +- Source plugin library files list from cmake-generated file. + +* Mon Jul 25 2011 Chuck Bell <chuck.bell@oracle.com> + +- Added the mysql_plugin client - enables or disables plugins. + +* Thu Jul 21 2011 Sunanda Menon <sunanda.menon@oracle.com> + +- Fix bug#12561297: Added the MySQL embedded binary + +* Thu Jul 07 2011 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Fix bug#45415: "rpm upgrade recreates test database" + Let the creation of the "test" database happen only during a new installation, + not in an RPM upgrade. + This affects both the "mkdir" and the call of "mysql_install_db". + +* Wed Feb 09 2011 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Fix bug#56581: If an installation deviates from the default file locations + ("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade) + should still work, and use these locations. + The problem was that the fix for bug#27072 did not check for local settings. + +* Mon Jan 31 2011 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Install the new "manifest" files: "INFO_SRC" and "INFO_BIN". + +* Tue Nov 23 2010 Jonathan Perkin <jonathan.perkin@oracle.com> + +- EXCEPTIONS-CLIENT has been deleted, remove it from here too +- Support MYSQL_BUILD_MAKE_JFLAG environment variable for passing + a '-j' argument to make. + +* Mon Nov 1 2010 Georgi Kodinov <georgi.godinov@oracle.com> + +- Added test authentication (WL#1054) plugin binaries + +* Wed Oct 6 2010 Georgi Kodinov <georgi.godinov@oracle.com> + +- Added example external authentication (WL#1054) plugin binaries + +* Wed Aug 11 2010 Joerg Bruehe <joerg.bruehe@oracle.com> + +- With a recent spec file cleanup, names have changed: A "-community" part was dropped. + Reflect that in the "Obsoletes" specifications. +- Add a "triggerpostun" to handle the uninstall of the "-community" server RPM. +- This fixes bug#55015 "MySQL server is not restarted properly after RPM upgrade". + +* Tue Jun 15 2010 Joerg Bruehe <joerg.bruehe@sun.com> + +- Change the behaviour on installation and upgrade: + On installation, do not autostart the server. + *Iff* the server was stopped before the upgrade is started, this is taken as a + sign the administrator is handling that manually, and so the new server will + not be started automatically at the end of the upgrade. + The start/stop scripts will still be installed, so the server will be started + on the next machine boot. + This is the 5.5 version of fixing bug#27072 (RPM autostarting the server). + +* Tue Jun 1 2010 Jonathan Perkin <jonathan.perkin@oracle.com> + +- Implement SELinux checks from distribution-specific spec file. + +* Wed May 12 2010 Jonathan Perkin <jonathan.perkin@oracle.com> + +- Large number of changes to build using CMake +- Introduce distribution-specific RPMs +- Drop debuginfo, build all binaries with debug/symbols +- Remove __os_install_post, use native macro +- Remove _unpackaged_files_terminate_build, make it an error to have + unpackaged files +- Remove cluster RPMs + +* Wed Mar 24 2010 Joerg Bruehe <joerg.bruehe@sun.com> + +- Add "--with-perfschema" to the configure options. + +* Mon Mar 22 2010 Joerg Bruehe <joerg.bruehe@sun.com> + +- User "usr/lib*" to allow for both "usr/lib" and "usr/lib64", + mask "rmdir" return code 1. +- Remove "ha_example.*" files from the list, they aren't built. + +* Wed Mar 17 2010 Joerg Bruehe <joerg.bruehe@sun.com> + +- Fix a wrong path name in handling the debug plugins. + +* Wed Mar 10 2010 Joerg Bruehe <joerg.bruehe@sun.com> + +- Take the result of the debug plugin build and put it into the optimized tree, + so that it becomes part of the final installation; + include the files in the packlist. Part of the fixes for bug#49022. + +* Mon Mar 01 2010 Joerg Bruehe <joerg.bruehe@sun.com> + +- Set "Oracle and/or its affiliates" as the vendor and copyright owner, + accept upgrading from packages showing MySQL or Sun as vendor. + +* Fri Feb 12 2010 Joerg Bruehe <joerg.bruehe@sun.com> + +- Formatting changes: + Have a consistent structure of separator lines and of indentation + (8 leading blanks => tab). +- Introduce the variable "src_dir". +- Give the environment variables "MYSQL_BUILD_CC(CXX)" precedence + over "CC" ("CXX"). +- Drop the old "with_static" argument analysis, this is not supported + in 5.1 since ages. +- Introduce variables to control the handlers individually, as well + as other options. +- Use the new "--with-plugin" notation for the table handlers. +- Drop handling "/etc/rc.d/init.d/mysql", the switch to "/etc/init.d/mysql" + was done back in 2002 already. +- Make "--with-zlib-dir=bundled" the default, add an option to disable it. +- Add missing manual pages to the file list. +- Improve the runtime check for "libgcc.a", protect it against being tried + with the Intel compiler "icc". + +* Mon Jan 11 2010 Joerg Bruehe <joerg.bruehe@sun.com> + +- Change RPM file naming: + - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". + - Release counts from 1, not 0. + +* Wed Dec 23 2009 Joerg Bruehe <joerg.bruehe@sun.com> + +- The "semisync" plugin file name has lost its introductory "lib", + adapt the file lists for the subpackages. + This is a part missing from the fix for bug#48351. +- Remove the "fix_privilege_tables" manual, it does not exist in 5.5 + (and likely, the whole script will go, too). + +* Mon Nov 16 2009 Joerg Bruehe <joerg.bruehe@sun.com> + +- Fix some problems with the directives around "tcmalloc" (experimental), + remove erroneous traces of the InnoDB plugin (that is 5.1 only). + +* Tue Oct 06 2009 Magnus Blaudd <mvensson@mysql.com> + +- Removed mysql_fix_privilege_tables + +* Fri Oct 02 2009 Alexander Nozdrin <alexander.nozdrin@sun.com> + +- "mysqlmanager" got removed from version 5.4, all references deleted. + +* Fri Aug 28 2009 Joerg Bruehe <joerg.bruehe@sun.com> + +- Merge up from 5.1 to 5.4: Remove handling for the InnoDB plugin. + +* Thu Aug 27 2009 Joerg Bruehe <joerg.bruehe@sun.com> + +- This version does not contain the "Instance manager", "mysqlmanager": + Remove it from the spec file so that packaging succeeds. + +* Mon Aug 24 2009 Jonathan Perkin <jperkin@sun.com> + +- Add conditionals for bundled zlib and innodb plugin + +* Fri Aug 21 2009 Jonathan Perkin <jperkin@sun.com> + +- Install plugin libraries in appropriate packages. +- Disable libdaemon_example and ftexample plugins. + +* Thu Aug 20 2009 Jonathan Perkin <jperkin@sun.com> + +- Update variable used for mysql-test suite location to match source. + +* Fri Nov 07 2008 Joerg Bruehe <joerg@mysql.com> + +- Correct yesterday's fix, so that it also works for the last flag, + and fix a wrong quoting: un-quoted quote marks must not be escaped. + +* Thu Nov 06 2008 Kent Boortz <kent.boortz@sun.com> + +- Removed "mysql_upgrade_shell" +- Removed some copy/paste between debug and normal build + +* Thu Nov 06 2008 Joerg Bruehe <joerg@mysql.com> + +- Modify CFLAGS and CXXFLAGS such that a debug build is not optimized. + This should cover both gcc and icc flags. Fixes bug#40546. + +* Fri Aug 29 2008 Kent Boortz <kent@mysql.com> + +- Removed the "Federated" storage engine option, and enabled in all + +* Tue Aug 26 2008 Joerg Bruehe <joerg@mysql.com> + +- Get rid of the "warning: Installed (but unpackaged) file(s) found:" + Some generated files aren't needed in RPMs: + - the "sql-bench/" subdirectory + Some files were missing: + - /usr/share/aclocal/mysql.m4 ("devel" subpackage) + - Manual "mysqlbug" ("server" subpackage) + - Program "innochecksum" and its manual ("server" subpackage) + - Manual "mysql_find_rows" ("client" subpackage) + - Script "mysql_upgrade_shell" ("client" subpackage) + - Program "ndb_cpcd" and its manual ("ndb-extra" subpackage) + - Manuals "ndb_mgm" + "ndb_restore" ("ndb-tools" subpackage) + +* Mon Mar 31 2008 Kent Boortz <kent@mysql.com> + +- Made the "Federated" storage engine an option +- Made the "Cluster" storage engine and sub packages an option + +* Wed Mar 19 2008 Joerg Bruehe <joerg@mysql.com> + +- Add the man pages for "ndbd" and "ndb_mgmd". + +* Mon Feb 18 2008 Timothy Smith <tim@mysql.com> + +- Require a manual upgrade if the alread-installed mysql-server is + from another vendor, or is of a different major version. + +* Wed May 02 2007 Joerg Bruehe <joerg@mysql.com> + +- "ndb_size.tmpl" is not needed any more, + "man1/mysql_install_db.1" lacked the trailing '*'. + +* Sat Apr 07 2007 Kent Boortz <kent@mysql.com> + +- Removed man page for "mysql_create_system_tables" + +* Wed Mar 21 2007 Daniel Fischer <df@mysql.com> + +- Add debug server. + +* Mon Mar 19 2007 Daniel Fischer <df@mysql.com> + +- Remove Max RPMs; the server RPMs contain a mysqld compiled with all + features that previously only were built into Max. + +* Fri Mar 02 2007 Joerg Bruehe <joerg@mysql.com> + +- Add several man pages for NDB which are now created. + +* Fri Jan 05 2007 Kent Boortz <kent@mysql.com> + +- Put back "libmygcc.a", found no real reason it was removed. + +- Add CFLAGS to gcc call with --print-libgcc-file, to make sure the + correct "libgcc.a" path is returned for the 32/64 bit architecture. + +* Mon Dec 18 2006 Joerg Bruehe <joerg@mysql.com> + +- Fix the move of "mysqlmanager" to section 8: Directory name was wrong. + +* Thu Dec 14 2006 Joerg Bruehe <joerg@mysql.com> + +- Include the new man pages for "my_print_defaults" and "mysql_tzinfo_to_sql" + in the server RPM. +- The "mysqlmanager" man page got moved from section 1 to 8. + +* Thu Nov 30 2006 Joerg Bruehe <joerg@mysql.com> + +- Call "make install" using "benchdir_root=%{_datadir}", + because that is affecting the regression test suite as well. + +* Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com> + +- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB) + replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading + (bug#22081). + +* Mon Nov 13 2006 Joerg Bruehe <joerg@mysql.com> + +- Add "--with-partition" t 2006 Joerg Bruehe <joerg@mysql.com> + +- Use the Perl script to run the tests, because it will automatically check + whether the server is configured with SSL. + +* Tue Jun 27 2006 Joerg Bruehe <joerg@mysql.com> + +- move "mysqldumpslow" from the client RPM to the server RPM (bug#20216) + +- Revert all previous attempts to call "mysql_upgrade" during RPM upgrade, + there are some more aspects which need to be solved before this is possible. + For now, just ensure the binary "mysql_upgrade" is delivered and installysql.com> + +- To run "mysql_upgrade", we need a running server; + start it in isolation and skip password checks. + +* Sat May 20 2006 Kent Boortz <kent@mysql.com> + +- Always compile for PIC, position independent code. + +* Wed May 10 2006 Kent Boortz <kent@mysql.com> + +- Use character set "all" when compiling with Cluster, to make Cluster + nodes independent on the character set directory, and the problem + that two RPM sub packages both wants to install this directory. + +* Mon May 01 2006 Kent Boortz <kent@mysql.com> + +- Use "./libtool --mode=execute" instead of searching for the + executable in current directory and ".libs". + +* Fri Apr 28 2006 Kent Boortz <kent@mysql.com> + +- Install and run "mysql_upgrade" + +* Wed Apr 12 2006 Jim Winstead <jimw@mysql.com> + +- Remove sql-bench, and MySQL-bench RPM (will be built as an independent + project from the mysql-bench repository) + +* Tue Apr 11 2006 Jim Winstead <jimw@mysql.com> + +- Remove old mysqltestmanager and related programs +* Sat Apr 01 2006 Kent Boortz <kent@mysql.com> + +- Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS + +* Tue Mar 07 2006 Kent Boortz <kent@mysql.com> + +- Changed product name from "Community Edition" to "Community Server" + +* Mon Mar 06 2006 Kent Boortz <kent@mysql.com> + +- Fast mutexes is now disabled by default, but should be + used in Linux builds. + +* Mon Feb 20 2006 Kent Boortz <kent@mysql.com> + +- Reintroduced a max build +- Limited testing of 'debug' and 'max' servers +- Berkeley DB only in 'max' + +* Mon Feb 13 2006 Joerg Bruehe <joerg@mysql.com> + +- Use "-i" on "make test-force"; + this is essential for later evaluation of this log file. + +* Thu Feb 09 2006 Kent Boortz <kent@mysql.com> + +- Pass '-static' to libtool, link static with our own libraries, dynamic + with system libraries. Link with the bundled zlib. + +* Wed Feb 08 2006 Kristian Nielsen <knielsen@mysql.com> + +- Modified RPM spec to match new 5.1 debug+max combined community packaging. + +* Sun Dec 18 2005 Kent Boortz <kent@mysql.com> + +- Added "client/mysqlslap" + +* Mon Dec 12 2005 Rodrigo Novo <rodrigo@mysql.com> + +- Added zlib to the list of (static) libraries installed +- Added check against libtool wierdness (WRT: sql/mysqld || sql/.libs/mysqld) +- Compile MySQL with bundled zlib +- Fixed %packager name to "MySQL Production Engineering Team" + +* Mon Dec 05 2005 Joerg Bruehe <joerg@mysql.com> + +- Avoid using the "bundled" zlib on "shared" builds: + As it is not installed (on the build system), this gives dependency + problems with "libtool" causing the build to fail. + (Change was done on Nov 11, but left uncommented.) + +* Tue Nov 22 2005 Joerg Bruehe <joerg@mysql.com> + +- Extend the file existence check for "init.d/mysql" on un-install + to also guard the call to "insserv"/"chkconfig". + +* Thu Oct 27 2005 Lenz Grimmer <lenz@grimmer.com> + +- added more man pages + +* Wed Oct 19 2005 Kent Boortz <kent@mysql.com> + +- Made yaSSL support an option (off by default) + +* Wed Oct 19 2005 Kent Boortz <kent@mysql.com> + +- Enabled yaSSL support + +* Sat Oct 15 2005 Kent Boortz <kent@mysql.com> + +- Give mode arguments the same way in all places +lenz@mysql.com> + +- fixed the removing of the RPM_BUILD_ROOT in the %clean section (the + $RBR variable did not get expanded, thus leaving old build roots behind) + +* Thu Aug 04 2005 Lenz Grimmer <lenz@mysql.com> + +- Fixed the creation of the mysql user group account in the postinstall + section (BUG 12348) +- Fixed enabling the Archive storage engine in the Max binary + +* Tue Aug 02 2005 Lenz Grimmer <lenz@mysql.com> + +- Fixed the Requires: tag for the server RPM (BUG 12233) + +* Fri Jul 15 2005 Lenz Grimmer <lenz@mysql.com> + +- create a "mysql" user group and assign the mysql user account to that group + in the server postinstall section. (BUG 10984) + +* Tue Jun 14 2005 Lenz Grimmer <lenz@mysql.com> + +- Do not build statically on i386 by default, only when adding either "--with + static" or "--define '_with_static 1'" to the RPM build options. Static + linking really only makes sense when linking against the specially patched + glibc 2.2.5. + +* Mon Jun 06 2005 Lenz Grimmer <lenz@mysql.com> + +- added mysql_client_test to the "bench" subpackage (BUG 10676) +- added the libndbclient static and shared libraries (BUG 10676) + +* Wed Jun 01 2005 Lenz Grimmer <lenz@mysql.com> + +- use "mysqldatadir" variable instead of hard-coding the path multiple times +- use the "mysqld_user" variable on all occasions a user name is referenced +- removed (incomplete) Brazilian translations +- removed redundant release tags from the subpackage descriptions + +* Wed May 25 2005 Joerg Bruehe <joerg@mysql.com> + +- Added a "make clean" between separate calls to "BuildMySQL". + +* Thu May 12 2005 Guilhem Bichot <guilhem@mysql.com> + +- Removed the mysql_tableinfo script made obsolete by the information schema + +* Wed Apr 20 2005 Lenz Grimmer <lenz@mysql.com> + +- Enabled the "blackhole" storage engine for the Max RPM + +* Wed Apr 13 2005 Lenz Grimmer <lenz@mysql.com> + +- removed the MySQL manual files (html/ps/texi) - they have been removed + from the MySQL sources and are now available seperately. + +* Mon Apr 4 2005 Petr Chardin <petr@mysql.com> + +- old mysqlmanager, mysq* Mon Feb 7 2005 Tomas Ulin <tomas@mysql.com> + +- enabled the "Ndbcluster" storage engine for the max binary +- added extra make install in ndb subdir after Max build to get ndb binaries +- added packages for ndbcluster storage engine + +* Fri Jan 14 2005 Lenz Grimmer <lenz@mysql.com> + +- replaced obsoleted "BuildPrereq" with "BuildRequires" instead + +* Thu Jan 13 2005 Lenz Grimmer <lenz@mysql.com> + +- enabled the "Federated" storage engine for the max binary + +* Tue Jan 04 2005 Petr Chardin <petr@mysql.com> + +- ISAM and merge storage engines were purged. As well as appropriate + tools and manpages (isamchk and isamlog) + +* Fri Dec 31 2004 Lenz Grimmer <lenz@mysql.com> + +- enabled the "Archive" storage engine for the max binary +- enabled the "CSV" storage engine for the max binary +- enabled the "Example" storage engine for the max binary + +* Thu Aug 26 2004 Lenz Grimmer <lenz@mysql.com> + +- MySQL-Max now requires MySQL-server instead of MySQL (BUG 3860) + +* Fri Aug 20 2004 Lenz Grimmer <lenz@mysql.com> + +- do not link statically on IA64/AMD64 as these systems do not have + a patched glibc installed + +* Tue Aug 10 2004 Lenz Grimmer <lenz@mysql.com> + +- Added libmygcc.a to the devel subpackage (required to link applications + against the the embedded server libmysqld.a) (BUG 4921) + +* Mon Aug 09 2004 Lenz Grimmer <lenz@mysql.com> + +- Added EXCEPTIONS-CLIENT to the "devel" package + +* Thu Jul 29 2004 Lenz Grimmer <lenz@mysql.com> + +- disabled OpenSSL in the Max binaries again (the RPM packages were the + only exception to this anyway) (BUG 1043) + +* Wed Jun 30 2004 Lenz Grimmer <lenz@mysql.com> + +- fixed server postinstall (mysql_install_db was called with the wrong + parameter) + +* Thu Jun 24 2004 Lenz Grimmer <lenz@mysql.com> + +- added mysql_tzinfo_to_sql to the server subpackage +- run "make clean" instead of "make distclean" + +* Mon Apr 05 2004 Lenz Grimmer <lenz@mysql.com> + +- added ncurses-devel to the build prerequisites (BUG 3377) + +* Thu Feb 12 2004 Lenz Grimmer <lenz@mysql.com> + +- when using gcc, _always_ use CXX=gcc +- replaced Copyright with License field (Copyright is obsolete) + +* Tue Feb 03 2004 Lenz Grimmer <lenz@mysql.com> + +- added myisam_ftdump to the Server package + +* Tue Jan 13 2004 Lenz Grimmer <lenz@mysql.com> + +- link the mysql client against libreadline instead of libedit (BUG 2289) + +* Mon Dec 22 2003 Lenz Grimmer <lenz@mysql.com> + +- marked /etc/logrotate.d/mysql as a config file (BUG 2156) + +* Sat Dec 13 2003 Lenz Grimmer <lenz@mysql.com> + +- fixed file permissions (BUG 1672) + +* Thu Dec 11 2003 Lenz Grimmer <lenz@mysql.com> + +- made testing for gcc3 a bit more robust + +* Fri Dec 05 2003 Lenz Grimmer <lenz@mysql.com> + +- added missing file mysql_create_system_tables to the server subpackage + +* Fri Nov 21 2003 Lenz Grimmer <lenz@mysql.com> + +- removed dependency on MySQL-client from the MySQL-devel subpackage + as it is not really required. (BUG 1610) + +* Fri Aug 29 2003 Lenz Grimmer <lenz@mysql.com> + +- Fixed BUG 1162 (removed macro names from the changelog) +- Really fixed BUG 998 (disable the checking for installed but + unpackaged files) + +* Tue Aug 05 2003 Lenz Grimmer <lenz@mysql.com> + +- Fixed BUG 959 (libmysqld not being compiled properly) +- Fixed BUG 998 (RPM build errors): added missing files to the + distribution (mysql_fix_extensions, mysql_tableinfo, mysqldumpslow, + mysql_fix_privilege_tables.1), removed "-n" from install section. + +* Wed Jul 09 2003 Lenz Grimmer <lenz@mysql.com> + +- removed the GIF Icon (file was not included in the sources anyway) +- removed unused variable shared_lib_version +- do not run automake before building the standard binary + (should not be necessary) +- add server suffix '-standard' to standard binary (to be in line + with the binary tarball distributions) +- Use more RPM macros (_exec_prefix, _sbindir, _libdir, _sysconfdir, + _datadir, _includedir) throughout the spec file. +- allow overriding CC and CXX (required when building with other compilers) + +* Fri May 16 2003 Lenz Grimmer <lenz@mysql.com> + +- re-enabled RAID again + +* Wed Apr 30 2003 Lenz Grimmer <lenz@mysql.com> + +- disabled MyISAM RAID (--with-raid)- it throws an assertion which + needs to be investigated first. + +* Mon Mar 10 2003 Lenz Grimmer <lenz@mysql.com> + +- added missing file mysql_secure_installation to server subpackage + (BUG 141) + +* Tue Feb 11 2003 Lenz Grimmer <lenz@mysql.com> + +- re-added missing pre- and post(un)install scripts to server subpackage +- added config file /etc/my.cnf to the file list (just for completeness) +- make sure to create the datadir with 755 permissions + +* Mon Jan 27 2003 Lenz Grimmer <lenz@mysql.com> + +- removed unusedql.com> + +- Reworked the build steps a little bit: the Max binary is supposed + to include OpenSSL, which cannot be linked statically, thus trying + to statically link against a special glibc is futile anyway +- because of this, it is not required to make yet another build run + just to compile the shared libs (saves a lot of time) +- updated package description of the Max subpackage +- clean up the BuildRoot directory afterwards + +* Mon Jul 15 2002 Lenz Grimmer <lenz@mysql.com> + +- Updated Packager information +- Fixed the build options: the regular package is supposed to + include InnoDB and linked statically, while the Max package + should include BDB and SSL support + +* Fri May 03 2002 Lenz Grimmer <lenz@mysql.com> + +- Use more RPM macros (e.g. infodir, mandir) to make the spec + file more portable +- reorganized the installation of documentation files: let RPM + take care of this +- reorganized the file list: actually install man pages along + with the binaries of the respective subpackage +- do not include libmysqld.a in the devel subpackage as well, if we + have a special "embedded" subpackage +- reworked the package descriptions + +* Mon Oct 8 2001 Monty + +- Added embedded server as a separate RPM + +* Fri Apr 13 2001 Monty + +- Added mysqld-max to the distribution + +* Tue Jan 2 2001 Monty + +- Added mysql-test to the bench package + +* Fri Aug 18 2000 Tim Smith <tim@mysql.com> + +- Added separate libmysql_r directory; now both a threaded + and non-threaded library is shipped. + +* Tue Sep 28 1999 David Axmark <davida@mysql.com> + +- Added the support-files/my-example.cnf to the docs directory. + +- Removed devel dependency on base since it is about client + development. + +* Wed Sep 8 1999 David Axmark <davida@mysql.com> + +- Cleaned up some for 3.23. + +* Thu Jul 1 1999 David Axmark <davida@mysql.com> + +- Added support for shared libraries in a separate sub + package. Original fix by David Fox (dsfox@cogsci.ucsd.edu) + +- The --enable-assembler switch is now automatically disables on + platforms there assembler code is unavailable. This should allow + building this RPM on non i386 systems. + +* Mon Feb 22 1999 David Axmark <david@detron.se> + +- Removed unportable cc switches from the spec file. The defaults can + now be overridden with environment variables. This feature is used + to compile the official RPM with optimal (but compiler version + specific) switches. + +- Removed the repetitive description parts for the sub rpms. Maybe add + again if RPM gets a multiline macro capability. + +- Added support for a pt_BR translation. Translation contributed by + Jorge Godoy <jorge@bestway.com.br>. + +* Wed Nov 4 1998 David Axmark <david@detron.se> + +- A lot of changes in all the rpm and install scripts. This may even + be a working RPM :-) + +* Sun Aug 16 1998 David Axmark <david@detron.se> + +- A developers changelog for MySQL is available in the source RPM. And + there is a history of major user visible changed in the Reference + Manual. Only RPM specific changes will be documented here. diff --git a/packaging/rpm-oel/mysql_config.sh b/packaging/rpm-oel/mysql_config.sh new file mode 100644 index 00000000000..abe46e0ed74 --- /dev/null +++ b/packaging/rpm-oel/mysql_config.sh @@ -0,0 +1,28 @@ +#! /bin/bash +# +# Wrapper script for mysql_config to support multilib +# +# Only works on OEL6/RHEL6 and similar +# +# This command respects setarch + +bits=$(rpm --eval %__isa_bits) + +case $bits in + 32|64) status=known ;; + *) status=unknown ;; +esac + +if [ "$status" = "unknown" ] ; then + echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits" + exit 1 +fi + + +if [ -x /usr/bin/mysql_config-$bits ] ; then + /usr/bin/mysql_config-$bits "$@" +else + echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation." + exit 1 +fi + diff --git a/packaging/rpm-oel/mysqld.service b/packaging/rpm-oel/mysqld.service new file mode 100644 index 00000000000..78ef3bffe60 --- /dev/null +++ b/packaging/rpm-oel/mysqld.service @@ -0,0 +1,48 @@ +# +# Simple MySQL systemd service file +# +# systemd supports lots of fancy features, look here (and linked docs) for a full list: +# http://www.freedesktop.org/software/systemd/man/systemd.exec.html +# +# Note: this file ( /usr/lib/systemd/system/mysql.service ) +# will be overwritten on package upgrade, please copy the file to +# +# /etc/systemd/system/mysql.service +# +# to make needed changes. +# +# systemd-delta can be used to check differences between the two mysql.service files. +# + +[Unit] +Description=MySQL Community Server +After=network.target +After=syslog.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service + +[Service] +User=mysql +Group=mysql + +# Execute pre and post scripts as root +PermissionsStartOnly=true + +# Needed to create system tables etc. +ExecStartPre=/usr/bin/mysql-systemd-start pre + +# Start main service +ExecStart=/usr/bin/mysqld_safe + +# Don't signal startup success before a ping works +ExecStartPost=/usr/bin/mysql-systemd-start post + +# Give up if ping don't get an answer +TimeoutSec=600 + +Restart=always +PrivateTmp=false + + diff --git a/packaging/rpm-uln/mysql.spec.sh b/packaging/rpm-uln/mysql.spec.sh index 3fcbd5c1234..34aed51048f 100644 --- a/packaging/rpm-uln/mysql.spec.sh +++ b/packaging/rpm-uln/mysql.spec.sh @@ -858,7 +858,9 @@ fi %files -n mysql-server%{product_suffix} -f release/support-files/plugins.files %defattr(-,root,root) %doc release/support-files/*.cnf -%doc %{_datadir}/info/mysql.info* +%if 0%{?commercial} + %doc %{_datadir}/info/mysql.info* +%endif %doc %{src_dir}/Docs/ChangeLog %doc %{src_dir}/Docs/INFO_SRC* %doc release/Docs/INFO_BIN* @@ -981,6 +983,9 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Tue Nov 05 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> +- Removed non gpl file mysql.info from community packages + * Wed Jul 10 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - Removed directory /usr/share/mysql/solaris/postinstall-solaris to resolve build error diff --git a/pcre/CMakeLists.txt b/pcre/CMakeLists.txt index 52cb0f65572..f885237c395 100644 --- a/pcre/CMakeLists.txt +++ b/pcre/CMakeLists.txt @@ -61,6 +61,10 @@ # 2012-09-08 ChPe added PCRE32 support # 2012-10-23 PH added support for VALGRIND and GCOV # 2012-12-08 PH added patch from Daniel Richard G to quash some MSVC warnings +# 2013-07-01 PH realized that the "support" for GCOV was a total nonsense and +# so it has been removed. +# 2013-10-08 PH got rid of the "source" command, which is a bash-ism (use ".") +# 2013-11-05 PH added support for PARENS_NEST_LIMIT PROJECT(PCRE C CXX) @@ -107,6 +111,9 @@ CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG) SET(PCRE_LINK_SIZE "2" CACHE STRING "Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.") +SET(PCRE_PARENS_NEST_LIMIT "250" CACHE STRING + "Default nested parentheses limit. See PARENS_NEST_LIMIT in config.h.in for details.") + SET(PCRE_MATCH_LIMIT "10000000" CACHE STRING "Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.") @@ -322,6 +329,15 @@ TARGET_LINK_LIBRARIES(pcreposix pcre) # Executables +# Removed by PH (2008-01-23) because pcredemo shouldn't really be built +# automatically, and it gave trouble in some environments anyway. +# ADD_EXECUTABLE(pcredemo pcredemo.c) +# TARGET_LINK_LIBRARIES(pcredemo pcreposix) +# IF(NOT BUILD_SHARED_LIBS) +# # make sure to not use declspec(dllimport) in static mode on windows +# SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC") +# ENDIF(NOT BUILD_SHARED_LIBS) + IF(PCRE_BUILD_PCREGREP) ADD_EXECUTABLE(pcregrep pcregrep.c) SET(targets ${targets} pcregrep) @@ -469,17 +485,25 @@ IF(PCRE_SHOW_REPORT) MESSAGE(STATUS "") MESSAGE(STATUS "PCRE configuration summary:") MESSAGE(STATUS "") +# MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}") +# MESSAGE(STATUS " C++ compiler .................... : ${CMAKE_CXX_COMPILER}") MESSAGE(STATUS " C compiler flags ................ : ${CMAKE_C_FLAGS}${cfsp}${CMAKE_C_FLAGS_${buildtype}}") # MESSAGE(STATUS " Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}") MESSAGE(STATUS " Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}") MESSAGE(STATUS " Newline char/sequence ........... : ${PCRE_NEWLINE}") MESSAGE(STATUS " \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}") +# MESSAGE(STATUS " EBCDIC coding ................... : ${PCRE_EBCDIC}") +# MESSAGE(STATUS " EBCDIC coding with NL=0x25 ...... : ${PCRE_EBCDIC_NL25}") +# MESSAGE(STATUS " Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}") MESSAGE(STATUS " No stack recursion .............. : ${PCRE_NO_RECURSE}") MESSAGE(STATUS " POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}") MESSAGE(STATUS " Internal link size .............. : ${PCRE_LINK_SIZE}") + MESSAGE(STATUS " Parentheses nest limit .......... : ${PCRE_PARENS_NEST_LIMIT}") MESSAGE(STATUS " Match limit ..................... : ${PCRE_MATCH_LIMIT}") MESSAGE(STATUS " Match limit recursion ........... : ${PCRE_MATCH_LIMIT_RECURSION}") +# MESSAGE(STATUS " Build shared libs ............... : ${BUILD_SHARED_LIBS}") +# MESSAGE(STATUS " Build static libs ............... : ${BUILD_STATIC_LIBS}") MESSAGE(STATUS " Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}") # MESSAGE(STATUS " Enable JIT in pcregrep .......... : ${PCRE_SUPPORT_PCREGREP_JIT}") MESSAGE(STATUS " Buffer size for pcregrep ........ : ${PCREGREP_BUFSIZE}") diff --git a/pcre/ChangeLog b/pcre/ChangeLog index 21cada49c9e..1f1e8600356 100644 --- a/pcre/ChangeLog +++ b/pcre/ChangeLog @@ -1,8 +1,216 @@ ChangeLog for PCRE ------------------ +Version 8.34 15-December-2013 +----------------------------- + +1. Add pcre[16|32]_jit_free_unused_memory to forcibly free unused JIT + executable memory. Patch inspired by Carsten Klein. + +2. ./configure --enable-coverage defined SUPPORT_GCOV in config.h, although + this macro is never tested and has no effect, because the work to support + coverage involves only compiling and linking options and special targets in + the Makefile. The comment in config.h implied that defining the macro would + enable coverage support, which is totally false. There was also support for + setting this macro in the CMake files (my fault, I just copied it from + configure). SUPPORT_GCOV has now been removed. + +3. Make a small performance improvement in strlen16() and strlen32() in + pcretest. + +4. Change 36 for 8.33 left some unreachable statements in pcre_exec.c, + detected by the Solaris compiler (gcc doesn't seem to be able to diagnose + these cases). There was also one in pcretest.c. + +5. Cleaned up a "may be uninitialized" compiler warning in pcre_exec.c. + +6. In UTF mode, the code for checking whether a group could match an empty + string (which is used for indefinitely repeated groups to allow for + breaking an infinite loop) was broken when the group contained a repeated + negated single-character class with a character that occupied more than one + data item and had a minimum repetition of zero (for example, [^\x{100}]* in + UTF-8 mode). The effect was undefined: the group might or might not be + deemed as matching an empty string, or the program might have crashed. + +7. The code for checking whether a group could match an empty string was not + recognizing that \h, \H, \v, \V, and \R must match a character. + +8. Implemented PCRE_INFO_MATCH_EMPTY, which yields 1 if the pattern can match + an empty string. If it can, pcretest shows this in its information output. + +9. Fixed two related bugs that applied to Unicode extended grapheme clusters + that were repeated with a maximizing qualifier (e.g. \X* or \X{2,5}) when + matched by pcre_exec() without using JIT: + + (a) If the rest of the pattern did not match after a maximal run of + grapheme clusters, the code for backing up to try with fewer of them + did not always back up over a full grapheme when characters that do not + have the modifier quality were involved, e.g. Hangul syllables. + + (b) If the match point in a subject started with modifier character, and + there was no match, the code could incorrectly back up beyond the match + point, and potentially beyond the first character in the subject, + leading to a segfault or an incorrect match result. + +10. A conditional group with an assertion condition could lead to PCRE + recording an incorrect first data item for a match if no other first data + item was recorded. For example, the pattern (?(?=ab)ab) recorded "a" as a + first data item, and therefore matched "ca" after "c" instead of at the + start. + +11. Change 40 for 8.33 (allowing pcregrep to find empty strings) showed up a + bug that caused the command "echo a | ./pcregrep -M '|a'" to loop. + +12. The source of pcregrep now includes z/OS-specific code so that it can be + compiled for z/OS as part of the special z/OS distribution. + +13. Added the -T and -TM options to pcretest. + +14. The code in pcre_compile.c for creating the table of named capturing groups + has been refactored. Instead of creating the table dynamically during the + actual compiling pass, the information is remembered during the pre-compile + pass (on the stack unless there are more than 20 named groups, in which + case malloc() is used) and the whole table is created before the actual + compile happens. This has simplified the code (it is now nearly 150 lines + shorter) and prepared the way for better handling of references to groups + with duplicate names. + +15. A back reference to a named subpattern when there is more than one of the + same name now checks them in the order in which they appear in the pattern. + The first one that is set is used for the reference. Previously only the + first one was inspected. This change makes PCRE more compatible with Perl. + +16. Unicode character properties were updated from Unicode 6.3.0. + +17. The compile-time code for auto-possessification has been refactored, based + on a patch by Zoltan Herczeg. It now happens after instead of during + compilation. The code is cleaner, and more cases are handled. The option + PCRE_NO_AUTO_POSSESS is added for testing purposes, and the -O and /O + options in pcretest are provided to set it. It can also be set by + (*NO_AUTO_POSSESS) at the start of a pattern. + +18. The character VT has been added to the default ("C" locale) set of + characters that match \s and are generally treated as white space, + following this same change in Perl 5.18. There is now no difference between + "Perl space" and "POSIX space". Whether VT is treated as white space in + other locales depends on the locale. + +19. The code for checking named groups as conditions, either for being set or + for being recursed, has been refactored (this is related to 14 and 15 + above). Processing unduplicated named groups should now be as fast at + numerical groups, and processing duplicated groups should be faster than + before. + +20. Two patches to the CMake build system, by Alexander Barkov: + + (1) Replace the "source" command by "." in CMakeLists.txt because + "source" is a bash-ism. + + (2) Add missing HAVE_STDINT_H and HAVE_INTTYPES_H to config-cmake.h.in; + without these the CMake build does not work on Solaris. + +21. Perl has changed its handling of \8 and \9. If there is no previously + encountered capturing group of those numbers, they are treated as the + literal characters 8 and 9 instead of a binary zero followed by the + literals. PCRE now does the same. + +22. Following Perl, added \o{} to specify codepoints in octal, making it + possible to specify values greater than 0777 and also making them + unambiguous. + +23. Perl now gives an error for missing closing braces after \x{... instead of + treating the string as literal. PCRE now does the same. + +24. RunTest used to grumble if an inappropriate test was selected explicitly, + but just skip it when running all tests. This make it awkward to run ranges + of tests when one of them was inappropriate. Now it just skips any + inappropriate tests, as it always did when running all tests. + +25. If PCRE_AUTO_CALLOUT and PCRE_UCP were set for a pattern that contained + character types such as \d or \w, too many callouts were inserted, and the + data that they returned was rubbish. + +26. In UCP mode, \s was not matching two of the characters that Perl matches, + namely NEL (U+0085) and MONGOLIAN VOWEL SEPARATOR (U+180E), though they + were matched by \h. The code has now been refactored so that the lists of + the horizontal and vertical whitespace characters used for \h and \v (which + are defined only in one place) are now also used for \s. + +27. Add JIT support for the 64 bit TileGX architecture. + Patch by Jiong Wang (Tilera Corporation). + +28. Possessive quantifiers for classes (both explicit and automatically + generated) now use special opcodes instead of wrapping in ONCE brackets. + +29. Whereas an item such as A{4}+ ignored the possessivenes of the quantifier + (because it's meaningless), this was not happening when PCRE_CASELESS was + set. Not wrong, but inefficient. + +30. Updated perltest.pl to add /u (force Unicode mode) when /W (use Unicode + properties for \w, \d, etc) is present in a test regex. Otherwise if the + test contains no characters greater than 255, Perl doesn't realise it + should be using Unicode semantics. + +31. Upgraded the handling of the POSIX classes [:graph:], [:print:], and + [:punct:] when PCRE_UCP is set so as to include the same characters as Perl + does in Unicode mode. + +32. Added the "forbid" facility to pcretest so that putting tests into the + wrong test files can sometimes be quickly detected. + +33. There is now a limit (default 250) on the depth of nesting of parentheses. + This limit is imposed to control the amount of system stack used at compile + time. It can be changed at build time by --with-parens-nest-limit=xxx or + the equivalent in CMake. + +34. Character classes such as [A-\d] or [a-[:digit:]] now cause compile-time + errors. Perl warns for these when in warning mode, but PCRE has no facility + for giving warnings. + +35. Change 34 for 8.13 allowed quantifiers on assertions, because Perl does. + However, this was not working for (?!) because it is optimized to (*FAIL), + for which PCRE does not allow quantifiers. The optimization is now disabled + when a quantifier follows (?!). I can't see any use for this, but it makes + things uniform. + +36. Perl no longer allows group names to start with digits, so I have made this + change also in PCRE. It simplifies the code a bit. + +37. In extended mode, Perl ignores spaces before a + that indicates a + possessive quantifier. PCRE allowed a space before the quantifier, but not + before the possessive +. It now does. + +38. The use of \K (reset reported match start) within a repeated possessive + group such as (a\Kb)*+ was not working. + +40. Document that the same character tables must be used at compile time and + run time, and that the facility to pass tables to pcre_exec() and + pcre_dfa_exec() is for use only with saved/restored patterns. + +41. Applied Jeff Trawick's patch CMakeLists.txt, which "provides two new + features for Builds with MSVC: + + 1. Support pcre.rc and/or pcreposix.rc (as is already done for MinGW + builds). The .rc files can be used to set FileDescription and many other + attributes. + + 2. Add an option (-DINSTALL_MSVC_PDB) to enable installation of .pdb files. + This allows higher-level build scripts which want .pdb files to avoid + hard-coding the exact files needed." + +42. Added support for [[:<:]] and [[:>:]] as used in the BSD POSIX library to + mean "start of word" and "end of word", respectively, as a transition aid. + +43. A minimizing repeat of a class containing codepoints greater than 255 in + non-UTF 16-bit or 32-bit modes caused an internal error when PCRE was + compiled to use the heap for recursion. + +44. Got rid of some compiler warnings for unused variables when UTF but not UCP + is configured. + + Version 8.33 28-May-2013 --------------------------- +------------------------ 1. Added 'U' to some constants that are compared to unsigned integers, to avoid compiler signed/unsigned warnings. Added (int) casts to unsigned diff --git a/pcre/HACKING b/pcre/HACKING index a90ddf87975..691b7a14e50 100644 --- a/pcre/HACKING +++ b/pcre/HACKING @@ -54,12 +54,12 @@ Support for 16-bit and 32-bit data strings From release 8.30, PCRE supports 16-bit as well as 8-bit data strings; and from release 8.32, PCRE supports 32-bit data strings. The library can be compiled -in any combination of 8-bit, 16-bit or 32-bit modes, creating different -libraries. In the description that follows, the word "short" is -used for a 16-bit data quantity, and the word "unit" is used for a quantity -that is a byte in 8-bit mode, a short in 16-bit mode and a 32-bit unsigned -integer in 32-bit mode. However, so as not to over-complicate the text, the -names of PCRE functions are given in 8-bit form only. +in any combination of 8-bit, 16-bit or 32-bit modes, creating up to three +different libraries. In the description that follows, the word "short" is used +for a 16-bit data quantity, and the word "unit" is used for a quantity that is +a byte in 8-bit mode, a short in 16-bit mode and a 32-bit word in 32-bit mode. +However, so as not to over-complicate the text, the names of PCRE functions are +given in 8-bit form only. Computing the memory requirement: how it was @@ -94,6 +94,11 @@ runs more slowly than before (30% or more, depending on the pattern) because it is doing a full analysis of the pattern. My hope was that this would not be a big issue, and in the event, nobody has commented on it. +At release 8.34, a limit on the nesting depth of parentheses was re-introduced +(default 250, settable at build time) so as to put a limit on the amount of +system stack used by pcre_compile(). This is a safety feature for environments +with small stacks where the patterns are provided by users. + Traditional matching function ----------------------------- @@ -120,29 +125,30 @@ facilities are available, and those that are do not always work in quite the same way. See the user documentation for details. The algorithm that is used for pcre_dfa_exec() is not a traditional FSM, -because it may have a number of states active at one time. More work would be -needed at compile time to produce a traditional FSM where only one state is -ever active at once. I believe some other regex matchers work this way. +because it may have a number of states active at one time. More work would be +needed at compile time to produce a traditional FSM where only one state is +ever active at once. I believe some other regex matchers work this way. JIT +support is not available for this kind of matching. Changeable options ------------------ -The /i, /m, or /s options (PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL) may -change in the middle of patterns. From PCRE 8.13, their processing is handled -entirely at compile time by generating different opcodes for the different -settings. The runtime functions do not need to keep track of an options state -any more. +The /i, /m, or /s options (PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and some +others) may change in the middle of patterns. From PCRE 8.13, their processing +is handled entirely at compile time by generating different opcodes for the +different settings. The runtime functions do not need to keep track of an +options state any more. Format of compiled patterns --------------------------- -The compiled form of a pattern is a vector of units (bytes in 8-bit mode, or -shorts in 16-bit mode, 32-bit unsigned integers in 32-bit mode), containing -items of variable length. The first unit in an item contains an opcode, and -the length of the item is either implicit in the opcode or contained in the -data that follows it. +The compiled form of a pattern is a vector of unsigned units (bytes in 8-bit +mode, shorts in 16-bit mode, 32-bit words in 32-bit mode), containing items of +variable length. The first unit in an item contains an opcode, and the length +of the item is either implicit in the opcode or contained in the data that +follows it. In many cases listed below, LINK_SIZE data values are specified for offsets within the compiled pattern. LINK_SIZE always specifies a number of bytes. The @@ -151,8 +157,10 @@ default value for LINK_SIZE is 2, but PCRE can be compiled to use 3-byte or LINK_SIZE values are available only in 8-bit mode.) Specifing a LINK_SIZE larger than 2 is necessary only when patterns whose compiled length is greater than 64K are going to be processed. In this description, we assume the "normal" -compilation options. Data values that are counts (e.g. for quantifiers) are -always just two bytes long (one short in 16-bit mode). +compilation options. Data values that are counts (e.g. quantifiers) are two +bytes long in 8-bit mode (most significant byte first), or one unit in 16-bit +and 32-bit modes. + Opcodes with no following data ------------------------------ @@ -162,7 +170,7 @@ These items are all just one unit long OP_END end of pattern OP_ANY match any one character other than newline OP_ALLANY match any one character, including newline - OP_ANYBYTE match any single byte, even in UTF-8 mode + OP_ANYBYTE match any single unit, even in UTF-8/16 mode OP_SOD match start of data: \A OP_SOM, start of match (subject + offset): \G OP_SET_SOM, set start of match (\K) @@ -180,28 +188,33 @@ These items are all just one unit long OP_VSPACE \v OP_NOT_WORDCHAR \W OP_WORDCHAR \w - OP_EODN match end of data or \n at end: \Z + OP_EODN match end of data or newline at end: \Z OP_EOD match end of data: \z OP_DOLL $ (end of data, or before final newline) OP_DOLLM $ multiline mode (end of data or before newline) - OP_EXTUNI match an extended Unicode character + OP_EXTUNI match an extended Unicode grapheme cluster OP_ANYNL match any Unicode newline sequence + OP_ASSERT_ACCEPT ) OP_ACCEPT ) These are Perl 5.10's "backtracking control OP_COMMIT ) verbs". If OP_ACCEPT is inside capturing OP_FAIL ) parentheses, it may be preceded by one or more - OP_PRUNE ) OP_CLOSE, followed by a 2-byte number, - OP_SKIP ) indicating which parentheses must be closed. + OP_PRUNE ) OP_CLOSE, each followed by a count that + OP_SKIP ) indicates which parentheses must be closed. + OP_THEN ) + +OP_ASSERT_ACCEPT is used when (*ACCEPT) is encountered within an assertion. +This ends the assertion, not the entire pattern match. -Backtracking control verbs with (optional) data ------------------------------------------------ +Backtracking control verbs with optional data +--------------------------------------------- (*THEN) without an argument generates the opcode OP_THEN and no following data. OP_MARK is followed by the mark name, preceded by a one-unit length, and followed by a binary zero. For (*PRUNE), (*SKIP), and (*THEN) with arguments, the opcodes OP_PRUNE_ARG, OP_SKIP_ARG, and OP_THEN_ARG are used, with the name -following in the same format. +following in the same format as OP_MARK. Matching literal characters @@ -212,6 +225,10 @@ casefully. For caseless matching, OP_CHARI is used. In UTF-8 or UTF-16 modes, the character may be more than one unit long. In UTF-32 mode, characters are always exactly one unit long. +If there is only one character in a character class, OP_CHAR or OP_CHARI is +used for a positive class, and OP_NOT or OP_NOTI for a negative one (that is, +for something like [^a]). + Repeating single characters --------------------------- @@ -232,10 +249,9 @@ following opcodes, which come in caseful and caseless versions: Each opcode is followed by the character that is to be repeated. In ASCII mode, these are two-unit items; in UTF-8 or UTF-16 modes, the length is variable; in -UTF-32 mode these are one-unit items. -Those with "MIN" in their names are the minimizing versions. Those with "POS" -in their names are possessive versions. Other repeats make use of these -opcodes: +UTF-32 mode these are one-unit items. Those with "MIN" in their names are the +minimizing versions. Those with "POS" in their names are possessive versions. +Other repeats make use of these opcodes: Caseful Caseless OP_UPTO OP_UPTOI @@ -243,10 +259,15 @@ opcodes: OP_POSUPTO OP_POSUPTOI OP_EXACT OP_EXACTI -Each of these is followed by a two-byte (one short) count (most significant -byte first in 8-bit mode) and then the repeated character. OP_UPTO matches from -0 to the given number. A repeat with a non-zero minimum and a fixed maximum is -coded as an OP_EXACT followed by an OP_UPTO (or OP_MINUPTO or OPT_POSUPTO). +Each of these is followed by a count and then the repeated character. OP_UPTO +matches from 0 to the given number. A repeat with a non-zero minimum and a +fixed maximum is coded as an OP_EXACT followed by an OP_UPTO (or OP_MINUPTO or +OPT_POSUPTO). + +Another set of matching repeating opcodes (called OP_NOTSTAR, OP_NOTSTARI, +etc.) are used for repeated, negated, single-character classes such as [^a]*. +The normal single-character opcodes (OP_STAR, etc.) are used for repeated +positive single-character classes. Repeating character types @@ -277,7 +298,10 @@ Match by Unicode property OP_PROP and OP_NOTPROP are used for positive and negative matches of a character by testing its Unicode property (the \p and \P escape sequences). Each is followed by two units that encode the desired property as a type and a -value. +value. The types are a set of #defines of the form PT_xxx, and the values are +enumerations of the form ucp_xx, defined in the ucp.h source file. The value is +relevant only for PT_GC (General Category), PT_PC (Particular Category), and +PT_SC (Script). Repeats of these items use the OP_TYPESTAR etc. set of opcodes, followed by three units: OP_PROP or OP_NOTPROP, and then the desired property type and @@ -287,67 +311,88 @@ value. Character classes ----------------- -If there is only one character in the class, OP_CHAR or OP_CHARI is used for a +If there is only one character in a class, OP_CHAR or OP_CHARI is used for a positive class, and OP_NOT or OP_NOTI for a negative one (that is, for something like [^a]). -Another set of 13 repeating opcodes (called OP_NOTSTAR etc.) are used for -repeated, negated, single-character classes. The normal single-character -opcodes (OP_STAR, etc.) are used for repeated positive single-character -classes. +A set of repeating opcodes (called OP_NOTSTAR etc.) are used for repeated, +negated, single-character classes. The normal single-character opcodes +(OP_STAR, etc.) are used for repeated positive single-character classes. -When there is more than one character in a class and all the characters are +When there is more than one character in a class, and all the code points are less than 256, OP_CLASS is used for a positive class, and OP_NCLASS for a -negative one. In either case, the opcode is followed by a 32-byte (16-short) -bit map containing a 1 bit for every character that is acceptable. The bits are -counted from the least significant end of each unit. In caseless mode, bits for -both cases are set. +negative one. In either case, the opcode is followed by a 32-byte (16-short, +8-word) bit map containing a 1 bit for every character that is acceptable. The +bits are counted from the least significant end of each unit. In caseless mode, +bits for both cases are set. + +The reason for having both OP_CLASS and OP_NCLASS is so that, in UTF-8/16/32 +mode, subject characters with values greater than 255 can be handled correctly. +For OP_CLASS they do not match, whereas for OP_NCLASS they do. + +For classes containing characters with values greater than 255 or that contain +\p or \P, OP_XCLASS is used. It optionally uses a bit map if any code points +are less than 256, followed by a list of pairs (for a range) and single +characters. In caseless mode, both cases are explicitly listed. -The reason for having both OP_CLASS and OP_NCLASS is so that, in UTF-8/16/32 mode, -subject characters with values greater than 255 can be handled correctly. For -OP_CLASS they do not match, whereas for OP_NCLASS they do. +OP_XCLASS is followed by a unit containing flag bits: XCL_NOT indicates that +this is a negative class, and XCL_MAP indicates that a bit map is present. +There follows the bit map, if XCL_MAP is set, and then a sequence of items +coded as follows: -For classes containing characters with values greater than 255, OP_XCLASS is -used. It optionally uses a bit map (if any characters lie within it), followed -by a list of pairs (for a range) and single characters. In caseless mode, both -cases are explicitly listed. There is a flag character than indicates whether -it is a positive or a negative class. + XCL_END marks the end of the list + XCL_SINGLE one character follows + XCL_RANGE two characters follow + XCL_PROP a Unicode property (type, value) follows + XCL_NOTPROP a Unicode property (type, value) follows + +If a range starts with a code point less than 256 and ends with one greater +than 256, an XCL_RANGE item is used, without setting any bits in the bit map. +This means that if no other items in the class set bits in the map, a map is +not needed. Back references --------------- -OP_REF (caseful) or OP_REFI (caseless) is followed by two bytes (one short) -containing the reference number. +OP_REF (caseful) or OP_REFI (caseless) is followed by a count containing the +reference number if the reference is to a unique capturing group (either by +number or by name). When named groups are used, there may be more than one +group with the same name. In this case, a reference by name generates OP_DNREF +or OP_DNREFI. These are followed by two counts: the index (not the byte offset) +in the group name table of the first entry for the requred name, followed by +the number of groups with the same name. Repeating character classes and back references ----------------------------------------------- Single-character classes are handled specially (see above). This section -applies to OP_CLASS and OP_REF[I]. In both cases, the repeat information -follows the base item. The matching code looks at the following opcode to see -if it is one of +applies to other classes and also to back references. In both cases, the repeat +information follows the base item. The matching code looks at the following +opcode to see if it is one of OP_CRSTAR OP_CRMINSTAR + OP_CRPOSSTAR OP_CRPLUS OP_CRMINPLUS + OP_CRPOSPLUS OP_CRQUERY OP_CRMINQUERY + OP_CRPOSQUERY OP_CRRANGE OP_CRMINRANGE + OP_CRPOSRANGE -All but the last two are just single-unit items. The others are followed by -four bytes (two shorts) of data, comprising the minimum and maximum repeat -counts. There are no special possessive opcodes for these repeats; a possessive -repeat is compiled into an atomic group. +All but the last three are single-unit items, with no data. The others are +followed by the minimum and maximum repeat counts. Brackets and alternation ------------------------ -A pair of non-capturing (round) brackets is wrapped round each expression at +A pair of non-capturing round brackets is wrapped round each expression at compile time, so alternation always happens in the context of brackets. [Note for North Americans: "bracket" to some English speakers, including @@ -364,20 +409,20 @@ A bracket opcode is followed by LINK_SIZE bytes which give the offset to the next alternative OP_ALT or, if there aren't any branches, to the matching OP_KET opcode. Each OP_ALT is followed by LINK_SIZE bytes giving the offset to the next one, or to the OP_KET opcode. For capturing brackets, the bracket -number immediately follows the offset, always as a 2-byte (one short) item. +number is a count that immediately follows the offset. -OP_KET is used for subpatterns that do not repeat indefinitely, and -OP_KETRMIN and OP_KETRMAX are used for indefinite repetitions, minimally or -maximally respectively (see below for possessive repetitions). All three are -followed by LINK_SIZE bytes giving (as a positive number) the offset back to -the matching bracket opcode. +OP_KET is used for subpatterns that do not repeat indefinitely, and OP_KETRMIN +and OP_KETRMAX are used for indefinite repetitions, minimally or maximally +respectively (see below for possessive repetitions). All three are followed by +LINK_SIZE bytes giving (as a positive number) the offset back to the matching +bracket opcode. If a subpattern is quantified such that it is permitted to match zero times, it is preceded by one of OP_BRAZERO, OP_BRAMINZERO, or OP_SKIPZERO. These are single-unit opcodes that tell the matcher that skipping the following subpattern entirely is a valid branch. In the case of the first two, not skipping the pattern is also valid (greedy and non-greedy). The third is used -when a pattern has the quantifier {0,0}. It cannot be entirely discarded, +when a pattern has the quantifier {0,0}. It cannot be entirely discarded, because it may be called as a subroutine from elsewhere in the regex. A subpattern with an indefinite maximum repetition is replicated in the @@ -397,6 +442,7 @@ final replication is changed to OP_SBRA or OP_SCBRA. This tells the matcher that it needs to check for matching an empty string when it hits OP_KETRMIN or OP_KETRMAX, and if so, to break the loop. + Possessive brackets ------------------- @@ -407,26 +453,34 @@ of OP_SCBRA. The end of such a group is marked by OP_KETRPOS. If the minimum repetition is zero, the group is preceded by OP_BRAPOSZERO. -Assertions ----------- +Once-only (atomic) groups +------------------------- -Forward assertions are just like other subpatterns, but starting with one of -the opcodes OP_ASSERT or OP_ASSERT_NOT. Backward assertions use the opcodes -OP_ASSERTBACK and OP_ASSERTBACK_NOT, and the first opcode inside the assertion -is OP_REVERSE, followed by a two byte (one short) count of the number of -characters to move back the pointer in the subject string. In ASCII mode, the -count is a number of units, but in UTF-8/16 mode each character may occupy more -than one unit; in UTF-32 mode each character occupies exactly one unit. -A separate count is present in each alternative of a lookbehind -assertion, allowing them to have different fixed lengths. +These are just like other subpatterns, but they start with the opcode +OP_ONCE or OP_ONCE_NC. The former is used when there are no capturing brackets +within the atomic group; the latter when there are. The distinction is needed +for when there is a backtrack to before the group - any captures within the +group must be reset, so it is necessary to retain backtracking points inside +the group even after it is complete in order to do this. When there are no +captures in an atomic group, all the backtracking can be discarded when it is +complete. This is more efficient, and also uses less stack. +The check for matching an empty string in an unbounded repeat is handled +entirely at runtime, so there are just these two opcodes for atomic groups. -Once-only (atomic) subpatterns ------------------------------- -These are also just like other subpatterns, but they start with the opcode -OP_ONCE. The check for matching an empty string in an unbounded repeat is -handled entirely at runtime, so there is just this one opcode. +Assertions +---------- + +Forward assertions are also just like other subpatterns, but starting with one +of the opcodes OP_ASSERT or OP_ASSERT_NOT. Backward assertions use the opcodes +OP_ASSERTBACK and OP_ASSERTBACK_NOT, and the first opcode inside the assertion +is OP_REVERSE, followed by a count of the number of characters to move back the +pointer in the subject string. In ASCII mode, the count is a number of units, +but in UTF-8/16 mode each character may occupy more than one unit; in UTF-32 +mode each character occupies exactly one unit. A separate count is present in +each alternative of a lookbehind assertion, allowing them to have different +fixed lengths. Conditional subpatterns @@ -435,28 +489,29 @@ Conditional subpatterns These are like other subpatterns, but they start with the opcode OP_COND, or OP_SCOND for one that might match an empty string in an unbounded repeat. If the condition is a back reference, this is stored at the start of the -subpattern using the opcode OP_CREF followed by two bytes (one short) -containing the reference number. OP_NCREF is used instead if the reference was -generated by name (so that the runtime code knows to check for duplicate -names). +subpattern using the opcode OP_CREF followed by a count containing the +reference number, provided that the reference is to a unique capturing group. +If the reference was by name and there is more than one group with that name, +OP_DNCREF is used instead. It is followed by two counts: the index in the group +names table, and the number of groups with the same name. If the condition is "in recursion" (coded as "(?(R)"), or "in recursion of group x" (coded as "(?(Rx)"), the group number is stored at the start of the -subpattern using the opcode OP_RREF or OP_NRREF (cf OP_NCREF), and a value of -zero for "the whole pattern". For a DEFINE condition, just the single unit -OP_DEF is used (it has no associated data). Otherwise, a conditional subpattern -always starts with one of the assertions. +subpattern using the opcode OP_RREF (with a value of zero for "the whole +pattern") or OP_DNRREF (with data as for OP_DNCREF). For a DEFINE condition, +just the single unit OP_DEF is used (it has no associated data). Otherwise, a +conditional subpattern always starts with one of the assertions. Recursion --------- Recursion either matches the current regex, or some subexpression. The opcode -OP_RECURSE is followed by an value which is the offset to the starting bracket -from the start of the whole pattern. From release 6.5, OP_RECURSE is -automatically wrapped inside OP_ONCE brackets (because otherwise some patterns -broke it). OP_RECURSE is also used for "subroutine" calls, even though they -are not strictly a recursion. +OP_RECURSE is followed by aLINK_SIZE value that is the offset to the starting +bracket from the start of the whole pattern. From release 6.5, OP_RECURSE is +automatically wrapped inside OP_ONCE brackets, because otherwise some patterns +broke it. OP_RECURSE is also used for "subroutine" calls, even though they are +not strictly a recursion. Callout @@ -464,10 +519,10 @@ Callout OP_CALLOUT is followed by one unit of data that holds a callout number in the range 0 to 254 for manual callouts, or 255 for an automatic callout. In both -cases there follows a two-byte (one short) value giving the offset in the -pattern to the start of the following item, and another two-byte (one short) -item giving the length of the next item. - +cases there follows a count giving the offset in the pattern string to the +start of the following item, and another count giving the length of this item. +These values make is possible for pcretest to output useful tracing information +using automatic callouts. Philip Hazel -February 2012 +November 2013 diff --git a/pcre/NEWS b/pcre/NEWS index 2ff69cbdd78..5f52f153460 100644 --- a/pcre/NEWS +++ b/pcre/NEWS @@ -1,6 +1,53 @@ News about PCRE releases ------------------------ +Release 8.34 15-December-2013 +----------------------------- + +As well as fixing the inevitable bugs, performance has been improved by +refactoring and extending the amount of "auto-possessification" that PCRE does. +Other notable changes: + +. Implemented PCRE_INFO_MATCH_EMPTY, which yields 1 if the pattern can match + an empty string. If it can, pcretest shows this in its information output. + +. A back reference to a named subpattern when there is more than one of the + same name now checks them in the order in which they appear in the pattern. + The first one that is set is used for the reference. Previously only the + first one was inspected. This change makes PCRE more compatible with Perl. + +. Unicode character properties were updated from Unicode 6.3.0. + +. The character VT has been added to the set of characters that match \s and + are generally treated as white space, following this same change in Perl + 5.18. There is now no difference between "Perl space" and "POSIX space". + +. Perl has changed its handling of \8 and \9. If there is no previously + encountered capturing group of those numbers, they are treated as the + literal characters 8 and 9 instead of a binary zero followed by the + literals. PCRE now does the same. + +. Following Perl, added \o{} to specify codepoints in octal, making it + possible to specify values greater than 0777 and also making them + unambiguous. + +. In UCP mode, \s was not matching two of the characters that Perl matches, + namely NEL (U+0085) and MONGOLIAN VOWEL SEPARATOR (U+180E), though they + were matched by \h. + +. Add JIT support for the 64 bit TileGX architecture. + +. Upgraded the handling of the POSIX classes [:graph:], [:print:], and + [:punct:] when PCRE_UCP is set so as to include the same characters as Perl + does in Unicode mode. + +. Perl no longer allows group names to start with digits, so I have made this + change also in PCRE. + +. Added support for [[:<:]] and [[:>:]] as used in the BSD POSIX library to + mean "start of word" and "end of word", respectively, as a transition aid. + + Release 8.33 28-May-2013 -------------------------- diff --git a/pcre/NON-AUTOTOOLS-BUILD b/pcre/NON-AUTOTOOLS-BUILD index 74075f0160a..cddf3e0699b 100644 --- a/pcre/NON-AUTOTOOLS-BUILD +++ b/pcre/NON-AUTOTOOLS-BUILD @@ -171,8 +171,8 @@ can skip ahead to the CMake section. pcre16_version.c pcre16_xclass.c - (8) If you want to build a 16-bit library (as well as, or instead of the 8-bit - or 32-bit libraries) repeat steps 5-6 with the following files: + (8) If you want to build a 32-bit library (as well as, or instead of the 8-bit + or 16-bit libraries) repeat steps 5-6 with the following files: pcre32_byte_order.c pcre32_chartables.c diff --git a/pcre/README b/pcre/README index e14935efeba..51197df7213 100644 --- a/pcre/README +++ b/pcre/README @@ -9,8 +9,10 @@ from: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.zip There is a mailing list for discussion about the development of PCRE at +pcre-dev@exim.org. You can access the archives and subscribe or manage your +subscription here: - pcre-dev@exim.org + https://lists.exim.org/mailman/listinfo/pcre-dev Please read the NEWS file if you are upgrading from a previous release. The contents of this README file are: @@ -112,6 +114,11 @@ contributions provided support for compiling PCRE on various flavours of Windows (I myself do not use Windows). Nowadays there is more Windows support in the standard distribution, so these contibutions have been archived. +A PCRE user maintains downloadable Windows binaries of the pcregrep and +pcretest programs here: + + http://www.rexegg.com/pcregrep-pcretest.html + Building PCRE on non-Unix-like systems -------------------------------------- @@ -262,9 +269,17 @@ library. They are also documented in the pcrebuild man page. on the "configure" command. -. PCRE has a counter that can be set to limit the amount of resources it uses. - If the limit is exceeded during a match, the match fails. The default is ten - million. You can change the default by setting, for example, +. PCRE has a counter that limits the depth of nesting of parentheses in a + pattern. This limits the amount of system stack that a pattern uses when it + is compiled. The default is 250, but you can change it by setting, for + example, + + --with-parens-nest-limit=500 + +. PCRE has a counter that can be set to limit the amount of resources it uses + when matching a pattern. If the limit is exceeded during a match, the match + fails. The default is ten million. You can change the default by setting, for + example, --with-match-limit=500000 @@ -344,7 +359,8 @@ library. They are also documented in the pcrebuild man page. report is generated by running "make coverage". If ccache is installed on your system, it must be disabled when building PCRE for coverage reporting. You can do this by setting the environment variable CCACHE_DISABLE=1 before - running "make" to build PCRE. + running "make" to build PCRE. There is more information about coverage + reporting in the "pcrebuild" documentation. . The pcregrep program currently supports only 8-bit data files, and so requires the 8-bit PCRE library. It is possible to compile pcregrep to use @@ -971,4 +987,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx. Philip Hazel Email local part: ph10 Email domain: cam.ac.uk -Last updated: 28 April 2013 +Last updated: 05 November 2013 diff --git a/pcre/RunGrepTest b/pcre/RunGrepTest index daaf8af47ac..e192ed77f7c 100755 --- a/pcre/RunGrepTest +++ b/pcre/RunGrepTest @@ -502,6 +502,10 @@ echo "---------------------------- Test 105 -----------------------------" >>tes (cd $srcdir; $valgrind $pcregrep --colour=always "ipsum|" ./testdata/grepinput3) >>testtry 2>&1 echo "RC=$?" >>testtry +echo "---------------------------- Test 106 -----------------------------" >>testtry +(cd $srcdir; echo "a" | $valgrind $pcregrep -M "|a" ) >>testtry 2>&1 +echo "RC=$?" >>testtry + # Now compare the results. diff --git a/pcre/RunTest b/pcre/RunTest index 505a0bf14b5..7caa51d6772 100755 --- a/pcre/RunTest +++ b/pcre/RunTest @@ -14,11 +14,11 @@ # UTF-8 with the UTF-8 check turned off; for this, studying must also be # disabled with /SS. # -# When JIT support is available, all the tests are also run with -s+ to test -# (again, almost) everything with studying and the JIT option, unless "nojit" -# is given on the command line. There are also two tests for JIT-specific -# features, one to be run when JIT support is available (unless "nojit" is -# specified), and one when it is not. +# When JIT support is available, all appropriate tests are also run with -s+ to +# test (again, almost) everything with studying and the JIT option, unless +# "nojit" is given on the command line. There are also two tests for +# JIT-specific features, one to be run when JIT support is available (unless +# "nojit" is specified), and one when it is not. # # Whichever of the 8-, 16- and 32-bit libraries exist are tested. It is also # possible to select which to test by giving "-8", "-16" or "-32" on the @@ -30,9 +30,13 @@ # runs tests 3 to 15, excluding test 10, and just "~10" runs all the tests # except test 10. Whatever order the arguments are in, the tests are always run # in numerical order. - +# +# Inappropriate tests are automatically skipped (with a comment to say so): for +# example, if JIT support is not compiled, test 12 is skipped, whereas if JIT +# support is compiled, test 13 is skipped. +# # Other arguments can be one of the words "valgrind", "valgrind-log", or "sim" -# followed by an argument to run cross- compiled executables under a simulator, +# followed by an argument to run cross-compiled executables under a simulator, # for example: # # RunTest 3 sim "qemu-arm -s 8388608" @@ -62,8 +66,8 @@ title8="Test 8: DFA matching main functionality" title9="Test 9: DFA matching with UTF" title10="Test 10: DFA matching with Unicode properties" title11="Test 11: Internal offsets and code size tests" -title12="Test 12: JIT-specific features (JIT available)" -title13="Test 13: JIT-specific features (JIT not available)" +title12="Test 12: JIT-specific features (when JIT is available)" +title13="Test 13: JIT-specific features (when JIT is not available)" title14="Test 14: Specials for the basic 8-bit library" title15="Test 15: Specials for the 8-bit library with UTF-8 support" title16="Test 16: Specials for the 8-bit library with Unicode propery support" @@ -350,79 +354,6 @@ if [ $jit -ne 0 -a "$nojit" != "yes" ] ; then jitopt=-s+ fi -# Handle any explicit skips - -for i in $skip; do eval do$i=no; done - -# If any unsuitable tests were explicitly requested, grumble. - -if [ $utf -eq 0 ] ; then - if [ $do4 = yes ] ; then - echo "Can't run test 4 because UTF support is not configured" - exit 1 - fi - if [ $do5 = yes ] ; then - echo "Can't run test 5 because UTF support is not configured" - exit 1 - fi - if [ $do9 = yes ] ; then - echo "Can't run test 8 because UTF support is not configured" - exit 1 - fi - if [ $do15 = yes ] ; then - echo "Can't run test 15 because UTF support is not configured" - exit 1 - fi - if [ $do18 = yes ] ; then - echo "Can't run test 18 because UTF support is not configured" - fi - if [ $do22 = yes ] ; then - echo "Can't run test 22 because UTF support is not configured" - fi -fi - -if [ $ucp -eq 0 ] ; then - if [ $do6 = yes ] ; then - echo "Can't run test 6 because Unicode property support is not configured" - exit 1 - fi - if [ $do7 = yes ] ; then - echo "Can't run test 7 because Unicode property support is not configured" - exit 1 - fi - if [ $do10 = yes ] ; then - echo "Can't run test 10 because Unicode property support is not configured" - exit 1 - fi - if [ $do16 = yes ] ; then - echo "Can't run test 16 because Unicode property support is not configured" - exit 1 - fi - if [ $do19 = yes ] ; then - echo "Can't run test 19 because Unicode property support is not configured" - exit 1 - fi -fi - -if [ $link_size -ne 2 ] ; then - if [ $do11 = yes ] ; then - echo "Can't run test 11 because the link size ($link_size) is not 2" - exit 1 - fi -fi - -if [ $jit -eq 0 ] ; then - if [ $do12 = "yes" ] ; then - echo "Can't run test 12 because JIT support is not configured" - exit 1 - fi -else - if [ $do13 = "yes" ] ; then - echo "Can't run test 13 because JIT support is configured" - exit 1 - fi -fi - # If no specific tests were requested, select all. Those that are not # relevant will be automatically skipped. @@ -461,8 +392,8 @@ if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \ do26=yes fi -# Handle any explicit skips (again, so that an argument list may consist only -# of explicit skips). +# Handle any explicit skips at this stage, so that an argument list may consist +# only of explicit skips. for i in $skip; do eval do$i=no; done diff --git a/pcre/config-cmake.h.in b/pcre/config-cmake.h.in index ba3b73c6d5d..77d901165d7 100644 --- a/pcre/config-cmake.h.in +++ b/pcre/config-cmake.h.in @@ -5,8 +5,8 @@ #cmakedefine HAVE_SYS_TYPES_H 1 #cmakedefine HAVE_UNISTD_H 1 #cmakedefine HAVE_WINDOWS_H 1 -#cmakedefine HAVE_STDINT_H 1 -#cmakedefine HAVE_INTTYPES_H 1 +#cmakedefine HAVE_STDINT_H 1 +#cmakedefine HAVE_INTTYPES_H 1 #cmakedefine HAVE_TYPE_TRAITS_H 1 #cmakedefine HAVE_BITS_TYPE_TRAITS_H 1 @@ -46,6 +46,7 @@ #define NEWLINE @NEWLINE@ #define POSIX_MALLOC_THRESHOLD @PCRE_POSIX_MALLOC_THRESHOLD@ #define LINK_SIZE @PCRE_LINK_SIZE@ +#define PARENS_NEST_LIMIT @PCRE_PARENS_NEST_LIMIT@ #define MATCH_LIMIT @PCRE_MATCH_LIMIT@ #define MATCH_LIMIT_RECURSION @PCRE_MATCH_LIMIT_RECURSION@ #define PCREGREP_BUFSIZE @PCREGREP_BUFSIZE@ diff --git a/pcre/configure.ac b/pcre/configure.ac index e70ceae2336..5ce6c62c0d3 100644 --- a/pcre/configure.ac +++ b/pcre/configure.ac @@ -9,17 +9,17 @@ dnl The PCRE_PRERELEASE feature is for identifying release candidates. It might dnl be defined as -RC2, for example. For real releases, it should be empty. m4_define(pcre_major, [8]) -m4_define(pcre_minor, [33]) +m4_define(pcre_minor, [34]) m4_define(pcre_prerelease, []) -m4_define(pcre_date, [2013-05-28]) +m4_define(pcre_date, [2013-12-15]) # NOTE: The CMakeLists.txt file searches for the above variables in the first # 50 lines of this file. Please update that if the variables above are moved. # Libtool shared library interface versions (current:revision:age) -m4_define(libpcre_version, [3:1:2]) -m4_define(libpcre16_version, [2:1:2]) -m4_define(libpcre32_version, [0:1:0]) +m4_define(libpcre_version, [3:2:2]) +m4_define(libpcre16_version, [2:2:2]) +m4_define(libpcre32_version, [0:2:0]) m4_define(libpcreposix_version, [0:2:0]) m4_define(libpcrecpp_version, [0:0:0]) @@ -275,6 +275,12 @@ AC_ARG_WITH(link-size, [internal link size (2, 3, or 4 allowed; default=2)]), , with_link_size=2) +# Handle --with-parens-nest-limit=N +AC_ARG_WITH(parens-nest-limit, + AS_HELP_STRING([--with-parens-nest-limit=N], + [nested parentheses limit (default=250)]), + , with_parens_nest_limit=250) + # Handle --with-match-limit=N AC_ARG_WITH(match-limit, AS_HELP_STRING([--with-match-limit=N], @@ -784,6 +790,11 @@ AC_DEFINE_UNQUOTED([POSIX_MALLOC_THRESHOLD], [$with_posix_malloc_threshold], [ faster than using malloc() for each call. The threshold above which the stack is no longer used is defined by POSIX_MALLOC_THRESHOLD.]) +AC_DEFINE_UNQUOTED([PARENS_NEST_LIMIT], [$with_parens_nest_limit], [ + The value of PARENS_NEST_LIMIT specifies the maximum depth of nested + parentheses (of any kind) in a pattern. This limits the amount of system + stack that is used while compiling a pattern.]) + AC_DEFINE_UNQUOTED([MATCH_LIMIT], [$with_match_limit], [ The value of MATCH_LIMIT determines the default number of times the internal match() function can be called during a single execution of @@ -957,7 +968,7 @@ if test "$enable_pcretest_libreadline" = "yes"; then fi fi -# Check for valgrind +# Handle valgrind support if test "$enable_valgrind" = "yes"; then m4_ifdef([PKG_CHECK_MODULES], @@ -965,7 +976,7 @@ if test "$enable_valgrind" = "yes"; then [AC_MSG_ERROR([pkg-config not supported])]) fi -# test code coverage reporting +# Handle code coverage reporting support if test "$enable_coverage" = "yes"; then if test "x$GCC" != "xyes"; then AC_MSG_ERROR([Code coverage reports can only be generated when using GCC]) @@ -996,11 +1007,7 @@ if test "$enable_coverage" = "yes"; then AC_MSG_ERROR([genhtml not found]) fi - AC_DEFINE([SUPPORT_GCOV],[1], [ - Define to allow pcretest and pcregrep to be linked with gcov, so that they - are able to generate code coverage reports.]) - - # And add flags needed for gcov + # Set flags needed for gcov GCOV_CFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage" GCOV_CXXFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage" GCOV_LIBS="-lgcov" @@ -1075,6 +1082,7 @@ $PACKAGE-$VERSION configuration summary: Use stack recursion ............. : ${enable_stack_for_recursion} POSIX mem threshold ............. : ${with_posix_malloc_threshold} Internal link size .............. : ${with_link_size} + Nested parentheses limit ........ : ${with_parens_nest_limit} Match limit ..................... : ${with_match_limit} Match limit recursion ........... : ${with_match_limit_recursion} Build shared libs ............... : ${enable_shared} diff --git a/pcre/doc/html/NON-AUTOTOOLS-BUILD.txt b/pcre/doc/html/NON-AUTOTOOLS-BUILD.txt index 74075f0160a..cddf3e0699b 100644 --- a/pcre/doc/html/NON-AUTOTOOLS-BUILD.txt +++ b/pcre/doc/html/NON-AUTOTOOLS-BUILD.txt @@ -171,8 +171,8 @@ can skip ahead to the CMake section. pcre16_version.c pcre16_xclass.c - (8) If you want to build a 16-bit library (as well as, or instead of the 8-bit - or 32-bit libraries) repeat steps 5-6 with the following files: + (8) If you want to build a 32-bit library (as well as, or instead of the 8-bit + or 16-bit libraries) repeat steps 5-6 with the following files: pcre32_byte_order.c pcre32_chartables.c diff --git a/pcre/doc/html/README.txt b/pcre/doc/html/README.txt index e14935efeba..51197df7213 100644 --- a/pcre/doc/html/README.txt +++ b/pcre/doc/html/README.txt @@ -9,8 +9,10 @@ from: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.zip There is a mailing list for discussion about the development of PCRE at +pcre-dev@exim.org. You can access the archives and subscribe or manage your +subscription here: - pcre-dev@exim.org + https://lists.exim.org/mailman/listinfo/pcre-dev Please read the NEWS file if you are upgrading from a previous release. The contents of this README file are: @@ -112,6 +114,11 @@ contributions provided support for compiling PCRE on various flavours of Windows (I myself do not use Windows). Nowadays there is more Windows support in the standard distribution, so these contibutions have been archived. +A PCRE user maintains downloadable Windows binaries of the pcregrep and +pcretest programs here: + + http://www.rexegg.com/pcregrep-pcretest.html + Building PCRE on non-Unix-like systems -------------------------------------- @@ -262,9 +269,17 @@ library. They are also documented in the pcrebuild man page. on the "configure" command. -. PCRE has a counter that can be set to limit the amount of resources it uses. - If the limit is exceeded during a match, the match fails. The default is ten - million. You can change the default by setting, for example, +. PCRE has a counter that limits the depth of nesting of parentheses in a + pattern. This limits the amount of system stack that a pattern uses when it + is compiled. The default is 250, but you can change it by setting, for + example, + + --with-parens-nest-limit=500 + +. PCRE has a counter that can be set to limit the amount of resources it uses + when matching a pattern. If the limit is exceeded during a match, the match + fails. The default is ten million. You can change the default by setting, for + example, --with-match-limit=500000 @@ -344,7 +359,8 @@ library. They are also documented in the pcrebuild man page. report is generated by running "make coverage". If ccache is installed on your system, it must be disabled when building PCRE for coverage reporting. You can do this by setting the environment variable CCACHE_DISABLE=1 before - running "make" to build PCRE. + running "make" to build PCRE. There is more information about coverage + reporting in the "pcrebuild" documentation. . The pcregrep program currently supports only 8-bit data files, and so requires the 8-bit PCRE library. It is possible to compile pcregrep to use @@ -971,4 +987,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx. Philip Hazel Email local part: ph10 Email domain: cam.ac.uk -Last updated: 28 April 2013 +Last updated: 05 November 2013 diff --git a/pcre/doc/html/pcre-config.html b/pcre/doc/html/pcre-config.html index c2e3ba28ab6..56a80604920 100644 --- a/pcre/doc/html/pcre-config.html +++ b/pcre/doc/html/pcre-config.html @@ -23,8 +23,8 @@ man page, in case the conversion went wrong. <br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br> <P> <b>pcre-config [--prefix] [--exec-prefix] [--version] [--libs]</b> -<b>[--libs16] [--libs32] [--libs-cpp] [--libs-posix]</b> -<b>[--cflags] [--cflags-posix]</b> +<b> [--libs16] [--libs32] [--libs-cpp] [--libs-posix]</b> +<b> [--cflags] [--cflags-posix]</b> </P> <br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br> <P> diff --git a/pcre/doc/html/pcre.html b/pcre/doc/html/pcre.html index 692f651b257..93b129ecd83 100644 --- a/pcre/doc/html/pcre.html +++ b/pcre/doc/html/pcre.html @@ -62,7 +62,7 @@ The current implementation of PCRE corresponds approximately with Perl 5.12, including support for UTF-8/16/32 encoded strings and Unicode general category properties. However, UTF-8/16/32 and Unicode support has to be explicitly enabled; it is not the default. The Unicode tables correspond to Unicode -release 6.2.0. +release 6.3.0. </P> <P> In addition to the Perl-compatible matching function, PCRE contains an diff --git a/pcre/doc/html/pcre16.html b/pcre/doc/html/pcre16.html index 3ade219092c..f00859f0523 100644 --- a/pcre/doc/html/pcre16.html +++ b/pcre/doc/html/pcre16.html @@ -42,126 +42,126 @@ man page, in case the conversion went wrong. <br><a name="SEC1" href="#TOC1">PCRE 16-BIT API BASIC FUNCTIONS</a><br> <P> <b>pcre16 *pcre16_compile(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre16 *pcre16_compile2(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b> -<b>int *<i>errorcodeptr</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> int *<i>errorcodeptr</i>,</b> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre16_extra *pcre16_study(const pcre16 *<i>code</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>);</b> +<br> +<br> <b>void pcre16_free_study(pcre16_extra *<i>extra</i>);</b> -</P> -<P> +<br> +<br> <b>int pcre16_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b> -<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> +<br> +<br> <b>int pcre16_dfa_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b> -<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>int *<i>workspace</i>, int <i>wscount</i>);</b> +<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> int *<i>workspace</i>, int <i>wscount</i>);</b> </P> <br><a name="SEC2" href="#TOC1">PCRE 16-BIT API STRING EXTRACTION FUNCTIONS</a><br> <P> <b>int pcre16_copy_named_substring(const pcre16 *<i>code</i>,</b> -<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b> -<b>PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b> +<b> PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre16_copy_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b> -<b>int <i>buffersize</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b> +<b> int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre16_get_named_substring(const pcre16 *<i>code</i>,</b> -<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b> -<b>PCRE_SPTR16 *<i>stringptr</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b> +<b> PCRE_SPTR16 *<i>stringptr</i>);</b> +<br> +<br> <b>int pcre16_get_stringnumber(const pcre16 *<i>code</i>,</b> -<b>PCRE_SPTR16 <i>name</i>);</b> -</P> -<P> +<b>" PCRE_SPTR16 <i>name</i>);</b> +<br> +<br> <b>int pcre16_get_stringtable_entries(const pcre16 *<i>code</i>,</b> -<b>PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b> +<br> +<br> <b>int pcre16_get_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b> -<b>PCRE_SPTR16 *<i>stringptr</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b> +<b> PCRE_SPTR16 *<i>stringptr</i>);</b> +<br> +<br> <b>int pcre16_get_substring_list(PCRE_SPTR16 <i>subject</i>,</b> -<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b> -</P> -<P> +<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b> +<br> +<br> <b>void pcre16_free_substring(PCRE_SPTR16 <i>stringptr</i>);</b> -</P> -<P> +<br> +<br> <b>void pcre16_free_substring_list(PCRE_SPTR16 *<i>stringptr</i>);</b> </P> <br><a name="SEC3" href="#TOC1">PCRE 16-BIT API AUXILIARY FUNCTIONS</a><br> <P> <b>pcre16_jit_stack *pcre16_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b> -</P> -<P> +<br> +<br> <b>void pcre16_jit_stack_free(pcre16_jit_stack *<i>stack</i>);</b> -</P> -<P> +<br> +<br> <b>void pcre16_assign_jit_stack(pcre16_extra *<i>extra</i>,</b> -<b>pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b> -</P> -<P> +<b> pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b> +<br> +<br> <b>const unsigned char *pcre16_maketables(void);</b> -</P> -<P> +<br> +<br> <b>int pcre16_fullinfo(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b> -<b>int <i>what</i>, void *<i>where</i>);</b> -</P> -<P> +<b> int <i>what</i>, void *<i>where</i>);</b> +<br> +<br> <b>int pcre16_refcount(pcre16 *<i>code</i>, int <i>adjust</i>);</b> -</P> -<P> +<br> +<br> <b>int pcre16_config(int <i>what</i>, void *<i>where</i>);</b> -</P> -<P> +<br> +<br> <b>const char *pcre16_version(void);</b> -</P> -<P> +<br> +<br> <b>int pcre16_pattern_to_host_byte_order(pcre16 *<i>code</i>,</b> -<b>pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> +<b> pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> </P> <br><a name="SEC4" href="#TOC1">PCRE 16-BIT API INDIRECTED FUNCTIONS</a><br> <P> <b>void *(*pcre16_malloc)(size_t);</b> -</P> -<P> +<br> +<br> <b>void (*pcre16_free)(void *);</b> -</P> -<P> +<br> +<br> <b>void *(*pcre16_stack_malloc)(size_t);</b> -</P> -<P> +<br> +<br> <b>void (*pcre16_stack_free)(void *);</b> -</P> -<P> +<br> +<br> <b>int (*pcre16_callout)(pcre16_callout_block *);</b> </P> <br><a name="SEC5" href="#TOC1">PCRE 16-BIT API 16-BIT-ONLY FUNCTION</a><br> <P> <b>int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *<i>output</i>,</b> -<b>PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b> -<b>int <i>keep_boms</i>);</b> +<b> PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b> +<b> int <i>keep_boms</i>);</b> </P> <br><a name="SEC6" href="#TOC1">THE PCRE 16-BIT LIBRARY</a><br> <P> diff --git a/pcre/doc/html/pcre32.html b/pcre/doc/html/pcre32.html index 2155ee88173..f96876e7502 100644 --- a/pcre/doc/html/pcre32.html +++ b/pcre/doc/html/pcre32.html @@ -42,126 +42,125 @@ man page, in case the conversion went wrong. <br><a name="SEC1" href="#TOC1">PCRE 32-BIT API BASIC FUNCTIONS</a><br> <P> <b>pcre32 *pcre32_compile(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre32 *pcre32_compile2(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b> -<b>int *<i>errorcodeptr</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> int *<i>errorcodeptr</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre32_extra *pcre32_study(const pcre32 *<i>code</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>);</b> +<br> +<br> <b>void pcre32_free_study(pcre32_extra *<i>extra</i>);</b> -</P> -<P> +<br> +<br> <b>int pcre32_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b> -<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> -</P> -<P> +<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> +<br> +<br> <b>int pcre32_dfa_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b> -<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>int *<i>workspace</i>, int <i>wscount</i>);</b> +<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> int *<i>workspace</i>, int <i>wscount</i>);</b> </P> <br><a name="SEC2" href="#TOC1">PCRE 32-BIT API STRING EXTRACTION FUNCTIONS</a><br> <P> <b>int pcre32_copy_named_substring(const pcre32 *<i>code</i>,</b> -<b>PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b> -<b>PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b> -</P> -<P> +<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b> +<b> PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre32_copy_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b> -<b>int <i>buffersize</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b> +<b> int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre32_get_named_substring(const pcre32 *<i>code</i>,</b> -<b>PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b> -<b>PCRE_SPTR32 *<i>stringptr</i>);</b> -</P> -<P> +<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b> +<b> PCRE_SPTR32 *<i>stringptr</i>);</b> +<br> +<br> <b>int pcre32_get_stringnumber(const pcre32 *<i>code</i>,</b> -<b>PCRE_SPTR32 <i>name</i>);</b> -</P> -<P> +<b> PCRE_SPTR32 <i>name</i>);</b> +<br> +<br> <b>int pcre32_get_stringtable_entries(const pcre32 *<i>code</i>,</b> -<b>PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b> -</P> -<P> +<b> PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b> +<br> +<br> <b>int pcre32_get_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b> -<b>PCRE_SPTR32 *<i>stringptr</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b> +<b> PCRE_SPTR32 *<i>stringptr</i>);</b> +<br> +<br> <b>int pcre32_get_substring_list(PCRE_SPTR32 <i>subject</i>,</b> -<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b> -</P> -<P> +<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b> +<br> +<br> <b>void pcre32_free_substring(PCRE_SPTR32 <i>stringptr</i>);</b> -</P> -<P> +<br> +<br> <b>void pcre32_free_substring_list(PCRE_SPTR32 *<i>stringptr</i>);</b> </P> <br><a name="SEC3" href="#TOC1">PCRE 32-BIT API AUXILIARY FUNCTIONS</a><br> <P> <b>pcre32_jit_stack *pcre32_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b> -</P> -<P> +<br> +<br> <b>void pcre32_jit_stack_free(pcre32_jit_stack *<i>stack</i>);</b> -</P> -<P> +<br> +<br> <b>void pcre32_assign_jit_stack(pcre32_extra *<i>extra</i>,</b> -<b>pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b> -</P> -<P> +<b> pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b> +<br> +<br> <b>const unsigned char *pcre32_maketables(void);</b> -</P> -<P> +<br> +<br> <b>int pcre32_fullinfo(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b> -<b>int <i>what</i>, void *<i>where</i>);</b> -</P> -<P> +<b> int <i>what</i>, void *<i>where</i>);</b> +<br> +<br> <b>int pcre32_refcount(pcre32 *<i>code</i>, int <i>adjust</i>);</b> -</P> -<P> +<br> +<br> <b>int pcre32_config(int <i>what</i>, void *<i>where</i>);</b> -</P> -<P> +<br> +<br> <b>const char *pcre32_version(void);</b> -</P> -<P> +<br> +<br> <b>int pcre32_pattern_to_host_byte_order(pcre32 *<i>code</i>,</b> -<b>pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> +<b> pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> </P> <br><a name="SEC4" href="#TOC1">PCRE 32-BIT API INDIRECTED FUNCTIONS</a><br> <P> <b>void *(*pcre32_malloc)(size_t);</b> -</P> -<P> +<br> +<br> <b>void (*pcre32_free)(void *);</b> -</P> -<P> +<br> +<br> <b>void *(*pcre32_stack_malloc)(size_t);</b> -</P> -<P> +<br> +<br> <b>void (*pcre32_stack_free)(void *);</b> -</P> -<P> +<br> +<br> <b>int (*pcre32_callout)(pcre32_callout_block *);</b> </P> <br><a name="SEC5" href="#TOC1">PCRE 32-BIT API 32-BIT-ONLY FUNCTION</a><br> <P> <b>int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *<i>output</i>,</b> -<b>PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b> -<b>int <i>keep_boms</i>);</b> +<b> PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b> +<b> int <i>keep_boms</i>);</b> </P> <br><a name="SEC6" href="#TOC1">THE PCRE 32-BIT LIBRARY</a><br> <P> diff --git a/pcre/doc/html/pcre_assign_jit_stack.html b/pcre/doc/html/pcre_assign_jit_stack.html index d77d4e1c9b4..b2eef704db8 100644 --- a/pcre/doc/html/pcre_assign_jit_stack.html +++ b/pcre/doc/html/pcre_assign_jit_stack.html @@ -20,15 +20,15 @@ SYNOPSIS </P> <P> <b>void pcre_assign_jit_stack(pcre_extra *<i>extra</i>,</b> -<b>pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b> -</P> -<P> +<b> pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b> +<br> +<br> <b>void pcre16_assign_jit_stack(pcre16_extra *<i>extra</i>,</b> -<b>pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b> -</P> -<P> +<b> pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b> +<br> +<br> <b>void pcre32_assign_jit_stack(pcre32_extra *<i>extra</i>,</b> -<b>pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b> +<b> pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_compile.html b/pcre/doc/html/pcre_compile.html index 012147516cf..95b4bec63c6 100644 --- a/pcre/doc/html/pcre_compile.html +++ b/pcre/doc/html/pcre_compile.html @@ -20,18 +20,18 @@ SYNOPSIS </P> <P> <b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre16 *pcre16_compile(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre32 *pcre32_compile(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> </P> <br><b> DESCRIPTION @@ -65,6 +65,7 @@ The option bits are: PCRE_FIRSTLINE Force matching to be before newline PCRE_JAVASCRIPT_COMPAT JavaScript compatibility PCRE_MULTILINE ^ and $ match newlines within data + PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF) PCRE_NEWLINE_ANY Recognize any Unicode newline sequence PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline sequences @@ -73,6 +74,8 @@ The option bits are: PCRE_NEWLINE_LF Set LF as the newline sequence PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren- theses (named ones available) + PCRE_NO_AUTO_POSSESS Disable auto-possessification + PCRE_NO_START_OPTIMIZE Disable match-time start optimizations PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16 validity (only relevant if PCRE_UTF16 is set) diff --git a/pcre/doc/html/pcre_compile2.html b/pcre/doc/html/pcre_compile2.html index 7d76bd9cae0..9cd56a237ba 100644 --- a/pcre/doc/html/pcre_compile2.html +++ b/pcre/doc/html/pcre_compile2.html @@ -20,21 +20,21 @@ SYNOPSIS </P> <P> <b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b> -<b>int *<i>errorcodeptr</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> int *<i>errorcodeptr</i>,</b> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre16 *pcre16_compile2(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b> -<b>int *<i>errorcodeptr</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> int *<i>errorcodeptr</i>,</b> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre32 *pcre32_compile2(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b> -<b>int *<i>errorcodeptr</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> +<b>" int *<i>errorcodeptr</i>,£</b> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> </P> <br><b> DESCRIPTION @@ -69,6 +69,7 @@ The option bits are: PCRE_FIRSTLINE Force matching to be before newline PCRE_JAVASCRIPT_COMPAT JavaScript compatibility PCRE_MULTILINE ^ and $ match newlines within data + PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF) PCRE_NEWLINE_ANY Recognize any Unicode newline sequence PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline sequences @@ -77,6 +78,8 @@ The option bits are: PCRE_NEWLINE_LF Set LF as the newline sequence PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren- theses (named ones available) + PCRE_NO_AUTO_POSSESS Disable auto-possessification + PCRE_NO_START_OPTIMIZE Disable match-time start optimizations PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16 validity (only relevant if PCRE_UTF16 is set) diff --git a/pcre/doc/html/pcre_config.html b/pcre/doc/html/pcre_config.html index fc10d183933..bcdcdded708 100644 --- a/pcre/doc/html/pcre_config.html +++ b/pcre/doc/html/pcre_config.html @@ -48,6 +48,7 @@ point to an unsigned long integer. The available codes are: target architecture for the JIT compiler, or NULL if there is no JIT support PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4 + PCRE_CONFIG_PARENS_LIMIT Parentheses nesting limit PCRE_CONFIG_MATCH_LIMIT Internal resource limit PCRE_CONFIG_MATCH_LIMIT_RECURSION Internal recursion depth limit diff --git a/pcre/doc/html/pcre_copy_named_substring.html b/pcre/doc/html/pcre_copy_named_substring.html index ae4f6905ccc..77b48043cd2 100644 --- a/pcre/doc/html/pcre_copy_named_substring.html +++ b/pcre/doc/html/pcre_copy_named_substring.html @@ -20,21 +20,21 @@ SYNOPSIS </P> <P> <b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b> -<b>const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b> -<b>char *<i>buffer</i>, int <i>buffersize</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b> +<b> char *<i>buffer</i>, int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre16_copy_named_substring(const pcre16 *<i>code</i>,</b> -<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b> -<b>PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b> +<b> PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre32_copy_named_substring(const pcre32 *<i>code</i>,</b> -<b>PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b> -<b>PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b> +<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b> +<b> PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_copy_substring.html b/pcre/doc/html/pcre_copy_substring.html index 12bfb636a77..ecaebe85338 100644 --- a/pcre/doc/html/pcre_copy_substring.html +++ b/pcre/doc/html/pcre_copy_substring.html @@ -20,18 +20,18 @@ SYNOPSIS </P> <P> <b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b> -<b>int <i>buffersize</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b> +<b> int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre16_copy_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b> -<b>int <i>buffersize</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b> +<b> int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre32_copy_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b> -<b>int <i>buffersize</i>);</b> +<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b> +<b> int <i>buffersize</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_dfa_exec.html b/pcre/doc/html/pcre_dfa_exec.html index e91b670eac6..5fff6a7e0a5 100644 --- a/pcre/doc/html/pcre_dfa_exec.html +++ b/pcre/doc/html/pcre_dfa_exec.html @@ -20,21 +20,21 @@ SYNOPSIS </P> <P> <b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>int *<i>workspace</i>, int <i>wscount</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> int *<i>workspace</i>, int <i>wscount</i>);</b> +<br> +<br> <b>int pcre16_dfa_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b> -<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>int *<i>workspace</i>, int <i>wscount</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> int *<i>workspace</i>, int <i>wscount</i>);</b> +<br> +<br> <b>int pcre32_dfa_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b> -<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>int *<i>workspace</i>, int <i>wscount</i>);</b> +<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> int *<i>workspace</i>, int <i>wscount</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_exec.html b/pcre/doc/html/pcre_exec.html index 0cc3bb7bb8b..18e1a13ff8d 100644 --- a/pcre/doc/html/pcre_exec.html +++ b/pcre/doc/html/pcre_exec.html @@ -20,18 +20,18 @@ SYNOPSIS </P> <P> <b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> +<br> +<br> <b>int pcre16_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b> -<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> +<br> +<br> <b>int pcre32_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b> -<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> +<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_fullinfo.html b/pcre/doc/html/pcre_fullinfo.html index d353432bc52..b88fc1155bd 100644 --- a/pcre/doc/html/pcre_fullinfo.html +++ b/pcre/doc/html/pcre_fullinfo.html @@ -20,15 +20,15 @@ SYNOPSIS </P> <P> <b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>int <i>what</i>, void *<i>where</i>);</b> -</P> -<P> +<b> int <i>what</i>, void *<i>where</i>);</b> +<br> +<br> <b>int pcre16_fullinfo(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b> -<b>int <i>what</i>, void *<i>where</i>);</b> -</P> -<P> +<b> int <i>what</i>, void *<i>where</i>);</b> +<br> +<br> <b>int pcre32_fullinfo(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b> -<b>int <i>what</i>, void *<i>where</i>);</b> +<b> int <i>what</i>, void *<i>where</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_get_named_substring.html b/pcre/doc/html/pcre_get_named_substring.html index 6150ad71424..72924d9b252 100644 --- a/pcre/doc/html/pcre_get_named_substring.html +++ b/pcre/doc/html/pcre_get_named_substring.html @@ -20,21 +20,21 @@ SYNOPSIS </P> <P> <b>int pcre_get_named_substring(const pcre *<i>code</i>,</b> -<b>const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b> -<b>const char **<i>stringptr</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b> +<b> const char **<i>stringptr</i>);</b> +<br> +<br> <b>int pcre16_get_named_substring(const pcre16 *<i>code</i>,</b> -<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b> -<b>PCRE_SPTR16 *<i>stringptr</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b> +<b> PCRE_SPTR16 *<i>stringptr</i>);</b> +<br> +<br> <b>int pcre32_get_named_substring(const pcre32 *<i>code</i>,</b> -<b>PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b> -<b>PCRE_SPTR32 *<i>stringptr</i>);</b> +<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b> +<b> PCRE_SPTR32 *<i>stringptr</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_get_stringnumber.html b/pcre/doc/html/pcre_get_stringnumber.html index 08967de3f7d..7324d782e72 100644 --- a/pcre/doc/html/pcre_get_stringnumber.html +++ b/pcre/doc/html/pcre_get_stringnumber.html @@ -20,15 +20,15 @@ SYNOPSIS </P> <P> <b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b> -<b>const char *<i>name</i>);</b> -</P> -<P> +<b> const char *<i>name</i>);</b> +<br> +<br> <b>int pcre16_get_stringnumber(const pcre16 *<i>code</i>,</b> -<b>PCRE_SPTR16 <i>name</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>name</i>);</b> +<br> +<br> <b>int pcre32_get_stringnumber(const pcre32 *<i>code</i>,</b> -<b>PCRE_SPTR32 <i>name</i>);</b> +<b> PCRE_SPTR32 <i>name</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_get_stringtable_entries.html b/pcre/doc/html/pcre_get_stringtable_entries.html index 38f9c0c902f..79906798e68 100644 --- a/pcre/doc/html/pcre_get_stringtable_entries.html +++ b/pcre/doc/html/pcre_get_stringtable_entries.html @@ -20,15 +20,15 @@ SYNOPSIS </P> <P> <b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b> -<b>const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b> -</P> -<P> +<b> const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b> +<br> +<br> <b>int pcre16_get_stringtable_entries(const pcre16 *<i>code</i>,</b> -<b>PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b> +<br> +<br> <b>int pcre32_get_stringtable_entries(const pcre32 *<i>code</i>,</b> -<b>PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b> +<b> PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_get_substring.html b/pcre/doc/html/pcre_get_substring.html index 2a5a610f971..1a8e4f5a499 100644 --- a/pcre/doc/html/pcre_get_substring.html +++ b/pcre/doc/html/pcre_get_substring.html @@ -20,18 +20,18 @@ SYNOPSIS </P> <P> <b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b> -<b>const char **<i>stringptr</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b> +<b> const char **<i>stringptr</i>);</b> +<br> +<br> <b>int pcre16_get_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b> -<b>PCRE_SPTR16 *<i>stringptr</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b> +<b> PCRE_SPTR16 *<i>stringptr</i>);</b> +<br> +<br> <b>int pcre32_get_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b> -<b>PCRE_SPTR32 *<i>stringptr</i>);</b> +<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b> +<b> PCRE_SPTR32 *<i>stringptr</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_get_substring_list.html b/pcre/doc/html/pcre_get_substring_list.html index 85edef4b9f4..7e8c6bc8584 100644 --- a/pcre/doc/html/pcre_get_substring_list.html +++ b/pcre/doc/html/pcre_get_substring_list.html @@ -20,15 +20,15 @@ SYNOPSIS </P> <P> <b>int pcre_get_substring_list(const char *<i>subject</i>,</b> -<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b> -</P> -<P> +<b> int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b> +<br> +<br> <b>int pcre16_get_substring_list(PCRE_SPTR16 <i>subject</i>,</b> -<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b> -</P> -<P> +<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b> +<br> +<br> <b>int pcre32_get_substring_list(PCRE_SPTR32 <i>subject</i>,</b> -<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b> +<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_jit_exec.html b/pcre/doc/html/pcre_jit_exec.html index 0c63503a997..4ebb0cbcac4 100644 --- a/pcre/doc/html/pcre_jit_exec.html +++ b/pcre/doc/html/pcre_jit_exec.html @@ -20,21 +20,21 @@ SYNOPSIS </P> <P> <b>int pcre_jit_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>pcre_jit_stack *<i>jstack</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> pcre_jit_stack *<i>jstack</i>);</b> +<br> +<br> <b>int pcre16_jit_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b> -<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>pcre_jit_stack *<i>jstack</i>);</b> -</P> -<P> +<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> pcre_jit_stack *<i>jstack</i>);</b> +<br> +<br> <b>int pcre32_jit_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b> -<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>pcre_jit_stack *<i>jstack</i>);</b> +<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> pcre_jit_stack *<i>jstack</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_jit_stack_alloc.html b/pcre/doc/html/pcre_jit_stack_alloc.html index 4153ee594ff..23ba450750c 100644 --- a/pcre/doc/html/pcre_jit_stack_alloc.html +++ b/pcre/doc/html/pcre_jit_stack_alloc.html @@ -20,15 +20,15 @@ SYNOPSIS </P> <P> <b>pcre_jit_stack *pcre_jit_stack_alloc(int <i>startsize</i>,</b> -<b>int <i>maxsize</i>);</b> -</P> -<P> +<b> int <i>maxsize</i>);</b> +<br> +<br> <b>pcre16_jit_stack *pcre16_jit_stack_alloc(int <i>startsize</i>,</b> -<b>int <i>maxsize</i>);</b> -</P> -<P> +<b> int <i>maxsize</i>);</b> +<br> +<br> <b>pcre32_jit_stack *pcre32_jit_stack_alloc(int <i>startsize</i>,</b> -<b>int <i>maxsize</i>);</b> +<b> int <i>maxsize</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_pattern_to_host_byte_order.html b/pcre/doc/html/pcre_pattern_to_host_byte_order.html index 68d6f5a10a3..1b1c80372b8 100644 --- a/pcre/doc/html/pcre_pattern_to_host_byte_order.html +++ b/pcre/doc/html/pcre_pattern_to_host_byte_order.html @@ -20,15 +20,15 @@ SYNOPSIS </P> <P> <b>int pcre_pattern_to_host_byte_order(pcre *<i>code</i>,</b> -<b>pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> -</P> -<P> +<b> pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> +<br> +<br> <b>int pcre16_pattern_to_host_byte_order(pcre16 *<i>code</i>,</b> -<b>pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> -</P> -<P> +<b> pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> +<br> +<br> <b>int pcre32_pattern_to_host_byte_order(pcre32 *<i>code</i>,</b> -<b>pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> +<b> pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_study.html b/pcre/doc/html/pcre_study.html index 2baf54c4689..af82f11409d 100644 --- a/pcre/doc/html/pcre_study.html +++ b/pcre/doc/html/pcre_study.html @@ -20,15 +20,15 @@ SYNOPSIS </P> <P> <b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>);</b> +<br> +<br> <b>pcre16_extra *pcre16_study(const pcre16 *<i>code</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>);</b> +<br> +<br> <b>pcre32_extra *pcre32_study(const pcre32 *<i>code</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>);</b> +<b> const char **<i>errptr</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_utf16_to_host_byte_order.html b/pcre/doc/html/pcre_utf16_to_host_byte_order.html index 164e2365a15..18e7788f682 100644 --- a/pcre/doc/html/pcre_utf16_to_host_byte_order.html +++ b/pcre/doc/html/pcre_utf16_to_host_byte_order.html @@ -20,8 +20,8 @@ SYNOPSIS </P> <P> <b>int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *<i>output</i>,</b> -<b>PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b> -<b>int <i>keep_boms</i>);</b> +<b> PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b> +<b> int <i>keep_boms</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcre_utf32_to_host_byte_order.html b/pcre/doc/html/pcre_utf32_to_host_byte_order.html index 967c00db802..772ae40cd92 100644 --- a/pcre/doc/html/pcre_utf32_to_host_byte_order.html +++ b/pcre/doc/html/pcre_utf32_to_host_byte_order.html @@ -20,8 +20,8 @@ SYNOPSIS </P> <P> <b>int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *<i>output</i>,</b> -<b>PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b> -<b>int <i>keep_boms</i>);</b> +<b> PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b> +<b> int <i>keep_boms</i>);</b> </P> <br><b> DESCRIPTION diff --git a/pcre/doc/html/pcreapi.html b/pcre/doc/html/pcreapi.html index 2a00d9ba041..abc3d2663fc 100644 --- a/pcre/doc/html/pcreapi.html +++ b/pcre/doc/html/pcreapi.html @@ -46,125 +46,125 @@ man page, in case the conversion went wrong. <br><a name="SEC1" href="#TOC1">PCRE NATIVE API BASIC FUNCTIONS</a><br> <P> <b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b> -<b>int *<i>errorcodeptr</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> -</P> -<P> +<b> int *<i>errorcodeptr</i>,</b> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>);</b> -</P> -<P> +<b> const char **<i>errptr</i>);</b> +<br> +<br> <b>void pcre_free_study(pcre_extra *<i>extra</i>);</b> -</P> -<P> +<br> +<br> <b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> +<br> +<br> <b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>int *<i>workspace</i>, int <i>wscount</i>);</b> +<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> int *<i>workspace</i>, int <i>wscount</i>);</b> </P> <br><a name="SEC2" href="#TOC1">PCRE NATIVE API STRING EXTRACTION FUNCTIONS</a><br> <P> <b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b> -<b>const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b> -<b>char *<i>buffer</i>, int <i>buffersize</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b> +<b> char *<i>buffer</i>, int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b> -<b>int <i>buffersize</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b> +<b> int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre_get_named_substring(const pcre *<i>code</i>,</b> -<b>const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b> -<b>const char **<i>stringptr</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b> +<b> const char **<i>stringptr</i>);</b> +<br> +<br> <b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b> -<b>const char *<i>name</i>);</b> -</P> -<P> +<b> const char *<i>name</i>);</b> +<br> +<br> <b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b> -<b>const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b> -</P> -<P> +<b> const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b> +<br> +<br> <b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b> -<b>const char **<i>stringptr</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b> +<b> const char **<i>stringptr</i>);</b> +<br> +<br> <b>int pcre_get_substring_list(const char *<i>subject</i>,</b> -<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b> -</P> -<P> +<b> int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b> +<br> +<br> <b>void pcre_free_substring(const char *<i>stringptr</i>);</b> -</P> -<P> +<br> +<br> <b>void pcre_free_substring_list(const char **<i>stringptr</i>);</b> </P> <br><a name="SEC3" href="#TOC1">PCRE NATIVE API AUXILIARY FUNCTIONS</a><br> <P> <b>int pcre_jit_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>pcre_jit_stack *<i>jstack</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> pcre_jit_stack *<i>jstack</i>);</b> +<br> +<br> <b>pcre_jit_stack *pcre_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b> -</P> -<P> +<br> +<br> <b>void pcre_jit_stack_free(pcre_jit_stack *<i>stack</i>);</b> -</P> -<P> +<br> +<br> <b>void pcre_assign_jit_stack(pcre_extra *<i>extra</i>,</b> -<b>pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b> -</P> -<P> +<b> pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b> +<br> +<br> <b>const unsigned char *pcre_maketables(void);</b> -</P> -<P> +<br> +<br> <b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>int <i>what</i>, void *<i>where</i>);</b> -</P> -<P> +<b> int <i>what</i>, void *<i>where</i>);</b> +<br> +<br> <b>int pcre_refcount(pcre *<i>code</i>, int <i>adjust</i>);</b> -</P> -<P> +<br> +<br> <b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b> -</P> -<P> +<br> +<br> <b>const char *pcre_version(void);</b> -</P> -<P> +<br> +<br> <b>int pcre_pattern_to_host_byte_order(pcre *<i>code</i>,</b> -<b>pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> +<b> pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b> </P> <br><a name="SEC4" href="#TOC1">PCRE NATIVE API INDIRECTED FUNCTIONS</a><br> <P> <b>void *(*pcre_malloc)(size_t);</b> -</P> -<P> +<br> +<br> <b>void (*pcre_free)(void *);</b> -</P> -<P> +<br> +<br> <b>void *(*pcre_stack_malloc)(size_t);</b> -</P> -<P> +<br> +<br> <b>void (*pcre_stack_free)(void *);</b> -</P> -<P> +<br> +<br> <b>int (*pcre_callout)(pcre_callout_block *);</b> </P> <br><a name="SEC5" href="#TOC1">PCRE 8-BIT, 16-BIT, AND 32-BIT LIBRARIES</a><br> @@ -484,6 +484,13 @@ the <a href="pcreposix.html"><b>pcreposix</b></a> documentation. <pre> + PCRE_CONFIG_PARENS_LIMIT +</pre> +The output is a long integer that gives the maximum depth of nesting of +parentheses (of any kind) in a pattern. This limit is imposed to cap the amount +of system stack used when a pattern is compiled. It is specified when PCRE is +built; the default is 250. +<pre> PCRE_CONFIG_MATCH_LIMIT </pre> The output is a long integer that gives the default limit for the number of @@ -509,12 +516,14 @@ avoiding the use of the stack. <br><a name="SEC11" href="#TOC1">COMPILING A PATTERN</a><br> <P> <b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> +<br> +<br> <b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b> -<b>int *<i>errorcodeptr</i>,</b> -<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b> -<b>const unsigned char *<i>tableptr</i>);</b> +<b> int *<i>errorcodeptr</i>,</b> +<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b> +<b> const unsigned char *<i>tableptr</i>);</b> </P> <P> Either of the functions <b>pcre_compile()</b> or <b>pcre_compile2()</b> can be @@ -580,8 +589,9 @@ If the final argument, <i>tableptr</i>, is NULL, PCRE uses a default set of character tables that are built when PCRE is compiled, using the default C locale. Otherwise, <i>tableptr</i> must be an address that is the result of a call to <b>pcre_maketables()</b>. This value is stored with the compiled -pattern, and used again by <b>pcre_exec()</b>, unless another table pointer is -passed to it. For more discussion, see the section on locale support below. +pattern, and used again by <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b> when the +pattern is matched. For more discussion, see the section on locale support +below. </P> <P> This code fragment shows a typical straightforward call to <b>pcre_compile()</b>: @@ -666,12 +676,24 @@ documentation. <pre> PCRE_EXTENDED </pre> -If this bit is set, white space data characters in the pattern are totally -ignored except when escaped or inside a character class. White space does not -include the VT character (code 11). In addition, characters between an -unescaped # outside a character class and the next newline, inclusive, are also -ignored. This is equivalent to Perl's /x option, and it can be changed within a -pattern by a (?x) option setting. +If this bit is set, most white space characters in the pattern are totally +ignored except when escaped or inside a character class. However, white space +is not allowed within sequences such as (?> that introduce various +parenthesized subpatterns, nor within a numerical quantifier such as {1,3}. +However, ignorable white space is permitted between an item and a following +quantifier and between a quantifier and a following + that indicates +possessiveness. +</P> +<P> +White space did not used to include the VT character (code 11), because Perl +did not treat this character as white space. However, Perl changed at release +5.18, so PCRE followed at release 8.34, and VT is now treated as white space. +</P> +<P> +PCRE_EXTENDED also causes characters between an unescaped # outside a character +class and the next newline, inclusive, to be ignored. PCRE_EXTENDED is +equivalent to Perl's /x option, and it can be changed within a pattern by a +(?x) option setting. </P> <P> Which characters are interpreted as newlines is controlled by the options @@ -825,6 +847,15 @@ were followed by ?: but named parentheses can still be used for capturing (and they acquire numbers in the usual way). There is no equivalent of this option in Perl. <pre> + PCRE_NO_AUTO_POSSESS +</pre> +If this option is set, it disables "auto-possessification". This is an +optimization that, for example, turns a+b into a++b in order to avoid +backtracks into a+ that can never be successful. However, if callouts are in +use, auto-possessification means that some of them are never taken. You can set +this option if you want the matching functions to do a full unoptimized search +and run all the callouts, but it is mainly provided for testing purposes. +<pre> PCRE_NO_START_OPTIMIZE </pre> This is an option that acts at matching time; that is, it is really an option @@ -875,10 +906,10 @@ page. If an invalid UTF-8 sequence is found, <b>pcre_compile()</b> returns an error. If you already know that your pattern is valid, and you want to skip this check for performance reasons, you can set the PCRE_NO_UTF8_CHECK option. When it is set, the effect of passing an invalid UTF-8 string as a pattern is -undefined. It may cause your program to crash. Note that this option can also -be passed to <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b>, to suppress the -validity checking of subject strings only. If the same string is being matched -many times, the option can be safely set for the second and subsequent +undefined. It may cause your program to crash or loop. Note that this option +can also be passed to <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b>, to suppress +the validity checking of subject strings only. If the same string is being +matched many times, the option can be safely set for the second and subsequent matchings to improve performance. </P> <br><a name="SEC12" href="#TOC1">COMPILATION ERROR CODES</a><br> @@ -923,7 +954,7 @@ have fallen out of use. To avoid confusion, they have not been re-used. 31 POSIX collating elements are not supported 32 this version of PCRE is compiled without UTF support 33 [this code is not in use] - 34 character value in \x{...} sequence is too large + 34 character value in \x{} or \o{} is too large 35 invalid condition (?(0) 36 \C not allowed in lookbehind assertion 37 PCRE does not support \L, \l, \N{name}, \U, or \u @@ -971,14 +1002,20 @@ have fallen out of use. To avoid confusion, they have not been re-used. 75 name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN) 76 character value in \u.... sequence is too large 77 invalid UTF-32 string (specifically UTF-32) + 78 setting UTF is disabled by the application + 79 non-hex character in \x{} (closing brace missing?) + 80 non-octal character in \o{} (closing brace missing?) + 81 missing opening brace after \o + 82 parentheses are too deeply nested + 83 invalid range in character class </pre> The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may be used if the limits were changed when PCRE was built. <a name="studyingapattern"></a></P> <br><a name="SEC13" href="#TOC1">STUDYING A PATTERN</a><br> <P> -<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i></b> -<b>const char **<i>errptr</i>);</b> +<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b> +<b> const char **<i>errptr</i>);</b> </P> <P> If a compiled pattern is going to be used several times, it is worth spending @@ -1101,15 +1138,18 @@ There is a longer discussion of PCRE_NO_START_OPTIMIZE <P> PCRE handles caseless matching, and determines whether characters are letters, digits, or whatever, by reference to a set of tables, indexed by character -value. When running in UTF-8 mode, this applies only to characters -with codes less than 128. By default, higher-valued codes never match escapes -such as \w or \d, but they can be tested with \p if PCRE is built with -Unicode character property support. Alternatively, the PCRE_UCP option can be -set at compile time; this causes \w and friends to use Unicode property -support instead of built-in tables. The use of locales with Unicode is -discouraged. If you are handling characters with codes greater than 128, you -should either use UTF-8 and Unicode, or use locales, but not try to mix the -two. +code point. When running in UTF-8 mode, or in the 16- or 32-bit libraries, this +applies only to characters with code points less than 256. By default, +higher-valued code points never match escapes such as \w or \d. However, if +PCRE is built with Unicode property support, all characters can be tested with +\p and \P, or, alternatively, the PCRE_UCP option can be set when a pattern +is compiled; this causes \w and friends to use Unicode property support +instead of the built-in tables. +</P> +<P> +The use of locales with Unicode is discouraged. If you are handling characters +with code points greater than 128, you should either use Unicode support, or +use locales, but not try to mix the two. </P> <P> PCRE contains an internal set of tables that are used when the final argument @@ -1127,10 +1167,10 @@ for this locale support is expected to die away. <P> External tables are built by calling the <b>pcre_maketables()</b> function, which has no arguments, in the relevant locale. The result can then be passed -to <b>pcre_compile()</b> or <b>pcre_exec()</b> as often as necessary. For -example, to build and use tables that are appropriate for the French locale -(where accented characters with values greater than 128 are treated as letters), -the following code could be used: +to <b>pcre_compile()</b> as often as necessary. For example, to build and use +tables that are appropriate for the French locale (where accented characters +with values greater than 128 are treated as letters), the following code could +be used: <pre> setlocale(LC_CTYPE, "fr_FR"); tables = pcre_maketables(); @@ -1148,21 +1188,25 @@ needed. <P> The pointer that is passed to <b>pcre_compile()</b> is saved with the compiled pattern, and the same tables are used via this pointer by <b>pcre_study()</b> -and normally also by <b>pcre_exec()</b>. Thus, by default, for any single +and also by <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b>. Thus, for any single pattern, compilation, studying and matching all happen in the same locale, but -different patterns can be compiled in different locales. +different patterns can be processed in different locales. </P> <P> It is possible to pass a table pointer or NULL (indicating the use of the -internal tables) to <b>pcre_exec()</b>. Although not intended for this purpose, -this facility could be used to match a pattern in a different locale from the -one in which it was compiled. Passing table pointers at run time is discussed -below in the section on matching a pattern. +internal tables) to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b> (see the +discussion below in the section on matching a pattern). This facility is +provided for use with pre-compiled patterns that have been saved and reloaded. +Character tables are not saved with patterns, so if a non-standard table was +used at compile time, it must be provided again when the reloaded pattern is +matched. Attempting to use this facility to match a pattern in a different +locale from the one in which it was compiled is likely to lead to anomalous +(usually incorrect) results. <a name="infoaboutpattern"></a></P> <br><a name="SEC15" href="#TOC1">INFORMATION ABOUT A PATTERN</a><br> <P> <b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>int <i>what</i>, void *<i>where</i>);</b> +<b> int <i>what</i>, void *<i>where</i>);</b> </P> <P> The <b>pcre_fullinfo()</b> function returns information about a compiled @@ -1303,10 +1347,15 @@ is -1. </P> <P> Since for the 32-bit library using the non-UTF-32 mode, this function is unable -to return the full 32-bit range of the character, this value is deprecated; +to return the full 32-bit range of characters, this value is deprecated; instead the PCRE_INFO_REQUIREDCHARFLAGS and PCRE_INFO_REQUIREDCHAR values should be used. <pre> + PCRE_INFO_MATCH_EMPTY +</pre> +Return 1 if the pattern can match an empty string, otherwise 0. The fourth +argument should point to an <b>int</b> variable. +<pre> PCRE_INFO_MATCHLIMIT </pre> If the pattern set a match limit by including an item of the form @@ -1364,16 +1413,18 @@ contains the parenthesis number. The rest of the entry is the corresponding name, zero terminated. </P> <P> -The names are in alphabetical order. Duplicate names may appear if (?| is used -to create multiple groups with the same number, as described in the +The names are in alphabetical order. If (?| is used to create multiple groups +with the same number, as described in the <a href="pcrepattern.html#dupsubpatternnumber">section on duplicate subpattern numbers</a> in the <a href="pcrepattern.html"><b>pcrepattern</b></a> -page. Duplicate names for subpatterns with different numbers are permitted only -if PCRE_DUPNAMES is set. In all cases of duplicate names, they appear in the -table in the order in which they were found in the pattern. In the absence of -(?| this is the order of increasing number; when (?| is used this is not -necessarily the case because later subpatterns may have lower numbers. +page, the groups may be given the same name, but there is only one entry in the +table. Different names for groups of the same number are not permitted. +Duplicate names for subpatterns with different numbers are permitted, +but only if PCRE_DUPNAMES is set. They appear in the table in the order in +which they were found in the pattern. In the absence of (?| this is the order +of increasing number; when (?| is used this is not necessarily the case because +later subpatterns may have lower numbers. </P> <P> As a simple example of the name/number table, consider the following pattern @@ -1487,30 +1538,14 @@ returned. For anchored patterns, 0 is returned. <pre> PCRE_INFO_FIRSTCHARACTER </pre> -Return the fixed first character value, if PCRE_INFO_FIRSTCHARACTERFLAGS -returned 1; otherwise returns 0. The fourth argument should point to an -<b>uint_t</b> variable. +Return the fixed first character value in the situation where +PCRE_INFO_FIRSTCHARACTERFLAGS returns 1; otherwise return 0. The fourth +argument should point to an <b>uint_t</b> variable. </P> <P> In the 8-bit library, the value is always less than 256. In the 16-bit library the value can be up to 0xffff. In the 32-bit library in UTF-32 mode the value can be up to 0x10ffff, and up to 0xffffffff when not using UTF-32 mode. -</P> -<P> -If there is no fixed first value, and if either -<br> -<br> -(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch -starts with "^", or -<br> -<br> -(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set -(if it were set, the pattern would be anchored), -<br> -<br> --1 is returned, indicating that the pattern matches only at the start of a -subject string or after any newline within the string. Otherwise -2 is -returned. For anchored patterns, -2 is returned. <pre> PCRE_INFO_REQUIREDCHARFLAGS </pre> @@ -1559,8 +1594,8 @@ is different. (This seems a highly unlikely scenario.) <br><a name="SEC17" href="#TOC1">MATCHING A PATTERN: THE TRADITIONAL FUNCTION</a><br> <P> <b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> +<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b> </P> <P> The function <b>pcre_exec()</b> is called to match a subject string against a @@ -1723,17 +1758,22 @@ and is described in the documentation. </P> <P> -The <i>tables</i> field is used to pass a character tables pointer to -<b>pcre_exec()</b>; this overrides the value that is stored with the compiled -pattern. A non-NULL value is stored with the compiled pattern only if custom -tables were supplied to <b>pcre_compile()</b> via its <i>tableptr</i> argument. -If NULL is passed to <b>pcre_exec()</b> using this mechanism, it forces PCRE's -internal tables to be used. This facility is helpful when re-using patterns -that have been saved after compiling with an external set of tables, because -the external tables might be at a different address when <b>pcre_exec()</b> is -called. See the +The <i>tables</i> field is provided for use with patterns that have been +pre-compiled using custom character tables, saved to disc or elsewhere, and +then reloaded, because the tables that were used to compile a pattern are not +saved with it. See the <a href="pcreprecompile.html"><b>pcreprecompile</b></a> -documentation for a discussion of saving compiled patterns for later use. +documentation for a discussion of saving compiled patterns for later use. If +NULL is passed using this mechanism, it forces PCRE's internal tables to be +used. +</P> +<P> +<b>Warning:</b> The tables that <b>pcre_exec()</b> uses must be the same as those +that were used when the pattern was compiled. If this is not the case, the +behaviour of <b>pcre_exec()</b> is undefined. Therefore, when a pattern is +compiled and matched in the same process, this field should never be set. In +this (the most common) case, the correct table pointer is automatically passed +with the compiled pattern from <b>pcre_compile()</b> to <b>pcre_exec()</b>. </P> <P> If PCRE_EXTRA_MARK is set in the <i>flags</i> field, the <i>mark</i> field must @@ -1951,7 +1991,7 @@ all the matches in a single subject string. However, you should be sure that the value of <i>startoffset</i> points to the start of a character (or the end of the subject). When PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid string as a subject or an invalid value of <i>startoffset</i> is -undefined. Your program may crash. +undefined. Your program may crash or loop. <pre> PCRE_PARTIAL_HARD PCRE_PARTIAL_SOFT @@ -2413,17 +2453,17 @@ no longer in use and is never returned. <br><a name="SEC18" href="#TOC1">EXTRACTING CAPTURED SUBSTRINGS BY NUMBER</a><br> <P> <b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b> -<b>int <i>buffersize</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b> +<b> int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b> -<b>const char **<i>stringptr</i>);</b> -</P> -<P> +<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b> +<b> const char **<i>stringptr</i>);</b> +<br> +<br> <b>int pcre_get_substring_list(const char *<i>subject</i>,</b> -<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b> +<b> int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b> </P> <P> Captured substrings can be accessed directly by using the offsets returned by @@ -2508,19 +2548,19 @@ provided. <br><a name="SEC19" href="#TOC1">EXTRACTING CAPTURED SUBSTRINGS BY NAME</a><br> <P> <b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b> -<b>const char *<i>name</i>);</b> -</P> -<P> +<b> const char *<i>name</i>);</b> +<br> +<br> <b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b> -<b>const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b> -<b>char *<i>buffer</i>, int <i>buffersize</i>);</b> -</P> -<P> +<b> const char *<i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b> +<b> char *<i>buffer</i>, int <i>buffersize</i>);</b> +<br> +<br> <b>int pcre_get_named_substring(const pcre *<i>code</i>,</b> -<b>const char *<i>subject</i>, int *<i>ovector</i>,</b> -<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b> -<b>const char **<i>stringptr</i>);</b> +<b> const char *<i>subject</i>, int *<i>ovector</i>,</b> +<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b> +<b> const char **<i>stringptr</i>);</b> </P> <P> To extract a substring by name, you first have to find associated number. @@ -2572,7 +2612,7 @@ same number causes an error at compile time. <br><a name="SEC20" href="#TOC1">DUPLICATE SUBPATTERN NAMES</a><br> <P> <b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b> -<b>const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b> +<b> const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b> </P> <P> When a pattern is compiled with the PCRE_DUPNAMES option, names for subpatterns @@ -2653,9 +2693,9 @@ the value returned is the size of each block that is obtained from the heap. <br><a name="SEC23" href="#TOC1">MATCHING A PATTERN: THE ALTERNATIVE FUNCTION</a><br> <P> <b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b> -<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> -<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> -<b>int *<i>workspace</i>, int <i>wscount</i>);</b> +<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> +<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b> +<b> int *<i>workspace</i>, int <i>wscount</i>);</b> </P> <P> The function <b>pcre_dfa_exec()</b> is called to match a subject string against @@ -2784,6 +2824,15 @@ matching string is given first. If there were too many matches to fit into the longest matches. Unlike <b>pcre_exec()</b>, <b>pcre_dfa_exec()</b> can use the entire <i>ovector</i> for returning matched strings. </P> +<P> +NOTE: PCRE's "auto-possessification" optimization usually applies to character +repeats at the end of a pattern (as well as internally). For example, the +pattern "a\d+" is compiled as if it were "a\d++" because there is no point +even considering the possibility of backtracking into the repeated digits. For +DFA matching, this means that only one possible match is found. If you really +do want multiple matches in such cases, either use an ungreedy repeat +("a\d+?") or set the PCRE_NO_AUTO_POSSESS option when compiling. +</P> <br><b> Error returns from <b>pcre_dfa_exec()</b> </b><br> @@ -2850,7 +2899,7 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC26" href="#TOC1">REVISION</a><br> <P> -Last updated: 12 May 2013 +Last updated: 12 November 2013 <br> Copyright © 1997-2013 University of Cambridge. <br> diff --git a/pcre/doc/html/pcrecallout.html b/pcre/doc/html/pcrecallout.html index 7233bb671e7..53a937f52dd 100644 --- a/pcre/doc/html/pcrecallout.html +++ b/pcre/doc/html/pcrecallout.html @@ -77,15 +77,50 @@ independent groups). Automatic callouts can be used for tracking the progress of pattern matching. The <a href="pcretest.html"><b>pcretest</b></a> -command has an option that sets automatic callouts; when it is used, the output -indicates how the pattern is matched. This is useful information when you are -trying to optimize the performance of a particular pattern. +program has a pattern qualifier (/C) that sets automatic callouts; when it is +used, the output indicates how the pattern is being matched. This is useful +information when you are trying to optimize the performance of a particular +pattern. </P> <br><a name="SEC3" href="#TOC1">MISSING CALLOUTS</a><br> <P> -You should be aware that, because of optimizations in the way PCRE matches -patterns by default, callouts sometimes do not happen. For example, if the -pattern is +You should be aware that, because of optimizations in the way PCRE compiles and +matches patterns, callouts sometimes do not happen exactly as you might expect. +</P> +<P> +At compile time, PCRE "auto-possessifies" repeated items when it knows that +what follows cannot be part of the repeat. For example, a+[bc] is compiled as +if it were a++[bc]. The <b>pcretest</b> output when this pattern is anchored and +then applied with automatic callouts to the string "aaaa" is: +<pre> + --->aaaa + +0 ^ ^ + +1 ^ a+ + +3 ^ ^ [bc] + No match +</pre> +This indicates that when matching [bc] fails, there is no backtracking into a+ +and therefore the callouts that would be taken for the backtracks do not occur. +You can disable the auto-possessify feature by passing PCRE_NO_AUTO_POSSESS +to <b>pcre_compile()</b>, or starting the pattern with (*NO_AUTO_POSSESS). If +this is done in <b>pcretest</b> (using the /O qualifier), the output changes to +this: +<pre> + --->aaaa + +0 ^ ^ + +1 ^ a+ + +3 ^ ^ [bc] + +3 ^ ^ [bc] + +3 ^ ^ [bc] + +3 ^^ [bc] + No match +</pre> +This time, when matching [bc] fails, the matcher backtracks into a+ and tries +again, repeatedly, until a+ itself fails. +</P> +<P> +Other optimizations that provide fast "no match" results also affect callouts. +For example, if the pattern is <pre> ab(?C4)cd </pre> @@ -109,11 +144,11 @@ callouts such as the example above are obeyed. <br><a name="SEC4" href="#TOC1">THE CALLOUT INTERFACE</a><br> <P> During matching, when PCRE reaches a callout point, the external function -defined by <i>pcre_callout</i> or <i>pcre[16|32]_callout</i> is called -(if it is set). This applies to both normal and DFA matching. The only -argument to the callout function is a pointer to a <b>pcre_callout</b> -or <b>pcre[16|32]_callout</b> block. -These structures contains the following fields: +defined by <i>pcre_callout</i> or <i>pcre[16|32]_callout</i> is called (if it is +set). This applies to both normal and DFA matching. The only argument to the +callout function is a pointer to a <b>pcre_callout</b> or +<b>pcre[16|32]_callout</b> block. These structures contains the following +fields: <pre> int <i>version</i>; int <i>callout_number</i>; @@ -242,7 +277,7 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC7" href="#TOC1">REVISION</a><br> <P> -Last updated: 03 March 2013 +Last updated: 12 November 2013 <br> Copyright © 1997-2013 University of Cambridge. <br> diff --git a/pcre/doc/html/pcrecompat.html b/pcre/doc/html/pcrecompat.html index 14e20c5f4b4..3e6226692ee 100644 --- a/pcre/doc/html/pcrecompat.html +++ b/pcre/doc/html/pcrecompat.html @@ -138,18 +138,24 @@ an error is given at compile time. <P> 15. Perl recognizes comments in some places that PCRE does not, for example, between the ( and ? at the start of a subpattern. If the /x modifier is set, -Perl allows white space between ( and ? but PCRE never does, even if the -PCRE_EXTENDED option is set. +Perl allows white space between ( and ? (though current Perls warn that this is +deprecated) but PCRE never does, even if the PCRE_EXTENDED option is set. </P> <P> -16. In PCRE, the upper/lower case character properties Lu and Ll are not +16. Perl, when in warning mode, gives warnings for character classes such as +[A-\d] or [a-[:digit:]]. It then treats the hyphens as literals. PCRE has no +warning features, so it gives an error in these cases because they are almost +certainly user mistakes. +</P> +<P> +17. In PCRE, the upper/lower case character properties Lu and Ll are not affected when case-independent matching is specified. For example, \p{Lu} always matches an upper case letter. I think Perl has changed in this respect; in the release at the time of writing (5.16), \p{Lu} and \p{Ll} match all letters, regardless of case, when case independence is specified. </P> <P> -17. PCRE provides some extensions to the Perl regular expression facilities. +18. PCRE provides some extensions to the Perl regular expression facilities. Perl 5.10 includes new features that are not in earlier versions of Perl, some of which (such as named parentheses) have been in PCRE for some time. This list is with respect to Perl 5.10: @@ -220,7 +226,7 @@ Cambridge CB2 3QH, England. REVISION </b><br> <P> -Last updated: 19 March 2013 +Last updated: 10 November 2013 <br> Copyright © 1997-2013 University of Cambridge. <br> diff --git a/pcre/doc/html/pcrelimits.html b/pcre/doc/html/pcrelimits.html index b83a801040a..ee5ebf033d9 100644 --- a/pcre/doc/html/pcrelimits.html +++ b/pcre/doc/html/pcrelimits.html @@ -21,9 +21,10 @@ practice be relevant. </P> <P> The maximum length of a compiled pattern is approximately 64K data units (bytes -for the 8-bit library, 32-bit units for the 32-bit library, and 32-bit units for -the 32-bit library) if PCRE is compiled with the default internal linkage size -of 2 bytes. If you want to process regular expressions that are truly enormous, +for the 8-bit library, 16-bit units for the 16-bit library, and 32-bit units for +the 32-bit library) if PCRE is compiled with the default internal linkage size, +which is 2 bytes for the 8-bit and 16-bit libraries, and 4 bytes for the 32-bit +library. If you want to process regular expressions that are truly enormous, you can compile PCRE with an internal linkage size of 3 or 4 (when building the 16-bit or 32-bit library, 3 is rounded up to 4). See the <b>README</b> file in the source distribution and the @@ -36,7 +37,10 @@ All values in repeating quantifiers must be less than 65536. </P> <P> There is no limit to the number of parenthesized subpatterns, but there can be -no more than 65535 capturing subpatterns. +no more than 65535 capturing subpatterns. There is, however, a limit to the +depth of nesting of parenthesized subpatterns of all kinds. This is imposed in +order to limit the amount of system stack used at compile time. The limit can +be specified when PCRE is built; the default is 250. </P> <P> There is a limit to the number of forward references to subsequent subpatterns @@ -50,7 +54,7 @@ maximum number of named subpatterns is 10000. </P> <P> The maximum length of a name in a (*MARK), (*PRUNE), (*SKIP), or (*THEN) verb -is 255 for the 8-bit library and 65535 for the 16-bit and 32-bit library. +is 255 for the 8-bit library and 65535 for the 16-bit and 32-bit libraries. </P> <P> The maximum length of a subject string is the largest positive number that an @@ -77,9 +81,9 @@ Cambridge CB2 3QH, England. REVISION </b><br> <P> -Last updated: 04 May 2012 +Last updated: 05 November 2013 <br> -Copyright © 1997-2012 University of Cambridge. +Copyright © 1997-2013 University of Cambridge. <br> <p> Return to the <a href="index.html">PCRE index page</a>. diff --git a/pcre/doc/html/pcrematching.html b/pcre/doc/html/pcrematching.html index f1854314594..a1af39b68d3 100644 --- a/pcre/doc/html/pcrematching.html +++ b/pcre/doc/html/pcrematching.html @@ -126,6 +126,15 @@ character of the subject. The algorithm does not automatically move on to find matches that start at later positions. </P> <P> +PCRE's "auto-possessification" optimization usually applies to character +repeats at the end of a pattern (as well as internally). For example, the +pattern "a\d+" is compiled as if it were "a\d++" because there is no point +even considering the possibility of backtracking into the repeated digits. For +DFA matching, this means that only one possible match is found. If you really +do want multiple matches in such cases, either use an ungreedy repeat +("a\d+?") or set the PCRE_NO_AUTO_POSSESS option when compiling. +</P> +<P> There are a number of features of PCRE regular expressions that are not supported by the alternative matching algorithm. They are as follows: </P> @@ -224,7 +233,7 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC8" href="#TOC1">REVISION</a><br> <P> -Last updated: 08 January 2012 +Last updated: 12 November 2013 <br> Copyright © 1997-2012 University of Cambridge. <br> diff --git a/pcre/doc/html/pcrepartial.html b/pcre/doc/html/pcrepartial.html index 98d34f0bcc2..4faeafcb688 100644 --- a/pcre/doc/html/pcrepartial.html +++ b/pcre/doc/html/pcrepartial.html @@ -306,6 +306,16 @@ not retain the previously partially-matched string. It is up to the calling program to do that if it needs to. </P> <P> +That means that, for an unanchored pattern, if a continued match fails, it is +not possible to try again at a new starting point. All this facility is capable +of doing is continuing with the previous match attempt. In the previous +example, if the second set of data is "ug23" the result is no match, even +though there would be a match for "aug23" if the entire string were given at +once. Depending on the application, this may or may not be what you want. +The only way to allow for starting again at the next character is to retain the +matched part of the subject and try a new complete match. +</P> +<P> You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with PCRE_DFA_RESTART to continue partial matching over multiple segments. This facility can be used to pass very long subject strings to the DFA matching @@ -490,7 +500,7 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC11" href="#TOC1">REVISION</a><br> <P> -Last updated: 20 February 2013 +Last updated: 02 July 2013 <br> Copyright © 1997-2013 University of Cambridge. <br> diff --git a/pcre/doc/html/pcrepattern.html b/pcre/doc/html/pcrepattern.html index 7e837e5a87e..624cb447238 100644 --- a/pcre/doc/html/pcrepattern.html +++ b/pcre/doc/html/pcrepattern.html @@ -23,25 +23,26 @@ man page, in case the conversion went wrong. <li><a name="TOC8" href="#SEC8">MATCHING A SINGLE DATA UNIT</a> <li><a name="TOC9" href="#SEC9">SQUARE BRACKETS AND CHARACTER CLASSES</a> <li><a name="TOC10" href="#SEC10">POSIX CHARACTER CLASSES</a> -<li><a name="TOC11" href="#SEC11">VERTICAL BAR</a> -<li><a name="TOC12" href="#SEC12">INTERNAL OPTION SETTING</a> -<li><a name="TOC13" href="#SEC13">SUBPATTERNS</a> -<li><a name="TOC14" href="#SEC14">DUPLICATE SUBPATTERN NUMBERS</a> -<li><a name="TOC15" href="#SEC15">NAMED SUBPATTERNS</a> -<li><a name="TOC16" href="#SEC16">REPETITION</a> -<li><a name="TOC17" href="#SEC17">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a> -<li><a name="TOC18" href="#SEC18">BACK REFERENCES</a> -<li><a name="TOC19" href="#SEC19">ASSERTIONS</a> -<li><a name="TOC20" href="#SEC20">CONDITIONAL SUBPATTERNS</a> -<li><a name="TOC21" href="#SEC21">COMMENTS</a> -<li><a name="TOC22" href="#SEC22">RECURSIVE PATTERNS</a> -<li><a name="TOC23" href="#SEC23">SUBPATTERNS AS SUBROUTINES</a> -<li><a name="TOC24" href="#SEC24">ONIGURUMA SUBROUTINE SYNTAX</a> -<li><a name="TOC25" href="#SEC25">CALLOUTS</a> -<li><a name="TOC26" href="#SEC26">BACKTRACKING CONTROL</a> -<li><a name="TOC27" href="#SEC27">SEE ALSO</a> -<li><a name="TOC28" href="#SEC28">AUTHOR</a> -<li><a name="TOC29" href="#SEC29">REVISION</a> +<li><a name="TOC11" href="#SEC11">COMPATIBILITY FEATURE FOR WORD BOUNDARIES</a> +<li><a name="TOC12" href="#SEC12">VERTICAL BAR</a> +<li><a name="TOC13" href="#SEC13">INTERNAL OPTION SETTING</a> +<li><a name="TOC14" href="#SEC14">SUBPATTERNS</a> +<li><a name="TOC15" href="#SEC15">DUPLICATE SUBPATTERN NUMBERS</a> +<li><a name="TOC16" href="#SEC16">NAMED SUBPATTERNS</a> +<li><a name="TOC17" href="#SEC17">REPETITION</a> +<li><a name="TOC18" href="#SEC18">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a> +<li><a name="TOC19" href="#SEC19">BACK REFERENCES</a> +<li><a name="TOC20" href="#SEC20">ASSERTIONS</a> +<li><a name="TOC21" href="#SEC21">CONDITIONAL SUBPATTERNS</a> +<li><a name="TOC22" href="#SEC22">COMMENTS</a> +<li><a name="TOC23" href="#SEC23">RECURSIVE PATTERNS</a> +<li><a name="TOC24" href="#SEC24">SUBPATTERNS AS SUBROUTINES</a> +<li><a name="TOC25" href="#SEC25">ONIGURUMA SUBROUTINE SYNTAX</a> +<li><a name="TOC26" href="#SEC26">CALLOUTS</a> +<li><a name="TOC27" href="#SEC27">BACKTRACKING CONTROL</a> +<li><a name="TOC28" href="#SEC28">SEE ALSO</a> +<li><a name="TOC29" href="#SEC29">AUTHOR</a> +<li><a name="TOC30" href="#SEC30">REVISION</a> </ul> <br><a name="SEC1" href="#TOC1">PCRE REGULAR EXPRESSION DETAILS</a><br> <P> @@ -116,21 +117,33 @@ appearance causes an error. Unicode property support </b><br> <P> -Another special sequence that may appear at the start of a pattern is -<pre> - (*UCP) -</pre> +Another special sequence that may appear at the start of a pattern is (*UCP). This has the same effect as setting the PCRE_UCP option: it causes sequences such as \d and \w to use Unicode properties to determine character types, instead of recognizing only characters with codes less than 128 via a lookup table. </P> <br><b> +Disabling auto-possessification +</b><br> +<P> +If a pattern starts with (*NO_AUTO_POSSESS), it has the same effect as setting +the PCRE_NO_AUTO_POSSESS option at compile time. This stops PCRE from making +quantifiers possessive when what follows cannot match the repeated item. For +example, by default a+b is treated as a++b. For more details, see the +<a href="pcreapi.html"><b>pcreapi</b></a> +documentation. +</P> +<br><b> Disabling start-up optimizations </b><br> <P> If a pattern starts with (*NO_START_OPT), it has the same effect as setting the -PCRE_NO_START_OPTIMIZE option either at compile or matching time. +PCRE_NO_START_OPTIMIZE option either at compile or matching time. This disables +several optimizations for quickly reaching "no match" results. For more +details, see the +<a href="pcreapi.html"><b>pcreapi</b></a> +documentation. <a name="newlines"></a></P> <br><b> Newline conventions @@ -193,10 +206,10 @@ pattern of the form (*LIMIT_RECURSION=d) </pre> where d is any number of decimal digits. However, the value of the setting must -be less than the value set by the caller of <b>pcre_exec()</b> for it to have -any effect. In other words, the pattern writer can lower the limit set by the -programmer, but not raise it. If there is more than one setting of one of these -limits, the lower value is used. +be less than the value set (or defaulted) by the caller of <b>pcre_exec()</b> +for it to have any effect. In other words, the pattern writer can lower the +limits set by the programmer, but not raise them. If there is more than one +setting of one of these limits, the lower value is used. </P> <br><a name="SEC3" href="#TOC1">EBCDIC CHARACTER CODES</a><br> <P> @@ -283,10 +296,11 @@ backslash. All other characters (in particular, those whose codepoints are greater than 127) are treated as literals. </P> <P> -If a pattern is compiled with the PCRE_EXTENDED option, white space in the -pattern (other than in a character class) and characters between a # outside -a character class and the next newline are ignored. An escaping backslash can -be used to include a white space or # character as part of the pattern. +If a pattern is compiled with the PCRE_EXTENDED option, most white space in the +pattern (other than in a character class), and characters between a # outside a +character class and the next newline, inclusive, are ignored. An escaping +backslash can be used to include a white space or # character as part of the +pattern. </P> <P> If you want to remove the special meaning from a sequence of characters, you @@ -324,7 +338,9 @@ one of the following escape sequences than the binary character it represents: \n linefeed (hex 0A) \r carriage return (hex 0D) \t tab (hex 09) + \0dd character with octal code 0dd \ddd character with octal code ddd, or back reference + \o{ddd..} character with octal code ddd.. \xhh character with hex code hh \x{hhh..} character with hex code hhh.. (non-JavaScript mode) \uhhhh character with hex code hhhh (JavaScript mode only) @@ -347,42 +363,6 @@ the EBCDIC letters are disjoint, \cZ becomes hex 29 (Z is E9), and other characters also generate different values. </P> <P> -By default, after \x, from zero to two hexadecimal digits are read (letters -can be in upper or lower case). Any number of hexadecimal digits may appear -between \x{ and }, but the character code is constrained as follows: -<pre> - 8-bit non-UTF mode less than 0x100 - 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint - 16-bit non-UTF mode less than 0x10000 - 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint - 32-bit non-UTF mode less than 0x80000000 - 32-bit UTF-32 mode less than 0x10ffff and a valid codepoint -</pre> -Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called -"surrogate" codepoints), and 0xffef. -</P> -<P> -If characters other than hexadecimal digits appear between \x{ and }, or if -there is no terminating }, this form of escape is not recognized. Instead, the -initial \x will be interpreted as a basic hexadecimal escape, with no -following digits, giving a character whose value is zero. -</P> -<P> -If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x is -as just described only when it is followed by two hexadecimal digits. -Otherwise, it matches a literal "x" character. In JavaScript mode, support for -code points greater than 256 is provided by \u, which must be followed by -four hexadecimal digits; otherwise it matches a literal "u" character. -Character codes specified by \u in JavaScript mode are constrained in the same -was as those specified by \x in non-JavaScript mode. -</P> -<P> -Characters whose value is less than 256 can be defined by either of the two -syntaxes for \x (or by \u in JavaScript mode). There is no difference in the -way they are handled. For example, \xdc is exactly the same as \x{dc} (or -\u00dc in JavaScript mode). -</P> -<P> After \0 up to two further octal digits are read. If there are fewer than two digits, just those that are present are used. Thus the sequence \0\x\07 specifies two binary zeros followed by a BEL character (code value 7). Make @@ -390,9 +370,23 @@ sure you supply two digits after the initial zero if the pattern character that follows is itself an octal digit. </P> <P> -The handling of a backslash followed by a digit other than 0 is complicated. -Outside a character class, PCRE reads it and any following digits as a decimal -number. If the number is less than 10, or if there have been at least that many +The escape \o must be followed by a sequence of octal digits, enclosed in +braces. An error occurs if this is not the case. This escape is a recent +addition to Perl; it provides way of specifying character code points as octal +numbers greater than 0777, and it also allows octal numbers and back references +to be unambiguously specified. +</P> +<P> +For greater clarity and unambiguity, it is best to avoid following \ by a +digit greater than zero. Instead, use \o{} or \x{} to specify character +numbers, and \g{} to specify back references. The following paragraphs +describe the old, ambiguous syntax. +</P> +<P> +The handling of a backslash followed by a digit other than 0 is complicated, +and Perl has changed in recent releases, causing PCRE also to change. Outside a +character class, PCRE reads the digit and any following digits as a decimal +number. If the number is less than 8, or if there have been at least that many previous capturing left parentheses in the expression, the entire sequence is taken as a <i>back reference</i>. A description of how this works is given <a href="#backreferences">later,</a> @@ -400,12 +394,11 @@ following the discussion of <a href="#subpattern">parenthesized subpatterns.</a> </P> <P> -Inside a character class, or if the decimal number is greater than 9 and there -have not been that many capturing subpatterns, PCRE re-reads up to three octal -digits following the backslash, and uses them to generate a data character. Any -subsequent digits stand for themselves. The value of the character is -constrained in the same way as characters specified in hexadecimal. -For example: +Inside a character class, or if the decimal number following \ is greater than +7 and there have not been that many capturing subpatterns, PCRE handles \8 and +\9 as the literal characters "8" and "9", and otherwise re-reads up to three +octal digits following the backslash, using them to generate a data character. +Any subsequent digits stand for themselves. For example: <pre> \040 is another way of writing an ASCII space \40 is the same, provided there are fewer than 40 previous capturing subpatterns @@ -415,11 +408,52 @@ For example: \0113 is a tab followed by the character "3" \113 might be a back reference, otherwise the character with octal code 113 \377 might be a back reference, otherwise the value 255 (decimal) - \81 is either a back reference, or a binary zero followed by the two characters "8" and "1" + \81 is either a back reference, or the two characters "8" and "1" +</pre> +Note that octal values of 100 or greater that are specified using this syntax +must not be introduced by a leading zero, because no more than three octal +digits are ever read. +</P> +<P> +By default, after \x that is not followed by {, from zero to two hexadecimal +digits are read (letters can be in upper or lower case). Any number of +hexadecimal digits may appear between \x{ and }. If a character other than +a hexadecimal digit appears between \x{ and }, or if there is no terminating +}, an error occurs. +</P> +<P> +If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x is +as just described only when it is followed by two hexadecimal digits. +Otherwise, it matches a literal "x" character. In JavaScript mode, support for +code points greater than 256 is provided by \u, which must be followed by +four hexadecimal digits; otherwise it matches a literal "u" character. +</P> +<P> +Characters whose value is less than 256 can be defined by either of the two +syntaxes for \x (or by \u in JavaScript mode). There is no difference in the +way they are handled. For example, \xdc is exactly the same as \x{dc} (or +\u00dc in JavaScript mode). +</P> +<br><b> +Constraints on character values +</b><br> +<P> +Characters that are specified using octal or hexadecimal numbers are +limited to certain values, as follows: +<pre> + 8-bit non-UTF mode less than 0x100 + 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint + 16-bit non-UTF mode less than 0x10000 + 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint + 32-bit non-UTF mode less than 0x100000000 + 32-bit UTF-32 mode less than 0x10ffff and a valid codepoint </pre> -Note that octal values of 100 or greater must not be introduced by a leading -zero, because no more than three octal digits are ever read. +Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called +"surrogate" codepoints), and 0xffef. </P> +<br><b> +Escape sequences in character classes +</b><br> <P> All the sequences that define a single character value can be used both inside and outside character classes. In addition, inside a character class, \b is @@ -498,11 +532,14 @@ matching point is at the end of the subject string, all of them fail, because there is no character to match. </P> <P> -For compatibility with Perl, \s does not match the VT character (code 11). -This makes it different from the the POSIX "space" class. The \s characters -are HT (9), LF (10), FF (12), CR (13), and space (32). If "use locale;" is -included in a Perl script, \s may match the VT character. In PCRE, it never -does. +For compatibility with Perl, \s did not used to match the VT character (code +11), which made it different from the the POSIX "space" class. However, Perl +added VT at release 5.18, and PCRE followed suit at release 8.34. The default +\s characters are now HT (9), LF (10), VT (11), FF (12), CR (13), and space +(32), which are defined as white space in the "C" locale. This list may vary if +locale-specific matching is taking place. For example, in some locales the +"non-breaking space" character (\xA0) is recognized as white space, and in +others the VT character is not. </P> <P> A "word" character is an underscore or any character that is a letter or digit. @@ -513,21 +550,23 @@ place (see in the <a href="pcreapi.html"><b>pcreapi</b></a> page). For example, in a French locale such as "fr_FR" in Unix-like systems, -or "french" in Windows, some character codes greater than 128 are used for +or "french" in Windows, some character codes greater than 127 are used for accented letters, and these are then matched by \w. The use of locales with Unicode is discouraged. </P> <P> -By default, in a UTF mode, characters with values greater than 128 never match -\d, \s, or \w, and always match \D, \S, and \W. These sequences retain -their original meanings from before UTF support was available, mainly for -efficiency reasons. However, if PCRE is compiled with Unicode property support, -and the PCRE_UCP option is set, the behaviour is changed so that Unicode -properties are used to determine character types, as follows: +By default, characters whose code points are greater than 127 never match \d, +\s, or \w, and always match \D, \S, and \W, although this may vary for +characters in the range 128-255 when locale-specific matching is happening. +These escape sequences retain their original meanings from before Unicode +support was available, mainly for efficiency reasons. If PCRE is compiled with +Unicode property support, and the PCRE_UCP option is set, the behaviour is +changed so that Unicode properties are used to determine character types, as +follows: <pre> - \d any character that \p{Nd} matches (decimal digit) - \s any character that \p{Z} matches, plus HT, LF, FF, CR - \w any character that \p{L} or \p{N} matches, plus underscore + \d any character that matches \p{Nd} (decimal digit) + \s any character that matches \p{Z} or \h or \v + \w any character that matches \p{L} or \p{N}, plus underscore </pre> The upper case escapes match the inverse sets of characters. Note that \d matches only decimal digits, whereas \w matches any Unicode digit, as well as @@ -538,7 +577,7 @@ is noticeably slower when PCRE_UCP is set. <P> The sequences \h, \H, \v, and \V are features that were added to Perl at release 5.10. In contrast to the other sequences, which match only ASCII -characters by default, these always match certain high-valued codepoints, +characters by default, these always match certain high-valued code points, whether or not PCRE_UCP is set. The horizontal space characters are: <pre> U+0009 Horizontal tab (HT) @@ -913,9 +952,9 @@ PCRE's additional properties <P> As well as the standard Unicode properties described above, PCRE supports four more that make it possible to convert traditional escape sequences such as \w -and \s and POSIX character classes to use Unicode properties. PCRE uses these -non-standard, non-Perl properties internally when PCRE_UCP is set. However, -they may also be used explicitly. These properties are: +and \s to use Unicode properties. PCRE uses these non-standard, non-Perl +properties internally when PCRE_UCP is set. However, they may also be used +explicitly. These properties are: <pre> Xan Any alphanumeric character Xps Any POSIX space character @@ -925,8 +964,9 @@ they may also be used explicitly. These properties are: Xan matches characters that have either the L (letter) or the N (number) property. Xps matches the characters tab, linefeed, vertical tab, form feed, or carriage return, and any other character that has the Z (separator) property. -Xsp is the same as Xps, except that vertical tab is excluded. Xwd matches the -same characters as Xan, plus underscore. +Xsp is the same as Xps; it used to exclude vertical tab, for Perl +compatibility, but Perl changed, and so PCRE followed at release 8.34. Xwd +matches the same characters as Xan, plus underscore. </P> <P> There is another non-standard property, Xuc, which matches any character that @@ -1218,7 +1258,9 @@ The minus (hyphen) character can be used to specify a range of characters in a character class. For example, [d-m] matches any letter between d and m, inclusive. If a minus character is required in a class, it must be escaped with a backslash or appear in a position where it cannot be interpreted as -indicating a range, typically as the first or last character in the class. +indicating a range, typically as the first or last character in the class, or +immediately after a range. For example, [b-d-z] matches letters in the range b +to d, a hyphen character, or z. </P> <P> It is not possible to have the literal character "]" as the end character of a @@ -1230,6 +1272,12 @@ followed by two other characters. The octal or hexadecimal representation of "]" can also be used to end a range. </P> <P> +An error is generated if a POSIX character class (see below) or an escape +sequence other than one that defines a single character appears at a point +where a range ending character is expected. For example, [z-\xff] is valid, +but [A-\d] and [A-[:digit:]] are not. +</P> +<P> Ranges operate in the collating sequence of character values. They can also be used for characters specified numerically, for example [\000-\037]. Ranges can include any characters that are valid for the current mode. @@ -1269,9 +1317,9 @@ something AND NOT ...". The only metacharacters that are recognized in character classes are backslash, hyphen (only where it can be interpreted as specifying a range), circumflex (only at the start), opening square bracket (only when it can be interpreted as -introducing a POSIX class name - see the next section), and the terminating -closing square bracket. However, escaping other non-alphanumeric characters -does no harm. +introducing a POSIX class name, or for a special compatibility feature - see +the next two sections), and the terminating closing square bracket. However, +escaping other non-alphanumeric characters does no harm. </P> <br><a name="SEC10" href="#TOC1">POSIX CHARACTER CLASSES</a><br> <P> @@ -1294,15 +1342,17 @@ are: lower lower case letters print printing characters, including space punct printing characters, excluding letters and digits and space - space white space (not quite the same as \s) + space white space (the same as \s from PCRE 8.34) upper upper case letters word "word" characters (same as \w) xdigit hexadecimal digits </pre> -The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), and -space (32). Notice that this list includes the VT character (code 11). This -makes "space" different to \s, which does not include VT (for Perl -compatibility). +The default "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), +and space (32). If locale-specific matching is taking place, the list of space +characters may be different; there may be fewer or more of them. "Space" used +to be different to \s, which did not include VT, for Perl compatibility. +However, Perl changed at release 5.18, and PCRE followed at release 8.34. +"Space" and \s now match the same set of characters. </P> <P> The name "word" is a Perl extension, and "blank" is a GNU extension from Perl @@ -1316,11 +1366,11 @@ syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not supported, and an error is given if they are encountered. </P> <P> -By default, in UTF modes, characters with values greater than 128 do not match -any of the POSIX character classes. However, if the PCRE_UCP option is passed -to <b>pcre_compile()</b>, some of the classes are changed so that Unicode -character properties are used. This is achieved by replacing the POSIX classes -by other sequences, as follows: +By default, characters with values greater than 128 do not match any of the +POSIX character classes. However, if the PCRE_UCP option is passed to +<b>pcre_compile()</b>, some of the classes are changed so that Unicode character +properties are used. This is achieved by replacing certain POSIX classes by +other sequences, as follows: <pre> [:alnum:] becomes \p{Xan} [:alpha:] becomes \p{L} @@ -1331,11 +1381,56 @@ by other sequences, as follows: [:upper:] becomes \p{Lu} [:word:] becomes \p{Xwd} </pre> -Negated versions, such as [:^alpha:] use \P instead of \p. The other POSIX -classes are unchanged, and match only characters with code points less than -128. +Negated versions, such as [:^alpha:] use \P instead of \p. Three other POSIX +classes are handled specially in UCP mode: </P> -<br><a name="SEC11" href="#TOC1">VERTICAL BAR</a><br> +<P> +[:graph:] +This matches characters that have glyphs that mark the page when printed. In +Unicode property terms, it matches all characters with the L, M, N, P, S, or Cf +properties, except for: +<pre> + U+061C Arabic Letter Mark + U+180E Mongolian Vowel Separator + U+2066 - U+2069 Various "isolate"s + +</PRE> +</P> +<P> +[:print:] +This matches the same characters as [:graph:] plus space characters that are +not controls, that is, characters with the Zs property. +</P> +<P> +[:punct:] +This matches all characters that have the Unicode P (punctuation) property, +plus those characters whose code points are less than 128 that have the S +(Symbol) property. +</P> +<P> +The other POSIX classes are unchanged, and match only characters with code +points less than 128. +</P> +<br><a name="SEC11" href="#TOC1">COMPATIBILITY FEATURE FOR WORD BOUNDARIES</a><br> +<P> +In the POSIX.2 compliant library that was included in 4.4BSD Unix, the ugly +syntax [[:<:]] and [[:>:]] is used for matching "start of word" and "end of +word". PCRE treats these items as follows: +<pre> + [[:<:]] is converted to \b(?=\w) + [[:>:]] is converted to \b(?<=\w) +</pre> +Only these exact character sequences are recognized. A sequence such as +[a[:<:]b] provokes error for an unrecognized POSIX class name. This support is +not compatible with Perl. It is provided to help migrations from other +environments, and is best not used in any new patterns. Note that \b matches +at the start and the end of a word (see +<a href="#smallassertions">"Simple assertions"</a> +above), and in a Perl-style pattern the preceding or following character +normally shows which is wanted, without the need for the assertions that are +used above in order to give exactly the POSIX behaviour. +</P> +<br><a name="SEC12" href="#TOC1">VERTICAL BAR</a><br> <P> Vertical bar characters are used to separate alternative patterns. For example, the pattern @@ -1350,7 +1445,7 @@ that succeeds is used. If the alternatives are within a subpattern "succeeds" means matching the rest of the main pattern as well as the alternative in the subpattern. </P> -<br><a name="SEC12" href="#TOC1">INTERNAL OPTION SETTING</a><br> +<br><a name="SEC13" href="#TOC1">INTERNAL OPTION SETTING</a><br> <P> The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and PCRE_EXTENDED options (which are Perl-compatible) can be changed from within @@ -1413,7 +1508,7 @@ options, respectively. The (*UTF) sequence is a generic version that can be used with any of the libraries. However, the application can set the PCRE_NEVER_UTF option, which locks out the use of the (*UTF) sequences. <a name="subpattern"></a></P> -<br><a name="SEC13" href="#TOC1">SUBPATTERNS</a><br> +<br><a name="SEC14" href="#TOC1">SUBPATTERNS</a><br> <P> Subpatterns are delimited by parentheses (round brackets), which can be nested. Turning part of a pattern into a subpattern does two things: @@ -1469,7 +1564,7 @@ from left to right, and options are not reset until the end of the subpattern is reached, an option setting in one branch does affect subsequent branches, so the above patterns match "SUNDAY" as well as "Saturday". <a name="dupsubpatternnumber"></a></P> -<br><a name="SEC14" href="#TOC1">DUPLICATE SUBPATTERN NUMBERS</a><br> +<br><a name="SEC15" href="#TOC1">DUPLICATE SUBPATTERN NUMBERS</a><br> <P> Perl 5.10 introduced a feature whereby each alternative in a subpattern uses the same numbers for its capturing parentheses. Such a subpattern starts with @@ -1513,7 +1608,7 @@ true if any of the subpatterns of that number have matched. An alternative approach to using this "branch reset" feature is to use duplicate named subpatterns, as described in the next section. </P> -<br><a name="SEC15" href="#TOC1">NAMED SUBPATTERNS</a><br> +<br><a name="SEC16" href="#TOC1">NAMED SUBPATTERNS</a><br> <P> Identifying capturing parentheses by number is simple, but it can be very hard to keep track of the numbers in complicated regular expressions. Furthermore, @@ -1535,11 +1630,12 @@ and can be made by name as well as by number. </P> <P> -Names consist of up to 32 alphanumeric characters and underscores. Named -capturing parentheses are still allocated numbers as well as names, exactly as -if the names were not present. The PCRE API provides function calls for -extracting the name-to-number translation table from a compiled pattern. There -is also a convenience function for extracting a captured substring by name. +Names consist of up to 32 alphanumeric characters and underscores, but must +start with a non-digit. Named capturing parentheses are still allocated numbers +as well as names, exactly as if the names were not present. The PCRE API +provides function calls for extracting the name-to-number translation table +from a compiled pattern. There is also a convenience function for extracting a +captured substring by name. </P> <P> By default, a name must be unique within a pattern, but it is possible to relax @@ -1568,9 +1664,23 @@ matched. This saves searching to find which numbered subpattern it was. </P> <P> If you make a back reference to a non-unique named subpattern from elsewhere in -the pattern, the one that corresponds to the first occurrence of the name is -used. In the absence of duplicate numbers (see the previous section) this is -the one with the lowest number. If you use a named reference in a condition +the pattern, the subpatterns to which the name refers are checked in the order +in which they appear in the overall pattern. The first one that is set is used +for the reference. For example, this pattern matches both "foofoo" and +"barbar" but not "foobar" or "barfoo": +<pre> + (?:(?<n>foo)|(?<n>bar))\k<n> + +</PRE> +</P> +<P> +If you make a subroutine call to a non-unique named subpattern, the one that +corresponds to the first occurrence of the name is used. In the absence of +duplicate numbers (see the previous section) this is the one with the lowest +number. +</P> +<P> +If you use a named reference in a condition test (see the <a href="#conditions">section about conditions</a> below), either to check whether a subpattern has matched, or to check for @@ -1585,10 +1695,11 @@ documentation. <b>Warning:</b> You cannot use different names to distinguish between two subpatterns with the same number because PCRE uses only the numbers when matching. For this reason, an error is given at compile time if different names -are given to subpatterns with the same number. However, you can give the same -name to subpatterns with the same number, even when PCRE_DUPNAMES is not set. +are given to subpatterns with the same number. However, you can always give the +same name to subpatterns with the same number, even when PCRE_DUPNAMES is not +set. </P> -<br><a name="SEC16" href="#TOC1">REPETITION</a><br> +<br><a name="SEC17" href="#TOC1">REPETITION</a><br> <P> Repetition is specified by quantifiers, which can follow any of the following items: @@ -1756,7 +1867,7 @@ example, after </pre> matches "aba" the value of the second captured substring is "b". <a name="atomicgroup"></a></P> -<br><a name="SEC17" href="#TOC1">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a><br> +<br><a name="SEC18" href="#TOC1">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a><br> <P> With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy") repetition, failure of what follows normally causes the repeated item to be @@ -1860,7 +1971,7 @@ an atomic group, like this: </pre> sequences of non-digits cannot be broken, and failure happens quickly. <a name="backreferences"></a></P> -<br><a name="SEC18" href="#TOC1">BACK REFERENCES</a><br> +<br><a name="SEC19" href="#TOC1">BACK REFERENCES</a><br> <P> Outside a character class, a backslash followed by a digit greater than 0 (and possibly further digits) is a back reference to a capturing subpattern earlier @@ -1988,7 +2099,7 @@ as an Once the whole group has been matched, a subsequent matching failure cannot cause backtracking into the middle of the group. <a name="bigassertions"></a></P> -<br><a name="SEC19" href="#TOC1">ASSERTIONS</a><br> +<br><a name="SEC20" href="#TOC1">ASSERTIONS</a><br> <P> An assertion is a test on the characters following or preceding the current matching point that does not actually consume any characters. The simple @@ -2178,7 +2289,7 @@ preceded by "foo", while is another pattern that matches "foo" preceded by three digits and any three characters that are not "999". <a name="conditions"></a></P> -<br><a name="SEC20" href="#TOC1">CONDITIONAL SUBPATTERNS</a><br> +<br><a name="SEC21" href="#TOC1">CONDITIONAL SUBPATTERNS</a><br> <P> It is possible to cause the matching process to obey a subpattern conditionally or to choose between two alternative subpatterns, depending on @@ -2252,12 +2363,7 @@ Checking for a used subpattern by name <P> Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a used subpattern by name. For compatibility with earlier versions of PCRE, which had -this facility before Perl, the syntax (?(name)...) is also recognized. However, -there is a possible ambiguity with this syntax, because subpattern names may -consist entirely of digits. PCRE looks first for a named subpattern; if it -cannot find one and the name consists entirely of digits, PCRE looks for a -subpattern of that number, which must be greater than zero. Using subpattern -names that consist entirely of digits is not recommended. +this facility before Perl, the syntax (?(name)...) is also recognized. </P> <P> Rewriting the above example to use a named subpattern gives this: @@ -2333,7 +2439,7 @@ subject is matched against the first alternative; otherwise it is matched against the second. This pattern matches strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits. <a name="comments"></a></P> -<br><a name="SEC21" href="#TOC1">COMMENTS</a><br> +<br><a name="SEC22" href="#TOC1">COMMENTS</a><br> <P> There are two ways of including comments in patterns that are processed by PCRE. In both cases, the start of the comment must not be in a character class, @@ -2362,7 +2468,7 @@ a newline in the pattern. The sequence \n is still literal at this stage, so it does not terminate the comment. Only an actual character with the code value 0x0a (the default newline) does so. <a name="recursion"></a></P> -<br><a name="SEC22" href="#TOC1">RECURSIVE PATTERNS</a><br> +<br><a name="SEC23" href="#TOC1">RECURSIVE PATTERNS</a><br> <P> Consider the problem of matching a string in parentheses, allowing for unlimited nested parentheses. Without the use of recursion, the best that can @@ -2577,7 +2683,7 @@ now match "b" and so the whole match succeeds. In Perl, the pattern fails to match because inside the recursive call \1 cannot access the externally set value. <a name="subpatternsassubroutines"></a></P> -<br><a name="SEC23" href="#TOC1">SUBPATTERNS AS SUBROUTINES</a><br> +<br><a name="SEC24" href="#TOC1">SUBPATTERNS AS SUBROUTINES</a><br> <P> If the syntax for a recursive subpattern call (either by number or by name) is used outside the parentheses to which it refers, it operates like a @@ -2618,7 +2724,7 @@ different calls. For example, consider this pattern: It matches "abcabc". It does not match "abcABC" because the change of processing option does not affect the called subpattern. <a name="onigurumasubroutines"></a></P> -<br><a name="SEC24" href="#TOC1">ONIGURUMA SUBROUTINE SYNTAX</a><br> +<br><a name="SEC25" href="#TOC1">ONIGURUMA SUBROUTINE SYNTAX</a><br> <P> For compatibility with Oniguruma, the non-Perl syntax \g followed by a name or a number enclosed either in angle brackets or single quotes, is an alternative @@ -2636,7 +2742,7 @@ plus or a minus sign it is taken as a relative reference. For example: Note that \g{...} (Perl syntax) and \g<...> (Oniguruma syntax) are <i>not</i> synonymous. The former is a back reference; the latter is a subroutine call. </P> -<br><a name="SEC25" href="#TOC1">CALLOUTS</a><br> +<br><a name="SEC26" href="#TOC1">CALLOUTS</a><br> <P> Perl has a feature whereby using the sequence (?{...}) causes arbitrary Perl code to be obeyed in the middle of matching a regular expression. This makes it @@ -2674,12 +2780,18 @@ During matching, when PCRE reaches a callout point, the external function is called. It is provided with the number of the callout, the position in the pattern, and, optionally, one item of data originally supplied by the caller of the matching function. The callout function may cause matching to proceed, to -backtrack, or to fail altogether. A complete description of the interface to -the callout function is given in the +backtrack, or to fail altogether. +</P> +<P> +By default, PCRE implements a number of optimizations at compile time and +matching time, and one side-effect is that sometimes callouts are skipped. If +you need all possible callouts to happen, you need to set options that disable +the relevant optimizations. More details, and a complete description of the +interface to the callout function, are given in the <a href="pcrecallout.html"><b>pcrecallout</b></a> documentation. <a name="backtrackcontrol"></a></P> -<br><a name="SEC26" href="#TOC1">BACKTRACKING CONTROL</a><br> +<br><a name="SEC27" href="#TOC1">BACKTRACKING CONTROL</a><br> <P> Perl 5.10 introduced a number of "Special Backtracking Control Verbs", which are still described in the Perl documentation as "experimental and subject to @@ -3026,7 +3138,7 @@ example: <pre> ...(*COMMIT)(*PRUNE)... </pre> -If there is a matching failure to the right, backtracking onto (*PRUNE) cases +If there is a matching failure to the right, backtracking onto (*PRUNE) causes it to be triggered, and its action is taken. There can never be a backtrack onto (*COMMIT). <a name="btrepeat"></a></P> @@ -3093,12 +3205,12 @@ the subroutine match to fail. the subpattern that has alternatives. If there is no such group within the subpattern, (*THEN) causes the subroutine match to fail. </P> -<br><a name="SEC27" href="#TOC1">SEE ALSO</a><br> +<br><a name="SEC28" href="#TOC1">SEE ALSO</a><br> <P> <b>pcreapi</b>(3), <b>pcrecallout</b>(3), <b>pcrematching</b>(3), <b>pcresyntax</b>(3), <b>pcre</b>(3), <b>pcre16(3)</b>, <b>pcre32(3)</b>. </P> -<br><a name="SEC28" href="#TOC1">AUTHOR</a><br> +<br><a name="SEC29" href="#TOC1">AUTHOR</a><br> <P> Philip Hazel <br> @@ -3107,9 +3219,9 @@ University Computing Service Cambridge CB2 3QH, England. <br> </P> -<br><a name="SEC29" href="#TOC1">REVISION</a><br> +<br><a name="SEC30" href="#TOC1">REVISION</a><br> <P> -Last updated: 26 April 2013 +Last updated: 03 December 2013 <br> Copyright © 1997-2013 University of Cambridge. <br> diff --git a/pcre/doc/html/pcreposix.html b/pcre/doc/html/pcreposix.html index 0e5b296a086..18924cf7f94 100644 --- a/pcre/doc/html/pcreposix.html +++ b/pcre/doc/html/pcreposix.html @@ -13,7 +13,7 @@ from the original man page. If there is any nonsense in it, please consult the man page, in case the conversion went wrong. <br> <ul> -<li><a name="TOC1" href="#SEC1">SYNOPSIS OF POSIX API</a> +<li><a name="TOC1" href="#SEC1">SYNOPSIS</a> <li><a name="TOC2" href="#SEC2">DESCRIPTION</a> <li><a name="TOC3" href="#SEC3">COMPILING A PATTERN</a> <li><a name="TOC4" href="#SEC4">MATCHING NEWLINE CHARACTERS</a> @@ -23,23 +23,21 @@ man page, in case the conversion went wrong. <li><a name="TOC8" href="#SEC8">AUTHOR</a> <li><a name="TOC9" href="#SEC9">REVISION</a> </ul> -<br><a name="SEC1" href="#TOC1">SYNOPSIS OF POSIX API</a><br> +<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br> <P> <b>#include <pcreposix.h></b> </P> <P> <b>int regcomp(regex_t *<i>preg</i>, const char *<i>pattern</i>,</b> -<b>int <i>cflags</i>);</b> -</P> -<P> +<b> int <i>cflags</i>);</b> +<br> +<br> <b>int regexec(regex_t *<i>preg</i>, const char *<i>string</i>,</b> -<b>size_t <i>nmatch</i>, regmatch_t <i>pmatch</i>[], int <i>eflags</i>);</b> -</P> -<P> -<b>size_t regerror(int <i>errcode</i>, const regex_t *<i>preg</i>,</b> -<b>char *<i>errbuf</i>, size_t <i>errbuf_size</i>);</b> -</P> -<P> +<b> size_t <i>nmatch</i>, regmatch_t <i>pmatch</i>[], int <i>eflags</i>);</b> +<b> size_t regerror(int <i>errcode</i>, const regex_t *<i>preg</i>,</b> +<b> char *<i>errbuf</i>, size_t <i>errbuf_size</i>);</b> +<br> +<br> <b>void regfree(regex_t *<i>preg</i>);</b> </P> <br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br> diff --git a/pcre/doc/html/pcreprecompile.html b/pcre/doc/html/pcreprecompile.html index beb9e242451..decb1d6ce05 100644 --- a/pcre/doc/html/pcreprecompile.html +++ b/pcre/doc/html/pcreprecompile.html @@ -102,8 +102,8 @@ study data. <br><a name="SEC3" href="#TOC1">RE-USING A PRECOMPILED PATTERN</a><br> <P> Re-using a precompiled pattern is straightforward. Having reloaded it into main -memory, called <b>pcre[16|32]_pattern_to_host_byte_order()</b> if necessary, -you pass its pointer to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> in +memory, called <b>pcre[16|32]_pattern_to_host_byte_order()</b> if necessary, you +pass its pointer to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> in the usual way. </P> <P> @@ -119,6 +119,11 @@ in the documentation. </P> <P> +<b>Warning:</b> The tables that <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b> use +must be the same as those that were used when the pattern was compiled. If this +is not the case, the behaviour is undefined. +</P> +<P> If you did not provide custom character tables when the pattern was compiled, the pointer in the compiled pattern is NULL, which causes the matching functions to use PCRE's internal tables. Thus, you do not need to take any @@ -126,9 +131,9 @@ special action at run time in this case. </P> <P> If you saved study data with the compiled pattern, you need to create your own -<b>pcre[16|32]_extra</b> data block and set the <i>study_data</i> field to point to the -reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the -<i>flags</i> field to indicate that study data is present. Then pass the +<b>pcre[16|32]_extra</b> data block and set the <i>study_data</i> field to point +to the reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in +the <i>flags</i> field to indicate that study data is present. Then pass the <b>pcre[16|32]_extra</b> block to the matching function in the usual way. If the pattern was studied for just-in-time optimization, that data cannot be saved, and so is lost by a save/restore cycle. @@ -149,9 +154,9 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC6" href="#TOC1">REVISION</a><br> <P> -Last updated: 24 June 2012 +Last updated: 12 November 2013 <br> -Copyright © 1997-2012 University of Cambridge. +Copyright © 1997-2013 University of Cambridge. <br> <p> Return to the <a href="index.html">PCRE index page</a>. diff --git a/pcre/doc/html/pcresyntax.html b/pcre/doc/html/pcresyntax.html index b32e8b1689f..0764a33a376 100644 --- a/pcre/doc/html/pcresyntax.html +++ b/pcre/doc/html/pcresyntax.html @@ -65,10 +65,14 @@ documentation. This document contains a quick-reference summary of the syntax. \n newline (hex 0A) \r carriage return (hex 0D) \t tab (hex 09) + \0dd character with octal code 0dd \ddd character with octal code ddd, or backreference + \o{ddd..} character with octal code ddd.. \xhh character with hex code hh \x{hhh..} character with hex code hhh.. -</PRE> +</pre> +Note that \0dd is always an octal code, and that \8 and \9 are the literal +characters "8" and "9". </P> <br><a name="SEC4" href="#TOC1">CHARACTER TYPES</a><br> <P> @@ -92,9 +96,11 @@ documentation. This document contains a quick-reference summary of the syntax. \W a "non-word" character \X a Unicode extended grapheme cluster </pre> -In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII -characters, even in a UTF mode. However, this can be changed by setting the -PCRE_UCP option. +By default, \d, \s, and \w match only ASCII characters, even in UTF-8 mode +or in the 16- bit and 32-bit libraries. However, if locale-specific matching is +happening, \s and \w may also match characters with code points in the range +128-255. If the PCRE_UCP option is set, the behaviour of these escape sequences +is changed to use Unicode properties and they match many more characters. </P> <br><a name="SEC5" href="#TOC1">GENERAL CATEGORY PROPERTIES FOR \p and \P</a><br> <P> @@ -150,11 +156,13 @@ PCRE_UCP option. <pre> Xan Alphanumeric: union of properties L and N Xps POSIX space: property Z or tab, NL, VT, FF, CR - Xsp Perl space: property Z or tab, NL, FF, CR + Xsp Perl space: property Z or tab, NL, VT, FF, CR Xuc Univerally-named character: one that can be represented by a Universal Character Name Xwd Perl word: property Xan or underscore -</PRE> +</pre> +Perl and POSIX space are now the same. Perl added VT to its space character set +at release 5.18 and PCRE changed at release 8.34. </P> <br><a name="SEC7" href="#TOC1">SCRIPT NAMES FOR \p AND \P</a><br> <P> @@ -385,7 +393,9 @@ newline-setting options with similar syntax: (*UTF32) set UTF-32 mode: 32-bit library (PCRE_UTF32) (*UTF) set appropriate UTF mode for the library in use (*UCP) set PCRE_UCP (use Unicode properties for \d etc) -</PRE> +</pre> +Note that LIMIT_MATCH and LIMIT_RECURSION can only reduce the value of the +limits set by the caller of pcre_exec(), not increase them. </P> <br><a name="SEC17" href="#TOC1">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a><br> <P> @@ -516,7 +526,7 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC27" href="#TOC1">REVISION</a><br> <P> -Last updated: 26 April 2013 +Last updated: 12 November 2013 <br> Copyright © 1997-2013 University of Cambridge. <br> diff --git a/pcre/doc/html/pcretest.html b/pcre/doc/html/pcretest.html index 17d1ade6246..4ed1dfd0c74 100644 --- a/pcre/doc/html/pcretest.html +++ b/pcre/doc/html/pcretest.html @@ -187,6 +187,11 @@ equivalent to adding <b>/M</b> to each regular expression. The size is given in bytes for both libraries. </P> <P> +<b>-O</b> +Behave as if each pattern has the <b>/O</b> modifier, that is disable +auto-possessification for all patterns. +</P> +<P> <b>-o</b> <i>osize</i> Set the number of elements in the output vector that is used when calling <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> to be <i>osize</i>. The @@ -256,19 +261,24 @@ should never be studied (see the <b>/S</b> pattern modifier below). </P> <P> <b>-t</b> -Run each compile, study, and match many times with a timer, and output -resulting time per compile or match (in milliseconds). Do not set <b>-m</b> with -<b>-t</b>, because you will then get the size output a zillion times, and the -timing will be distorted. You can control the number of iterations that are -used for timing by following <b>-t</b> with a number (as a separate item on the -command line). For example, "-t 1000" would iterate 1000 times. The default is -to iterate 500000 times. +Run each compile, study, and match many times with a timer, and output the +resulting times per compile, study, or match (in milliseconds). Do not set +<b>-m</b> with <b>-t</b>, because you will then get the size output a zillion +times, and the timing will be distorted. You can control the number of +iterations that are used for timing by following <b>-t</b> with a number (as a +separate item on the command line). For example, "-t 1000" iterates 1000 times. +The default is to iterate 500000 times. </P> <P> <b>-tm</b> This is like <b>-t</b> except that it times only the matching phase, not the compile or study phases. </P> +<P> +<b>-T</b> <b>-TM</b> +These behave like <b>-t</b> and <b>-tm</b>, but in addition, at the end of a run, +the total times for all compiles, studies, and matches are output. +</P> <br><a name="SEC5" href="#TOC1">DESCRIPTION</a><br> <P> If <b>pcretest</b> is given two filename arguments, it reads from the first and @@ -287,7 +297,7 @@ option states whether or not <b>readline()</b> will be used. <P> The program handles any number of sets of input on a single input file. Each set starts with a regular expression, and continues with any number of data -lines to be matched against the pattern. +lines to be matched against that pattern. </P> <P> Each data line is matched separately and independently. If you want to do @@ -361,6 +371,7 @@ sections. <b>/M</b> show compiled memory size <b>/m</b> set PCRE_MULTILINE <b>/N</b> set PCRE_NO_AUTO_CAPTURE + <b>/O</b> set PCRE_NO_AUTO_POSSESS <b>/P</b> use the POSIX wrapper <b>/S</b> study the pattern after compilation <b>/s</b> set PCRE_DOTALL @@ -419,6 +430,7 @@ options that do not correspond to anything in Perl: <b>/f</b> PCRE_FIRSTLINE <b>/J</b> PCRE_DUPNAMES <b>/N</b> PCRE_NO_AUTO_CAPTURE + <b>/O</b> PCRE_NO_AUTO_POSSESS <b>/U</b> PCRE_UNGREEDY <b>/W</b> PCRE_UCP <b>/X</b> PCRE_EXTRA @@ -562,8 +574,8 @@ matched. There are a number of qualifying characters that may follow <b>/S</b>. They may appear in any order. </P> <P> -If <b>S</b> is followed by an exclamation mark, <b>pcre[16|32]_study()</b> is called -with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a +If <b>/S</b> is followed by an exclamation mark, <b>pcre[16|32]_study()</b> is +called with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a <b>pcre_extra</b> block, even when studying discovers no useful information. </P> <P> @@ -642,6 +654,37 @@ function: The <b>/+</b> modifier works as described above. All other modifiers are ignored. </P> +<br><b> +Locking out certain modifiers +</b><br> +<P> +PCRE can be compiled with or without support for certain features such as +UTF-8/16/32 or Unicode properties. Accordingly, the standard tests are split up +into a number of different files that are selected for running depending on +which features are available. When updating the tests, it is all too easy to +put a new test into the wrong file by mistake; for example, to put a test that +requires UTF support into a file that is used when it is not available. To help +detect such mistakes as early as possible, there is a facility for locking out +specific modifiers. If an input line for <b>pcretest</b> starts with the string +"< forbid " the following sequence of characters is taken as a list of +forbidden modifiers. For example, in the test files that must not use UTF or +Unicode property support, this line appears: +<pre> + < forbid 8W +</pre> +This locks out the /8 and /W modifiers. An immediate error is given if they are +subsequently encountered. If the character string contains < but not >, all the +multi-character modifiers that begin with < are locked out. Otherwise, such +modifiers must be explicitly listed, for example: +<pre> + < forbid <JS><cr> +</pre> +There must be a single space between < and "forbid" for this feature to be +recognised. If there is not, the line is interpreted either as a request to +re-load a pre-compiled pattern (see "SAVING AND RELOADING COMPILED PATTERNS" +below) or, if there is a another < character, as a pattern that uses < as its +delimiter. +</P> <br><a name="SEC7" href="#TOC1">DATA LINES</a><br> <P> Before each data line is passed to <b>pcre[16|32]_exec()</b>, leading and trailing @@ -662,6 +705,7 @@ recognized: \v vertical tab (\x0b) \nnn octal character (up to 3 octal digits); always a byte unless > 255 in UTF-8 or 16-bit or 32-bit mode + \o{dd...} octal character (any number of octal digits} \xhh hexadecimal byte (up to 2 hex digits) \x{hh...} hexadecimal character (any number of hex digits) \A pass the PCRE_ANCHORED option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> @@ -1031,10 +1075,9 @@ writing the file, <b>pcretest</b> expects to read a new pattern. </P> <P> A saved pattern can be reloaded into <b>pcretest</b> by specifying < and a file -name instead of a pattern. The name of the file must not contain a < character, -as otherwise <b>pcretest</b> will interpret the line as a pattern delimited by < -characters. -For example: +name instead of a pattern. There must be no space between < and the file name, +which must not contain a < character, as otherwise <b>pcretest</b> will +interpret the line as a pattern delimited by < characters. For example: <pre> re> </some/file Compiled pattern loaded from /some/file @@ -1091,7 +1134,7 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC17" href="#TOC1">REVISION</a><br> <P> -Last updated: 26 April 2013 +Last updated: 12 November 2013 <br> Copyright © 1997-2013 University of Cambridge. <br> diff --git a/pcre/doc/pcre-config.1 b/pcre/doc/pcre-config.1 index 92a4b58bc4a..52eb4fb2264 100644 --- a/pcre/doc/pcre-config.1 +++ b/pcre/doc/pcre-config.1 @@ -4,11 +4,11 @@ pcre-config - program to return PCRE configuration .SH SYNOPSIS .rs .sp +.nf .B pcre-config [--prefix] [--exec-prefix] [--version] [--libs] -.ti +5n -.B [--libs16] [--libs32] [--libs-cpp] [--libs-posix] -.ti +5n -.B [--cflags] [--cflags-posix] +.B " [--libs16] [--libs32] [--libs-cpp] [--libs-posix]" +.B " [--cflags] [--cflags-posix]" +.fi . . .SH DESCRIPTION diff --git a/pcre/doc/pcre-config.txt b/pcre/doc/pcre-config.txt index 97a6abed62c..8503ab0ef0c 100644 --- a/pcre/doc/pcre-config.txt +++ b/pcre/doc/pcre-config.txt @@ -8,8 +8,8 @@ NAME SYNOPSIS pcre-config [--prefix] [--exec-prefix] [--version] [--libs] - [--libs16] [--libs32] [--libs-cpp] [--libs-posix] - [--cflags] [--cflags-posix] + [--libs16] [--libs32] [--libs-cpp] [--libs-posix] + [--cflags] [--cflags-posix] DESCRIPTION diff --git a/pcre/doc/pcre.3 b/pcre/doc/pcre.3 index c2f9164052c..d92f9ef08de 100644 --- a/pcre/doc/pcre.3 +++ b/pcre/doc/pcre.3 @@ -1,4 +1,4 @@ -.TH PCRE 3 "13 May 2013" "PCRE 8.33" +.TH PCRE 3 "01 Oct 2013" "PCRE 8.33" .SH NAME PCRE - Perl-compatible regular expressions .SH INTRODUCTION @@ -44,7 +44,7 @@ The current implementation of PCRE corresponds approximately with Perl 5.12, including support for UTF-8/16/32 encoded strings and Unicode general category properties. However, UTF-8/16/32 and Unicode support has to be explicitly enabled; it is not the default. The Unicode tables correspond to Unicode -release 6.2.0. +release 6.3.0. .P In addition to the Perl-compatible matching function, PCRE contains an alternative function that matches the same compiled patterns in a different diff --git a/pcre/doc/pcre.txt b/pcre/doc/pcre.txt index 193203e8a32..9d69515c3b8 100644 --- a/pcre/doc/pcre.txt +++ b/pcre/doc/pcre.txt @@ -53,7 +53,7 @@ INTRODUCTION 5.12, including support for UTF-8/16/32 encoded strings and Unicode general category properties. However, UTF-8/16/32 and Unicode support has to be explicitly enabled; it is not the default. The Unicode tables - correspond to Unicode release 6.2.0. + correspond to Unicode release 6.3.0. In addition to the Perl-compatible matching function, PCRE contains an alternative function that matches the same compiled patterns in a dif- @@ -532,7 +532,6 @@ PCRE 32-BIT API BASIC FUNCTIONS pcre32 *pcre32_compile2(PCRE_SPTR32 pattern, int options, int *errorcodeptr, - const char **errptr, int *erroffset, const unsigned char *tableptr); pcre32_extra *pcre32_study(const pcre32 *code, int options, @@ -1458,72 +1457,81 @@ THE ALTERNATIVE MATCHING ALGORITHM at the fifth character of the subject. The algorithm does not automati- cally move on to find matches that start at later positions. + PCRE's "auto-possessification" optimization usually applies to charac- + ter repeats at the end of a pattern (as well as internally). For exam- + ple, the pattern "a\d+" is compiled as if it were "a\d++" because there + is no point even considering the possibility of backtracking into the + repeated digits. For DFA matching, this means that only one possible + match is found. If you really do want multiple matches in such cases, + either use an ungreedy repeat ("a\d+?") or set the PCRE_NO_AUTO_POSSESS + option when compiling. + There are a number of features of PCRE regular expressions that are not supported by the alternative matching algorithm. They are as follows: - 1. Because the algorithm finds all possible matches, the greedy or - ungreedy nature of repetition quantifiers is not relevant. Greedy and + 1. Because the algorithm finds all possible matches, the greedy or + ungreedy nature of repetition quantifiers is not relevant. Greedy and ungreedy quantifiers are treated in exactly the same way. However, pos- - sessive quantifiers can make a difference when what follows could also + sessive quantifiers can make a difference when what follows could also match what is quantified, for example in a pattern like this: ^a++\w! - This pattern matches "aaab!" but not "aaa!", which would be matched by - a non-possessive quantifier. Similarly, if an atomic group is present, - it is matched as if it were a standalone pattern at the current point, - and the longest match is then "locked in" for the rest of the overall + This pattern matches "aaab!" but not "aaa!", which would be matched by + a non-possessive quantifier. Similarly, if an atomic group is present, + it is matched as if it were a standalone pattern at the current point, + and the longest match is then "locked in" for the rest of the overall pattern. 2. When dealing with multiple paths through the tree simultaneously, it - is not straightforward to keep track of captured substrings for the - different matching possibilities, and PCRE's implementation of this + is not straightforward to keep track of captured substrings for the + different matching possibilities, and PCRE's implementation of this algorithm does not attempt to do this. This means that no captured sub- strings are available. - 3. Because no substrings are captured, back references within the pat- + 3. Because no substrings are captured, back references within the pat- tern are not supported, and cause errors if encountered. - 4. For the same reason, conditional expressions that use a backrefer- - ence as the condition or test for a specific group recursion are not + 4. For the same reason, conditional expressions that use a backrefer- + ence as the condition or test for a specific group recursion are not supported. - 5. Because many paths through the tree may be active, the \K escape + 5. Because many paths through the tree may be active, the \K escape sequence, which resets the start of the match when encountered (but may - be on some paths and not on others), is not supported. It causes an + be on some paths and not on others), is not supported. It causes an error if encountered. - 6. Callouts are supported, but the value of the capture_top field is + 6. Callouts are supported, but the value of the capture_top field is always 1, and the value of the capture_last field is always -1. - 7. The \C escape sequence, which (in the standard algorithm) always - matches a single data unit, even in UTF-8, UTF-16 or UTF-32 modes, is - not supported in these modes, because the alternative algorithm moves + 7. The \C escape sequence, which (in the standard algorithm) always + matches a single data unit, even in UTF-8, UTF-16 or UTF-32 modes, is + not supported in these modes, because the alternative algorithm moves through the subject string one character (not data unit) at a time, for all active paths through the tree. - 8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE) - are not supported. (*FAIL) is supported, and behaves like a failing + 8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE) + are not supported. (*FAIL) is supported, and behaves like a failing negative assertion. ADVANTAGES OF THE ALTERNATIVE ALGORITHM - Using the alternative matching algorithm provides the following advan- + Using the alternative matching algorithm provides the following advan- tages: 1. All possible matches (at a single point in the subject) are automat- - ically found, and in particular, the longest match is found. To find + ically found, and in particular, the longest match is found. To find more than one match using the standard algorithm, you have to do kludgy things with callouts. - 2. Because the alternative algorithm scans the subject string just + 2. Because the alternative algorithm scans the subject string just once, and never needs to backtrack (except for lookbehinds), it is pos- - sible to pass very long subject strings to the matching function in + sible to pass very long subject strings to the matching function in several pieces, checking for partial matching each time. Although it is - possible to do multi-segment matching using the standard algorithm by - retaining partially matched substrings, it is more complicated. The - pcrepartial documentation gives details of partial matching and dis- + possible to do multi-segment matching using the standard algorithm by + retaining partially matched substrings, it is more complicated. The + pcrepartial documentation gives details of partial matching and dis- cusses multi-segment matching. @@ -1531,8 +1539,8 @@ DISADVANTAGES OF THE ALTERNATIVE ALGORITHM The alternative algorithm suffers from a number of disadvantages: - 1. It is substantially slower than the standard algorithm. This is - partly because it has to search for all possible matches, but is also + 1. It is substantially slower than the standard algorithm. This is + partly because it has to search for all possible matches, but is also because it is less susceptible to optimization. 2. Capturing parentheses and back references are not supported. @@ -1550,7 +1558,7 @@ AUTHOR REVISION - Last updated: 08 January 2012 + Last updated: 12 November 2013 Copyright (c) 1997-2012 University of Cambridge. ------------------------------------------------------------------------------ @@ -1958,27 +1966,34 @@ CHECKING BUILD-TIME OPTIONS POSIX interface uses malloc() for output vectors. Further details are given in the pcreposix documentation. + PCRE_CONFIG_PARENS_LIMIT + + The output is a long integer that gives the maximum depth of nesting of + parentheses (of any kind) in a pattern. This limit is imposed to cap + the amount of system stack used when a pattern is compiled. It is spec- + ified when PCRE is built; the default is 250. + PCRE_CONFIG_MATCH_LIMIT - The output is a long integer that gives the default limit for the num- - ber of internal matching function calls in a pcre_exec() execution. + The output is a long integer that gives the default limit for the num- + ber of internal matching function calls in a pcre_exec() execution. Further details are given with pcre_exec() below. PCRE_CONFIG_MATCH_LIMIT_RECURSION The output is a long integer that gives the default limit for the depth - of recursion when calling the internal matching function in a - pcre_exec() execution. Further details are given with pcre_exec() + of recursion when calling the internal matching function in a + pcre_exec() execution. Further details are given with pcre_exec() below. PCRE_CONFIG_STACKRECURSE - The output is an integer that is set to one if internal recursion when + The output is an integer that is set to one if internal recursion when running pcre_exec() is implemented by recursive function calls that use - the stack to remember their state. This is the usual way that PCRE is + the stack to remember their state. This is the usual way that PCRE is compiled. The output is zero if PCRE was compiled to use blocks of data - on the heap instead of recursive function calls. In this case, - pcre_stack_malloc and pcre_stack_free are called to manage memory + on the heap instead of recursive function calls. In this case, + pcre_stack_malloc and pcre_stack_free are called to manage memory blocks on the heap, thus avoiding the use of the stack. @@ -1995,67 +2010,67 @@ COMPILING A PATTERN Either of the functions pcre_compile() or pcre_compile2() can be called to compile a pattern into an internal form. The only difference between - the two interfaces is that pcre_compile2() has an additional argument, - errorcodeptr, via which a numerical error code can be returned. To - avoid too much repetition, we refer just to pcre_compile() below, but + the two interfaces is that pcre_compile2() has an additional argument, + errorcodeptr, via which a numerical error code can be returned. To + avoid too much repetition, we refer just to pcre_compile() below, but the information applies equally to pcre_compile2(). The pattern is a C string terminated by a binary zero, and is passed in - the pattern argument. A pointer to a single block of memory that is - obtained via pcre_malloc is returned. This contains the compiled code + the pattern argument. A pointer to a single block of memory that is + obtained via pcre_malloc is returned. This contains the compiled code and related data. The pcre type is defined for the returned block; this is a typedef for a structure whose contents are not externally defined. It is up to the caller to free the memory (via pcre_free) when it is no longer required. - Although the compiled code of a PCRE regex is relocatable, that is, it + Although the compiled code of a PCRE regex is relocatable, that is, it does not depend on memory location, the complete pcre data block is not - fully relocatable, because it may contain a copy of the tableptr argu- + fully relocatable, because it may contain a copy of the tableptr argu- ment, which is an address (see below). The options argument contains various bit settings that affect the com- - pilation. It should be zero if no options are required. The available - options are described below. Some of them (in particular, those that - are compatible with Perl, but some others as well) can also be set and - unset from within the pattern (see the detailed description in the - pcrepattern documentation). For those options that can be different in - different parts of the pattern, the contents of the options argument + pilation. It should be zero if no options are required. The available + options are described below. Some of them (in particular, those that + are compatible with Perl, but some others as well) can also be set and + unset from within the pattern (see the detailed description in the + pcrepattern documentation). For those options that can be different in + different parts of the pattern, the contents of the options argument specifies their settings at the start of compilation and execution. The - PCRE_ANCHORED, PCRE_BSR_xxx, PCRE_NEWLINE_xxx, PCRE_NO_UTF8_CHECK, and - PCRE_NO_START_OPTIMIZE options can be set at the time of matching as + PCRE_ANCHORED, PCRE_BSR_xxx, PCRE_NEWLINE_xxx, PCRE_NO_UTF8_CHECK, and + PCRE_NO_START_OPTIMIZE options can be set at the time of matching as well as at compile time. If errptr is NULL, pcre_compile() returns NULL immediately. Otherwise, - if compilation of a pattern fails, pcre_compile() returns NULL, and + if compilation of a pattern fails, pcre_compile() returns NULL, and sets the variable pointed to by errptr to point to a textual error mes- sage. This is a static string that is part of the library. You must not - try to free it. Normally, the offset from the start of the pattern to + try to free it. Normally, the offset from the start of the pattern to the data unit that was being processed when the error was discovered is - placed in the variable pointed to by erroffset, which must not be NULL - (if it is, an immediate error is given). However, for an invalid UTF-8 - or UTF-16 string, the offset is that of the first data unit of the + placed in the variable pointed to by erroffset, which must not be NULL + (if it is, an immediate error is given). However, for an invalid UTF-8 + or UTF-16 string, the offset is that of the first data unit of the failing character. - Some errors are not detected until the whole pattern has been scanned; - in these cases, the offset passed back is the length of the pattern. - Note that the offset is in data units, not characters, even in a UTF + Some errors are not detected until the whole pattern has been scanned; + in these cases, the offset passed back is the length of the pattern. + Note that the offset is in data units, not characters, even in a UTF mode. It may sometimes point into the middle of a UTF-8 or UTF-16 char- acter. - If pcre_compile2() is used instead of pcre_compile(), and the error- - codeptr argument is not NULL, a non-zero error code number is returned - via this argument in the event of an error. This is in addition to the + If pcre_compile2() is used instead of pcre_compile(), and the error- + codeptr argument is not NULL, a non-zero error code number is returned + via this argument in the event of an error. This is in addition to the textual error message. Error codes and messages are listed below. - If the final argument, tableptr, is NULL, PCRE uses a default set of - character tables that are built when PCRE is compiled, using the - default C locale. Otherwise, tableptr must be an address that is the - result of a call to pcre_maketables(). This value is stored with the - compiled pattern, and used again by pcre_exec(), unless another table - pointer is passed to it. For more discussion, see the section on locale - support below. + If the final argument, tableptr, is NULL, PCRE uses a default set of + character tables that are built when PCRE is compiled, using the + default C locale. Otherwise, tableptr must be an address that is the + result of a call to pcre_maketables(). This value is stored with the + compiled pattern, and used again by pcre_exec() and pcre_dfa_exec() + when the pattern is matched. For more discussion, see the section on + locale support below. - This code fragment shows a typical straightforward call to pcre_com- + This code fragment shows a typical straightforward call to pcre_com- pile(): pcre *re; @@ -2068,171 +2083,181 @@ COMPILING A PATTERN &erroffset, /* for error offset */ NULL); /* use default character tables */ - The following names for option bits are defined in the pcre.h header + The following names for option bits are defined in the pcre.h header file: PCRE_ANCHORED If this bit is set, the pattern is forced to be "anchored", that is, it - is constrained to match only at the first matching point in the string - that is being searched (the "subject string"). This effect can also be - achieved by appropriate constructs in the pattern itself, which is the + is constrained to match only at the first matching point in the string + that is being searched (the "subject string"). This effect can also be + achieved by appropriate constructs in the pattern itself, which is the only way to do it in Perl. PCRE_AUTO_CALLOUT If this bit is set, pcre_compile() automatically inserts callout items, - all with number 255, before each pattern item. For discussion of the + all with number 255, before each pattern item. For discussion of the callout facility, see the pcrecallout documentation. PCRE_BSR_ANYCRLF PCRE_BSR_UNICODE These options (which are mutually exclusive) control what the \R escape - sequence matches. The choice is either to match only CR, LF, or CRLF, + sequence matches. The choice is either to match only CR, LF, or CRLF, or to match any Unicode newline sequence. The default is specified when PCRE is built. It can be overridden from within the pattern, or by set- ting an option when a compiled pattern is matched. PCRE_CASELESS - If this bit is set, letters in the pattern match both upper and lower - case letters. It is equivalent to Perl's /i option, and it can be - changed within a pattern by a (?i) option setting. In UTF-8 mode, PCRE - always understands the concept of case for characters whose values are - less than 128, so caseless matching is always possible. For characters - with higher values, the concept of case is supported if PCRE is com- - piled with Unicode property support, but not otherwise. If you want to - use caseless matching for characters 128 and above, you must ensure - that PCRE is compiled with Unicode property support as well as with + If this bit is set, letters in the pattern match both upper and lower + case letters. It is equivalent to Perl's /i option, and it can be + changed within a pattern by a (?i) option setting. In UTF-8 mode, PCRE + always understands the concept of case for characters whose values are + less than 128, so caseless matching is always possible. For characters + with higher values, the concept of case is supported if PCRE is com- + piled with Unicode property support, but not otherwise. If you want to + use caseless matching for characters 128 and above, you must ensure + that PCRE is compiled with Unicode property support as well as with UTF-8 support. PCRE_DOLLAR_ENDONLY - If this bit is set, a dollar metacharacter in the pattern matches only - at the end of the subject string. Without this option, a dollar also - matches immediately before a newline at the end of the string (but not - before any other newlines). The PCRE_DOLLAR_ENDONLY option is ignored - if PCRE_MULTILINE is set. There is no equivalent to this option in + If this bit is set, a dollar metacharacter in the pattern matches only + at the end of the subject string. Without this option, a dollar also + matches immediately before a newline at the end of the string (but not + before any other newlines). The PCRE_DOLLAR_ENDONLY option is ignored + if PCRE_MULTILINE is set. There is no equivalent to this option in Perl, and no way to set it within a pattern. PCRE_DOTALL - If this bit is set, a dot metacharacter in the pattern matches a char- + If this bit is set, a dot metacharacter in the pattern matches a char- acter of any value, including one that indicates a newline. However, it - only ever matches one character, even if newlines are coded as CRLF. - Without this option, a dot does not match when the current position is + only ever matches one character, even if newlines are coded as CRLF. + Without this option, a dot does not match when the current position is at a newline. This option is equivalent to Perl's /s option, and it can - be changed within a pattern by a (?s) option setting. A negative class + be changed within a pattern by a (?s) option setting. A negative class such as [^a] always matches newline characters, independent of the set- ting of this option. PCRE_DUPNAMES - If this bit is set, names used to identify capturing subpatterns need + If this bit is set, names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it - is known that only one instance of the named subpattern can ever be - matched. There are more details of named subpatterns below; see also + is known that only one instance of the named subpattern can ever be + matched. There are more details of named subpatterns below; see also the pcrepattern documentation. PCRE_EXTENDED - If this bit is set, white space data characters in the pattern are - totally ignored except when escaped or inside a character class. White - space does not include the VT character (code 11). In addition, charac- - ters between an unescaped # outside a character class and the next new- - line, inclusive, are also ignored. This is equivalent to Perl's /x - option, and it can be changed within a pattern by a (?x) option set- - ting. - - Which characters are interpreted as newlines is controlled by the - options passed to pcre_compile() or by a special sequence at the start - of the pattern, as described in the section entitled "Newline conven- + If this bit is set, most white space characters in the pattern are + totally ignored except when escaped or inside a character class. How- + ever, white space is not allowed within sequences such as (?> that + introduce various parenthesized subpatterns, nor within a numerical + quantifier such as {1,3}. However, ignorable white space is permitted + between an item and a following quantifier and between a quantifier and + a following + that indicates possessiveness. + + White space did not used to include the VT character (code 11), because + Perl did not treat this character as white space. However, Perl changed + at release 5.18, so PCRE followed at release 8.34, and VT is now + treated as white space. + + PCRE_EXTENDED also causes characters between an unescaped # outside a + character class and the next newline, inclusive, to be ignored. + PCRE_EXTENDED is equivalent to Perl's /x option, and it can be changed + within a pattern by a (?x) option setting. + + Which characters are interpreted as newlines is controlled by the + options passed to pcre_compile() or by a special sequence at the start + of the pattern, as described in the section entitled "Newline conven- tions" in the pcrepattern documentation. Note that the end of this type - of comment is a literal newline sequence in the pattern; escape + of comment is a literal newline sequence in the pattern; escape sequences that happen to represent a newline do not count. - This option makes it possible to include comments inside complicated - patterns. Note, however, that this applies only to data characters. - White space characters may never appear within special character + This option makes it possible to include comments inside complicated + patterns. Note, however, that this applies only to data characters. + White space characters may never appear within special character sequences in a pattern, for example within the sequence (?( that intro- duces a conditional subpattern. PCRE_EXTRA - This option was invented in order to turn on additional functionality - of PCRE that is incompatible with Perl, but it is currently of very - little use. When set, any backslash in a pattern that is followed by a - letter that has no special meaning causes an error, thus reserving - these combinations for future expansion. By default, as in Perl, a - backslash followed by a letter with no special meaning is treated as a + This option was invented in order to turn on additional functionality + of PCRE that is incompatible with Perl, but it is currently of very + little use. When set, any backslash in a pattern that is followed by a + letter that has no special meaning causes an error, thus reserving + these combinations for future expansion. By default, as in Perl, a + backslash followed by a letter with no special meaning is treated as a literal. (Perl can, however, be persuaded to give an error for this, by - running it with the -w option.) There are at present no other features - controlled by this option. It can also be set by a (?X) option setting + running it with the -w option.) There are at present no other features + controlled by this option. It can also be set by a (?X) option setting within a pattern. PCRE_FIRSTLINE - If this option is set, an unanchored pattern is required to match - before or at the first newline in the subject string, though the + If this option is set, an unanchored pattern is required to match + before or at the first newline in the subject string, though the matched text may continue over the newline. PCRE_JAVASCRIPT_COMPAT If this option is set, PCRE's behaviour is changed in some ways so that - it is compatible with JavaScript rather than Perl. The changes are as + it is compatible with JavaScript rather than Perl. The changes are as follows: - (1) A lone closing square bracket in a pattern causes a compile-time - error, because this is illegal in JavaScript (by default it is treated + (1) A lone closing square bracket in a pattern causes a compile-time + error, because this is illegal in JavaScript (by default it is treated as a data character). Thus, the pattern AB]CD becomes illegal when this option is set. - (2) At run time, a back reference to an unset subpattern group matches - an empty string (by default this causes the current matching alterna- - tive to fail). A pattern such as (\1)(a) succeeds when this option is - set (assuming it can find an "a" in the subject), whereas it fails by + (2) At run time, a back reference to an unset subpattern group matches + an empty string (by default this causes the current matching alterna- + tive to fail). A pattern such as (\1)(a) succeeds when this option is + set (assuming it can find an "a" in the subject), whereas it fails by default, for Perl compatibility. (3) \U matches an upper case "U" character; by default \U causes a com- pile time error (Perl uses \U to upper case subsequent characters). (4) \u matches a lower case "u" character unless it is followed by four - hexadecimal digits, in which case the hexadecimal number defines the - code point to match. By default, \u causes a compile time error (Perl + hexadecimal digits, in which case the hexadecimal number defines the + code point to match. By default, \u causes a compile time error (Perl uses it to upper case the following character). - (5) \x matches a lower case "x" character unless it is followed by two - hexadecimal digits, in which case the hexadecimal number defines the - code point to match. By default, as in Perl, a hexadecimal number is + (5) \x matches a lower case "x" character unless it is followed by two + hexadecimal digits, in which case the hexadecimal number defines the + code point to match. By default, as in Perl, a hexadecimal number is always expected after \x, but it may have zero, one, or two digits (so, for example, \xz matches a binary zero character followed by z). PCRE_MULTILINE - By default, for the purposes of matching "start of line" and "end of + By default, for the purposes of matching "start of line" and "end of line", PCRE treats the subject string as consisting of a single line of - characters, even if it actually contains newlines. The "start of line" + characters, even if it actually contains newlines. The "start of line" metacharacter (^) matches only at the start of the string, and the "end - of line" metacharacter ($) matches only at the end of the string, or - before a terminating newline (except when PCRE_DOLLAR_ENDONLY is set). - Note, however, that unless PCRE_DOTALL is set, the "any character" - metacharacter (.) does not match at a newline. This behaviour (for ^, + of line" metacharacter ($) matches only at the end of the string, or + before a terminating newline (except when PCRE_DOLLAR_ENDONLY is set). + Note, however, that unless PCRE_DOTALL is set, the "any character" + metacharacter (.) does not match at a newline. This behaviour (for ^, $, and dot) is the same as Perl. - When PCRE_MULTILINE it is set, the "start of line" and "end of line" - constructs match immediately following or immediately before internal - newlines in the subject string, respectively, as well as at the very - start and end. This is equivalent to Perl's /m option, and it can be + When PCRE_MULTILINE it is set, the "start of line" and "end of line" + constructs match immediately following or immediately before internal + newlines in the subject string, respectively, as well as at the very + start and end. This is equivalent to Perl's /m option, and it can be changed within a pattern by a (?m) option setting. If there are no new- - lines in a subject string, or no occurrences of ^ or $ in a pattern, + lines in a subject string, or no occurrences of ^ or $ in a pattern, setting PCRE_MULTILINE has no effect. PCRE_NEVER_UTF This option locks out interpretation of the pattern as UTF-8 (or UTF-16 - or UTF-32 in the 16-bit and 32-bit libraries). In particular, it pre- - vents the creator of the pattern from switching to UTF interpretation + or UTF-32 in the 16-bit and 32-bit libraries). In particular, it pre- + vents the creator of the pattern from switching to UTF interpretation by starting the pattern with (*UTF). This may be useful in applications that process patterns from external sources. The combination of PCRE_UTF8 and PCRE_NEVER_UTF also causes an error. @@ -2243,41 +2268,41 @@ COMPILING A PATTERN PCRE_NEWLINE_ANYCRLF PCRE_NEWLINE_ANY - These options override the default newline definition that was chosen - when PCRE was built. Setting the first or the second specifies that a - newline is indicated by a single character (CR or LF, respectively). - Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the - two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies + These options override the default newline definition that was chosen + when PCRE was built. Setting the first or the second specifies that a + newline is indicated by a single character (CR or LF, respectively). + Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the + two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies that any of the three preceding sequences should be recognized. Setting - PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be + PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be recognized. - In an ASCII/Unicode environment, the Unicode newline sequences are the - three just mentioned, plus the single characters VT (vertical tab, + In an ASCII/Unicode environment, the Unicode newline sequences are the + three just mentioned, plus the single characters VT (vertical tab, U+000B), FF (form feed, U+000C), NEL (next line, U+0085), LS (line sep- - arator, U+2028), and PS (paragraph separator, U+2029). For the 8-bit + arator, U+2028), and PS (paragraph separator, U+2029). For the 8-bit library, the last two are recognized only in UTF-8 mode. - When PCRE is compiled to run in an EBCDIC (mainframe) environment, the + When PCRE is compiled to run in an EBCDIC (mainframe) environment, the code for CR is 0x0d, the same as ASCII. However, the character code for - LF is normally 0x15, though in some EBCDIC environments 0x25 is used. - Whichever of these is not LF is made to correspond to Unicode's NEL - character. EBCDIC codes are all less than 256. For more details, see + LF is normally 0x15, though in some EBCDIC environments 0x25 is used. + Whichever of these is not LF is made to correspond to Unicode's NEL + character. EBCDIC codes are all less than 256. For more details, see the pcrebuild documentation. - The newline setting in the options word uses three bits that are + The newline setting in the options word uses three bits that are treated as a number, giving eight possibilities. Currently only six are - used (default plus the five values above). This means that if you set - more than one newline option, the combination may or may not be sensi- + used (default plus the five values above). This means that if you set + more than one newline option, the combination may or may not be sensi- ble. For example, PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to - PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and + PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and cause an error. - The only time that a line break in a pattern is specially recognized - when compiling is when PCRE_EXTENDED is set. CR and LF are white space - characters, and so are ignored in this mode. Also, an unescaped # out- - side a character class indicates a comment that lasts until after the - next line break sequence. In other circumstances, line break sequences + The only time that a line break in a pattern is specially recognized + when compiling is when PCRE_EXTENDED is set. CR and LF are white space + characters, and so are ignored in this mode. Also, an unescaped # out- + side a character class indicates a comment that lasts until after the + next line break sequence. In other circumstances, line break sequences in patterns are treated as literal data. The newline option that is set at compile time becomes the default that @@ -2286,69 +2311,79 @@ COMPILING A PATTERN PCRE_NO_AUTO_CAPTURE If this option is set, it disables the use of numbered capturing paren- - theses in the pattern. Any opening parenthesis that is not followed by - ? behaves as if it were followed by ?: but named parentheses can still - be used for capturing (and they acquire numbers in the usual way). + theses in the pattern. Any opening parenthesis that is not followed by + ? behaves as if it were followed by ?: but named parentheses can still + be used for capturing (and they acquire numbers in the usual way). There is no equivalent of this option in Perl. + PCRE_NO_AUTO_POSSESS + + If this option is set, it disables "auto-possessification". This is an + optimization that, for example, turns a+b into a++b in order to avoid + backtracks into a+ that can never be successful. However, if callouts + are in use, auto-possessification means that some of them are never + taken. You can set this option if you want the matching functions to do + a full unoptimized search and run all the callouts, but it is mainly + provided for testing purposes. + PCRE_NO_START_OPTIMIZE - This is an option that acts at matching time; that is, it is really an - option for pcre_exec() or pcre_dfa_exec(). If it is set at compile - time, it is remembered with the compiled pattern and assumed at match- - ing time. This is necessary if you want to use JIT execution, because - the JIT compiler needs to know whether or not this option is set. For + This is an option that acts at matching time; that is, it is really an + option for pcre_exec() or pcre_dfa_exec(). If it is set at compile + time, it is remembered with the compiled pattern and assumed at match- + ing time. This is necessary if you want to use JIT execution, because + the JIT compiler needs to know whether or not this option is set. For details see the discussion of PCRE_NO_START_OPTIMIZE below. PCRE_UCP - This option changes the way PCRE processes \B, \b, \D, \d, \S, \s, \W, - \w, and some of the POSIX character classes. By default, only ASCII - characters are recognized, but if PCRE_UCP is set, Unicode properties - are used instead to classify characters. More details are given in the - section on generic character types in the pcrepattern page. If you set - PCRE_UCP, matching one of the items it affects takes much longer. The - option is available only if PCRE has been compiled with Unicode prop- + This option changes the way PCRE processes \B, \b, \D, \d, \S, \s, \W, + \w, and some of the POSIX character classes. By default, only ASCII + characters are recognized, but if PCRE_UCP is set, Unicode properties + are used instead to classify characters. More details are given in the + section on generic character types in the pcrepattern page. If you set + PCRE_UCP, matching one of the items it affects takes much longer. The + option is available only if PCRE has been compiled with Unicode prop- erty support. PCRE_UNGREEDY - This option inverts the "greediness" of the quantifiers so that they - are not greedy by default, but become greedy if followed by "?". It is - not compatible with Perl. It can also be set by a (?U) option setting + This option inverts the "greediness" of the quantifiers so that they + are not greedy by default, but become greedy if followed by "?". It is + not compatible with Perl. It can also be set by a (?U) option setting within the pattern. PCRE_UTF8 - This option causes PCRE to regard both the pattern and the subject as + This option causes PCRE to regard both the pattern and the subject as strings of UTF-8 characters instead of single-byte strings. However, it - is available only when PCRE is built to include UTF support. If not, - the use of this option provokes an error. Details of how this option + is available only when PCRE is built to include UTF support. If not, + the use of this option provokes an error. Details of how this option changes the behaviour of PCRE are given in the pcreunicode page. PCRE_NO_UTF8_CHECK When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is - automatically checked. There is a discussion about the validity of - UTF-8 strings in the pcreunicode page. If an invalid UTF-8 sequence is - found, pcre_compile() returns an error. If you already know that your - pattern is valid, and you want to skip this check for performance rea- - sons, you can set the PCRE_NO_UTF8_CHECK option. When it is set, the + automatically checked. There is a discussion about the validity of + UTF-8 strings in the pcreunicode page. If an invalid UTF-8 sequence is + found, pcre_compile() returns an error. If you already know that your + pattern is valid, and you want to skip this check for performance rea- + sons, you can set the PCRE_NO_UTF8_CHECK option. When it is set, the effect of passing an invalid UTF-8 string as a pattern is undefined. It - may cause your program to crash. Note that this option can also be - passed to pcre_exec() and pcre_dfa_exec(), to suppress the validity - checking of subject strings only. If the same string is being matched - many times, the option can be safely set for the second and subsequent + may cause your program to crash or loop. Note that this option can also + be passed to pcre_exec() and pcre_dfa_exec(), to suppress the validity + checking of subject strings only. If the same string is being matched + many times, the option can be safely set for the second and subsequent matchings to improve performance. COMPILATION ERROR CODES - The following table lists the error codes than may be returned by - pcre_compile2(), along with the error messages that may be returned by - both compiling functions. Note that error messages are always 8-bit - ASCII strings, even in 16-bit or 32-bit mode. As PCRE has developed, - some error codes have fallen out of use. To avoid confusion, they have + The following table lists the error codes than may be returned by + pcre_compile2(), along with the error messages that may be returned by + both compiling functions. Note that error messages are always 8-bit + ASCII strings, even in 16-bit or 32-bit mode. As PCRE has developed, + some error codes have fallen out of use. To avoid confusion, they have not been re-used. 0 no error @@ -2385,7 +2420,7 @@ COMPILATION ERROR CODES 31 POSIX collating elements are not supported 32 this version of PCRE is compiled without UTF support 33 [this code is not in use] - 34 character value in \x{...} sequence is too large + 34 character value in \x{} or \o{} is too large 35 invalid condition (?(0) 36 \C not allowed in lookbehind assertion 37 PCRE does not support \L, \l, \N{name}, \U, or \u @@ -2433,74 +2468,80 @@ COMPILATION ERROR CODES 75 name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN) 76 character value in \u.... sequence is too large 77 invalid UTF-32 string (specifically UTF-32) - - The numbers 32 and 10000 in errors 48 and 49 are defaults; different + 78 setting UTF is disabled by the application + 79 non-hex character in \x{} (closing brace missing?) + 80 non-octal character in \o{} (closing brace missing?) + 81 missing opening brace after \o + 82 parentheses are too deeply nested + 83 invalid range in character class + + The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may be used if the limits were changed when PCRE was built. STUDYING A PATTERN - pcre_extra *pcre_study(const pcre *code, int options + pcre_extra *pcre_study(const pcre *code, int options, const char **errptr); - If a compiled pattern is going to be used several times, it is worth + If a compiled pattern is going to be used several times, it is worth spending more time analyzing it in order to speed up the time taken for - matching. The function pcre_study() takes a pointer to a compiled pat- + matching. The function pcre_study() takes a pointer to a compiled pat- tern as its first argument. If studying the pattern produces additional - information that will help speed up matching, pcre_study() returns a - pointer to a pcre_extra block, in which the study_data field points to + information that will help speed up matching, pcre_study() returns a + pointer to a pcre_extra block, in which the study_data field points to the results of the study. The returned value from pcre_study() can be passed directly to - pcre_exec() or pcre_dfa_exec(). However, a pcre_extra block also con- - tains other fields that can be set by the caller before the block is + pcre_exec() or pcre_dfa_exec(). However, a pcre_extra block also con- + tains other fields that can be set by the caller before the block is passed; these are described below in the section on matching a pattern. - If studying the pattern does not produce any useful information, - pcre_study() returns NULL by default. In that circumstance, if the + If studying the pattern does not produce any useful information, + pcre_study() returns NULL by default. In that circumstance, if the calling program wants to pass any of the other fields to pcre_exec() or - pcre_dfa_exec(), it must set up its own pcre_extra block. However, if - pcre_study() is called with the PCRE_STUDY_EXTRA_NEEDED option, it + pcre_dfa_exec(), it must set up its own pcre_extra block. However, if + pcre_study() is called with the PCRE_STUDY_EXTRA_NEEDED option, it returns a pcre_extra block even if studying did not find any additional - information. It may still return NULL, however, if an error occurs in + information. It may still return NULL, however, if an error occurs in pcre_study(). - The second argument of pcre_study() contains option bits. There are + The second argument of pcre_study() contains option bits. There are three further options in addition to PCRE_STUDY_EXTRA_NEEDED: PCRE_STUDY_JIT_COMPILE PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE - If any of these are set, and the just-in-time compiler is available, - the pattern is further compiled into machine code that executes much - faster than the pcre_exec() interpretive matching function. If the - just-in-time compiler is not available, these options are ignored. All + If any of these are set, and the just-in-time compiler is available, + the pattern is further compiled into machine code that executes much + faster than the pcre_exec() interpretive matching function. If the + just-in-time compiler is not available, these options are ignored. All undefined bits in the options argument must be zero. - JIT compilation is a heavyweight optimization. It can take some time - for patterns to be analyzed, and for one-off matches and simple pat- - terns the benefit of faster execution might be offset by a much slower + JIT compilation is a heavyweight optimization. It can take some time + for patterns to be analyzed, and for one-off matches and simple pat- + terns the benefit of faster execution might be offset by a much slower study time. Not all patterns can be optimized by the JIT compiler. For - those that cannot be handled, matching automatically falls back to the - pcre_exec() interpreter. For more details, see the pcrejit documenta- + those that cannot be handled, matching automatically falls back to the + pcre_exec() interpreter. For more details, see the pcrejit documenta- tion. - The third argument for pcre_study() is a pointer for an error message. - If studying succeeds (even if no data is returned), the variable it - points to is set to NULL. Otherwise it is set to point to a textual + The third argument for pcre_study() is a pointer for an error message. + If studying succeeds (even if no data is returned), the variable it + points to is set to NULL. Otherwise it is set to point to a textual error message. This is a static string that is part of the library. You - must not try to free it. You should test the error pointer for NULL + must not try to free it. You should test the error pointer for NULL after calling pcre_study(), to be sure that it has run successfully. - When you are finished with a pattern, you can free the memory used for + When you are finished with a pattern, you can free the memory used for the study data by calling pcre_free_study(). This function was added to - the API for release 8.20. For earlier versions, the memory could be - freed with pcre_free(), just like the pattern itself. This will still - work in cases where JIT optimization is not used, but it is advisable + the API for release 8.20. For earlier versions, the memory could be + freed with pcre_free(), just like the pattern itself. This will still + work in cases where JIT optimization is not used, but it is advisable to change to the new function when convenient. - This is a typical way in which pcre_study() is used (except that in a + This is a typical way in which pcre_study() is used (except that in a real application there should be tests for errors): int rc; @@ -2520,29 +2561,29 @@ STUDYING A PATTERN Studying a pattern does two things: first, a lower bound for the length of subject string that is needed to match the pattern is computed. This does not mean that there are any strings of that length that match, but - it does guarantee that no shorter strings match. The value is used to + it does guarantee that no shorter strings match. The value is used to avoid wasting time by trying to match strings that are shorter than the - lower bound. You can find out the value in a calling program via the + lower bound. You can find out the value in a calling program via the pcre_fullinfo() function. Studying a pattern is also useful for non-anchored patterns that do not - have a single fixed starting character. A bitmap of possible starting - bytes is created. This speeds up finding a position in the subject at + have a single fixed starting character. A bitmap of possible starting + bytes is created. This speeds up finding a position in the subject at which to start matching. (In 16-bit mode, the bitmap is used for 16-bit - values less than 256. In 32-bit mode, the bitmap is used for 32-bit + values less than 256. In 32-bit mode, the bitmap is used for 32-bit values less than 256.) - These two optimizations apply to both pcre_exec() and pcre_dfa_exec(), - and the information is also used by the JIT compiler. The optimiza- - tions can be disabled by setting the PCRE_NO_START_OPTIMIZE option. - You might want to do this if your pattern contains callouts or (*MARK) - and you want to make use of these facilities in cases where matching + These two optimizations apply to both pcre_exec() and pcre_dfa_exec(), + and the information is also used by the JIT compiler. The optimiza- + tions can be disabled by setting the PCRE_NO_START_OPTIMIZE option. + You might want to do this if your pattern contains callouts or (*MARK) + and you want to make use of these facilities in cases where matching fails. - PCRE_NO_START_OPTIMIZE can be specified at either compile time or exe- - cution time. However, if PCRE_NO_START_OPTIMIZE is passed to + PCRE_NO_START_OPTIMIZE can be specified at either compile time or exe- + cution time. However, if PCRE_NO_START_OPTIMIZE is passed to pcre_exec(), (that is, after any JIT compilation has happened) JIT exe- - cution is disabled. For JIT execution to work with PCRE_NO_START_OPTI- + cution is disabled. For JIT execution to work with PCRE_NO_START_OPTI- MIZE, the option must be set at compile time. There is a longer discussion of PCRE_NO_START_OPTIMIZE below. @@ -2550,17 +2591,20 @@ STUDYING A PATTERN LOCALE SUPPORT - PCRE handles caseless matching, and determines whether characters are - letters, digits, or whatever, by reference to a set of tables, indexed - by character value. When running in UTF-8 mode, this applies only to - characters with codes less than 128. By default, higher-valued codes - never match escapes such as \w or \d, but they can be tested with \p if - PCRE is built with Unicode character property support. Alternatively, - the PCRE_UCP option can be set at compile time; this causes \w and - friends to use Unicode property support instead of built-in tables. The - use of locales with Unicode is discouraged. If you are handling charac- - ters with codes greater than 128, you should either use UTF-8 and Uni- - code, or use locales, but not try to mix the two. + PCRE handles caseless matching, and determines whether characters are + letters, digits, or whatever, by reference to a set of tables, indexed + by character code point. When running in UTF-8 mode, or in the 16- or + 32-bit libraries, this applies only to characters with code points less + than 256. By default, higher-valued code points never match escapes + such as \w or \d. However, if PCRE is built with Unicode property sup- + port, all characters can be tested with \p and \P, or, alternatively, + the PCRE_UCP option can be set when a pattern is compiled; this causes + \w and friends to use Unicode property support instead of the built-in + tables. + + The use of locales with Unicode is discouraged. If you are handling + characters with code points greater than 128, you should either use + Unicode support, or use locales, but not try to mix the two. PCRE contains an internal set of tables that are used when the final argument of pcre_compile() is NULL. These are sufficient for many @@ -2576,10 +2620,10 @@ LOCALE SUPPORT External tables are built by calling the pcre_maketables() function, which has no arguments, in the relevant locale. The result can then be - passed to pcre_compile() or pcre_exec() as often as necessary. For - example, to build and use tables that are appropriate for the French - locale (where accented characters with values greater than 128 are - treated as letters), the following code could be used: + passed to pcre_compile() as often as necessary. For example, to build + and use tables that are appropriate for the French locale (where + accented characters with values greater than 128 are treated as let- + ters), the following code could be used: setlocale(LC_CTYPE, "fr_FR"); tables = pcre_maketables(); @@ -2595,15 +2639,19 @@ LOCALE SUPPORT The pointer that is passed to pcre_compile() is saved with the compiled pattern, and the same tables are used via this pointer by pcre_study() - and normally also by pcre_exec(). Thus, by default, for any single pat- + and also by pcre_exec() and pcre_dfa_exec(). Thus, for any single pat- tern, compilation, studying and matching all happen in the same locale, - but different patterns can be compiled in different locales. + but different patterns can be processed in different locales. It is possible to pass a table pointer or NULL (indicating the use of - the internal tables) to pcre_exec(). Although not intended for this - purpose, this facility could be used to match a pattern in a different - locale from the one in which it was compiled. Passing table pointers at - run time is discussed below in the section on matching a pattern. + the internal tables) to pcre_exec() or pcre_dfa_exec() (see the discus- + sion below in the section on matching a pattern). This facility is pro- + vided for use with pre-compiled patterns that have been saved and + reloaded. Character tables are not saved with patterns, so if a non- + standard table was used at compile time, it must be provided again when + the reloaded pattern is matched. Attempting to use this facility to + match a pattern in a different locale from the one in which it was com- + piled is likely to lead to anomalous (usually incorrect) results. INFORMATION ABOUT A PATTERN @@ -2744,77 +2792,83 @@ INFORMATION ABOUT A PATTERN /^a\dz\d/ the returned value is -1. Since for the 32-bit library using the non-UTF-32 mode, this function - is unable to return the full 32-bit range of the character, this value - is deprecated; instead the PCRE_INFO_REQUIREDCHARFLAGS and + is unable to return the full 32-bit range of characters, this value is + deprecated; instead the PCRE_INFO_REQUIREDCHARFLAGS and PCRE_INFO_REQUIREDCHAR values should be used. + PCRE_INFO_MATCH_EMPTY + + Return 1 if the pattern can match an empty string, otherwise 0. The + fourth argument should point to an int variable. + PCRE_INFO_MATCHLIMIT - If the pattern set a match limit by including an item of the form - (*LIMIT_MATCH=nnnn) at the start, the value is returned. The fourth - argument should point to an unsigned 32-bit integer. If no such value - has been set, the call to pcre_fullinfo() returns the error + If the pattern set a match limit by including an item of the form + (*LIMIT_MATCH=nnnn) at the start, the value is returned. The fourth + argument should point to an unsigned 32-bit integer. If no such value + has been set, the call to pcre_fullinfo() returns the error PCRE_ERROR_UNSET. PCRE_INFO_MAXLOOKBEHIND - Return the number of characters (NB not data units) in the longest - lookbehind assertion in the pattern. This information is useful when - doing multi-segment matching using the partial matching facilities. + Return the number of characters (NB not data units) in the longest + lookbehind assertion in the pattern. This information is useful when + doing multi-segment matching using the partial matching facilities. Note that the simple assertions \b and \B require a one-character look- - behind. \A also registers a one-character lookbehind, though it does - not actually inspect the previous character. This is to ensure that at + behind. \A also registers a one-character lookbehind, though it does + not actually inspect the previous character. This is to ensure that at least one character from the old segment is retained when a new segment is processed. Otherwise, if there are no lookbehinds in the pattern, \A might match incorrectly at the start of a new segment. PCRE_INFO_MINLENGTH - If the pattern was studied and a minimum length for matching subject - strings was computed, its value is returned. Otherwise the returned + If the pattern was studied and a minimum length for matching subject + strings was computed, its value is returned. Otherwise the returned value is -1. The value is a number of characters, which in UTF mode may - be different from the number of data units. The fourth argument should - point to an int variable. A non-negative value is a lower bound to the - length of any matching string. There may not be any strings of that - length that do actually match, but every string that does match is at + be different from the number of data units. The fourth argument should + point to an int variable. A non-negative value is a lower bound to the + length of any matching string. There may not be any strings of that + length that do actually match, but every string that does match is at least that long. PCRE_INFO_NAMECOUNT PCRE_INFO_NAMEENTRYSIZE PCRE_INFO_NAMETABLE - PCRE supports the use of named as well as numbered capturing parenthe- - ses. The names are just an additional way of identifying the parenthe- + PCRE supports the use of named as well as numbered capturing parenthe- + ses. The names are just an additional way of identifying the parenthe- ses, which still acquire numbers. Several convenience functions such as - pcre_get_named_substring() are provided for extracting captured sub- - strings by name. It is also possible to extract the data directly, by - first converting the name to a number in order to access the correct + pcre_get_named_substring() are provided for extracting captured sub- + strings by name. It is also possible to extract the data directly, by + first converting the name to a number in order to access the correct pointers in the output vector (described with pcre_exec() below). To do - the conversion, you need to use the name-to-number map, which is + the conversion, you need to use the name-to-number map, which is described by these three values. The map consists of a number of fixed-size entries. PCRE_INFO_NAMECOUNT gives the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size - of each entry; both of these return an int value. The entry size - depends on the length of the longest name. PCRE_INFO_NAMETABLE returns + of each entry; both of these return an int value. The entry size + depends on the length of the longest name. PCRE_INFO_NAMETABLE returns a pointer to the first entry of the table. This is a pointer to char in the 8-bit library, where the first two bytes of each entry are the num- - ber of the capturing parenthesis, most significant byte first. In the - 16-bit library, the pointer points to 16-bit data units, the first of - which contains the parenthesis number. In the 32-bit library, the - pointer points to 32-bit data units, the first of which contains the - parenthesis number. The rest of the entry is the corresponding name, + ber of the capturing parenthesis, most significant byte first. In the + 16-bit library, the pointer points to 16-bit data units, the first of + which contains the parenthesis number. In the 32-bit library, the + pointer points to 32-bit data units, the first of which contains the + parenthesis number. The rest of the entry is the corresponding name, zero terminated. - The names are in alphabetical order. Duplicate names may appear if (?| - is used to create multiple groups with the same number, as described in - the section on duplicate subpattern numbers in the pcrepattern page. - Duplicate names for subpatterns with different numbers are permitted - only if PCRE_DUPNAMES is set. In all cases of duplicate names, they - appear in the table in the order in which they were found in the pat- - tern. In the absence of (?| this is the order of increasing number; - when (?| is used this is not necessarily the case because later subpat- - terns may have lower numbers. + The names are in alphabetical order. If (?| is used to create multiple + groups with the same number, as described in the section on duplicate + subpattern numbers in the pcrepattern page, the groups may be given the + same name, but there is only one entry in the table. Different names + for groups of the same number are not permitted. Duplicate names for + subpatterns with different numbers are permitted, but only if PCRE_DUP- + NAMES is set. They appear in the table in the order in which they were + found in the pattern. In the absence of (?| this is the order of + increasing number; when (?| is used this is not necessarily the case + because later subpatterns may have lower numbers. As a simple example of the name/number table, consider the following pattern after compilation by the 8-bit library (assume PCRE_EXTENDED is @@ -2924,27 +2978,15 @@ INFORMATION ABOUT A PATTERN PCRE_INFO_FIRSTCHARACTER - Return the fixed first character value, if PCRE_INFO_FIRSTCHARACTER- - FLAGS returned 1; otherwise returns 0. The fourth argument should point - to an uint_t variable. + Return the fixed first character value in the situation where + PCRE_INFO_FIRSTCHARACTERFLAGS returns 1; otherwise return 0. The fourth + argument should point to an uint_t variable. In the 8-bit library, the value is always less than 256. In the 16-bit library the value can be up to 0xffff. In the 32-bit library in UTF-32 mode the value can be up to 0x10ffff, and up to 0xffffffff when not using UTF-32 mode. - If there is no fixed first value, and if either - - (a) the pattern was compiled with the PCRE_MULTILINE option, and every - branch starts with "^", or - - (b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not - set (if it were set, the pattern would be anchored), - - -1 is returned, indicating that the pattern matches only at the start - of a subject string or after any newline within the string. Otherwise - -2 is returned. For anchored patterns, -2 is returned. - PCRE_INFO_REQUIREDCHARFLAGS Returns 1 if there is a rightmost literal data unit that must exist in @@ -3133,16 +3175,20 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION The callout_data field is used in conjunction with the "callout" fea- ture, and is described in the pcrecallout documentation. - The tables field is used to pass a character tables pointer to - pcre_exec(); this overrides the value that is stored with the compiled - pattern. A non-NULL value is stored with the compiled pattern only if - custom tables were supplied to pcre_compile() via its tableptr argu- - ment. If NULL is passed to pcre_exec() using this mechanism, it forces - PCRE's internal tables to be used. This facility is helpful when re- - using patterns that have been saved after compiling with an external - set of tables, because the external tables might be at a different - address when pcre_exec() is called. See the pcreprecompile documenta- - tion for a discussion of saving compiled patterns for later use. + The tables field is provided for use with patterns that have been pre- + compiled using custom character tables, saved to disc or elsewhere, and + then reloaded, because the tables that were used to compile a pattern + are not saved with it. See the pcreprecompile documentation for a dis- + cussion of saving compiled patterns for later use. If NULL is passed + using this mechanism, it forces PCRE's internal tables to be used. + + Warning: The tables that pcre_exec() uses must be the same as those + that were used when the pattern was compiled. If this is not the case, + the behaviour of pcre_exec() is undefined. Therefore, when a pattern is + compiled and matched in the same process, this field should never be + set. In this (the most common) case, the correct table pointer is auto- + matically passed with the compiled pattern from pcre_compile() to + pcre_exec(). If PCRE_EXTRA_MARK is set in the flags field, the mark field must be set to point to a suitable variable. If the pattern contains any back- @@ -3351,7 +3397,7 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION points to the start of a character (or the end of the subject). When PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid string as a subject or an invalid value of startoffset is undefined. Your program - may crash. + may crash or loop. PCRE_PARTIAL_HARD PCRE_PARTIAL_SOFT @@ -4131,55 +4177,64 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION filled with the longest matches. Unlike pcre_exec(), pcre_dfa_exec() can use the entire ovector for returning matched strings. + NOTE: PCRE's "auto-possessification" optimization usually applies to + character repeats at the end of a pattern (as well as internally). For + example, the pattern "a\d+" is compiled as if it were "a\d++" because + there is no point even considering the possibility of backtracking into + the repeated digits. For DFA matching, this means that only one possi- + ble match is found. If you really do want multiple matches in such + cases, either use an ungreedy repeat ("a\d+?") or set the + PCRE_NO_AUTO_POSSESS option when compiling. + Error returns from pcre_dfa_exec() - The pcre_dfa_exec() function returns a negative number when it fails. - Many of the errors are the same as for pcre_exec(), and these are - described above. There are in addition the following errors that are + The pcre_dfa_exec() function returns a negative number when it fails. + Many of the errors are the same as for pcre_exec(), and these are + described above. There are in addition the following errors that are specific to pcre_dfa_exec(): PCRE_ERROR_DFA_UITEM (-16) - This return is given if pcre_dfa_exec() encounters an item in the pat- - tern that it does not support, for instance, the use of \C or a back + This return is given if pcre_dfa_exec() encounters an item in the pat- + tern that it does not support, for instance, the use of \C or a back reference. PCRE_ERROR_DFA_UCOND (-17) - This return is given if pcre_dfa_exec() encounters a condition item - that uses a back reference for the condition, or a test for recursion + This return is given if pcre_dfa_exec() encounters a condition item + that uses a back reference for the condition, or a test for recursion in a specific group. These are not supported. PCRE_ERROR_DFA_UMLIMIT (-18) - This return is given if pcre_dfa_exec() is called with an extra block - that contains a setting of the match_limit or match_limit_recursion - fields. This is not supported (these fields are meaningless for DFA + This return is given if pcre_dfa_exec() is called with an extra block + that contains a setting of the match_limit or match_limit_recursion + fields. This is not supported (these fields are meaningless for DFA matching). PCRE_ERROR_DFA_WSSIZE (-19) - This return is given if pcre_dfa_exec() runs out of space in the + This return is given if pcre_dfa_exec() runs out of space in the workspace vector. PCRE_ERROR_DFA_RECURSE (-20) - When a recursive subpattern is processed, the matching function calls - itself recursively, using private vectors for ovector and workspace. - This error is given if the output vector is not large enough. This + When a recursive subpattern is processed, the matching function calls + itself recursively, using private vectors for ovector and workspace. + This error is given if the output vector is not large enough. This should be extremely rare, as a vector of size 1000 is used. PCRE_ERROR_DFA_BADRESTART (-30) - When pcre_dfa_exec() is called with the PCRE_DFA_RESTART option, some - plausibility checks are made on the contents of the workspace, which - should contain data about the previous partial match. If any of these + When pcre_dfa_exec() is called with the PCRE_DFA_RESTART option, some + plausibility checks are made on the contents of the workspace, which + should contain data about the previous partial match. If any of these checks fail, this error is given. SEE ALSO - pcre16(3), pcre32(3), pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), + pcre16(3), pcre32(3), pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), pcrematching(3), pcrepartial(3), pcreposix(3), pcreprecompile(3), pcre- sample(3), pcrestack(3). @@ -4193,7 +4248,7 @@ AUTHOR REVISION - Last updated: 12 May 2013 + Last updated: 12 November 2013 Copyright (c) 1997-2013 University of Cambridge. ------------------------------------------------------------------------------ @@ -4256,43 +4311,77 @@ DESCRIPTION independent groups). Automatic callouts can be used for tracking the progress of pattern - matching. The pcretest command has an option that sets automatic call- - outs; when it is used, the output indicates how the pattern is matched. - This is useful information when you are trying to optimize the perfor- - mance of a particular pattern. + matching. The pcretest program has a pattern qualifier (/C) that sets + automatic callouts; when it is used, the output indicates how the pat- + tern is being matched. This is useful information when you are trying + to optimize the performance of a particular pattern. MISSING CALLOUTS - You should be aware that, because of optimizations in the way PCRE - matches patterns by default, callouts sometimes do not happen. For - example, if the pattern is + You should be aware that, because of optimizations in the way PCRE com- + piles and matches patterns, callouts sometimes do not happen exactly as + you might expect. + + At compile time, PCRE "auto-possessifies" repeated items when it knows + that what follows cannot be part of the repeat. For example, a+[bc] is + compiled as if it were a++[bc]. The pcretest output when this pattern + is anchored and then applied with automatic callouts to the string + "aaaa" is: + + --->aaaa + +0 ^ ^ + +1 ^ a+ + +3 ^ ^ [bc] + No match + + This indicates that when matching [bc] fails, there is no backtracking + into a+ and therefore the callouts that would be taken for the back- + tracks do not occur. You can disable the auto-possessify feature by + passing PCRE_NO_AUTO_POSSESS to pcre_compile(), or starting the pattern + with (*NO_AUTO_POSSESS). If this is done in pcretest (using the /O + qualifier), the output changes to this: + + --->aaaa + +0 ^ ^ + +1 ^ a+ + +3 ^ ^ [bc] + +3 ^ ^ [bc] + +3 ^ ^ [bc] + +3 ^^ [bc] + No match + + This time, when matching [bc] fails, the matcher backtracks into a+ and + tries again, repeatedly, until a+ itself fails. + + Other optimizations that provide fast "no match" results also affect + callouts. For example, if the pattern is ab(?C4)cd PCRE knows that any matching string must contain the letter "d". If the - subject string is "abyz", the lack of "d" means that matching doesn't - ever start, and the callout is never reached. However, with "abyd", + subject string is "abyz", the lack of "d" means that matching doesn't + ever start, and the callout is never reached. However, with "abyd", though the result is still no match, the callout is obeyed. - If the pattern is studied, PCRE knows the minimum length of a matching - string, and will immediately give a "no match" return without actually - running a match if the subject is not long enough, or, for unanchored + If the pattern is studied, PCRE knows the minimum length of a matching + string, and will immediately give a "no match" return without actually + running a match if the subject is not long enough, or, for unanchored patterns, if it has been scanned far enough. - You can disable these optimizations by passing the PCRE_NO_START_OPTI- - MIZE option to the matching function, or by starting the pattern with - (*NO_START_OPT). This slows down the matching process, but does ensure + You can disable these optimizations by passing the PCRE_NO_START_OPTI- + MIZE option to the matching function, or by starting the pattern with + (*NO_START_OPT). This slows down the matching process, but does ensure that callouts such as the example above are obeyed. THE CALLOUT INTERFACE - During matching, when PCRE reaches a callout point, the external func- + During matching, when PCRE reaches a callout point, the external func- tion defined by pcre_callout or pcre[16|32]_callout is called (if it is - set). This applies to both normal and DFA matching. The only argument - to the callout function is a pointer to a pcre_callout or - pcre[16|32]_callout block. These structures contains the following + set). This applies to both normal and DFA matching. The only argument + to the callout function is a pointer to a pcre_callout or + pcre[16|32]_callout block. These structures contains the following fields: int version; @@ -4313,92 +4402,92 @@ THE CALLOUT INTERFACE const PCRE_UCHAR16 *mark; (16-bit version) const PCRE_UCHAR32 *mark; (32-bit version) - The version field is an integer containing the version number of the - block format. The initial version was 0; the current version is 2. The - version number will change again in future if additional fields are + The version field is an integer containing the version number of the + block format. The initial version was 0; the current version is 2. The + version number will change again in future if additional fields are added, but the intention is never to remove any of the existing fields. - The callout_number field contains the number of the callout, as com- - piled into the pattern (that is, the number after ?C for manual call- + The callout_number field contains the number of the callout, as com- + piled into the pattern (that is, the number after ?C for manual call- outs, and 255 for automatically generated callouts). - The offset_vector field is a pointer to the vector of offsets that was - passed by the caller to the matching function. When pcre_exec() or - pcre[16|32]_exec() is used, the contents can be inspected, in order to - extract substrings that have been matched so far, in the same way as - for extracting substrings after a match has completed. For the DFA + The offset_vector field is a pointer to the vector of offsets that was + passed by the caller to the matching function. When pcre_exec() or + pcre[16|32]_exec() is used, the contents can be inspected, in order to + extract substrings that have been matched so far, in the same way as + for extracting substrings after a match has completed. For the DFA matching functions, this field is not useful. The subject and subject_length fields contain copies of the values that were passed to the matching function. - The start_match field normally contains the offset within the subject - at which the current match attempt started. However, if the escape - sequence \K has been encountered, this value is changed to reflect the - modified starting point. If the pattern is not anchored, the callout + The start_match field normally contains the offset within the subject + at which the current match attempt started. However, if the escape + sequence \K has been encountered, this value is changed to reflect the + modified starting point. If the pattern is not anchored, the callout function may be called several times from the same point in the pattern for different starting points in the subject. - The current_position field contains the offset within the subject of + The current_position field contains the offset within the subject of the current match pointer. - When the pcre_exec() or pcre[16|32]_exec() is used, the capture_top - field contains one more than the number of the highest numbered cap- - tured substring so far. If no substrings have been captured, the value - of capture_top is one. This is always the case when the DFA functions + When the pcre_exec() or pcre[16|32]_exec() is used, the capture_top + field contains one more than the number of the highest numbered cap- + tured substring so far. If no substrings have been captured, the value + of capture_top is one. This is always the case when the DFA functions are used, because they do not support captured substrings. - The capture_last field contains the number of the most recently cap- - tured substring. However, when a recursion exits, the value reverts to - what it was outside the recursion, as do the values of all captured - substrings. If no substrings have been captured, the value of cap- - ture_last is -1. This is always the case for the DFA matching func- + The capture_last field contains the number of the most recently cap- + tured substring. However, when a recursion exits, the value reverts to + what it was outside the recursion, as do the values of all captured + substrings. If no substrings have been captured, the value of cap- + ture_last is -1. This is always the case for the DFA matching func- tions. - The callout_data field contains a value that is passed to a matching - function specifically so that it can be passed back in callouts. It is - passed in the callout_data field of a pcre_extra or pcre[16|32]_extra - data structure. If no such data was passed, the value of callout_data - in a callout block is NULL. There is a description of the pcre_extra + The callout_data field contains a value that is passed to a matching + function specifically so that it can be passed back in callouts. It is + passed in the callout_data field of a pcre_extra or pcre[16|32]_extra + data structure. If no such data was passed, the value of callout_data + in a callout block is NULL. There is a description of the pcre_extra structure in the pcreapi documentation. - The pattern_position field is present from version 1 of the callout + The pattern_position field is present from version 1 of the callout structure. It contains the offset to the next item to be matched in the pattern string. - The next_item_length field is present from version 1 of the callout + The next_item_length field is present from version 1 of the callout structure. It contains the length of the next item to be matched in the - pattern string. When the callout immediately precedes an alternation - bar, a closing parenthesis, or the end of the pattern, the length is - zero. When the callout precedes an opening parenthesis, the length is + pattern string. When the callout immediately precedes an alternation + bar, a closing parenthesis, or the end of the pattern, the length is + zero. When the callout precedes an opening parenthesis, the length is that of the entire subpattern. - The pattern_position and next_item_length fields are intended to help - in distinguishing between different automatic callouts, which all have + The pattern_position and next_item_length fields are intended to help + in distinguishing between different automatic callouts, which all have the same callout number. However, they are set for all callouts. - The mark field is present from version 2 of the callout structure. In - callouts from pcre_exec() or pcre[16|32]_exec() it contains a pointer - to the zero-terminated name of the most recently passed (*MARK), - (*PRUNE), or (*THEN) item in the match, or NULL if no such items have - been passed. Instances of (*PRUNE) or (*THEN) without a name do not - obliterate a previous (*MARK). In callouts from the DFA matching func- + The mark field is present from version 2 of the callout structure. In + callouts from pcre_exec() or pcre[16|32]_exec() it contains a pointer + to the zero-terminated name of the most recently passed (*MARK), + (*PRUNE), or (*THEN) item in the match, or NULL if no such items have + been passed. Instances of (*PRUNE) or (*THEN) without a name do not + obliterate a previous (*MARK). In callouts from the DFA matching func- tions this field always contains NULL. RETURN VALUES - The external callout function returns an integer to PCRE. If the value - is zero, matching proceeds as normal. If the value is greater than - zero, matching fails at the current point, but the testing of other + The external callout function returns an integer to PCRE. If the value + is zero, matching proceeds as normal. If the value is greater than + zero, matching fails at the current point, but the testing of other matching possibilities goes ahead, just as if a lookahead assertion had - failed. If the value is less than zero, the match is abandoned, the + failed. If the value is less than zero, the match is abandoned, the matching function returns the negative value. - Negative values should normally be chosen from the set of + Negative values should normally be chosen from the set of PCRE_ERROR_xxx values. In particular, PCRE_ERROR_NOMATCH forces a stan- - dard "no match" failure. The error number PCRE_ERROR_CALLOUT is - reserved for use by callout functions; it will never be used by PCRE + dard "no match" failure. The error number PCRE_ERROR_CALLOUT is + reserved for use by callout functions; it will never be used by PCRE itself. @@ -4411,7 +4500,7 @@ AUTHOR REVISION - Last updated: 03 March 2013 + Last updated: 12 November 2013 Copyright (c) 1997-2013 University of Cambridge. ------------------------------------------------------------------------------ @@ -4533,17 +4622,23 @@ DIFFERENCES BETWEEN PCRE AND PERL 15. Perl recognizes comments in some places that PCRE does not, for example, between the ( and ? at the start of a subpattern. If the /x - modifier is set, Perl allows white space between ( and ? but PCRE never - does, even if the PCRE_EXTENDED option is set. + modifier is set, Perl allows white space between ( and ? (though cur- + rent Perls warn that this is deprecated) but PCRE never does, even if + the PCRE_EXTENDED option is set. + + 16. Perl, when in warning mode, gives warnings for character classes + such as [A-\d] or [a-[:digit:]]. It then treats the hyphens as liter- + als. PCRE has no warning features, so it gives an error in these cases + because they are almost certainly user mistakes. - 16. In PCRE, the upper/lower case character properties Lu and Ll are + 17. In PCRE, the upper/lower case character properties Lu and Ll are not affected when case-independent matching is specified. For example, \p{Lu} always matches an upper case letter. I think Perl has changed in this respect; in the release at the time of writing (5.16), \p{Lu} and \p{Ll} match all letters, regardless of case, when case independence is specified. - 17. PCRE provides some extensions to the Perl regular expression facil- + 18. PCRE provides some extensions to the Perl regular expression facil- ities. Perl 5.10 includes new features that are not in earlier ver- sions of Perl, some of which (such as named parentheses) have been in PCRE for some time. This list is with respect to Perl 5.10: @@ -4600,7 +4695,7 @@ AUTHOR REVISION - Last updated: 19 March 2013 + Last updated: 10 November 2013 Copyright (c) 1997-2013 University of Cambridge. ------------------------------------------------------------------------------ @@ -4679,20 +4774,26 @@ SPECIAL START-OF-PATTERN ITEMS Unicode property support - Another special sequence that may appear at the start of a pattern is + Another special sequence that may appear at the start of a pattern is + (*UCP). This has the same effect as setting the PCRE_UCP option: it + causes sequences such as \d and \w to use Unicode properties to deter- + mine character types, instead of recognizing only characters with codes + less than 128 via a lookup table. - (*UCP) + Disabling auto-possessification - This has the same effect as setting the PCRE_UCP option: it causes - sequences such as \d and \w to use Unicode properties to determine - character types, instead of recognizing only characters with codes less - than 128 via a lookup table. + If a pattern starts with (*NO_AUTO_POSSESS), it has the same effect as + setting the PCRE_NO_AUTO_POSSESS option at compile time. This stops + PCRE from making quantifiers possessive when what follows cannot match + the repeated item. For example, by default a+b is treated as a++b. For + more details, see the pcreapi documentation. Disabling start-up optimizations - If a pattern starts with (*NO_START_OPT), it has the same effect as + If a pattern starts with (*NO_START_OPT), it has the same effect as setting the PCRE_NO_START_OPTIMIZE option either at compile or matching - time. + time. This disables several optimizations for quickly reaching "no + match" results. For more details, see the pcreapi documentation. Newline conventions @@ -4746,48 +4847,49 @@ SPECIAL START-OF-PATTERN ITEMS (*LIMIT_RECURSION=d) where d is any number of decimal digits. However, the value of the set- - ting must be less than the value set by the caller of pcre_exec() for - it to have any effect. In other words, the pattern writer can lower the - limit set by the programmer, but not raise it. If there is more than - one setting of one of these limits, the lower value is used. + ting must be less than the value set (or defaulted) by the caller of + pcre_exec() for it to have any effect. In other words, the pattern + writer can lower the limits set by the programmer, but not raise them. + If there is more than one setting of one of these limits, the lower + value is used. EBCDIC CHARACTER CODES - PCRE can be compiled to run in an environment that uses EBCDIC as its + PCRE can be compiled to run in an environment that uses EBCDIC as its character code rather than ASCII or Unicode (typically a mainframe sys- - tem). In the sections below, character code values are ASCII or Uni- + tem). In the sections below, character code values are ASCII or Uni- code; in an EBCDIC environment these characters may have different code values, and there are no code points greater than 255. CHARACTERS AND METACHARACTERS - A regular expression is a pattern that is matched against a subject - string from left to right. Most characters stand for themselves in a - pattern, and match the corresponding characters in the subject. As a + A regular expression is a pattern that is matched against a subject + string from left to right. Most characters stand for themselves in a + pattern, and match the corresponding characters in the subject. As a trivial example, the pattern The quick brown fox matches a portion of a subject string that is identical to itself. When - caseless matching is specified (the PCRE_CASELESS option), letters are - matched independently of case. In a UTF mode, PCRE always understands - the concept of case for characters whose values are less than 128, so - caseless matching is always possible. For characters with higher val- - ues, the concept of case is supported if PCRE is compiled with Unicode - property support, but not otherwise. If you want to use caseless - matching for characters 128 and above, you must ensure that PCRE is + caseless matching is specified (the PCRE_CASELESS option), letters are + matched independently of case. In a UTF mode, PCRE always understands + the concept of case for characters whose values are less than 128, so + caseless matching is always possible. For characters with higher val- + ues, the concept of case is supported if PCRE is compiled with Unicode + property support, but not otherwise. If you want to use caseless + matching for characters 128 and above, you must ensure that PCRE is compiled with Unicode property support as well as with UTF support. - The power of regular expressions comes from the ability to include - alternatives and repetitions in the pattern. These are encoded in the + The power of regular expressions comes from the ability to include + alternatives and repetitions in the pattern. These are encoded in the pattern by the use of metacharacters, which do not stand for themselves but instead are interpreted in some special way. - There are two different sets of metacharacters: those that are recog- - nized anywhere in the pattern except within square brackets, and those - that are recognized within square brackets. Outside square brackets, + There are two different sets of metacharacters: those that are recog- + nized anywhere in the pattern except within square brackets, and those + that are recognized within square brackets. Outside square brackets, the metacharacters are as follows: \ general escape character with several uses @@ -4806,7 +4908,7 @@ CHARACTERS AND METACHARACTERS also "possessive quantifier" { start min/max quantifier - Part of a pattern that is in square brackets is called a "character + Part of a pattern that is in square brackets is called a "character class". In a character class the only metacharacters are: \ general escape character @@ -4823,30 +4925,30 @@ BACKSLASH The backslash character has several uses. Firstly, if it is followed by a character that is not a number or a letter, it takes away any special - meaning that character may have. This use of backslash as an escape + meaning that character may have. This use of backslash as an escape character applies both inside and outside character classes. - For example, if you want to match a * character, you write \* in the - pattern. This escaping action applies whether or not the following - character would otherwise be interpreted as a metacharacter, so it is - always safe to precede a non-alphanumeric with backslash to specify - that it stands for itself. In particular, if you want to match a back- + For example, if you want to match a * character, you write \* in the + pattern. This escaping action applies whether or not the following + character would otherwise be interpreted as a metacharacter, so it is + always safe to precede a non-alphanumeric with backslash to specify + that it stands for itself. In particular, if you want to match a back- slash, you write \\. - In a UTF mode, only ASCII numbers and letters have any special meaning - after a backslash. All other characters (in particular, those whose + In a UTF mode, only ASCII numbers and letters have any special meaning + after a backslash. All other characters (in particular, those whose codepoints are greater than 127) are treated as literals. - If a pattern is compiled with the PCRE_EXTENDED option, white space in - the pattern (other than in a character class) and characters between a - # outside a character class and the next newline are ignored. An escap- - ing backslash can be used to include a white space or # character as - part of the pattern. + If a pattern is compiled with the PCRE_EXTENDED option, most white + space in the pattern (other than in a character class), and characters + between a # outside a character class and the next newline, inclusive, + are ignored. An escaping backslash can be used to include a white space + or # character as part of the pattern. - If you want to remove the special meaning from a sequence of charac- - ters, you can do so by putting them between \Q and \E. This is differ- - ent from Perl in that $ and @ are handled as literals in \Q...\E - sequences in PCRE, whereas in Perl, $ and @ cause variable interpola- + If you want to remove the special meaning from a sequence of charac- + ters, you can do so by putting them between \Q and \E. This is differ- + ent from Perl in that $ and @ are handled as literals in \Q...\E + sequences in PCRE, whereas in Perl, $ and @ cause variable interpola- tion. Note the following examples: Pattern PCRE matches Perl matches @@ -4856,20 +4958,20 @@ BACKSLASH \Qabc\$xyz\E abc\$xyz abc\$xyz \Qabc\E\$\Qxyz\E abc$xyz abc$xyz - The \Q...\E sequence is recognized both inside and outside character - classes. An isolated \E that is not preceded by \Q is ignored. If \Q - is not followed by \E later in the pattern, the literal interpretation - continues to the end of the pattern (that is, \E is assumed at the - end). If the isolated \Q is inside a character class, this causes an + The \Q...\E sequence is recognized both inside and outside character + classes. An isolated \E that is not preceded by \Q is ignored. If \Q + is not followed by \E later in the pattern, the literal interpretation + continues to the end of the pattern (that is, \E is assumed at the + end). If the isolated \Q is inside a character class, this causes an error, because the character class is not terminated. Non-printing characters A second use of backslash provides a way of encoding non-printing char- - acters in patterns in a visible manner. There is no restriction on the - appearance of non-printing characters, apart from the binary zero that - terminates a pattern, but when a pattern is being prepared by text - editing, it is often easier to use one of the following escape + acters in patterns in a visible manner. There is no restriction on the + appearance of non-printing characters, apart from the binary zero that + terminates a pattern, but when a pattern is being prepared by text + editing, it is often easier to use one of the following escape sequences than the binary character it represents: \a alarm, that is, the BEL character (hex 07) @@ -4879,84 +4981,63 @@ BACKSLASH \n linefeed (hex 0A) \r carriage return (hex 0D) \t tab (hex 09) + \0dd character with octal code 0dd \ddd character with octal code ddd, or back reference + \o{ddd..} character with octal code ddd.. \xhh character with hex code hh \x{hhh..} character with hex code hhh.. (non-JavaScript mode) \uhhhh character with hex code hhhh (JavaScript mode only) - The precise effect of \cx on ASCII characters is as follows: if x is a - lower case letter, it is converted to upper case. Then bit 6 of the + The precise effect of \cx on ASCII characters is as follows: if x is a + lower case letter, it is converted to upper case. Then bit 6 of the character (hex 40) is inverted. Thus \cA to \cZ become hex 01 to hex 1A - (A is 41, Z is 5A), but \c{ becomes hex 3B ({ is 7B), and \c; becomes - hex 7B (; is 3B). If the data item (byte or 16-bit value) following \c - has a value greater than 127, a compile-time error occurs. This locks + (A is 41, Z is 5A), but \c{ becomes hex 3B ({ is 7B), and \c; becomes + hex 7B (; is 3B). If the data item (byte or 16-bit value) following \c + has a value greater than 127, a compile-time error occurs. This locks out non-ASCII characters in all modes. - The \c facility was designed for use with ASCII characters, but with - the extension to Unicode it is even less useful than it once was. It - is, however, recognized when PCRE is compiled in EBCDIC mode, where - data items are always bytes. In this mode, all values are valid after - \c. If the next character is a lower case letter, it is converted to - upper case. Then the 0xc0 bits of the byte are inverted. Thus \cA - becomes hex 01, as in ASCII (A is C1), but because the EBCDIC letters - are disjoint, \cZ becomes hex 29 (Z is E9), and other characters also + The \c facility was designed for use with ASCII characters, but with + the extension to Unicode it is even less useful than it once was. It + is, however, recognized when PCRE is compiled in EBCDIC mode, where + data items are always bytes. In this mode, all values are valid after + \c. If the next character is a lower case letter, it is converted to + upper case. Then the 0xc0 bits of the byte are inverted. Thus \cA + becomes hex 01, as in ASCII (A is C1), but because the EBCDIC letters + are disjoint, \cZ becomes hex 29 (Z is E9), and other characters also generate different values. - By default, after \x, from zero to two hexadecimal digits are read - (letters can be in upper or lower case). Any number of hexadecimal dig- - its may appear between \x{ and }, but the character code is constrained - as follows: - - 8-bit non-UTF mode less than 0x100 - 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint - 16-bit non-UTF mode less than 0x10000 - 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint - 32-bit non-UTF mode less than 0x80000000 - 32-bit UTF-32 mode less than 0x10ffff and a valid codepoint - - Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so- - called "surrogate" codepoints), and 0xffef. - - If characters other than hexadecimal digits appear between \x{ and }, - or if there is no terminating }, this form of escape is not recognized. - Instead, the initial \x will be interpreted as a basic hexadecimal - escape, with no following digits, giving a character whose value is - zero. - - If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x - is as just described only when it is followed by two hexadecimal dig- - its. Otherwise, it matches a literal "x" character. In JavaScript - mode, support for code points greater than 256 is provided by \u, which - must be followed by four hexadecimal digits; otherwise it matches a - literal "u" character. Character codes specified by \u in JavaScript - mode are constrained in the same was as those specified by \x in non- - JavaScript mode. - - Characters whose value is less than 256 can be defined by either of the - two syntaxes for \x (or by \u in JavaScript mode). There is no differ- - ence in the way they are handled. For example, \xdc is exactly the same - as \x{dc} (or \u00dc in JavaScript mode). - - After \0 up to two further octal digits are read. If there are fewer - than two digits, just those that are present are used. Thus the + After \0 up to two further octal digits are read. If there are fewer + than two digits, just those that are present are used. Thus the sequence \0\x\07 specifies two binary zeros followed by a BEL character - (code value 7). Make sure you supply two digits after the initial zero + (code value 7). Make sure you supply two digits after the initial zero if the pattern character that follows is itself an octal digit. + The escape \o must be followed by a sequence of octal digits, enclosed + in braces. An error occurs if this is not the case. This escape is a + recent addition to Perl; it provides way of specifying character code + points as octal numbers greater than 0777, and it also allows octal + numbers and back references to be unambiguously specified. + + For greater clarity and unambiguity, it is best to avoid following \ by + a digit greater than zero. Instead, use \o{} or \x{} to specify charac- + ter numbers, and \g{} to specify back references. The following para- + graphs describe the old, ambiguous syntax. + The handling of a backslash followed by a digit other than 0 is compli- - cated. Outside a character class, PCRE reads it and any following dig- - its as a decimal number. If the number is less than 10, or if there - have been at least that many previous capturing left parentheses in the - expression, the entire sequence is taken as a back reference. A - description of how this works is given later, following the discussion + cated, and Perl has changed in recent releases, causing PCRE also to + change. Outside a character class, PCRE reads the digit and any follow- + ing digits as a decimal number. If the number is less than 8, or if + there have been at least that many previous capturing left parentheses + in the expression, the entire sequence is taken as a back reference. A + description of how this works is given later, following the discussion of parenthesized subpatterns. - Inside a character class, or if the decimal number is greater than 9 - and there have not been that many capturing subpatterns, PCRE re-reads - up to three octal digits following the backslash, and uses them to gen- - erate a data character. Any subsequent digits stand for themselves. The - value of the character is constrained in the same way as characters - specified in hexadecimal. For example: + Inside a character class, or if the decimal number following \ is + greater than 7 and there have not been that many capturing subpatterns, + PCRE handles \8 and \9 as the literal characters "8" and "9", and oth- + erwise re-reads up to three octal digits following the backslash, using + them to generate a data character. Any subsequent digits stand for + themselves. For example: \040 is another way of writing an ASCII space \40 is the same, provided there are fewer than 40 @@ -4970,11 +5051,47 @@ BACKSLASH character with octal code 113 \377 might be a back reference, otherwise the value 255 (decimal) - \81 is either a back reference, or a binary zero - followed by the two characters "8" and "1" + \81 is either a back reference, or the two + characters "8" and "1" + + Note that octal values of 100 or greater that are specified using this + syntax must not be introduced by a leading zero, because no more than + three octal digits are ever read. - Note that octal values of 100 or greater must not be introduced by a - leading zero, because no more than three octal digits are ever read. + By default, after \x that is not followed by {, from zero to two hexa- + decimal digits are read (letters can be in upper or lower case). Any + number of hexadecimal digits may appear between \x{ and }. If a charac- + ter other than a hexadecimal digit appears between \x{ and }, or if + there is no terminating }, an error occurs. + + If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x + is as just described only when it is followed by two hexadecimal dig- + its. Otherwise, it matches a literal "x" character. In JavaScript + mode, support for code points greater than 256 is provided by \u, which + must be followed by four hexadecimal digits; otherwise it matches a + literal "u" character. + + Characters whose value is less than 256 can be defined by either of the + two syntaxes for \x (or by \u in JavaScript mode). There is no differ- + ence in the way they are handled. For example, \xdc is exactly the same + as \x{dc} (or \u00dc in JavaScript mode). + + Constraints on character values + + Characters that are specified using octal or hexadecimal numbers are + limited to certain values, as follows: + + 8-bit non-UTF mode less than 0x100 + 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint + 16-bit non-UTF mode less than 0x10000 + 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint + 32-bit non-UTF mode less than 0x100000000 + 32-bit UTF-32 mode less than 0x10ffff and a valid codepoint + + Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so- + called "surrogate" codepoints), and 0xffef. + + Escape sequences in character classes All the sequences that define a single character value can be used both inside and outside character classes. In addition, inside a character @@ -5039,43 +5156,48 @@ BACKSLASH the subject string, all of them fail, because there is no character to match. - For compatibility with Perl, \s does not match the VT character (code - 11). This makes it different from the the POSIX "space" class. The \s - characters are HT (9), LF (10), FF (12), CR (13), and space (32). If - "use locale;" is included in a Perl script, \s may match the VT charac- - ter. In PCRE, it never does. + For compatibility with Perl, \s did not used to match the VT character + (code 11), which made it different from the the POSIX "space" class. + However, Perl added VT at release 5.18, and PCRE followed suit at + release 8.34. The default \s characters are now HT (9), LF (10), VT + (11), FF (12), CR (13), and space (32), which are defined as white + space in the "C" locale. This list may vary if locale-specific matching + is taking place. For example, in some locales the "non-breaking space" + character (\xA0) is recognized as white space, and in others the VT + character is not. A "word" character is an underscore or any character that is a letter or digit. By default, the definition of letters and digits is con- trolled by PCRE's low-valued character tables, and may vary if locale- specific matching is taking place (see "Locale support" in the pcreapi page). For example, in a French locale such as "fr_FR" in Unix-like - systems, or "french" in Windows, some character codes greater than 128 + systems, or "french" in Windows, some character codes greater than 127 are used for accented letters, and these are then matched by \w. The use of locales with Unicode is discouraged. - By default, in a UTF mode, characters with values greater than 128 - never match \d, \s, or \w, and always match \D, \S, and \W. These - sequences retain their original meanings from before UTF support was - available, mainly for efficiency reasons. However, if PCRE is compiled - with Unicode property support, and the PCRE_UCP option is set, the be- - haviour is changed so that Unicode properties are used to determine - character types, as follows: - - \d any character that \p{Nd} matches (decimal digit) - \s any character that \p{Z} matches, plus HT, LF, FF, CR - \w any character that \p{L} or \p{N} matches, plus underscore - - The upper case escapes match the inverse sets of characters. Note that - \d matches only decimal digits, whereas \w matches any Unicode digit, - as well as any Unicode letter, and underscore. Note also that PCRE_UCP - affects \b, and \B because they are defined in terms of \w and \W. + By default, characters whose code points are greater than 127 never + match \d, \s, or \w, and always match \D, \S, and \W, although this may + vary for characters in the range 128-255 when locale-specific matching + is happening. These escape sequences retain their original meanings + from before Unicode support was available, mainly for efficiency rea- + sons. If PCRE is compiled with Unicode property support, and the + PCRE_UCP option is set, the behaviour is changed so that Unicode prop- + erties are used to determine character types, as follows: + + \d any character that matches \p{Nd} (decimal digit) + \s any character that matches \p{Z} or \h or \v + \w any character that matches \p{L} or \p{N}, plus underscore + + The upper case escapes match the inverse sets of characters. Note that + \d matches only decimal digits, whereas \w matches any Unicode digit, + as well as any Unicode letter, and underscore. Note also that PCRE_UCP + affects \b, and \B because they are defined in terms of \w and \W. Matching these sequences is noticeably slower when PCRE_UCP is set. - The sequences \h, \H, \v, and \V are features that were added to Perl - at release 5.10. In contrast to the other sequences, which match only - ASCII characters by default, these always match certain high-valued - codepoints, whether or not PCRE_UCP is set. The horizontal space char- + The sequences \h, \H, \v, and \V are features that were added to Perl + at release 5.10. In contrast to the other sequences, which match only + ASCII characters by default, these always match certain high-valued + code points, whether or not PCRE_UCP is set. The horizontal space char- acters are: U+0009 Horizontal tab (HT) @@ -5113,106 +5235,106 @@ BACKSLASH Newline sequences - Outside a character class, by default, the escape sequence \R matches - any Unicode newline sequence. In 8-bit non-UTF-8 mode \R is equivalent + Outside a character class, by default, the escape sequence \R matches + any Unicode newline sequence. In 8-bit non-UTF-8 mode \R is equivalent to the following: (?>\r\n|\n|\x0b|\f|\r|\x85) - This is an example of an "atomic group", details of which are given + This is an example of an "atomic group", details of which are given below. This particular group matches either the two-character sequence - CR followed by LF, or one of the single characters LF (linefeed, - U+000A), VT (vertical tab, U+000B), FF (form feed, U+000C), CR (car- - riage return, U+000D), or NEL (next line, U+0085). The two-character + CR followed by LF, or one of the single characters LF (linefeed, + U+000A), VT (vertical tab, U+000B), FF (form feed, U+000C), CR (car- + riage return, U+000D), or NEL (next line, U+0085). The two-character sequence is treated as a single unit that cannot be split. - In other modes, two additional characters whose codepoints are greater + In other modes, two additional characters whose codepoints are greater than 255 are added: LS (line separator, U+2028) and PS (paragraph sepa- - rator, U+2029). Unicode character property support is not needed for + rator, U+2029). Unicode character property support is not needed for these characters to be recognized. It is possible to restrict \R to match only CR, LF, or CRLF (instead of - the complete set of Unicode line endings) by setting the option + the complete set of Unicode line endings) by setting the option PCRE_BSR_ANYCRLF either at compile time or when the pattern is matched. (BSR is an abbrevation for "backslash R".) This can be made the default - when PCRE is built; if this is the case, the other behaviour can be - requested via the PCRE_BSR_UNICODE option. It is also possible to - specify these settings by starting a pattern string with one of the + when PCRE is built; if this is the case, the other behaviour can be + requested via the PCRE_BSR_UNICODE option. It is also possible to + specify these settings by starting a pattern string with one of the following sequences: (*BSR_ANYCRLF) CR, LF, or CRLF only (*BSR_UNICODE) any Unicode newline sequence These override the default and the options given to the compiling func- - tion, but they can themselves be overridden by options given to a - matching function. Note that these special settings, which are not - Perl-compatible, are recognized only at the very start of a pattern, - and that they must be in upper case. If more than one of them is - present, the last one is used. They can be combined with a change of + tion, but they can themselves be overridden by options given to a + matching function. Note that these special settings, which are not + Perl-compatible, are recognized only at the very start of a pattern, + and that they must be in upper case. If more than one of them is + present, the last one is used. They can be combined with a change of newline convention; for example, a pattern can start with: (*ANY)(*BSR_ANYCRLF) - They can also be combined with the (*UTF8), (*UTF16), (*UTF32), (*UTF) + They can also be combined with the (*UTF8), (*UTF16), (*UTF32), (*UTF) or (*UCP) special sequences. Inside a character class, \R is treated as - an unrecognized escape sequence, and so matches the letter "R" by + an unrecognized escape sequence, and so matches the letter "R" by default, but causes an error if PCRE_EXTRA is set. Unicode character properties When PCRE is built with Unicode character property support, three addi- - tional escape sequences that match characters with specific properties - are available. When in 8-bit non-UTF-8 mode, these sequences are of - course limited to testing characters whose codepoints are less than + tional escape sequences that match characters with specific properties + are available. When in 8-bit non-UTF-8 mode, these sequences are of + course limited to testing characters whose codepoints are less than 256, but they do work in this mode. The extra escape sequences are: \p{xx} a character with the xx property \P{xx} a character without the xx property \X a Unicode extended grapheme cluster - The property names represented by xx above are limited to the Unicode + The property names represented by xx above are limited to the Unicode script names, the general category properties, "Any", which matches any - character (including newline), and some special PCRE properties - (described in the next section). Other Perl properties such as "InMu- - sicalSymbols" are not currently supported by PCRE. Note that \P{Any} + character (including newline), and some special PCRE properties + (described in the next section). Other Perl properties such as "InMu- + sicalSymbols" are not currently supported by PCRE. Note that \P{Any} does not match any characters, so always causes a match failure. Sets of Unicode characters are defined as belonging to certain scripts. - A character from one of these sets can be matched using a script name. + A character from one of these sets can be matched using a script name. For example: \p{Greek} \P{Han} - Those that are not part of an identified script are lumped together as + Those that are not part of an identified script are lumped together as "Common". The current list of scripts is: - Arabic, Armenian, Avestan, Balinese, Bamum, Batak, Bengali, Bopomofo, - Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Carian, Chakma, - Cham, Cherokee, Common, Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, - Devanagari, Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, - Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hira- - gana, Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip- - tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li, - Kharoshthi, Khmer, Lao, Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, + Arabic, Armenian, Avestan, Balinese, Bamum, Batak, Bengali, Bopomofo, + Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Carian, Chakma, + Cham, Cherokee, Common, Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, + Devanagari, Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, + Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hira- + gana, Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip- + tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li, + Kharoshthi, Khmer, Lao, Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam, Mandaic, Meetei_Mayek, Meroitic_Cursive, - Meroitic_Hieroglyphs, Miao, Mongolian, Myanmar, New_Tai_Lue, Nko, - Ogham, Old_Italic, Old_Persian, Old_South_Arabian, Old_Turkic, - Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, Rejang, Runic, Samari- - tan, Saurashtra, Sharada, Shavian, Sinhala, Sora_Sompeng, Sundanese, - Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet, - Takri, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Vai, + Meroitic_Hieroglyphs, Miao, Mongolian, Myanmar, New_Tai_Lue, Nko, + Ogham, Old_Italic, Old_Persian, Old_South_Arabian, Old_Turkic, + Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, Rejang, Runic, Samari- + tan, Saurashtra, Sharada, Shavian, Sinhala, Sora_Sompeng, Sundanese, + Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet, + Takri, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Vai, Yi. Each character has exactly one Unicode general category property, spec- - ified by a two-letter abbreviation. For compatibility with Perl, nega- - tion can be specified by including a circumflex between the opening - brace and the property name. For example, \p{^Lu} is the same as + ified by a two-letter abbreviation. For compatibility with Perl, nega- + tion can be specified by including a circumflex between the opening + brace and the property name. For example, \p{^Lu} is the same as \P{Lu}. If only one letter is specified with \p or \P, it includes all the gen- - eral category properties that start with that letter. In this case, in - the absence of negation, the curly brackets in the escape sequence are + eral category properties that start with that letter. In this case, in + the absence of negation, the curly brackets in the escape sequence are optional; these two examples have the same effect: \p{L} @@ -5264,73 +5386,73 @@ BACKSLASH Zp Paragraph separator Zs Space separator - The special property L& is also supported: it matches a character that - has the Lu, Ll, or Lt property, in other words, a letter that is not + The special property L& is also supported: it matches a character that + has the Lu, Ll, or Lt property, in other words, a letter that is not classified as a modifier or "other". - The Cs (Surrogate) property applies only to characters in the range - U+D800 to U+DFFF. Such characters are not valid in Unicode strings and - so cannot be tested by PCRE, unless UTF validity checking has been + The Cs (Surrogate) property applies only to characters in the range + U+D800 to U+DFFF. Such characters are not valid in Unicode strings and + so cannot be tested by PCRE, unless UTF validity checking has been turned off (see the discussion of PCRE_NO_UTF8_CHECK, - PCRE_NO_UTF16_CHECK and PCRE_NO_UTF32_CHECK in the pcreapi page). Perl + PCRE_NO_UTF16_CHECK and PCRE_NO_UTF32_CHECK in the pcreapi page). Perl does not support the Cs property. - The long synonyms for property names that Perl supports (such as - \p{Letter}) are not supported by PCRE, nor is it permitted to prefix + The long synonyms for property names that Perl supports (such as + \p{Letter}) are not supported by PCRE, nor is it permitted to prefix any of these properties with "Is". No character that is in the Unicode table has the Cn (unassigned) prop- erty. Instead, this property is assumed for any code point that is not in the Unicode table. - Specifying caseless matching does not affect these escape sequences. - For example, \p{Lu} always matches only upper case letters. This is + Specifying caseless matching does not affect these escape sequences. + For example, \p{Lu} always matches only upper case letters. This is different from the behaviour of current versions of Perl. - Matching characters by Unicode property is not fast, because PCRE has - to do a multistage table lookup in order to find a character's prop- + Matching characters by Unicode property is not fast, because PCRE has + to do a multistage table lookup in order to find a character's prop- erty. That is why the traditional escape sequences such as \d and \w do not use Unicode properties in PCRE by default, though you can make them - do so by setting the PCRE_UCP option or by starting the pattern with + do so by setting the PCRE_UCP option or by starting the pattern with (*UCP). Extended grapheme clusters - The \X escape matches any number of Unicode characters that form an + The \X escape matches any number of Unicode characters that form an "extended grapheme cluster", and treats the sequence as an atomic group - (see below). Up to and including release 8.31, PCRE matched an ear- + (see below). Up to and including release 8.31, PCRE matched an ear- lier, simpler definition that was equivalent to (?>\PM\pM*) - That is, it matched a character without the "mark" property, followed - by zero or more characters with the "mark" property. Characters with - the "mark" property are typically non-spacing accents that affect the + That is, it matched a character without the "mark" property, followed + by zero or more characters with the "mark" property. Characters with + the "mark" property are typically non-spacing accents that affect the preceding character. - This simple definition was extended in Unicode to include more compli- - cated kinds of composite character by giving each character a grapheme - breaking property, and creating rules that use these properties to - define the boundaries of extended grapheme clusters. In releases of + This simple definition was extended in Unicode to include more compli- + cated kinds of composite character by giving each character a grapheme + breaking property, and creating rules that use these properties to + define the boundaries of extended grapheme clusters. In releases of PCRE later than 8.31, \X matches one of these clusters. - \X always matches at least one character. Then it decides whether to + \X always matches at least one character. Then it decides whether to add additional characters according to the following rules for ending a cluster: 1. End at the end of the subject string. - 2. Do not end between CR and LF; otherwise end after any control char- + 2. Do not end between CR and LF; otherwise end after any control char- acter. - 3. Do not break Hangul (a Korean script) syllable sequences. Hangul - characters are of five types: L, V, T, LV, and LVT. An L character may - be followed by an L, V, LV, or LVT character; an LV or V character may + 3. Do not break Hangul (a Korean script) syllable sequences. Hangul + characters are of five types: L, V, T, LV, and LVT. An L character may + be followed by an L, V, LV, or LVT character; an LV or V character may be followed by a V or T character; an LVT or T character may be follwed only by a T character. - 4. Do not end before extending characters or spacing marks. Characters - with the "mark" property always have the "extend" grapheme breaking + 4. Do not end before extending characters or spacing marks. Characters + with the "mark" property always have the "extend" grapheme breaking property. 5. Do not end after prepend characters. @@ -5339,12 +5461,11 @@ BACKSLASH PCRE's additional properties - As well as the standard Unicode properties described above, PCRE sup- - ports four more that make it possible to convert traditional escape - sequences such as \w and \s and POSIX character classes to use Unicode - properties. PCRE uses these non-standard, non-Perl properties inter- - nally when PCRE_UCP is set. However, they may also be used explicitly. - These properties are: + As well as the standard Unicode properties described above, PCRE sup- + ports four more that make it possible to convert traditional escape + sequences such as \w and \s to use Unicode properties. PCRE uses these + non-standard, non-Perl properties internally when PCRE_UCP is set. How- + ever, they may also be used explicitly. These properties are: Xan Any alphanumeric character Xps Any POSIX space character @@ -5354,8 +5475,10 @@ BACKSLASH Xan matches characters that have either the L (letter) or the N (num- ber) property. Xps matches the characters tab, linefeed, vertical tab, form feed, or carriage return, and any other character that has the Z - (separator) property. Xsp is the same as Xps, except that vertical tab - is excluded. Xwd matches the same characters as Xan, plus underscore. + (separator) property. Xsp is the same as Xps; it used to exclude ver- + tical tab, for Perl compatibility, but Perl changed, and so PCRE fol- + lowed at release 8.34. Xwd matches the same characters as Xan, plus + underscore. There is another non-standard property, Xuc, which matches any charac- ter that can be represented by a Universal Character Name in C++ and @@ -5628,7 +5751,9 @@ SQUARE BRACKETS AND CHARACTER CLASSES between d and m, inclusive. If a minus character is required in a class, it must be escaped with a backslash or appear in a position where it cannot be interpreted as indicating a range, typically as the - first or last character in the class. + first or last character in the class, or immediately after a range. For + example, [b-d-z] matches letters in the range b to d, a hyphen charac- + ter, or z. It is not possible to have the literal character "]" as the end charac- ter of a range. A pattern such as [W-]46] is interpreted as a class of @@ -5639,45 +5764,51 @@ SQUARE BRACKETS AND CHARACTER CLASSES The octal or hexadecimal representation of "]" can also be used to end a range. - Ranges operate in the collating sequence of character values. They can - also be used for characters specified numerically, for example - [\000-\037]. Ranges can include any characters that are valid for the + An error is generated if a POSIX character class (see below) or an + escape sequence other than one that defines a single character appears + at a point where a range ending character is expected. For example, + [z-\xff] is valid, but [A-\d] and [A-[:digit:]] are not. + + Ranges operate in the collating sequence of character values. They can + also be used for characters specified numerically, for example + [\000-\037]. Ranges can include any characters that are valid for the current mode. If a range that includes letters is used when caseless matching is set, it matches the letters in either case. For example, [W-c] is equivalent - to [][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if - character tables for a French locale are in use, [\xc8-\xcb] matches - accented E characters in both cases. In UTF modes, PCRE supports the - concept of case for characters with values greater than 128 only when + to [][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if + character tables for a French locale are in use, [\xc8-\xcb] matches + accented E characters in both cases. In UTF modes, PCRE supports the + concept of case for characters with values greater than 128 only when it is compiled with Unicode property support. - The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v, \V, + The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v, \V, \w, and \W may appear in a character class, and add the characters that - they match to the class. For example, [\dABCDEF] matches any hexadeci- - mal digit. In UTF modes, the PCRE_UCP option affects the meanings of - \d, \s, \w and their upper case partners, just as it does when they - appear outside a character class, as described in the section entitled + they match to the class. For example, [\dABCDEF] matches any hexadeci- + mal digit. In UTF modes, the PCRE_UCP option affects the meanings of + \d, \s, \w and their upper case partners, just as it does when they + appear outside a character class, as described in the section entitled "Generic character types" above. The escape sequence \b has a different - meaning inside a character class; it matches the backspace character. - The sequences \B, \N, \R, and \X are not special inside a character - class. Like any other unrecognized escape sequences, they are treated - as the literal characters "B", "N", "R", and "X" by default, but cause + meaning inside a character class; it matches the backspace character. + The sequences \B, \N, \R, and \X are not special inside a character + class. Like any other unrecognized escape sequences, they are treated + as the literal characters "B", "N", "R", and "X" by default, but cause an error if the PCRE_EXTRA option is set. - A circumflex can conveniently be used with the upper case character - types to specify a more restricted set of characters than the matching - lower case type. For example, the class [^\W_] matches any letter or + A circumflex can conveniently be used with the upper case character + types to specify a more restricted set of characters than the matching + lower case type. For example, the class [^\W_] matches any letter or digit, but not underscore, whereas [\w] includes underscore. A positive character class should be read as "something OR something OR ..." and a negative class as "NOT something AND NOT something AND NOT ...". - The only metacharacters that are recognized in character classes are - backslash, hyphen (only where it can be interpreted as specifying a - range), circumflex (only at the start), opening square bracket (only - when it can be interpreted as introducing a POSIX class name - see the - next section), and the terminating closing square bracket. However, - escaping other non-alphanumeric characters does no harm. + The only metacharacters that are recognized in character classes are + backslash, hyphen (only where it can be interpreted as specifying a + range), circumflex (only at the start), opening square bracket (only + when it can be interpreted as introducing a POSIX class name, or for a + special compatibility feature - see the next two sections), and the + terminating closing square bracket. However, escaping other non- + alphanumeric characters does no harm. POSIX CHARACTER CLASSES @@ -5701,31 +5832,34 @@ POSIX CHARACTER CLASSES lower lower case letters print printing characters, including space punct printing characters, excluding letters and digits and space - space white space (not quite the same as \s) + space white space (the same as \s from PCRE 8.34) upper upper case letters word "word" characters (same as \w) xdigit hexadecimal digits - The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), - and space (32). Notice that this list includes the VT character (code - 11). This makes "space" different to \s, which does not include VT (for - Perl compatibility). + The default "space" characters are HT (9), LF (10), VT (11), FF (12), + CR (13), and space (32). If locale-specific matching is taking place, + the list of space characters may be different; there may be fewer or + more of them. "Space" used to be different to \s, which did not include + VT, for Perl compatibility. However, Perl changed at release 5.18, and + PCRE followed at release 8.34. "Space" and \s now match the same set + of characters. - The name "word" is a Perl extension, and "blank" is a GNU extension - from Perl 5.8. Another Perl extension is negation, which is indicated + The name "word" is a Perl extension, and "blank" is a GNU extension + from Perl 5.8. Another Perl extension is negation, which is indicated by a ^ character after the colon. For example, [12[:^digit:]] - matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the + matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the POSIX syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not supported, and an error is given if they are encountered. - By default, in UTF modes, characters with values greater than 128 do - not match any of the POSIX character classes. However, if the PCRE_UCP - option is passed to pcre_compile(), some of the classes are changed so - that Unicode character properties are used. This is achieved by replac- - ing the POSIX classes by other sequences, as follows: + By default, characters with values greater than 128 do not match any of + the POSIX character classes. However, if the PCRE_UCP option is passed + to pcre_compile(), some of the classes are changed so that Unicode + character properties are used. This is achieved by replacing certain + POSIX classes by other sequences, as follows: [:alnum:] becomes \p{Xan} [:alpha:] becomes \p{L} @@ -5736,31 +5870,70 @@ POSIX CHARACTER CLASSES [:upper:] becomes \p{Lu} [:word:] becomes \p{Xwd} - Negated versions, such as [:^alpha:] use \P instead of \p. The other - POSIX classes are unchanged, and match only characters with code points - less than 128. + Negated versions, such as [:^alpha:] use \P instead of \p. Three other + POSIX classes are handled specially in UCP mode: + + [:graph:] This matches characters that have glyphs that mark the page + when printed. In Unicode property terms, it matches all char- + acters with the L, M, N, P, S, or Cf properties, except for: + + U+061C Arabic Letter Mark + U+180E Mongolian Vowel Separator + U+2066 - U+2069 Various "isolate"s + + + [:print:] This matches the same characters as [:graph:] plus space + characters that are not controls, that is, characters with + the Zs property. + + [:punct:] This matches all characters that have the Unicode P (punctua- + tion) property, plus those characters whose code points are + less than 128 that have the S (Symbol) property. + + The other POSIX classes are unchanged, and match only characters with + code points less than 128. + + +COMPATIBILITY FEATURE FOR WORD BOUNDARIES + + In the POSIX.2 compliant library that was included in 4.4BSD Unix, the + ugly syntax [[:<:]] and [[:>:]] is used for matching "start of word" + and "end of word". PCRE treats these items as follows: + + [[:<:]] is converted to \b(?=\w) + [[:>:]] is converted to \b(?<=\w) + + Only these exact character sequences are recognized. A sequence such as + [a[:<:]b] provokes error for an unrecognized POSIX class name. This + support is not compatible with Perl. It is provided to help migrations + from other environments, and is best not used in any new patterns. Note + that \b matches at the start and the end of a word (see "Simple asser- + tions" above), and in a Perl-style pattern the preceding or following + character normally shows which is wanted, without the need for the + assertions that are used above in order to give exactly the POSIX be- + haviour. VERTICAL BAR - Vertical bar characters are used to separate alternative patterns. For + Vertical bar characters are used to separate alternative patterns. For example, the pattern gilbert|sullivan - matches either "gilbert" or "sullivan". Any number of alternatives may - appear, and an empty alternative is permitted (matching the empty + matches either "gilbert" or "sullivan". Any number of alternatives may + appear, and an empty alternative is permitted (matching the empty string). The matching process tries each alternative in turn, from left - to right, and the first one that succeeds is used. If the alternatives - are within a subpattern (defined below), "succeeds" means matching the + to right, and the first one that succeeds is used. If the alternatives + are within a subpattern (defined below), "succeeds" means matching the rest of the main pattern as well as the alternative in the subpattern. INTERNAL OPTION SETTING - The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and - PCRE_EXTENDED options (which are Perl-compatible) can be changed from - within the pattern by a sequence of Perl option letters enclosed + The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and + PCRE_EXTENDED options (which are Perl-compatible) can be changed from + within the pattern by a sequence of Perl option letters enclosed between "(?" and ")". The option letters are i for PCRE_CASELESS @@ -5770,51 +5943,51 @@ INTERNAL OPTION SETTING For example, (?im) sets caseless, multiline matching. It is also possi- ble to unset these options by preceding the letter with a hyphen, and a - combined setting and unsetting such as (?im-sx), which sets PCRE_CASE- - LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, - is also permitted. If a letter appears both before and after the + combined setting and unsetting such as (?im-sx), which sets PCRE_CASE- + LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, + is also permitted. If a letter appears both before and after the hyphen, the option is unset. - The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA - can be changed in the same way as the Perl-compatible options by using + The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA + can be changed in the same way as the Perl-compatible options by using the characters J, U and X respectively. - When one of these option changes occurs at top level (that is, not - inside subpattern parentheses), the change applies to the remainder of + When one of these option changes occurs at top level (that is, not + inside subpattern parentheses), the change applies to the remainder of the pattern that follows. If the change is placed right at the start of a pattern, PCRE extracts it into the global options (and it will there- fore show up in data extracted by the pcre_fullinfo() function). - An option change within a subpattern (see below for a description of - subpatterns) affects only that part of the subpattern that follows it, + An option change within a subpattern (see below for a description of + subpatterns) affects only that part of the subpattern that follows it, so (a(?i)b)c matches abc and aBc and no other strings (assuming PCRE_CASELESS is not - used). By this means, options can be made to have different settings - in different parts of the pattern. Any changes made in one alternative - do carry on into subsequent branches within the same subpattern. For + used). By this means, options can be made to have different settings + in different parts of the pattern. Any changes made in one alternative + do carry on into subsequent branches within the same subpattern. For example, (a(?i)b|c) - matches "ab", "aB", "c", and "C", even though when matching "C" the - first branch is abandoned before the option setting. This is because - the effects of option settings happen at compile time. There would be + matches "ab", "aB", "c", and "C", even though when matching "C" the + first branch is abandoned before the option setting. This is because + the effects of option settings happen at compile time. There would be some very weird behaviour otherwise. - Note: There are other PCRE-specific options that can be set by the - application when the compiling or matching functions are called. In - some cases the pattern can contain special leading sequences such as - (*CRLF) to override what the application has set or what has been - defaulted. Details are given in the section entitled "Newline - sequences" above. There are also the (*UTF8), (*UTF16),(*UTF32), and - (*UCP) leading sequences that can be used to set UTF and Unicode prop- - erty modes; they are equivalent to setting the PCRE_UTF8, PCRE_UTF16, - PCRE_UTF32 and the PCRE_UCP options, respectively. The (*UTF) sequence - is a generic version that can be used with any of the libraries. How- - ever, the application can set the PCRE_NEVER_UTF option, which locks + Note: There are other PCRE-specific options that can be set by the + application when the compiling or matching functions are called. In + some cases the pattern can contain special leading sequences such as + (*CRLF) to override what the application has set or what has been + defaulted. Details are given in the section entitled "Newline + sequences" above. There are also the (*UTF8), (*UTF16),(*UTF32), and + (*UCP) leading sequences that can be used to set UTF and Unicode prop- + erty modes; they are equivalent to setting the PCRE_UTF8, PCRE_UTF16, + PCRE_UTF32 and the PCRE_UCP options, respectively. The (*UTF) sequence + is a generic version that can be used with any of the libraries. How- + ever, the application can set the PCRE_NEVER_UTF option, which locks out the use of the (*UTF) sequences. @@ -5827,18 +6000,18 @@ SUBPATTERNS cat(aract|erpillar|) - matches "cataract", "caterpillar", or "cat". Without the parentheses, + matches "cataract", "caterpillar", or "cat". Without the parentheses, it would match "cataract", "erpillar" or an empty string. - 2. It sets up the subpattern as a capturing subpattern. This means - that, when the whole pattern matches, that portion of the subject + 2. It sets up the subpattern as a capturing subpattern. This means + that, when the whole pattern matches, that portion of the subject string that matched the subpattern is passed back to the caller via the - ovector argument of the matching function. (This applies only to the - traditional matching functions; the DFA matching functions do not sup- + ovector argument of the matching function. (This applies only to the + traditional matching functions; the DFA matching functions do not sup- port capturing.) Opening parentheses are counted from left to right (starting from 1) to - obtain numbers for the capturing subpatterns. For example, if the + obtain numbers for the capturing subpatterns. For example, if the string "the red king" is matched against the pattern the ((red|white) (king|queen)) @@ -5846,12 +6019,12 @@ SUBPATTERNS the captured substrings are "red king", "red", and "king", and are num- bered 1, 2, and 3, respectively. - The fact that plain parentheses fulfil two functions is not always - helpful. There are often times when a grouping subpattern is required - without a capturing requirement. If an opening parenthesis is followed - by a question mark and a colon, the subpattern does not do any captur- - ing, and is not counted when computing the number of any subsequent - capturing subpatterns. For example, if the string "the white queen" is + The fact that plain parentheses fulfil two functions is not always + helpful. There are often times when a grouping subpattern is required + without a capturing requirement. If an opening parenthesis is followed + by a question mark and a colon, the subpattern does not do any captur- + ing, and is not counted when computing the number of any subsequent + capturing subpatterns. For example, if the string "the white queen" is matched against the pattern the ((?:red|white) (king|queen)) @@ -5859,37 +6032,37 @@ SUBPATTERNS the captured substrings are "white queen" and "queen", and are numbered 1 and 2. The maximum number of capturing subpatterns is 65535. - As a convenient shorthand, if any option settings are required at the - start of a non-capturing subpattern, the option letters may appear + As a convenient shorthand, if any option settings are required at the + start of a non-capturing subpattern, the option letters may appear between the "?" and the ":". Thus the two patterns (?i:saturday|sunday) (?:(?i)saturday|sunday) match exactly the same set of strings. Because alternative branches are - tried from left to right, and options are not reset until the end of - the subpattern is reached, an option setting in one branch does affect - subsequent branches, so the above patterns match "SUNDAY" as well as + tried from left to right, and options are not reset until the end of + the subpattern is reached, an option setting in one branch does affect + subsequent branches, so the above patterns match "SUNDAY" as well as "Saturday". DUPLICATE SUBPATTERN NUMBERS Perl 5.10 introduced a feature whereby each alternative in a subpattern - uses the same numbers for its capturing parentheses. Such a subpattern - starts with (?| and is itself a non-capturing subpattern. For example, + uses the same numbers for its capturing parentheses. Such a subpattern + starts with (?| and is itself a non-capturing subpattern. For example, consider this pattern: (?|(Sat)ur|(Sun))day - Because the two alternatives are inside a (?| group, both sets of cap- - turing parentheses are numbered one. Thus, when the pattern matches, - you can look at captured substring number one, whichever alternative - matched. This construct is useful when you want to capture part, but + Because the two alternatives are inside a (?| group, both sets of cap- + turing parentheses are numbered one. Thus, when the pattern matches, + you can look at captured substring number one, whichever alternative + matched. This construct is useful when you want to capture part, but not all, of one of a number of alternatives. Inside a (?| group, paren- - theses are numbered as usual, but the number is reset at the start of - each branch. The numbers of any capturing parentheses that follow the - subpattern start after the highest number used in any branch. The fol- + theses are numbered as usual, but the number is reset at the start of + each branch. The numbers of any capturing parentheses that follow the + subpattern start after the highest number used in any branch. The fol- lowing example is taken from the Perl documentation. The numbers under- neath show in which buffer the captured content will be stored. @@ -5897,58 +6070,58 @@ DUPLICATE SUBPATTERN NUMBERS / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x # 1 2 2 3 2 3 4 - A back reference to a numbered subpattern uses the most recent value - that is set for that number by any subpattern. The following pattern + A back reference to a numbered subpattern uses the most recent value + that is set for that number by any subpattern. The following pattern matches "abcabc" or "defdef": /(?|(abc)|(def))\1/ - In contrast, a subroutine call to a numbered subpattern always refers - to the first one in the pattern with the given number. The following + In contrast, a subroutine call to a numbered subpattern always refers + to the first one in the pattern with the given number. The following pattern matches "abcabc" or "defabc": /(?|(abc)|(def))(?1)/ - If a condition test for a subpattern's having matched refers to a non- - unique number, the test is true if any of the subpatterns of that num- + If a condition test for a subpattern's having matched refers to a non- + unique number, the test is true if any of the subpatterns of that num- ber have matched. - An alternative approach to using this "branch reset" feature is to use + An alternative approach to using this "branch reset" feature is to use duplicate named subpatterns, as described in the next section. NAMED SUBPATTERNS - Identifying capturing parentheses by number is simple, but it can be - very hard to keep track of the numbers in complicated regular expres- - sions. Furthermore, if an expression is modified, the numbers may - change. To help with this difficulty, PCRE supports the naming of sub- + Identifying capturing parentheses by number is simple, but it can be + very hard to keep track of the numbers in complicated regular expres- + sions. Furthermore, if an expression is modified, the numbers may + change. To help with this difficulty, PCRE supports the naming of sub- patterns. This feature was not added to Perl until release 5.10. Python - had the feature earlier, and PCRE introduced it at release 4.0, using - the Python syntax. PCRE now supports both the Perl and the Python syn- - tax. Perl allows identically numbered subpatterns to have different + had the feature earlier, and PCRE introduced it at release 4.0, using + the Python syntax. PCRE now supports both the Perl and the Python syn- + tax. Perl allows identically numbered subpatterns to have different names, but PCRE does not. - In PCRE, a subpattern can be named in one of three ways: (?<name>...) - or (?'name'...) as in Perl, or (?P<name>...) as in Python. References - to capturing parentheses from other parts of the pattern, such as back - references, recursion, and conditions, can be made by name as well as + In PCRE, a subpattern can be named in one of three ways: (?<name>...) + or (?'name'...) as in Perl, or (?P<name>...) as in Python. References + to capturing parentheses from other parts of the pattern, such as back + references, recursion, and conditions, can be made by name as well as by number. - Names consist of up to 32 alphanumeric characters and underscores. - Named capturing parentheses are still allocated numbers as well as - names, exactly as if the names were not present. The PCRE API provides - function calls for extracting the name-to-number translation table from - a compiled pattern. There is also a convenience function for extracting - a captured substring by name. + Names consist of up to 32 alphanumeric characters and underscores, but + must start with a non-digit. Named capturing parentheses are still + allocated numbers as well as names, exactly as if the names were not + present. The PCRE API provides function calls for extracting the name- + to-number translation table from a compiled pattern. There is also a + convenience function for extracting a captured substring by name. - By default, a name must be unique within a pattern, but it is possible + By default, a name must be unique within a pattern, but it is possible to relax this constraint by setting the PCRE_DUPNAMES option at compile - time. (Duplicate names are also always permitted for subpatterns with - the same number, set up as described in the previous section.) Dupli- - cate names can be useful for patterns where only one instance of the - named parentheses can match. Suppose you want to match the name of a - weekday, either as a 3-letter abbreviation or as the full name, and in + time. (Duplicate names are also always permitted for subpatterns with + the same number, set up as described in the previous section.) Dupli- + cate names can be useful for patterns where only one instance of the + named parentheses can match. Suppose you want to match the name of a + weekday, either as a 3-letter abbreviation or as the full name, and in both cases you want to extract the abbreviation. This pattern (ignoring the line breaks) does the job: @@ -5958,33 +6131,43 @@ NAMED SUBPATTERNS (?<DN>Thu)(?:rsday)?| (?<DN>Sat)(?:urday)? - There are five capturing substrings, but only one is ever set after a + There are five capturing substrings, but only one is ever set after a match. (An alternative way of solving this problem is to use a "branch reset" subpattern, as described in the previous section.) - The convenience function for extracting the data by name returns the - substring for the first (and in this example, the only) subpattern of - that name that matched. This saves searching to find which numbered + The convenience function for extracting the data by name returns the + substring for the first (and in this example, the only) subpattern of + that name that matched. This saves searching to find which numbered subpattern it was. - If you make a back reference to a non-unique named subpattern from - elsewhere in the pattern, the one that corresponds to the first occur- - rence of the name is used. In the absence of duplicate numbers (see the - previous section) this is the one with the lowest number. If you use a - named reference in a condition test (see the section about conditions - below), either to check whether a subpattern has matched, or to check - for recursion, all subpatterns with the same name are tested. If the - condition is true for any one of them, the overall condition is true. - This is the same behaviour as testing by number. For further details of - the interfaces for handling named subpatterns, see the pcreapi documen- - tation. + If you make a back reference to a non-unique named subpattern from + elsewhere in the pattern, the subpatterns to which the name refers are + checked in the order in which they appear in the overall pattern. The + first one that is set is used for the reference. For example, this pat- + tern matches both "foofoo" and "barbar" but not "foobar" or "barfoo": + + (?:(?<n>foo)|(?<n>bar))\k<n> + + + If you make a subroutine call to a non-unique named subpattern, the one + that corresponds to the first occurrence of the name is used. In the + absence of duplicate numbers (see the previous section) this is the one + with the lowest number. + + If you use a named reference in a condition test (see the section about + conditions below), either to check whether a subpattern has matched, or + to check for recursion, all subpatterns with the same name are tested. + If the condition is true for any one of them, the overall condition is + true. This is the same behaviour as testing by number. For further + details of the interfaces for handling named subpatterns, see the + pcreapi documentation. Warning: You cannot use different names to distinguish between two sub- patterns with the same number because PCRE uses only the numbers when matching. For this reason, an error is given at compile time if differ- ent names are given to subpatterns with the same number. However, you - can give the same name to subpatterns with the same number, even when - PCRE_DUPNAMES is not set. + can always give the same name to subpatterns with the same number, even + when PCRE_DUPNAMES is not set. REPETITION @@ -6619,25 +6802,20 @@ CONDITIONAL SUBPATTERNS Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a used subpattern by name. For compatibility with earlier versions of PCRE, which had this facility before Perl, the syntax (?(name)...) is - also recognized. However, there is a possible ambiguity with this syn- - tax, because subpattern names may consist entirely of digits. PCRE - looks first for a named subpattern; if it cannot find one and the name - consists entirely of digits, PCRE looks for a subpattern of that num- - ber, which must be greater than zero. Using subpattern names that con- - sist entirely of digits is not recommended. + also recognized. Rewriting the above example to use a named subpattern gives this: (?<OPEN> \( )? [^()]+ (?(<OPEN>) \) ) - If the name used in a condition of this kind is a duplicate, the test - is applied to all subpatterns of the same name, and is true if any one + If the name used in a condition of this kind is a duplicate, the test + is applied to all subpatterns of the same name, and is true if any one of them has matched. Checking for pattern recursion If the condition is the string (R), and there is no subpattern with the - name R, the condition is true if a recursive call to the whole pattern + name R, the condition is true if a recursive call to the whole pattern or any subpattern has been made. If digits or a name preceded by amper- sand follow the letter R, for example: @@ -6645,51 +6823,51 @@ CONDITIONAL SUBPATTERNS the condition is true if the most recent recursion is into a subpattern whose number or name is given. This condition does not check the entire - recursion stack. If the name used in a condition of this kind is a + recursion stack. If the name used in a condition of this kind is a duplicate, the test is applied to all subpatterns of the same name, and is true if any one of them is the most recent recursion. - At "top level", all these recursion test conditions are false. The + At "top level", all these recursion test conditions are false. The syntax for recursive patterns is described below. Defining subpatterns for use by reference only - If the condition is the string (DEFINE), and there is no subpattern - with the name DEFINE, the condition is always false. In this case, - there may be only one alternative in the subpattern. It is always - skipped if control reaches this point in the pattern; the idea of - DEFINE is that it can be used to define subroutines that can be refer- - enced from elsewhere. (The use of subroutines is described below.) For - example, a pattern to match an IPv4 address such as "192.168.23.245" + If the condition is the string (DEFINE), and there is no subpattern + with the name DEFINE, the condition is always false. In this case, + there may be only one alternative in the subpattern. It is always + skipped if control reaches this point in the pattern; the idea of + DEFINE is that it can be used to define subroutines that can be refer- + enced from elsewhere. (The use of subroutines is described below.) For + example, a pattern to match an IPv4 address such as "192.168.23.245" could be written like this (ignore white space and line breaks): (?(DEFINE) (?<byte> 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) ) \b (?&byte) (\.(?&byte)){3} \b - The first part of the pattern is a DEFINE group inside which a another - group named "byte" is defined. This matches an individual component of - an IPv4 address (a number less than 256). When matching takes place, - this part of the pattern is skipped because DEFINE acts like a false - condition. The rest of the pattern uses references to the named group - to match the four dot-separated components of an IPv4 address, insist- + The first part of the pattern is a DEFINE group inside which a another + group named "byte" is defined. This matches an individual component of + an IPv4 address (a number less than 256). When matching takes place, + this part of the pattern is skipped because DEFINE acts like a false + condition. The rest of the pattern uses references to the named group + to match the four dot-separated components of an IPv4 address, insist- ing on a word boundary at each end. Assertion conditions - If the condition is not in any of the above formats, it must be an - assertion. This may be a positive or negative lookahead or lookbehind - assertion. Consider this pattern, again containing non-significant + If the condition is not in any of the above formats, it must be an + assertion. This may be a positive or negative lookahead or lookbehind + assertion. Consider this pattern, again containing non-significant white space, and with the two alternatives on the second line: (?(?=[^a-z]*[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) - The condition is a positive lookahead assertion that matches an - optional sequence of non-letters followed by a letter. In other words, - it tests for the presence of at least one letter in the subject. If a - letter is found, the subject is matched against the first alternative; - otherwise it is matched against the second. This pattern matches - strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are + The condition is a positive lookahead assertion that matches an + optional sequence of non-letters followed by a letter. In other words, + it tests for the presence of at least one letter in the subject. If a + letter is found, the subject is matched against the first alternative; + otherwise it is matched against the second. This pattern matches + strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits. @@ -6698,41 +6876,41 @@ COMMENTS There are two ways of including comments in patterns that are processed by PCRE. In both cases, the start of the comment must not be in a char- acter class, nor in the middle of any other sequence of related charac- - ters such as (?: or a subpattern name or number. The characters that + ters such as (?: or a subpattern name or number. The characters that make up a comment play no part in the pattern matching. - The sequence (?# marks the start of a comment that continues up to the - next closing parenthesis. Nested parentheses are not permitted. If the + The sequence (?# marks the start of a comment that continues up to the + next closing parenthesis. Nested parentheses are not permitted. If the PCRE_EXTENDED option is set, an unescaped # character also introduces a - comment, which in this case continues to immediately after the next - newline character or character sequence in the pattern. Which charac- + comment, which in this case continues to immediately after the next + newline character or character sequence in the pattern. Which charac- ters are interpreted as newlines is controlled by the options passed to - a compiling function or by a special sequence at the start of the pat- + a compiling function or by a special sequence at the start of the pat- tern, as described in the section entitled "Newline conventions" above. Note that the end of this type of comment is a literal newline sequence - in the pattern; escape sequences that happen to represent a newline do - not count. For example, consider this pattern when PCRE_EXTENDED is + in the pattern; escape sequences that happen to represent a newline do + not count. For example, consider this pattern when PCRE_EXTENDED is set, and the default newline convention is in force: abc #comment \n still comment - On encountering the # character, pcre_compile() skips along, looking - for a newline in the pattern. The sequence \n is still literal at this - stage, so it does not terminate the comment. Only an actual character + On encountering the # character, pcre_compile() skips along, looking + for a newline in the pattern. The sequence \n is still literal at this + stage, so it does not terminate the comment. Only an actual character with the code value 0x0a (the default newline) does so. RECURSIVE PATTERNS - Consider the problem of matching a string in parentheses, allowing for - unlimited nested parentheses. Without the use of recursion, the best - that can be done is to use a pattern that matches up to some fixed - depth of nesting. It is not possible to handle an arbitrary nesting + Consider the problem of matching a string in parentheses, allowing for + unlimited nested parentheses. Without the use of recursion, the best + that can be done is to use a pattern that matches up to some fixed + depth of nesting. It is not possible to handle an arbitrary nesting depth. For some time, Perl has provided a facility that allows regular expres- - sions to recurse (amongst other things). It does this by interpolating - Perl code in the expression at run time, and the code can refer to the + sions to recurse (amongst other things). It does this by interpolating + Perl code in the expression at run time, and the code can refer to the expression itself. A Perl pattern using code interpolation to solve the parentheses problem can be created like this: @@ -6742,201 +6920,201 @@ RECURSIVE PATTERNS refers recursively to the pattern in which it appears. Obviously, PCRE cannot support the interpolation of Perl code. Instead, - it supports special syntax for recursion of the entire pattern, and - also for individual subpattern recursion. After its introduction in - PCRE and Python, this kind of recursion was subsequently introduced + it supports special syntax for recursion of the entire pattern, and + also for individual subpattern recursion. After its introduction in + PCRE and Python, this kind of recursion was subsequently introduced into Perl at release 5.10. - A special item that consists of (? followed by a number greater than - zero and a closing parenthesis is a recursive subroutine call of the - subpattern of the given number, provided that it occurs inside that - subpattern. (If not, it is a non-recursive subroutine call, which is - described in the next section.) The special item (?R) or (?0) is a + A special item that consists of (? followed by a number greater than + zero and a closing parenthesis is a recursive subroutine call of the + subpattern of the given number, provided that it occurs inside that + subpattern. (If not, it is a non-recursive subroutine call, which is + described in the next section.) The special item (?R) or (?0) is a recursive call of the entire regular expression. - This PCRE pattern solves the nested parentheses problem (assume the + This PCRE pattern solves the nested parentheses problem (assume the PCRE_EXTENDED option is set so that white space is ignored): \( ( [^()]++ | (?R) )* \) - First it matches an opening parenthesis. Then it matches any number of - substrings which can either be a sequence of non-parentheses, or a - recursive match of the pattern itself (that is, a correctly parenthe- + First it matches an opening parenthesis. Then it matches any number of + substrings which can either be a sequence of non-parentheses, or a + recursive match of the pattern itself (that is, a correctly parenthe- sized substring). Finally there is a closing parenthesis. Note the use of a possessive quantifier to avoid backtracking into sequences of non- parentheses. - If this were part of a larger pattern, you would not want to recurse + If this were part of a larger pattern, you would not want to recurse the entire pattern, so instead you could use this: ( \( ( [^()]++ | (?1) )* \) ) - We have put the pattern into parentheses, and caused the recursion to + We have put the pattern into parentheses, and caused the recursion to refer to them instead of the whole pattern. - In a larger pattern, keeping track of parenthesis numbers can be - tricky. This is made easier by the use of relative references. Instead + In a larger pattern, keeping track of parenthesis numbers can be + tricky. This is made easier by the use of relative references. Instead of (?1) in the pattern above you can write (?-2) to refer to the second - most recently opened parentheses preceding the recursion. In other - words, a negative number counts capturing parentheses leftwards from + most recently opened parentheses preceding the recursion. In other + words, a negative number counts capturing parentheses leftwards from the point at which it is encountered. - It is also possible to refer to subsequently opened parentheses, by - writing references such as (?+2). However, these cannot be recursive - because the reference is not inside the parentheses that are refer- - enced. They are always non-recursive subroutine calls, as described in + It is also possible to refer to subsequently opened parentheses, by + writing references such as (?+2). However, these cannot be recursive + because the reference is not inside the parentheses that are refer- + enced. They are always non-recursive subroutine calls, as described in the next section. - An alternative approach is to use named parentheses instead. The Perl - syntax for this is (?&name); PCRE's earlier syntax (?P>name) is also + An alternative approach is to use named parentheses instead. The Perl + syntax for this is (?&name); PCRE's earlier syntax (?P>name) is also supported. We could rewrite the above example as follows: (?<pn> \( ( [^()]++ | (?&pn) )* \) ) - If there is more than one subpattern with the same name, the earliest + If there is more than one subpattern with the same name, the earliest one is used. - This particular example pattern that we have been looking at contains + This particular example pattern that we have been looking at contains nested unlimited repeats, and so the use of a possessive quantifier for matching strings of non-parentheses is important when applying the pat- - tern to strings that do not match. For example, when this pattern is + tern to strings that do not match. For example, when this pattern is applied to (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() - it yields "no match" quickly. However, if a possessive quantifier is - not used, the match runs for a very long time indeed because there are - so many different ways the + and * repeats can carve up the subject, + it yields "no match" quickly. However, if a possessive quantifier is + not used, the match runs for a very long time indeed because there are + so many different ways the + and * repeats can carve up the subject, and all have to be tested before failure can be reported. - At the end of a match, the values of capturing parentheses are those - from the outermost level. If you want to obtain intermediate values, a - callout function can be used (see below and the pcrecallout documenta- + At the end of a match, the values of capturing parentheses are those + from the outermost level. If you want to obtain intermediate values, a + callout function can be used (see below and the pcrecallout documenta- tion). If the pattern above is matched against (ab(cd)ef) - the value for the inner capturing parentheses (numbered 2) is "ef", - which is the last value taken on at the top level. If a capturing sub- - pattern is not matched at the top level, its final captured value is - unset, even if it was (temporarily) set at a deeper level during the + the value for the inner capturing parentheses (numbered 2) is "ef", + which is the last value taken on at the top level. If a capturing sub- + pattern is not matched at the top level, its final captured value is + unset, even if it was (temporarily) set at a deeper level during the matching process. - If there are more than 15 capturing parentheses in a pattern, PCRE has - to obtain extra memory to store data during a recursion, which it does + If there are more than 15 capturing parentheses in a pattern, PCRE has + to obtain extra memory to store data during a recursion, which it does by using pcre_malloc, freeing it via pcre_free afterwards. If no memory can be obtained, the match fails with the PCRE_ERROR_NOMEMORY error. - Do not confuse the (?R) item with the condition (R), which tests for - recursion. Consider this pattern, which matches text in angle brack- - ets, allowing for arbitrary nesting. Only digits are allowed in nested - brackets (that is, when recursing), whereas any characters are permit- + Do not confuse the (?R) item with the condition (R), which tests for + recursion. Consider this pattern, which matches text in angle brack- + ets, allowing for arbitrary nesting. Only digits are allowed in nested + brackets (that is, when recursing), whereas any characters are permit- ted at the outer level. < (?: (?(R) \d++ | [^<>]*+) | (?R)) * > - In this pattern, (?(R) is the start of a conditional subpattern, with - two different alternatives for the recursive and non-recursive cases. + In this pattern, (?(R) is the start of a conditional subpattern, with + two different alternatives for the recursive and non-recursive cases. The (?R) item is the actual recursive call. Differences in recursion processing between PCRE and Perl - Recursion processing in PCRE differs from Perl in two important ways. - In PCRE (like Python, but unlike Perl), a recursive subpattern call is + Recursion processing in PCRE differs from Perl in two important ways. + In PCRE (like Python, but unlike Perl), a recursive subpattern call is always treated as an atomic group. That is, once it has matched some of the subject string, it is never re-entered, even if it contains untried - alternatives and there is a subsequent matching failure. This can be - illustrated by the following pattern, which purports to match a palin- - dromic string that contains an odd number of characters (for example, + alternatives and there is a subsequent matching failure. This can be + illustrated by the following pattern, which purports to match a palin- + dromic string that contains an odd number of characters (for example, "a", "aba", "abcba", "abcdcba"): ^(.|(.)(?1)\2)$ The idea is that it either matches a single character, or two identical - characters surrounding a sub-palindrome. In Perl, this pattern works; - in PCRE it does not if the pattern is longer than three characters. + characters surrounding a sub-palindrome. In Perl, this pattern works; + in PCRE it does not if the pattern is longer than three characters. Consider the subject string "abcba": - At the top level, the first character is matched, but as it is not at + At the top level, the first character is matched, but as it is not at the end of the string, the first alternative fails; the second alterna- tive is taken and the recursion kicks in. The recursive call to subpat- - tern 1 successfully matches the next character ("b"). (Note that the + tern 1 successfully matches the next character ("b"). (Note that the beginning and end of line tests are not part of the recursion). - Back at the top level, the next character ("c") is compared with what - subpattern 2 matched, which was "a". This fails. Because the recursion - is treated as an atomic group, there are now no backtracking points, - and so the entire match fails. (Perl is able, at this point, to re- - enter the recursion and try the second alternative.) However, if the + Back at the top level, the next character ("c") is compared with what + subpattern 2 matched, which was "a". This fails. Because the recursion + is treated as an atomic group, there are now no backtracking points, + and so the entire match fails. (Perl is able, at this point, to re- + enter the recursion and try the second alternative.) However, if the pattern is written with the alternatives in the other order, things are different: ^((.)(?1)\2|.)$ - This time, the recursing alternative is tried first, and continues to - recurse until it runs out of characters, at which point the recursion - fails. But this time we do have another alternative to try at the - higher level. That is the big difference: in the previous case the + This time, the recursing alternative is tried first, and continues to + recurse until it runs out of characters, at which point the recursion + fails. But this time we do have another alternative to try at the + higher level. That is the big difference: in the previous case the remaining alternative is at a deeper recursion level, which PCRE cannot use. - To change the pattern so that it matches all palindromic strings, not - just those with an odd number of characters, it is tempting to change + To change the pattern so that it matches all palindromic strings, not + just those with an odd number of characters, it is tempting to change the pattern to this: ^((.)(?1)\2|.?)$ - Again, this works in Perl, but not in PCRE, and for the same reason. - When a deeper recursion has matched a single character, it cannot be - entered again in order to match an empty string. The solution is to - separate the two cases, and write out the odd and even cases as alter- + Again, this works in Perl, but not in PCRE, and for the same reason. + When a deeper recursion has matched a single character, it cannot be + entered again in order to match an empty string. The solution is to + separate the two cases, and write out the odd and even cases as alter- natives at the higher level: ^(?:((.)(?1)\2|)|((.)(?3)\4|.)) - If you want to match typical palindromic phrases, the pattern has to + If you want to match typical palindromic phrases, the pattern has to ignore all non-word characters, which can be done like this: ^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$ If run with the PCRE_CASELESS option, this pattern matches phrases such as "A man, a plan, a canal: Panama!" and it works well in both PCRE and - Perl. Note the use of the possessive quantifier *+ to avoid backtrack- - ing into sequences of non-word characters. Without this, PCRE takes a - great deal longer (ten times or more) to match typical phrases, and + Perl. Note the use of the possessive quantifier *+ to avoid backtrack- + ing into sequences of non-word characters. Without this, PCRE takes a + great deal longer (ten times or more) to match typical phrases, and Perl takes so long that you think it has gone into a loop. - WARNING: The palindrome-matching patterns above work only if the sub- - ject string does not start with a palindrome that is shorter than the - entire string. For example, although "abcba" is correctly matched, if - the subject is "ababa", PCRE finds the palindrome "aba" at the start, - then fails at top level because the end of the string does not follow. - Once again, it cannot jump back into the recursion to try other alter- + WARNING: The palindrome-matching patterns above work only if the sub- + ject string does not start with a palindrome that is shorter than the + entire string. For example, although "abcba" is correctly matched, if + the subject is "ababa", PCRE finds the palindrome "aba" at the start, + then fails at top level because the end of the string does not follow. + Once again, it cannot jump back into the recursion to try other alter- natives, so the entire match fails. - The second way in which PCRE and Perl differ in their recursion pro- - cessing is in the handling of captured values. In Perl, when a subpat- - tern is called recursively or as a subpattern (see the next section), - it has no access to any values that were captured outside the recur- - sion, whereas in PCRE these values can be referenced. Consider this + The second way in which PCRE and Perl differ in their recursion pro- + cessing is in the handling of captured values. In Perl, when a subpat- + tern is called recursively or as a subpattern (see the next section), + it has no access to any values that were captured outside the recur- + sion, whereas in PCRE these values can be referenced. Consider this pattern: ^(.)(\1|a(?2)) - In PCRE, this pattern matches "bab". The first capturing parentheses - match "b", then in the second group, when the back reference \1 fails - to match "b", the second alternative matches "a" and then recurses. In - the recursion, \1 does now match "b" and so the whole match succeeds. - In Perl, the pattern fails to match because inside the recursive call + In PCRE, this pattern matches "bab". The first capturing parentheses + match "b", then in the second group, when the back reference \1 fails + to match "b", the second alternative matches "a" and then recurses. In + the recursion, \1 does now match "b" and so the whole match succeeds. + In Perl, the pattern fails to match because inside the recursive call \1 cannot access the externally set value. SUBPATTERNS AS SUBROUTINES - If the syntax for a recursive subpattern call (either by number or by - name) is used outside the parentheses to which it refers, it operates - like a subroutine in a programming language. The called subpattern may - be defined before or after the reference. A numbered reference can be + If the syntax for a recursive subpattern call (either by number or by + name) is used outside the parentheses to which it refers, it operates + like a subroutine in a programming language. The called subpattern may + be defined before or after the reference. A numbered reference can be absolute or relative, as in these examples: (...(absolute)...)...(?2)... @@ -6947,79 +7125,79 @@ SUBPATTERNS AS SUBROUTINES (sens|respons)e and \1ibility - matches "sense and sensibility" and "response and responsibility", but + matches "sense and sensibility" and "response and responsibility", but not "sense and responsibility". If instead the pattern (sens|respons)e and (?1)ibility - is used, it does match "sense and responsibility" as well as the other - two strings. Another example is given in the discussion of DEFINE + is used, it does match "sense and responsibility" as well as the other + two strings. Another example is given in the discussion of DEFINE above. - All subroutine calls, whether recursive or not, are always treated as - atomic groups. That is, once a subroutine has matched some of the sub- + All subroutine calls, whether recursive or not, are always treated as + atomic groups. That is, once a subroutine has matched some of the sub- ject string, it is never re-entered, even if it contains untried alter- - natives and there is a subsequent matching failure. Any capturing - parentheses that are set during the subroutine call revert to their + natives and there is a subsequent matching failure. Any capturing + parentheses that are set during the subroutine call revert to their previous values afterwards. - Processing options such as case-independence are fixed when a subpat- - tern is defined, so if it is used as a subroutine, such options cannot + Processing options such as case-independence are fixed when a subpat- + tern is defined, so if it is used as a subroutine, such options cannot be changed for different calls. For example, consider this pattern: (abc)(?i:(?-1)) - It matches "abcabc". It does not match "abcABC" because the change of + It matches "abcabc". It does not match "abcABC" because the change of processing option does not affect the called subpattern. ONIGURUMA SUBROUTINE SYNTAX - For compatibility with Oniguruma, the non-Perl syntax \g followed by a + For compatibility with Oniguruma, the non-Perl syntax \g followed by a name or a number enclosed either in angle brackets or single quotes, is - an alternative syntax for referencing a subpattern as a subroutine, - possibly recursively. Here are two of the examples used above, rewrit- + an alternative syntax for referencing a subpattern as a subroutine, + possibly recursively. Here are two of the examples used above, rewrit- ten using this syntax: (?<pn> \( ( (?>[^()]+) | \g<pn> )* \) ) (sens|respons)e and \g'1'ibility - PCRE supports an extension to Oniguruma: if a number is preceded by a + PCRE supports an extension to Oniguruma: if a number is preceded by a plus or a minus sign it is taken as a relative reference. For example: (abc)(?i:\g<-1>) - Note that \g{...} (Perl syntax) and \g<...> (Oniguruma syntax) are not - synonymous. The former is a back reference; the latter is a subroutine + Note that \g{...} (Perl syntax) and \g<...> (Oniguruma syntax) are not + synonymous. The former is a back reference; the latter is a subroutine call. CALLOUTS Perl has a feature whereby using the sequence (?{...}) causes arbitrary - Perl code to be obeyed in the middle of matching a regular expression. + Perl code to be obeyed in the middle of matching a regular expression. This makes it possible, amongst other things, to extract different sub- strings that match the same pair of parentheses when there is a repeti- tion. PCRE provides a similar feature, but of course it cannot obey arbitrary Perl code. The feature is called "callout". The caller of PCRE provides - an external function by putting its entry point in the global variable - pcre_callout (8-bit library) or pcre[16|32]_callout (16-bit or 32-bit - library). By default, this variable contains NULL, which disables all + an external function by putting its entry point in the global variable + pcre_callout (8-bit library) or pcre[16|32]_callout (16-bit or 32-bit + library). By default, this variable contains NULL, which disables all calling out. - Within a regular expression, (?C) indicates the points at which the - external function is to be called. If you want to identify different - callout points, you can put a number less than 256 after the letter C. - The default value is zero. For example, this pattern has two callout + Within a regular expression, (?C) indicates the points at which the + external function is to be called. If you want to identify different + callout points, you can put a number less than 256 after the letter C. + The default value is zero. For example, this pattern has two callout points: (?C1)abc(?C2)def - If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, call- - outs are automatically installed before each item in the pattern. They - are all numbered 255. If there is a conditional group in the pattern + If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, call- + outs are automatically installed before each item in the pattern. They + are all numbered 255. If there is a conditional group in the pattern whose condition is an assertion, an additional callout is inserted just before the condition. An explicit callout may also be set at this posi- tion, as in this example: @@ -7029,13 +7207,18 @@ CALLOUTS Note that this applies only to assertion conditions, not to other types of condition. - During matching, when PCRE reaches a callout point, the external func- - tion is called. It is provided with the number of the callout, the - position in the pattern, and, optionally, one item of data originally - supplied by the caller of the matching function. The callout function - may cause matching to proceed, to backtrack, or to fail altogether. A - complete description of the interface to the callout function is given - in the pcrecallout documentation. + During matching, when PCRE reaches a callout point, the external func- + tion is called. It is provided with the number of the callout, the + position in the pattern, and, optionally, one item of data originally + supplied by the caller of the matching function. The callout function + may cause matching to proceed, to backtrack, or to fail altogether. + + By default, PCRE implements a number of optimizations at compile time + and matching time, and one side-effect is that sometimes callouts are + skipped. If you need all possible callouts to happen, you need to set + options that disable the relevant optimizations. More details, and a + complete description of the interface to the callout function, are + given in the pcrecallout documentation. BACKTRACKING CONTROL @@ -7364,8 +7547,8 @@ BACKTRACKING CONTROL ...(*COMMIT)(*PRUNE)... If there is a matching failure to the right, backtracking onto (*PRUNE) - cases it to be triggered, and its action is taken. There can never be a - backtrack onto (*COMMIT). + causes it to be triggered, and its action is taken. There can never be + a backtrack onto (*COMMIT). Backtracking verbs in repeated groups @@ -7435,7 +7618,7 @@ AUTHOR REVISION - Last updated: 26 April 2013 + Last updated: 03 December 2013 Copyright (c) 1997-2013 University of Cambridge. ------------------------------------------------------------------------------ @@ -7469,10 +7652,15 @@ CHARACTERS \n newline (hex 0A) \r carriage return (hex 0D) \t tab (hex 09) + \0dd character with octal code 0dd \ddd character with octal code ddd, or backreference + \o{ddd..} character with octal code ddd.. \xhh character with hex code hh \x{hhh..} character with hex code hhh.. + Note that \0dd is always an octal code, and that \8 and \9 are the lit- + eral characters "8" and "9". + CHARACTER TYPES @@ -7495,9 +7683,12 @@ CHARACTER TYPES \W a "non-word" character \X a Unicode extended grapheme cluster - In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII - characters, even in a UTF mode. However, this can be changed by setting - the PCRE_UCP option. + By default, \d, \s, and \w match only ASCII characters, even in UTF-8 + mode or in the 16- bit and 32-bit libraries. However, if locale-spe- + cific matching is happening, \s and \w may also match characters with + code points in the range 128-255. If the PCRE_UCP option is set, the + behaviour of these escape sequences is changed to use Unicode proper- + ties and they match many more characters. GENERAL CATEGORY PROPERTIES FOR \p and \P @@ -7552,29 +7743,32 @@ PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P Xan Alphanumeric: union of properties L and N Xps POSIX space: property Z or tab, NL, VT, FF, CR - Xsp Perl space: property Z or tab, NL, FF, CR + Xsp Perl space: property Z or tab, NL, VT, FF, CR Xuc Univerally-named character: one that can be represented by a Universal Character Name Xwd Perl word: property Xan or underscore + Perl and POSIX space are now the same. Perl added VT to its space char- + acter set at release 5.18 and PCRE changed at release 8.34. + SCRIPT NAMES FOR \p AND \P - Arabic, Armenian, Avestan, Balinese, Bamum, Batak, Bengali, Bopomofo, - Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Carian, Chakma, - Cham, Cherokee, Common, Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, - Devanagari, Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, - Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hira- - gana, Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip- - tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li, - Kharoshthi, Khmer, Lao, Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, + Arabic, Armenian, Avestan, Balinese, Bamum, Batak, Bengali, Bopomofo, + Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Carian, Chakma, + Cham, Cherokee, Common, Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, + Devanagari, Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, + Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hira- + gana, Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip- + tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li, + Kharoshthi, Khmer, Lao, Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam, Mandaic, Meetei_Mayek, Meroitic_Cursive, - Meroitic_Hieroglyphs, Miao, Mongolian, Myanmar, New_Tai_Lue, Nko, - Ogham, Old_Italic, Old_Persian, Old_South_Arabian, Old_Turkic, - Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, Rejang, Runic, Samari- - tan, Saurashtra, Sharada, Shavian, Sinhala, Sora_Sompeng, Sundanese, - Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet, - Takri, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Vai, + Meroitic_Hieroglyphs, Miao, Mongolian, Myanmar, New_Tai_Lue, Nko, + Ogham, Old_Italic, Old_Persian, Old_South_Arabian, Old_Turkic, + Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, Rejang, Runic, Samari- + tan, Saurashtra, Sharada, Shavian, Sinhala, Sora_Sompeng, Sundanese, + Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet, + Takri, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Vai, Yi. @@ -7601,8 +7795,8 @@ CHARACTER CLASSES word same as \w xdigit hexadecimal digit - In PCRE, POSIX character set names recognize only ASCII characters by - default, but some of them use Unicode properties if PCRE_UCP is set. + In PCRE, POSIX character set names recognize only ASCII characters by + default, but some of them use Unicode properties if PCRE_UCP is set. You can use \Q...\E inside a character class. @@ -7683,7 +7877,7 @@ OPTION SETTING (?x) extended (ignore white space) (?-...) unset option(s) - The following are recognized only at the start of a pattern or after + The following are recognized only at the start of a pattern or after one of the newline-setting options with similar syntax: (*LIMIT_MATCH=d) set the match limit to d (decimal number) @@ -7695,6 +7889,9 @@ OPTION SETTING (*UTF) set appropriate UTF mode for the library in use (*UCP) set PCRE_UCP (use Unicode properties for \d etc) + Note that LIMIT_MATCH and LIMIT_RECURSION can only reduce the value of + the limits set by the caller of pcre_exec(), not increase them. + LOOKAHEAD AND LOOKBEHIND ASSERTIONS @@ -7819,7 +8016,7 @@ AUTHOR REVISION - Last updated: 26 April 2013 + Last updated: 12 November 2013 Copyright (c) 1997-2013 University of Cambridge. ------------------------------------------------------------------------------ @@ -8743,6 +8940,16 @@ MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre[16|32]_dfa_exec() matched string. It is up to the calling program to do that if it needs to. + That means that, for an unanchored pattern, if a continued match fails, + it is not possible to try again at a new starting point. All this + facility is capable of doing is continuing with the previous match + attempt. In the previous example, if the second set of data is "ug23" + the result is no match, even though there would be a match for "aug23" + if the entire string were given at once. Depending on the application, + this may or may not be what you want. The only way to allow for start- + ing again at the next character is to retain the matched part of the + subject and try a new complete match. + You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with PCRE_DFA_RESTART to continue partial matching over multiple segments. This facility can be used to pass very long subject strings to the DFA @@ -8926,7 +9133,7 @@ AUTHOR REVISION - Last updated: 20 February 2013 + Last updated: 02 July 2013 Copyright (c) 1997-2013 University of Cambridge. ------------------------------------------------------------------------------ @@ -9030,6 +9237,10 @@ RE-USING A PRECOMPILED PATTERN is used to pass this data, as described in the section on matching a pattern in the pcreapi documentation. + Warning: The tables that pcre_exec() and pcre_dfa_exec() use must be + the same as those that were used when the pattern was compiled. If this + is not the case, the behaviour is undefined. + If you did not provide custom character tables when the pattern was compiled, the pointer in the compiled pattern is NULL, which causes the matching functions to use PCRE's internal tables. Thus, you do not need @@ -9061,8 +9272,8 @@ AUTHOR REVISION - Last updated: 24 June 2012 - Copyright (c) 1997-2012 University of Cambridge. + Last updated: 12 November 2013 + Copyright (c) 1997-2013 University of Cambridge. ------------------------------------------------------------------------------ @@ -9243,7 +9454,7 @@ PCREPOSIX(3) Library Functions Manual PCREPOSIX(3) NAME PCRE - Perl-compatible regular expressions. -SYNOPSIS OF POSIX API +SYNOPSIS #include <pcreposix.h> @@ -9252,8 +9463,7 @@ SYNOPSIS OF POSIX API int regexec(regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); - - size_t regerror(int errcode, const regex_t *preg, + size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size); void regfree(regex_t *preg); @@ -9943,38 +10153,43 @@ SIZE AND OTHER LIMITATIONS never in practice be relevant. The maximum length of a compiled pattern is approximately 64K data - units (bytes for the 8-bit library, 32-bit units for the 32-bit + units (bytes for the 8-bit library, 16-bit units for the 16-bit library, and 32-bit units for the 32-bit library) if PCRE is compiled - with the default internal linkage size of 2 bytes. If you want to - process regular expressions that are truly enormous, you can compile - PCRE with an internal linkage size of 3 or 4 (when building the 16-bit - or 32-bit library, 3 is rounded up to 4). See the README file in the - source distribution and the pcrebuild documentation for details. In - these cases the limit is substantially larger. However, the speed of + with the default internal linkage size, which is 2 bytes for the 8-bit + and 16-bit libraries, and 4 bytes for the 32-bit library. If you want + to process regular expressions that are truly enormous, you can compile + PCRE with an internal linkage size of 3 or 4 (when building the 16-bit + or 32-bit library, 3 is rounded up to 4). See the README file in the + source distribution and the pcrebuild documentation for details. In + these cases the limit is substantially larger. However, the speed of execution is slower. All values in repeating quantifiers must be less than 65536. There is no limit to the number of parenthesized subpatterns, but there - can be no more than 65535 capturing subpatterns. + can be no more than 65535 capturing subpatterns. There is, however, a + limit to the depth of nesting of parenthesized subpatterns of all + kinds. This is imposed in order to limit the amount of system stack + used at compile time. The limit can be specified when PCRE is built; + the default is 250. There is a limit to the number of forward references to subsequent sub- - patterns of around 200,000. Repeated forward references with fixed - upper limits, for example, (?2){0,100} when subpattern number 2 is to - the right, are included in the count. There is no limit to the number + patterns of around 200,000. Repeated forward references with fixed + upper limits, for example, (?2){0,100} when subpattern number 2 is to + the right, are included in the count. There is no limit to the number of backward references. The maximum length of name for a named subpattern is 32 characters, and the maximum number of named subpatterns is 10000. - The maximum length of a name in a (*MARK), (*PRUNE), (*SKIP), or - (*THEN) verb is 255 for the 8-bit library and 65535 for the 16-bit and - 32-bit library. + The maximum length of a name in a (*MARK), (*PRUNE), (*SKIP), or + (*THEN) verb is 255 for the 8-bit library and 65535 for the 16-bit and + 32-bit libraries. - The maximum length of a subject string is the largest positive number - that an integer variable can hold. However, when using the traditional + The maximum length of a subject string is the largest positive number + that an integer variable can hold. However, when using the traditional matching function, PCRE uses recursion to handle subpatterns and indef- - inite repetition. This means that the available stack space may limit + inite repetition. This means that the available stack space may limit the size of a subject string that can be processed by certain patterns. For a discussion of stack issues, see the pcrestack documentation. @@ -9988,8 +10203,8 @@ AUTHOR REVISION - Last updated: 04 May 2012 - Copyright (c) 1997-2012 University of Cambridge. + Last updated: 05 November 2013 + Copyright (c) 1997-2013 University of Cambridge. ------------------------------------------------------------------------------ diff --git a/pcre/doc/pcre16.3 b/pcre/doc/pcre16.3 index 234ae96412f..85126a67923 100644 --- a/pcre/doc/pcre16.3 +++ b/pcre/doc/pcre16.3 @@ -8,140 +8,120 @@ PCRE - Perl-compatible regular expressions .SH "PCRE 16-BIT API BASIC FUNCTIONS" .rs .sp -.SM +.nf .B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B int *\fIerrorcodeptr\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " int *\fIerrorcodeptr\fP," +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre16_extra *pcre16_study(const pcre16 *\fIcode\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP); -.PP +.B " const char **\fIerrptr\fP);" +.sp .B void pcre16_free_study(pcre16_extra *\fIextra\fP); -.PP +.sp .B int pcre16_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP); -.PP +.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);" +.sp .B int pcre16_dfa_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B int *\fIworkspace\fP, int \fIwscount\fP); +.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " int *\fIworkspace\fP, int \fIwscount\fP);" +.fi . . .SH "PCRE 16-BIT API STRING EXTRACTION FUNCTIONS" .rs .sp +.nf .B int pcre16_copy_named_substring(const pcre16 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP, -.ti +5n -.B PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP); -.PP +.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP," +.B " PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);" +.sp .B int pcre16_copy_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP, -.ti +5n -.B int \fIbuffersize\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP," +.B " int \fIbuffersize\fP);" +.sp .B int pcre16_get_named_substring(const pcre16 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP, -.ti +5n -.B PCRE_SPTR16 *\fIstringptr\fP); -.PP +.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP," +.B " PCRE_SPTR16 *\fIstringptr\fP);" +.sp .B int pcre16_get_stringnumber(const pcre16 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR16 \fIname\fP); -.PP +.B " PCRE_SPTR16 \fIname\fP); +.sp .B int pcre16_get_stringtable_entries(const pcre16 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP); -.PP +.B " PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);" +.sp .B int pcre16_get_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, -.ti +5n -.B PCRE_SPTR16 *\fIstringptr\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP," +.B " PCRE_SPTR16 *\fIstringptr\fP);" +.sp .B int pcre16_get_substring_list(PCRE_SPTR16 \fIsubject\fP, -.ti +5n -.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR16 **\fIlistptr\fP);" -.PP +.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR16 **\fIlistptr\fP);" +.sp .B void pcre16_free_substring(PCRE_SPTR16 \fIstringptr\fP); -.PP +.sp .B void pcre16_free_substring_list(PCRE_SPTR16 *\fIstringptr\fP); +.fi . . .SH "PCRE 16-BIT API AUXILIARY FUNCTIONS" .rs .sp +.nf .B pcre16_jit_stack *pcre16_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP); -.PP +.sp .B void pcre16_jit_stack_free(pcre16_jit_stack *\fIstack\fP); -.PP +.sp .B void pcre16_assign_jit_stack(pcre16_extra *\fIextra\fP, -.ti +5n -.B pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP); -.PP +.B " pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);" +.sp .B const unsigned char *pcre16_maketables(void); -.PP +.sp .B int pcre16_fullinfo(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP," -.ti +5n -.B int \fIwhat\fP, void *\fIwhere\fP); -.PP +.B " int \fIwhat\fP, void *\fIwhere\fP);" +.sp .B int pcre16_refcount(pcre16 *\fIcode\fP, int \fIadjust\fP); -.PP +.sp .B int pcre16_config(int \fIwhat\fP, void *\fIwhere\fP); -.PP +.sp .B const char *pcre16_version(void); -.PP +.sp .B int pcre16_pattern_to_host_byte_order(pcre16 *\fIcode\fP, -.ti +5n -.B pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP); +.B " pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);" +.fi . . .SH "PCRE 16-BIT API INDIRECTED FUNCTIONS" .rs .sp +.nf .B void *(*pcre16_malloc)(size_t); -.PP +.sp .B void (*pcre16_free)(void *); -.PP +.sp .B void *(*pcre16_stack_malloc)(size_t); -.PP +.sp .B void (*pcre16_stack_free)(void *); -.PP +.sp .B int (*pcre16_callout)(pcre16_callout_block *); +.fi . . .SH "PCRE 16-BIT API 16-BIT-ONLY FUNCTION" .rs .sp +.nf .B int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *\fIoutput\fP, -.ti +5n -.B PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP, -.ti +5n -.B int \fIkeep_boms\fP); +.B " PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP," +.B " int \fIkeep_boms\fP);" +.fi . . .SH "THE PCRE 16-BIT LIBRARY" diff --git a/pcre/doc/pcre32.3 b/pcre/doc/pcre32.3 index 516c8ee570c..7cde8c08772 100644 --- a/pcre/doc/pcre32.3 +++ b/pcre/doc/pcre32.3 @@ -8,140 +8,119 @@ PCRE - Perl-compatible regular expressions .SH "PCRE 32-BIT API BASIC FUNCTIONS" .rs .sp -.SM +.nf .B pcre32 *pcre32_compile(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre32 *pcre32_compile2(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B int *\fIerrorcodeptr\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " int *\fIerrorcodeptr\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre32_extra *pcre32_study(const pcre32 *\fIcode\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP); -.PP +.B " const char **\fIerrptr\fP);" +.sp .B void pcre32_free_study(pcre32_extra *\fIextra\fP); -.PP +.sp .B int pcre32_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP); -.PP +.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);" +.sp .B int pcre32_dfa_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B int *\fIworkspace\fP, int \fIwscount\fP); +.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " int *\fIworkspace\fP, int \fIwscount\fP);" +.fi . . .SH "PCRE 32-BIT API STRING EXTRACTION FUNCTIONS" .rs .sp +.nf .B int pcre32_copy_named_substring(const pcre32 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP, -.ti +5n -.B PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP); -.PP +.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP," +.B " PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP);" +.sp .B int pcre32_copy_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP, -.ti +5n -.B int \fIbuffersize\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP," +.B " int \fIbuffersize\fP);" +.sp .B int pcre32_get_named_substring(const pcre32 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP, -.ti +5n -.B PCRE_SPTR32 *\fIstringptr\fP); -.PP +.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP," +.B " PCRE_SPTR32 *\fIstringptr\fP);" +.sp .B int pcre32_get_stringnumber(const pcre32 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR32 \fIname\fP); -.PP +.B " PCRE_SPTR32 \fIname\fP);" +.sp .B int pcre32_get_stringtable_entries(const pcre32 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP); -.PP +.B " PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP);" +.sp .B int pcre32_get_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, -.ti +5n -.B PCRE_SPTR32 *\fIstringptr\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP," +.B " PCRE_SPTR32 *\fIstringptr\fP);" +.sp .B int pcre32_get_substring_list(PCRE_SPTR32 \fIsubject\fP, -.ti +5n -.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR32 **\fIlistptr\fP);" -.PP +.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR32 **\fIlistptr\fP);" +.sp .B void pcre32_free_substring(PCRE_SPTR32 \fIstringptr\fP); -.PP +.sp .B void pcre32_free_substring_list(PCRE_SPTR32 *\fIstringptr\fP); +.fi . . .SH "PCRE 32-BIT API AUXILIARY FUNCTIONS" .rs .sp +.nf .B pcre32_jit_stack *pcre32_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP); -.PP +.sp .B void pcre32_jit_stack_free(pcre32_jit_stack *\fIstack\fP); -.PP +.sp .B void pcre32_assign_jit_stack(pcre32_extra *\fIextra\fP, -.ti +5n -.B pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP); -.PP +.B " pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP);" +.sp .B const unsigned char *pcre32_maketables(void); -.PP +.sp .B int pcre32_fullinfo(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP," -.ti +5n -.B int \fIwhat\fP, void *\fIwhere\fP); -.PP +.B " int \fIwhat\fP, void *\fIwhere\fP);" +.sp .B int pcre32_refcount(pcre32 *\fIcode\fP, int \fIadjust\fP); -.PP +.sp .B int pcre32_config(int \fIwhat\fP, void *\fIwhere\fP); -.PP +.sp .B const char *pcre32_version(void); -.PP +.sp .B int pcre32_pattern_to_host_byte_order(pcre32 *\fIcode\fP, -.ti +5n -.B pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP); +.B " pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP);" +.fi . . .SH "PCRE 32-BIT API INDIRECTED FUNCTIONS" .rs .sp +.nf .B void *(*pcre32_malloc)(size_t); -.PP +.sp .B void (*pcre32_free)(void *); -.PP +.sp .B void *(*pcre32_stack_malloc)(size_t); -.PP +.sp .B void (*pcre32_stack_free)(void *); -.PP +.sp .B int (*pcre32_callout)(pcre32_callout_block *); +.fi . . .SH "PCRE 32-BIT API 32-BIT-ONLY FUNCTION" .rs .sp +.nf .B int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *\fIoutput\fP, -.ti +5n -.B PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP, -.ti +5n -.B int \fIkeep_boms\fP); +.B " PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP," +.B " int \fIkeep_boms\fP);" +.fi . . .SH "THE PCRE 32-BIT LIBRARY" diff --git a/pcre/doc/pcre_assign_jit_stack.3 b/pcre/doc/pcre_assign_jit_stack.3 index e1563b6e06d..0ecf6f2c60f 100644 --- a/pcre/doc/pcre_assign_jit_stack.3 +++ b/pcre/doc/pcre_assign_jit_stack.3 @@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP, -.ti +5n -.B pcre_jit_callback \fIcallback\fP, void *\fIdata\fP); -.PP +.B " pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);" +.sp .B void pcre16_assign_jit_stack(pcre16_extra *\fIextra\fP, -.ti +5n -.B pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP); -.PP +.B " pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);" +.sp .B void pcre32_assign_jit_stack(pcre32_extra *\fIextra\fP, -.ti +5n -.B pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP); +.B " pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_compile.3 b/pcre/doc/pcre_compile.3 index d09768d8021..5c16ebe26d5 100644 --- a/pcre/doc/pcre_compile.3 +++ b/pcre/doc/pcre_compile.3 @@ -1,4 +1,4 @@ -.TH PCRE_COMPILE 3 "24 June 2012" "PCRE 8.30" +.TH PCRE_COMPILE 3 "01 October 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH SYNOPSIS @@ -6,24 +6,19 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre32 *pcre32_compile(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.fi . .SH DESCRIPTION .rs @@ -56,6 +51,7 @@ The option bits are: PCRE_FIRSTLINE Force matching to be before newline PCRE_JAVASCRIPT_COMPAT JavaScript compatibility PCRE_MULTILINE ^ and $ match newlines within data + PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF) PCRE_NEWLINE_ANY Recognize any Unicode newline sequence PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline sequences @@ -64,6 +60,8 @@ The option bits are: PCRE_NEWLINE_LF Set LF as the newline sequence PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren- theses (named ones available) + PCRE_NO_AUTO_POSSESS Disable auto-possessification + PCRE_NO_START_OPTIMIZE Disable match-time start optimizations PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16 validity (only relevant if PCRE_UTF16 is set) diff --git a/pcre/doc/pcre_compile2.3 b/pcre/doc/pcre_compile2.3 index 1fcae433b43..377420180e9 100644 --- a/pcre/doc/pcre_compile2.3 +++ b/pcre/doc/pcre_compile2.3 @@ -1,4 +1,4 @@ -.TH PCRE_COMPILE2 3 "24 June 2012" "PCRE 8.30" +.TH PCRE_COMPILE2 3 "01 October 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH SYNOPSIS @@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B int *\fIerrorcodeptr\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " int *\fIerrorcodeptr\fP," +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B int *\fIerrorcodeptr\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " int *\fIerrorcodeptr\fP," +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre32 *pcre32_compile2(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B int *\fIerrorcodeptr\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); +.B " int *\fIerrorcodeptr\fP,£ +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.fi . .SH DESCRIPTION .rs @@ -64,6 +56,7 @@ The option bits are: PCRE_FIRSTLINE Force matching to be before newline PCRE_JAVASCRIPT_COMPAT JavaScript compatibility PCRE_MULTILINE ^ and $ match newlines within data + PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF) PCRE_NEWLINE_ANY Recognize any Unicode newline sequence PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline sequences @@ -72,6 +65,8 @@ The option bits are: PCRE_NEWLINE_LF Set LF as the newline sequence PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren- theses (named ones available) + PCRE_NO_AUTO_POSSESS Disable auto-possessification + PCRE_NO_START_OPTIMIZE Disable match-time start optimizations PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16 validity (only relevant if PCRE_UTF16 is set) diff --git a/pcre/doc/pcre_config.3 b/pcre/doc/pcre_config.3 index 5a6e6be7a47..d3de14bb73c 100644 --- a/pcre/doc/pcre_config.3 +++ b/pcre/doc/pcre_config.3 @@ -1,4 +1,4 @@ -.TH PCRE_CONFIG 3 "24 June 2012" "PCRE 8.30" +.TH PCRE_CONFIG 3 "05 November 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH SYNOPSIS @@ -33,6 +33,7 @@ point to an unsigned long integer. The available codes are: target architecture for the JIT compiler, or NULL if there is no JIT support PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4 + PCRE_CONFIG_PARENS_LIMIT Parentheses nesting limit PCRE_CONFIG_MATCH_LIMIT Internal resource limit PCRE_CONFIG_MATCH_LIMIT_RECURSION Internal recursion depth limit diff --git a/pcre/doc/pcre_copy_named_substring.3 b/pcre/doc/pcre_copy_named_substring.3 index e3281d8feae..52582aecb2b 100644 --- a/pcre/doc/pcre_copy_named_substring.3 +++ b/pcre/doc/pcre_copy_named_substring.3 @@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_copy_named_substring(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, const char *\fIstringname\fP, -.ti +5n -.B char *\fIbuffer\fP, int \fIbuffersize\fP); -.PP +.B " const char *\fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, const char *\fIstringname\fP," +.B " char *\fIbuffer\fP, int \fIbuffersize\fP);" +.sp .B int pcre16_copy_named_substring(const pcre16 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP, -.ti +5n -.B PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP); -.PP +.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP," +.B " PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);" +.sp .B int pcre32_copy_named_substring(const pcre32 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP, -.ti +5n -.B PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP); +.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP," +.B " PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_copy_substring.3 b/pcre/doc/pcre_copy_substring.3 index 96bff3a2c66..83af6e800af 100644 --- a/pcre/doc/pcre_copy_substring.3 +++ b/pcre/doc/pcre_copy_substring.3 @@ -6,24 +6,19 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP, -.ti +5n -.B int \fIbuffersize\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP," +.B " int \fIbuffersize\fP);" +.sp .B int pcre16_copy_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP, -.ti +5n -.B int \fIbuffersize\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP," +.B " int \fIbuffersize\fP);" +.sp .B int pcre32_copy_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP, -.ti +5n -.B int \fIbuffersize\fP); +.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP," +.B " int \fIbuffersize\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_dfa_exec.3 b/pcre/doc/pcre_dfa_exec.3 index 9bc7448b6a3..39c2e836dac 100644 --- a/pcre/doc/pcre_dfa_exec.3 +++ b/pcre/doc/pcre_dfa_exec.3 @@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B int *\fIworkspace\fP, int \fIwscount\fP); -.PP +.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " int *\fIworkspace\fP, int \fIwscount\fP);" +.sp .B int pcre16_dfa_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B int *\fIworkspace\fP, int \fIwscount\fP); -.PP +.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " int *\fIworkspace\fP, int \fIwscount\fP);" +.sp .B int pcre32_dfa_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B int *\fIworkspace\fP, int \fIwscount\fP); +.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " int *\fIworkspace\fP, int \fIwscount\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_exec.3 b/pcre/doc/pcre_exec.3 index c92c2a57a69..4686bd6de06 100644 --- a/pcre/doc/pcre_exec.3 +++ b/pcre/doc/pcre_exec.3 @@ -6,24 +6,19 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP); -.PP +.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);" +.sp .B int pcre16_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP); -.PP +.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);" +.sp .B int pcre32_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP); +.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_fullinfo.3 b/pcre/doc/pcre_fullinfo.3 index ad640fc66fc..01e2e928740 100644 --- a/pcre/doc/pcre_fullinfo.3 +++ b/pcre/doc/pcre_fullinfo.3 @@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B int \fIwhat\fP, void *\fIwhere\fP); -.PP +.B " int \fIwhat\fP, void *\fIwhere\fP);" +.sp .B int pcre16_fullinfo(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP," -.ti +5n -.B int \fIwhat\fP, void *\fIwhere\fP); -.PP +.B " int \fIwhat\fP, void *\fIwhere\fP);" +.sp .B int pcre32_fullinfo(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP," -.ti +5n -.B int \fIwhat\fP, void *\fIwhere\fP); +.B " int \fIwhat\fP, void *\fIwhere\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_get_named_substring.3 b/pcre/doc/pcre_get_named_substring.3 index f81a243c6bf..84d4ee7dbbf 100644 --- a/pcre/doc/pcre_get_named_substring.3 +++ b/pcre/doc/pcre_get_named_substring.3 @@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_get_named_substring(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, const char *\fIstringname\fP, -.ti +5n -.B const char **\fIstringptr\fP); -.PP +.B " const char *\fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, const char *\fIstringname\fP," +.B " const char **\fIstringptr\fP);" +.sp .B int pcre16_get_named_substring(const pcre16 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP, -.ti +5n -.B PCRE_SPTR16 *\fIstringptr\fP); -.PP +.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP," +.B " PCRE_SPTR16 *\fIstringptr\fP);" +.sp .B int pcre32_get_named_substring(const pcre32 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP, -.ti +5n -.B PCRE_SPTR32 *\fIstringptr\fP); +.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP," +.B " PCRE_SPTR32 *\fIstringptr\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_get_stringnumber.3 b/pcre/doc/pcre_get_stringnumber.3 index 7def00bafd1..9fc5291dc88 100644 --- a/pcre/doc/pcre_get_stringnumber.3 +++ b/pcre/doc/pcre_get_stringnumber.3 @@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_get_stringnumber(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIname\fP); -.PP +.B " const char *\fIname\fP);" +.sp .B int pcre16_get_stringnumber(const pcre16 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR16 \fIname\fP); -.PP +.B " PCRE_SPTR16 \fIname\fP);" +.sp .B int pcre32_get_stringnumber(const pcre32 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR32 \fIname\fP); +.B " PCRE_SPTR32 \fIname\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_get_stringtable_entries.3 b/pcre/doc/pcre_get_stringtable_entries.3 index 39178165c59..5c58c90c0e4 100644 --- a/pcre/doc/pcre_get_stringtable_entries.3 +++ b/pcre/doc/pcre_get_stringtable_entries.3 @@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_get_stringtable_entries(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP); -.PP +.B " const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);" +.sp .B int pcre16_get_stringtable_entries(const pcre16 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP); -.PP +.B " PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);" +.sp .B int pcre32_get_stringtable_entries(const pcre32 *\fIcode\fP, -.ti +5n -.B PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP); +.B " PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_get_substring.3 b/pcre/doc/pcre_get_substring.3 index d5bc60c45d1..1e62b2c0c61 100644 --- a/pcre/doc/pcre_get_substring.3 +++ b/pcre/doc/pcre_get_substring.3 @@ -6,24 +6,19 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, -.ti +5n -.B const char **\fIstringptr\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP," +.B " const char **\fIstringptr\fP);" +.sp .B int pcre16_get_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, -.ti +5n -.B PCRE_SPTR16 *\fIstringptr\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP," +.B " PCRE_SPTR16 *\fIstringptr\fP);" +.sp .B int pcre32_get_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, -.ti +5n -.B PCRE_SPTR32 *\fIstringptr\fP); +.B " int \fIstringcount\fP, int \fIstringnumber\fP," +.B " PCRE_SPTR32 *\fIstringptr\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_get_substring_list.3 b/pcre/doc/pcre_get_substring_list.3 index a1a57496b19..511a4a39d67 100644 --- a/pcre/doc/pcre_get_substring_list.3 +++ b/pcre/doc/pcre_get_substring_list.3 @@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_get_substring_list(const char *\fIsubject\fP, -.ti +5n -.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);" -.PP +.B " int *\fIovector\fP, int \fIstringcount\fP, const char ***\fIlistptr\fP);" +.sp .B int pcre16_get_substring_list(PCRE_SPTR16 \fIsubject\fP, -.ti +5n -.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR16 **\fIlistptr\fP);" -.PP +.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR16 **\fIlistptr\fP);" +.sp .B int pcre32_get_substring_list(PCRE_SPTR32 \fIsubject\fP, -.ti +5n -.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR32 **\fIlistptr\fP);" +.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR32 **\fIlistptr\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_jit_exec.3 b/pcre/doc/pcre_jit_exec.3 index 8b9d05bf1ee..ba85168178a 100644 --- a/pcre/doc/pcre_jit_exec.3 +++ b/pcre/doc/pcre_jit_exec.3 @@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_jit_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B pcre_jit_stack *\fIjstack\fP); -.PP +.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " pcre_jit_stack *\fIjstack\fP);" +.sp .B int pcre16_jit_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B pcre_jit_stack *\fIjstack\fP); -.PP +.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " pcre_jit_stack *\fIjstack\fP);" +.sp .B int pcre32_jit_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP," -.ti +5n -.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B pcre_jit_stack *\fIjstack\fP); +.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " pcre_jit_stack *\fIjstack\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_jit_stack_alloc.3 b/pcre/doc/pcre_jit_stack_alloc.3 index 5d2a117882a..11c97a0fc8a 100644 --- a/pcre/doc/pcre_jit_stack_alloc.3 +++ b/pcre/doc/pcre_jit_stack_alloc.3 @@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B pcre_jit_stack *pcre_jit_stack_alloc(int \fIstartsize\fP, -.ti +5n -.B int \fImaxsize\fP); -.PP +.B " int \fImaxsize\fP);" +.sp .B pcre16_jit_stack *pcre16_jit_stack_alloc(int \fIstartsize\fP, -.ti +5n -.B int \fImaxsize\fP); -.PP +.B " int \fImaxsize\fP);" +.sp .B pcre32_jit_stack *pcre32_jit_stack_alloc(int \fIstartsize\fP, -.ti +5n -.B int \fImaxsize\fP); +.B " int \fImaxsize\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_pattern_to_host_byte_order.3 b/pcre/doc/pcre_pattern_to_host_byte_order.3 index 4c306eef178..b0c41c38e89 100644 --- a/pcre/doc/pcre_pattern_to_host_byte_order.3 +++ b/pcre/doc/pcre_pattern_to_host_byte_order.3 @@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre_pattern_to_host_byte_order(pcre *\fIcode\fP, -.ti +5n -.B pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP); -.PP +.B " pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);" +.sp .B int pcre16_pattern_to_host_byte_order(pcre16 *\fIcode\fP, -.ti +5n -.B pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP); -.PP +.B " pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);" +.sp .B int pcre32_pattern_to_host_byte_order(pcre32 *\fIcode\fP, -.ti +5n -.B pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP); +.B " pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_study.3 b/pcre/doc/pcre_study.3 index 1f2b465afff..1200e0a6683 100644 --- a/pcre/doc/pcre_study.3 +++ b/pcre/doc/pcre_study.3 @@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP); -.PP +.B " const char **\fIerrptr\fP);" +.sp .B pcre16_extra *pcre16_study(const pcre16 *\fIcode\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP); -.PP +.B " const char **\fIerrptr\fP);" +.sp .B pcre32_extra *pcre32_study(const pcre32 *\fIcode\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP); +.B " const char **\fIerrptr\fP);" +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcre_utf16_to_host_byte_order.3 b/pcre/doc/pcre_utf16_to_host_byte_order.3 index 8f0d2d4e8a9..1851b619dad 100644 --- a/pcre/doc/pcre_utf16_to_host_byte_order.3 +++ b/pcre/doc/pcre_utf16_to_host_byte_order.3 @@ -6,12 +6,11 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *\fIoutput\fP, -.ti +5n -.B PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP, -.ti +5n -.B int \fIkeep_boms\fP); +.B " PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP," +.B " int \fIkeep_boms\fP);" +.fi . . .SH DESCRIPTION diff --git a/pcre/doc/pcre_utf32_to_host_byte_order.3 b/pcre/doc/pcre_utf32_to_host_byte_order.3 index fa4c1796b81..a415dcf5fad 100644 --- a/pcre/doc/pcre_utf32_to_host_byte_order.3 +++ b/pcre/doc/pcre_utf32_to_host_byte_order.3 @@ -6,12 +6,11 @@ PCRE - Perl-compatible regular expressions .sp .B #include <pcre.h> .PP -.SM +.nf .B int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *\fIoutput\fP, -.ti +5n -.B PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP, -.ti +5n -.B int \fIkeep_boms\fP); +.B " PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP," +.B " int \fIkeep_boms\fP);" +.fi . . .SH DESCRIPTION diff --git a/pcre/doc/pcreapi.3 b/pcre/doc/pcreapi.3 index 4718c7fd71b..ebbd20fc4d5 100644 --- a/pcre/doc/pcreapi.3 +++ b/pcre/doc/pcreapi.3 @@ -1,4 +1,4 @@ -.TH PCREAPI 3 "12 May 2013" "PCRE 8.33" +.TH PCREAPI 3 "12 November 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .sp @@ -8,138 +8,115 @@ PCRE - Perl-compatible regular expressions .SH "PCRE NATIVE API BASIC FUNCTIONS" .rs .sp -.SM +.nf .B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B int *\fIerrorcodeptr\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); -.PP +.B " int *\fIerrorcodeptr\fP," +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.sp .B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP); -.PP +.B " const char **\fIerrptr\fP);" +.sp .B void pcre_free_study(pcre_extra *\fIextra\fP); -.PP +.sp .B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP); -.PP +.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);" +.sp .B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B int *\fIworkspace\fP, int \fIwscount\fP); +.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " int *\fIworkspace\fP, int \fIwscount\fP);" +.fi . . .SH "PCRE NATIVE API STRING EXTRACTION FUNCTIONS" .rs .sp +.nf .B int pcre_copy_named_substring(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, const char *\fIstringname\fP, -.ti +5n -.B char *\fIbuffer\fP, int \fIbuffersize\fP); -.PP +.B " const char *\fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, const char *\fIstringname\fP," +.B " char *\fIbuffer\fP, int \fIbuffersize\fP);" +.sp .B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP, -.ti +5n -.B int \fIbuffersize\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP," +.B " int \fIbuffersize\fP);" +.sp .B int pcre_get_named_substring(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, const char *\fIstringname\fP, -.ti +5n -.B const char **\fIstringptr\fP); -.PP +.B " const char *\fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, const char *\fIstringname\fP," +.B " const char **\fIstringptr\fP);" +.sp .B int pcre_get_stringnumber(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIname\fP); -.PP +.B " const char *\fIname\fP);" +.sp .B int pcre_get_stringtable_entries(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP); -.PP +.B " const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);" +.sp .B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, -.ti +5n -.B const char **\fIstringptr\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP," +.B " const char **\fIstringptr\fP);" +.sp .B int pcre_get_substring_list(const char *\fIsubject\fP, -.ti +5n -.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);" -.PP +.B " int *\fIovector\fP, int \fIstringcount\fP, const char ***\fIlistptr\fP);" +.sp .B void pcre_free_substring(const char *\fIstringptr\fP); -.PP +.sp .B void pcre_free_substring_list(const char **\fIstringptr\fP); +.fi . . .SH "PCRE NATIVE API AUXILIARY FUNCTIONS" .rs .sp +.nf .B int pcre_jit_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B pcre_jit_stack *\fIjstack\fP); -.PP +.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " pcre_jit_stack *\fIjstack\fP);" +.sp .B pcre_jit_stack *pcre_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP); -.PP +.sp .B void pcre_jit_stack_free(pcre_jit_stack *\fIstack\fP); -.PP +.sp .B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP, -.ti +5n -.B pcre_jit_callback \fIcallback\fP, void *\fIdata\fP); -.PP +.B " pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);" +.sp .B const unsigned char *pcre_maketables(void); -.PP +.sp .B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B int \fIwhat\fP, void *\fIwhere\fP); -.PP +.B " int \fIwhat\fP, void *\fIwhere\fP);" +.sp .B int pcre_refcount(pcre *\fIcode\fP, int \fIadjust\fP); -.PP +.sp .B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP); -.PP +.sp .B const char *pcre_version(void); -.PP +.sp .B int pcre_pattern_to_host_byte_order(pcre *\fIcode\fP, -.ti +5n -.B pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP); +.B " pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);" +.fi . . .SH "PCRE NATIVE API INDIRECTED FUNCTIONS" .rs .sp +.nf .B void *(*pcre_malloc)(size_t); -.PP +.sp .B void (*pcre_free)(void *); -.PP +.sp .B void *(*pcre_stack_malloc)(size_t); -.PP +.sp .B void (*pcre_stack_free)(void *); -.PP +.sp .B int (*pcre_callout)(pcre_callout_block *); +.fi . . .SH "PCRE 8-BIT, 16-BIT, AND 32-BIT LIBRARIES" @@ -483,6 +460,13 @@ the .\" documentation. .sp + PCRE_CONFIG_PARENS_LIMIT +.sp +The output is a long integer that gives the maximum depth of nesting of +parentheses (of any kind) in a pattern. This limit is imposed to cap the amount +of system stack used when a pattern is compiled. It is specified when PCRE is +built; the default is 250. +.sp PCRE_CONFIG_MATCH_LIMIT .sp The output is a long integer that gives the default limit for the number of @@ -509,19 +493,16 @@ avoiding the use of the stack. .SH "COMPILING A PATTERN" .rs .sp +.nf .B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" .sp .B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP, -.ti +5n -.B int *\fIerrorcodeptr\fP, -.ti +5n -.B const char **\fIerrptr\fP, int *\fIerroffset\fP, -.ti +5n -.B const unsigned char *\fItableptr\fP); +.B " int *\fIerrorcodeptr\fP," +.B " const char **\fIerrptr\fP, int *\fIerroffset\fP," +.B " const unsigned char *\fItableptr\fP);" +.fi .P Either of the functions \fBpcre_compile()\fP or \fBpcre_compile2()\fP can be called to compile a pattern into an internal form. The only difference between @@ -581,8 +562,9 @@ If the final argument, \fItableptr\fP, is NULL, PCRE uses a default set of character tables that are built when PCRE is compiled, using the default C locale. Otherwise, \fItableptr\fP must be an address that is the result of a call to \fBpcre_maketables()\fP. This value is stored with the compiled -pattern, and used again by \fBpcre_exec()\fP, unless another table pointer is -passed to it. For more discussion, see the section on locale support below. +pattern, and used again by \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP when the +pattern is matched. For more discussion, see the section on locale support +below. .P This code fragment shows a typical straightforward call to \fBpcre_compile()\fP: .sp @@ -670,12 +652,22 @@ documentation. .sp PCRE_EXTENDED .sp -If this bit is set, white space data characters in the pattern are totally -ignored except when escaped or inside a character class. White space does not -include the VT character (code 11). In addition, characters between an -unescaped # outside a character class and the next newline, inclusive, are also -ignored. This is equivalent to Perl's /x option, and it can be changed within a -pattern by a (?x) option setting. +If this bit is set, most white space characters in the pattern are totally +ignored except when escaped or inside a character class. However, white space +is not allowed within sequences such as (?> that introduce various +parenthesized subpatterns, nor within a numerical quantifier such as {1,3}. +However, ignorable white space is permitted between an item and a following +quantifier and between a quantifier and a following + that indicates +possessiveness. +.P +White space did not used to include the VT character (code 11), because Perl +did not treat this character as white space. However, Perl changed at release +5.18, so PCRE followed at release 8.34, and VT is now treated as white space. +.P +PCRE_EXTENDED also causes characters between an unescaped # outside a character +class and the next newline, inclusive, to be ignored. PCRE_EXTENDED is +equivalent to Perl's /x option, and it can be changed within a pattern by a +(?x) option setting. .P Which characters are interpreted as newlines is controlled by the options passed to \fBpcre_compile()\fP or by a special sequence at the start of the @@ -821,6 +813,15 @@ were followed by ?: but named parentheses can still be used for capturing (and they acquire numbers in the usual way). There is no equivalent of this option in Perl. .sp + PCRE_NO_AUTO_POSSESS +.sp +If this option is set, it disables "auto-possessification". This is an +optimization that, for example, turns a+b into a++b in order to avoid +backtracks into a+ that can never be successful. However, if callouts are in +use, auto-possessification means that some of them are never taken. You can set +this option if you want the matching functions to do a full unoptimized search +and run all the callouts, but it is mainly provided for testing purposes. +.sp PCRE_NO_START_OPTIMIZE .sp This is an option that acts at matching time; that is, it is really an option @@ -886,10 +887,10 @@ page. If an invalid UTF-8 sequence is found, \fBpcre_compile()\fP returns an error. If you already know that your pattern is valid, and you want to skip this check for performance reasons, you can set the PCRE_NO_UTF8_CHECK option. When it is set, the effect of passing an invalid UTF-8 string as a pattern is -undefined. It may cause your program to crash. Note that this option can also -be passed to \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP, to suppress the -validity checking of subject strings only. If the same string is being matched -many times, the option can be safely set for the second and subsequent +undefined. It may cause your program to crash or loop. Note that this option +can also be passed to \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP, to suppress +the validity checking of subject strings only. If the same string is being +matched many times, the option can be safely set for the second and subsequent matchings to improve performance. . . @@ -936,7 +937,7 @@ have fallen out of use. To avoid confusion, they have not been re-used. 31 POSIX collating elements are not supported 32 this version of PCRE is compiled without UTF support 33 [this code is not in use] - 34 character value in \ex{...} sequence is too large + 34 character value in \ex{} or \eo{} is too large 35 invalid condition (?(0) 36 \eC not allowed in lookbehind assertion 37 PCRE does not support \eL, \el, \eN{name}, \eU, or \eu @@ -984,6 +985,12 @@ have fallen out of use. To avoid confusion, they have not been re-used. 75 name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN) 76 character value in \eu.... sequence is too large 77 invalid UTF-32 string (specifically UTF-32) + 78 setting UTF is disabled by the application + 79 non-hex character in \ex{} (closing brace missing?) + 80 non-octal character in \eo{} (closing brace missing?) + 81 missing opening brace after \eo + 82 parentheses are too deeply nested + 83 invalid range in character class .sp The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may be used if the limits were changed when PCRE was built. @@ -993,9 +1000,10 @@ be used if the limits were changed when PCRE was built. .SH "STUDYING A PATTERN" .rs .sp -.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP -.ti +5n -.B const char **\fIerrptr\fP); +.nf +.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP, +.B " const char **\fIerrptr\fP);" +.fi .PP If a compiled pattern is going to be used several times, it is worth spending more time analyzing it in order to speed up the time taken for matching. The @@ -1117,15 +1125,17 @@ below. .sp PCRE handles caseless matching, and determines whether characters are letters, digits, or whatever, by reference to a set of tables, indexed by character -value. When running in UTF-8 mode, this applies only to characters -with codes less than 128. By default, higher-valued codes never match escapes -such as \ew or \ed, but they can be tested with \ep if PCRE is built with -Unicode character property support. Alternatively, the PCRE_UCP option can be -set at compile time; this causes \ew and friends to use Unicode property -support instead of built-in tables. The use of locales with Unicode is -discouraged. If you are handling characters with codes greater than 128, you -should either use UTF-8 and Unicode, or use locales, but not try to mix the -two. +code point. When running in UTF-8 mode, or in the 16- or 32-bit libraries, this +applies only to characters with code points less than 256. By default, +higher-valued code points never match escapes such as \ew or \ed. However, if +PCRE is built with Unicode property support, all characters can be tested with +\ep and \eP, or, alternatively, the PCRE_UCP option can be set when a pattern +is compiled; this causes \ew and friends to use Unicode property support +instead of the built-in tables. +.P +The use of locales with Unicode is discouraged. If you are handling characters +with code points greater than 128, you should either use Unicode support, or +use locales, but not try to mix the two. .P PCRE contains an internal set of tables that are used when the final argument of \fBpcre_compile()\fP is NULL. These are sufficient for many applications. @@ -1140,10 +1150,10 @@ for this locale support is expected to die away. .P External tables are built by calling the \fBpcre_maketables()\fP function, which has no arguments, in the relevant locale. The result can then be passed -to \fBpcre_compile()\fP or \fBpcre_exec()\fP as often as necessary. For -example, to build and use tables that are appropriate for the French locale -(where accented characters with values greater than 128 are treated as letters), -the following code could be used: +to \fBpcre_compile()\fP as often as necessary. For example, to build and use +tables that are appropriate for the French locale (where accented characters +with values greater than 128 are treated as letters), the following code could +be used: .sp setlocale(LC_CTYPE, "fr_FR"); tables = pcre_maketables(); @@ -1159,24 +1169,29 @@ needed. .P The pointer that is passed to \fBpcre_compile()\fP is saved with the compiled pattern, and the same tables are used via this pointer by \fBpcre_study()\fP -and normally also by \fBpcre_exec()\fP. Thus, by default, for any single +and also by \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP. Thus, for any single pattern, compilation, studying and matching all happen in the same locale, but -different patterns can be compiled in different locales. +different patterns can be processed in different locales. .P It is possible to pass a table pointer or NULL (indicating the use of the -internal tables) to \fBpcre_exec()\fP. Although not intended for this purpose, -this facility could be used to match a pattern in a different locale from the -one in which it was compiled. Passing table pointers at run time is discussed -below in the section on matching a pattern. +internal tables) to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP (see the +discussion below in the section on matching a pattern). This facility is +provided for use with pre-compiled patterns that have been saved and reloaded. +Character tables are not saved with patterns, so if a non-standard table was +used at compile time, it must be provided again when the reloaded pattern is +matched. Attempting to use this facility to match a pattern in a different +locale from the one in which it was compiled is likely to lead to anomalous +(usually incorrect) results. . . .\" HTML <a name="infoaboutpattern"></a> .SH "INFORMATION ABOUT A PATTERN" .rs .sp +.nf .B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B int \fIwhat\fP, void *\fIwhere\fP); +.B " int \fIwhat\fP, void *\fIwhere\fP);" +.fi .PP The \fBpcre_fullinfo()\fP function returns information about a compiled pattern. It replaces the \fBpcre_info()\fP function, which was removed from the @@ -1310,10 +1325,15 @@ only if it follows something of variable length. For example, for the pattern is -1. .P Since for the 32-bit library using the non-UTF-32 mode, this function is unable -to return the full 32-bit range of the character, this value is deprecated; +to return the full 32-bit range of characters, this value is deprecated; instead the PCRE_INFO_REQUIREDCHARFLAGS and PCRE_INFO_REQUIREDCHAR values should be used. .sp + PCRE_INFO_MATCH_EMPTY +.sp +Return 1 if the pattern can match an empty string, otherwise 0. The fourth +argument should point to an \fBint\fP variable. +.sp PCRE_INFO_MATCHLIMIT .sp If the pattern set a match limit by including an item of the form @@ -1369,8 +1389,8 @@ most significant byte first. In the 16-bit library, the pointer points to contains the parenthesis number. The rest of the entry is the corresponding name, zero terminated. .P -The names are in alphabetical order. Duplicate names may appear if (?| is used -to create multiple groups with the same number, as described in the +The names are in alphabetical order. If (?| is used to create multiple groups +with the same number, as described in the .\" HTML <a href="pcrepattern.html#dupsubpatternnumber"> .\" </a> section on duplicate subpattern numbers @@ -1379,11 +1399,13 @@ in the .\" HREF \fBpcrepattern\fP .\" -page. Duplicate names for subpatterns with different numbers are permitted only -if PCRE_DUPNAMES is set. In all cases of duplicate names, they appear in the -table in the order in which they were found in the pattern. In the absence of -(?| this is the order of increasing number; when (?| is used this is not -necessarily the case because later subpatterns may have lower numbers. +page, the groups may be given the same name, but there is only one entry in the +table. Different names for groups of the same number are not permitted. +Duplicate names for subpatterns with different numbers are permitted, +but only if PCRE_DUPNAMES is set. They appear in the table in the order in +which they were found in the pattern. In the absence of (?| this is the order +of increasing number; when (?| is used this is not necessarily the case because +later subpatterns may have lower numbers. .P As a simple example of the name/number table, consider the following pattern after compilation by the 8-bit library (assume PCRE_EXTENDED is set, so white @@ -1501,25 +1523,13 @@ returned. For anchored patterns, 0 is returned. .sp PCRE_INFO_FIRSTCHARACTER .sp -Return the fixed first character value, if PCRE_INFO_FIRSTCHARACTERFLAGS -returned 1; otherwise returns 0. The fourth argument should point to an -\fBuint_t\fP variable. +Return the fixed first character value in the situation where +PCRE_INFO_FIRSTCHARACTERFLAGS returns 1; otherwise return 0. The fourth +argument should point to an \fBuint_t\fP variable. .P In the 8-bit library, the value is always less than 256. In the 16-bit library the value can be up to 0xffff. In the 32-bit library in UTF-32 mode the value can be up to 0x10ffff, and up to 0xffffffff when not using UTF-32 mode. -.P -If there is no fixed first value, and if either -.sp -(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch -starts with "^", or -.sp -(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set -(if it were set, the pattern would be anchored), -.sp --1 is returned, indicating that the pattern matches only at the start of a -subject string or after any newline within the string. Otherwise -2 is -returned. For anchored patterns, -2 is returned. .sp PCRE_INFO_REQUIREDCHARFLAGS .sp @@ -1567,11 +1577,11 @@ is different. (This seems a highly unlikely scenario.) .SH "MATCHING A PATTERN: THE TRADITIONAL FUNCTION" .rs .sp +.nf .B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP); +.B " const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);" +.fi .P The function \fBpcre_exec()\fP is called to match a subject string against a compiled pattern, which is passed in the \fIcode\fP argument. If the @@ -1724,19 +1734,23 @@ and is described in the .\" documentation. .P -The \fItables\fP field is used to pass a character tables pointer to -\fBpcre_exec()\fP; this overrides the value that is stored with the compiled -pattern. A non-NULL value is stored with the compiled pattern only if custom -tables were supplied to \fBpcre_compile()\fP via its \fItableptr\fP argument. -If NULL is passed to \fBpcre_exec()\fP using this mechanism, it forces PCRE's -internal tables to be used. This facility is helpful when re-using patterns -that have been saved after compiling with an external set of tables, because -the external tables might be at a different address when \fBpcre_exec()\fP is -called. See the +The \fItables\fP field is provided for use with patterns that have been +pre-compiled using custom character tables, saved to disc or elsewhere, and +then reloaded, because the tables that were used to compile a pattern are not +saved with it. See the .\" HREF \fBpcreprecompile\fP .\" -documentation for a discussion of saving compiled patterns for later use. +documentation for a discussion of saving compiled patterns for later use. If +NULL is passed using this mechanism, it forces PCRE's internal tables to be +used. +.P +\fBWarning:\fP The tables that \fBpcre_exec()\fP uses must be the same as those +that were used when the pattern was compiled. If this is not the case, the +behaviour of \fBpcre_exec()\fP is undefined. Therefore, when a pattern is +compiled and matched in the same process, this field should never be set. In +this (the most common) case, the correct table pointer is automatically passed +with the compiled pattern from \fBpcre_compile()\fP to \fBpcre_exec()\fP. .P If PCRE_EXTRA_MARK is set in the \fIflags\fP field, the \fImark\fP field must be set to point to a suitable variable. If the pattern contains any @@ -1960,7 +1974,7 @@ all the matches in a single subject string. However, you should be sure that the value of \fIstartoffset\fP points to the start of a character (or the end of the subject). When PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid string as a subject or an invalid value of \fIstartoffset\fP is -undefined. Your program may crash. +undefined. Your program may crash or loop. .sp PCRE_PARTIAL_HARD PCRE_PARTIAL_SOFT @@ -2423,21 +2437,18 @@ no longer in use and is never returned. .SH "EXTRACTING CAPTURED SUBSTRINGS BY NUMBER" .rs .sp +.nf .B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP, -.ti +5n -.B int \fIbuffersize\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP," +.B " int \fIbuffersize\fP);" +.sp .B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, int \fIstringnumber\fP, -.ti +5n -.B const char **\fIstringptr\fP); -.PP +.B " int \fIstringcount\fP, int \fIstringnumber\fP," +.B " const char **\fIstringptr\fP);" +.sp .B int pcre_get_substring_list(const char *\fIsubject\fP, -.ti +5n -.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);" +.B " int *\fIovector\fP, int \fIstringcount\fP, const char ***\fIlistptr\fP);" +.fi .PP Captured substrings can be accessed directly by using the offsets returned by \fBpcre_exec()\fP in \fIovector\fP. For convenience, the functions @@ -2516,25 +2527,20 @@ provided. .SH "EXTRACTING CAPTURED SUBSTRINGS BY NAME" .rs .sp +.nf .B int pcre_get_stringnumber(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIname\fP); -.PP +.B " const char *\fIname\fP);" +.sp .B int pcre_copy_named_substring(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, const char *\fIstringname\fP, -.ti +5n -.B char *\fIbuffer\fP, int \fIbuffersize\fP); -.PP +.B " const char *\fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, const char *\fIstringname\fP," +.B " char *\fIbuffer\fP, int \fIbuffersize\fP);" +.sp .B int pcre_get_named_substring(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIsubject\fP, int *\fIovector\fP, -.ti +5n -.B int \fIstringcount\fP, const char *\fIstringname\fP, -.ti +5n -.B const char **\fIstringptr\fP); +.B " const char *\fIsubject\fP, int *\fIovector\fP," +.B " int \fIstringcount\fP, const char *\fIstringname\fP," +.B " const char **\fIstringptr\fP);" +.fi .PP To extract a substring by name, you first have to find associated number. For example, for this pattern @@ -2586,9 +2592,10 @@ same number causes an error at compile time. .SH "DUPLICATE SUBPATTERN NAMES" .rs .sp +.nf .B int pcre_get_stringtable_entries(const pcre *\fIcode\fP, -.ti +5n -.B const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP); +.B " const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);" +.fi .PP When a pattern is compiled with the PCRE_DUPNAMES option, names for subpatterns are not required to be unique. (Duplicate names are always allowed for @@ -2677,13 +2684,12 @@ the value returned is the size of each block that is obtained from the heap. .SH "MATCHING A PATTERN: THE ALTERNATIVE FUNCTION" .rs .sp +.nf .B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," -.ti +5n -.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, -.ti +5n -.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP, -.ti +5n -.B int *\fIworkspace\fP, int \fIwscount\fP); +.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP," +.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP," +.B " int *\fIworkspace\fP, int \fIwscount\fP);" +.fi .P The function \fBpcre_dfa_exec()\fP is called to match a subject string against a compiled pattern, using a matching algorithm that scans the subject string @@ -2810,6 +2816,14 @@ matching string is given first. If there were too many matches to fit into \fIovector\fP, the yield of the function is zero, and the vector is filled with the longest matches. Unlike \fBpcre_exec()\fP, \fBpcre_dfa_exec()\fP can use the entire \fIovector\fP for returning matched strings. +.P +NOTE: PCRE's "auto-possessification" optimization usually applies to character +repeats at the end of a pattern (as well as internally). For example, the +pattern "a\ed+" is compiled as if it were "a\ed++" because there is no point +even considering the possibility of backtracking into the repeated digits. For +DFA matching, this means that only one possible match is found. If you really +do want multiple matches in such cases, either use an ungreedy repeat +("a\ed+?") or set the PCRE_NO_AUTO_POSSESS option when compiling. . . .SS "Error returns from \fBpcre_dfa_exec()\fP" @@ -2886,6 +2900,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 12 May 2013 +Last updated: 12 November 2013 Copyright (c) 1997-2013 University of Cambridge. .fi diff --git a/pcre/doc/pcrecallout.3 b/pcre/doc/pcrecallout.3 index 79e2bb931aa..8ebc9959520 100644 --- a/pcre/doc/pcrecallout.3 +++ b/pcre/doc/pcrecallout.3 @@ -1,4 +1,4 @@ -.TH PCRECALLOUT 3 "03 March 2013" "PCRE 8.33" +.TH PCRECALLOUT 3 "12 November 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH SYNOPSIS @@ -55,17 +55,50 @@ The .\" HREF \fBpcretest\fP .\" -command has an option that sets automatic callouts; when it is used, the output -indicates how the pattern is matched. This is useful information when you are -trying to optimize the performance of a particular pattern. +program has a pattern qualifier (/C) that sets automatic callouts; when it is +used, the output indicates how the pattern is being matched. This is useful +information when you are trying to optimize the performance of a particular +pattern. . . .SH "MISSING CALLOUTS" .rs .sp -You should be aware that, because of optimizations in the way PCRE matches -patterns by default, callouts sometimes do not happen. For example, if the -pattern is +You should be aware that, because of optimizations in the way PCRE compiles and +matches patterns, callouts sometimes do not happen exactly as you might expect. +.P +At compile time, PCRE "auto-possessifies" repeated items when it knows that +what follows cannot be part of the repeat. For example, a+[bc] is compiled as +if it were a++[bc]. The \fBpcretest\fP output when this pattern is anchored and +then applied with automatic callouts to the string "aaaa" is: +.sp + --->aaaa + +0 ^ ^ + +1 ^ a+ + +3 ^ ^ [bc] + No match +.sp +This indicates that when matching [bc] fails, there is no backtracking into a+ +and therefore the callouts that would be taken for the backtracks do not occur. +You can disable the auto-possessify feature by passing PCRE_NO_AUTO_POSSESS +to \fBpcre_compile()\fP, or starting the pattern with (*NO_AUTO_POSSESS). If +this is done in \fBpcretest\fP (using the /O qualifier), the output changes to +this: +.sp + --->aaaa + +0 ^ ^ + +1 ^ a+ + +3 ^ ^ [bc] + +3 ^ ^ [bc] + +3 ^ ^ [bc] + +3 ^^ [bc] + No match +.sp +This time, when matching [bc] fails, the matcher backtracks into a+ and tries +again, repeatedly, until a+ itself fails. +.P +Other optimizations that provide fast "no match" results also affect callouts. +For example, if the pattern is .sp ab(?C4)cd .sp @@ -89,11 +122,11 @@ callouts such as the example above are obeyed. .rs .sp During matching, when PCRE reaches a callout point, the external function -defined by \fIpcre_callout\fP or \fIpcre[16|32]_callout\fP is called -(if it is set). This applies to both normal and DFA matching. The only -argument to the callout function is a pointer to a \fBpcre_callout\fP -or \fBpcre[16|32]_callout\fP block. -These structures contains the following fields: +defined by \fIpcre_callout\fP or \fIpcre[16|32]_callout\fP is called (if it is +set). This applies to both normal and DFA matching. The only argument to the +callout function is a pointer to a \fBpcre_callout\fP or +\fBpcre[16|32]_callout\fP block. These structures contains the following +fields: .sp int \fIversion\fP; int \fIcallout_number\fP; @@ -217,6 +250,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 03 March 2013 +Last updated: 12 November 2013 Copyright (c) 1997-2013 University of Cambridge. .fi diff --git a/pcre/doc/pcrecompat.3 b/pcre/doc/pcrecompat.3 index 2c109ea9999..0cc40198235 100644 --- a/pcre/doc/pcrecompat.3 +++ b/pcre/doc/pcrecompat.3 @@ -1,4 +1,4 @@ -.TH PCRECOMPAT 3 "19 March 2013" "PCRE 8.33" +.TH PCRECOMPAT 3 "10 November 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH "DIFFERENCES BETWEEN PCRE AND PERL" @@ -122,16 +122,21 @@ an error is given at compile time. .P 15. Perl recognizes comments in some places that PCRE does not, for example, between the ( and ? at the start of a subpattern. If the /x modifier is set, -Perl allows white space between ( and ? but PCRE never does, even if the -PCRE_EXTENDED option is set. +Perl allows white space between ( and ? (though current Perls warn that this is +deprecated) but PCRE never does, even if the PCRE_EXTENDED option is set. .P -16. In PCRE, the upper/lower case character properties Lu and Ll are not +16. Perl, when in warning mode, gives warnings for character classes such as +[A-\ed] or [a-[:digit:]]. It then treats the hyphens as literals. PCRE has no +warning features, so it gives an error in these cases because they are almost +certainly user mistakes. +.P +17. In PCRE, the upper/lower case character properties Lu and Ll are not affected when case-independent matching is specified. For example, \ep{Lu} always matches an upper case letter. I think Perl has changed in this respect; in the release at the time of writing (5.16), \ep{Lu} and \ep{Ll} match all letters, regardless of case, when case independence is specified. .P -17. PCRE provides some extensions to the Perl regular expression facilities. +18. PCRE provides some extensions to the Perl regular expression facilities. Perl 5.10 includes new features that are not in earlier versions of Perl, some of which (such as named parentheses) have been in PCRE for some time. This list is with respect to Perl 5.10: @@ -190,6 +195,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 19 March 2013 +Last updated: 10 November 2013 Copyright (c) 1997-2013 University of Cambridge. .fi diff --git a/pcre/doc/pcrelimits.3 b/pcre/doc/pcrelimits.3 index 14ffbc466ed..423d6a27684 100644 --- a/pcre/doc/pcrelimits.3 +++ b/pcre/doc/pcrelimits.3 @@ -1,4 +1,4 @@ -.TH PCRELIMITS 3 "24 June 2012" "PCRE 8.30" +.TH PCRELIMITS 3 "05 November 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH "SIZE AND OTHER LIMITATIONS" @@ -8,9 +8,10 @@ There are some size limitations in PCRE but it is hoped that they will never in practice be relevant. .P The maximum length of a compiled pattern is approximately 64K data units (bytes -for the 8-bit library, 32-bit units for the 32-bit library, and 32-bit units for -the 32-bit library) if PCRE is compiled with the default internal linkage size -of 2 bytes. If you want to process regular expressions that are truly enormous, +for the 8-bit library, 16-bit units for the 16-bit library, and 32-bit units for +the 32-bit library) if PCRE is compiled with the default internal linkage size, +which is 2 bytes for the 8-bit and 16-bit libraries, and 4 bytes for the 32-bit +library. If you want to process regular expressions that are truly enormous, you can compile PCRE with an internal linkage size of 3 or 4 (when building the 16-bit or 32-bit library, 3 is rounded up to 4). See the \fBREADME\fP file in the source distribution and the @@ -23,7 +24,10 @@ However, the speed of execution is slower. All values in repeating quantifiers must be less than 65536. .P There is no limit to the number of parenthesized subpatterns, but there can be -no more than 65535 capturing subpatterns. +no more than 65535 capturing subpatterns. There is, however, a limit to the +depth of nesting of parenthesized subpatterns of all kinds. This is imposed in +order to limit the amount of system stack used at compile time. The limit can +be specified when PCRE is built; the default is 250. .P There is a limit to the number of forward references to subsequent subpatterns of around 200,000. Repeated forward references with fixed upper limits, for @@ -34,7 +38,7 @@ The maximum length of name for a named subpattern is 32 characters, and the maximum number of named subpatterns is 10000. .P The maximum length of a name in a (*MARK), (*PRUNE), (*SKIP), or (*THEN) verb -is 255 for the 8-bit library and 65535 for the 16-bit and 32-bit library. +is 255 for the 8-bit library and 65535 for the 16-bit and 32-bit libraries. .P The maximum length of a subject string is the largest positive number that an integer variable can hold. However, when using the traditional matching @@ -62,6 +66,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 04 May 2012 -Copyright (c) 1997-2012 University of Cambridge. +Last updated: 05 November 2013 +Copyright (c) 1997-2013 University of Cambridge. .fi diff --git a/pcre/doc/pcrematching.3 b/pcre/doc/pcrematching.3 index a9977d5e05a..268baf9b8c6 100644 --- a/pcre/doc/pcrematching.3 +++ b/pcre/doc/pcrematching.3 @@ -1,4 +1,4 @@ -.TH PCREMATCHING 3 "08 January 2012" "PCRE 8.30" +.TH PCREMATCHING 3 "12 November 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH "PCRE MATCHING ALGORITHMS" @@ -106,6 +106,14 @@ the three strings "caterpillar", "cater", and "cat" that start at the fifth character of the subject. The algorithm does not automatically move on to find matches that start at later positions. .P +PCRE's "auto-possessification" optimization usually applies to character +repeats at the end of a pattern (as well as internally). For example, the +pattern "a\ed+" is compiled as if it were "a\ed++" because there is no point +even considering the possibility of backtracking into the repeated digits. For +DFA matching, this means that only one possible match is found. If you really +do want multiple matches in such cases, either use an ungreedy repeat +("a\ed+?") or set the PCRE_NO_AUTO_POSSESS option when compiling. +.P There are a number of features of PCRE regular expressions that are not supported by the alternative matching algorithm. They are as follows: .P @@ -201,6 +209,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 08 January 2012 +Last updated: 12 November 2013 Copyright (c) 1997-2012 University of Cambridge. .fi diff --git a/pcre/doc/pcrepartial.3 b/pcre/doc/pcrepartial.3 index 4041838c3e9..14d0124f1c2 100644 --- a/pcre/doc/pcrepartial.3 +++ b/pcre/doc/pcrepartial.3 @@ -1,4 +1,4 @@ -.TH PCREPARTIAL 3 "20 February 2013" "PCRE 8.33" +.TH PCREPARTIAL 3 "02 July 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH "PARTIAL MATCHING IN PCRE" @@ -280,6 +280,15 @@ Notice that when the match is complete, only the last part is shown; PCRE does not retain the previously partially-matched string. It is up to the calling program to do that if it needs to. .P +That means that, for an unanchored pattern, if a continued match fails, it is +not possible to try again at a new starting point. All this facility is capable +of doing is continuing with the previous match attempt. In the previous +example, if the second set of data is "ug23" the result is no match, even +though there would be a match for "aug23" if the entire string were given at +once. Depending on the application, this may or may not be what you want. +The only way to allow for starting again at the next character is to retain the +matched part of the subject and try a new complete match. +.P You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with PCRE_DFA_RESTART to continue partial matching over multiple segments. This facility can be used to pass very long subject strings to the DFA matching @@ -462,6 +471,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 20 February 2013 +Last updated: 02 July 2013 Copyright (c) 1997-2013 University of Cambridge. .fi diff --git a/pcre/doc/pcrepattern.3 b/pcre/doc/pcrepattern.3 index 39711014996..4c515f83adc 100644 --- a/pcre/doc/pcrepattern.3 +++ b/pcre/doc/pcrepattern.3 @@ -1,4 +1,4 @@ -.TH PCREPATTERN 3 "26 April 2013" "PCRE 8.33" +.TH PCREPATTERN 3 "03 December 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH "PCRE REGULAR EXPRESSION DETAILS" @@ -80,21 +80,37 @@ appearance causes an error. .SS "Unicode property support" .rs .sp -Another special sequence that may appear at the start of a pattern is -.sp - (*UCP) -.sp +Another special sequence that may appear at the start of a pattern is (*UCP). This has the same effect as setting the PCRE_UCP option: it causes sequences such as \ed and \ew to use Unicode properties to determine character types, instead of recognizing only characters with codes less than 128 via a lookup table. . . +.SS "Disabling auto-possessification" +.rs +.sp +If a pattern starts with (*NO_AUTO_POSSESS), it has the same effect as setting +the PCRE_NO_AUTO_POSSESS option at compile time. This stops PCRE from making +quantifiers possessive when what follows cannot match the repeated item. For +example, by default a+b is treated as a++b. For more details, see the +.\" HREF +\fBpcreapi\fP +.\" +documentation. +. +. .SS "Disabling start-up optimizations" .rs .sp If a pattern starts with (*NO_START_OPT), it has the same effect as setting the -PCRE_NO_START_OPTIMIZE option either at compile or matching time. +PCRE_NO_START_OPTIMIZE option either at compile or matching time. This disables +several optimizations for quickly reaching "no match" results. For more +details, see the +.\" HREF +\fBpcreapi\fP +.\" +documentation. . . .\" HTML <a name="newlines"></a> @@ -164,10 +180,10 @@ pattern of the form (*LIMIT_RECURSION=d) .sp where d is any number of decimal digits. However, the value of the setting must -be less than the value set by the caller of \fBpcre_exec()\fP for it to have -any effect. In other words, the pattern writer can lower the limit set by the -programmer, but not raise it. If there is more than one setting of one of these -limits, the lower value is used. +be less than the value set (or defaulted) by the caller of \fBpcre_exec()\fP +for it to have any effect. In other words, the pattern writer can lower the +limits set by the programmer, but not raise them. If there is more than one +setting of one of these limits, the lower value is used. . . .SH "EBCDIC CHARACTER CODES" @@ -257,10 +273,11 @@ In a UTF mode, only ASCII numbers and letters have any special meaning after a backslash. All other characters (in particular, those whose codepoints are greater than 127) are treated as literals. .P -If a pattern is compiled with the PCRE_EXTENDED option, white space in the -pattern (other than in a character class) and characters between a # outside -a character class and the next newline are ignored. An escaping backslash can -be used to include a white space or # character as part of the pattern. +If a pattern is compiled with the PCRE_EXTENDED option, most white space in the +pattern (other than in a character class), and characters between a # outside a +character class and the next newline, inclusive, are ignored. An escaping +backslash can be used to include a white space or # character as part of the +pattern. .P If you want to remove the special meaning from a sequence of characters, you can do so by putting them between \eQ and \eE. This is different from Perl in @@ -300,7 +317,9 @@ one of the following escape sequences than the binary character it represents: \en linefeed (hex 0A) \er carriage return (hex 0D) \et tab (hex 09) + \e0dd character with octal code 0dd \eddd character with octal code ddd, or back reference + \eo{ddd..} character with octal code ddd.. \exhh character with hex code hh \ex{hhh..} character with hex code hhh.. (non-JavaScript mode) \euhhhh character with hex code hhhh (JavaScript mode only) @@ -321,47 +340,27 @@ byte are inverted. Thus \ecA becomes hex 01, as in ASCII (A is C1), but because the EBCDIC letters are disjoint, \ecZ becomes hex 29 (Z is E9), and other characters also generate different values. .P -By default, after \ex, from zero to two hexadecimal digits are read (letters -can be in upper or lower case). Any number of hexadecimal digits may appear -between \ex{ and }, but the character code is constrained as follows: -.sp - 8-bit non-UTF mode less than 0x100 - 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint - 16-bit non-UTF mode less than 0x10000 - 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint - 32-bit non-UTF mode less than 0x80000000 - 32-bit UTF-32 mode less than 0x10ffff and a valid codepoint -.sp -Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called -"surrogate" codepoints), and 0xffef. -.P -If characters other than hexadecimal digits appear between \ex{ and }, or if -there is no terminating }, this form of escape is not recognized. Instead, the -initial \ex will be interpreted as a basic hexadecimal escape, with no -following digits, giving a character whose value is zero. -.P -If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \ex is -as just described only when it is followed by two hexadecimal digits. -Otherwise, it matches a literal "x" character. In JavaScript mode, support for -code points greater than 256 is provided by \eu, which must be followed by -four hexadecimal digits; otherwise it matches a literal "u" character. -Character codes specified by \eu in JavaScript mode are constrained in the same -was as those specified by \ex in non-JavaScript mode. -.P -Characters whose value is less than 256 can be defined by either of the two -syntaxes for \ex (or by \eu in JavaScript mode). There is no difference in the -way they are handled. For example, \exdc is exactly the same as \ex{dc} (or -\eu00dc in JavaScript mode). -.P After \e0 up to two further octal digits are read. If there are fewer than two digits, just those that are present are used. Thus the sequence \e0\ex\e07 specifies two binary zeros followed by a BEL character (code value 7). Make sure you supply two digits after the initial zero if the pattern character that follows is itself an octal digit. .P -The handling of a backslash followed by a digit other than 0 is complicated. -Outside a character class, PCRE reads it and any following digits as a decimal -number. If the number is less than 10, or if there have been at least that many +The escape \eo must be followed by a sequence of octal digits, enclosed in +braces. An error occurs if this is not the case. This escape is a recent +addition to Perl; it provides way of specifying character code points as octal +numbers greater than 0777, and it also allows octal numbers and back references +to be unambiguously specified. +.P +For greater clarity and unambiguity, it is best to avoid following \e by a +digit greater than zero. Instead, use \eo{} or \ex{} to specify character +numbers, and \eg{} to specify back references. The following paragraphs +describe the old, ambiguous syntax. +.P +The handling of a backslash followed by a digit other than 0 is complicated, +and Perl has changed in recent releases, causing PCRE also to change. Outside a +character class, PCRE reads the digit and any following digits as a decimal +number. If the number is less than 8, or if there have been at least that many previous capturing left parentheses in the expression, the entire sequence is taken as a \fIback reference\fP. A description of how this works is given .\" HTML <a href="#backreferences"> @@ -374,12 +373,11 @@ following the discussion of parenthesized subpatterns. .\" .P -Inside a character class, or if the decimal number is greater than 9 and there -have not been that many capturing subpatterns, PCRE re-reads up to three octal -digits following the backslash, and uses them to generate a data character. Any -subsequent digits stand for themselves. The value of the character is -constrained in the same way as characters specified in hexadecimal. -For example: +Inside a character class, or if the decimal number following \e is greater than +7 and there have not been that many capturing subpatterns, PCRE handles \e8 and +\e9 as the literal characters "8" and "9", and otherwise re-reads up to three +octal digits following the backslash, using them to generate a data character. +Any subsequent digits stand for themselves. For example: .sp \e040 is another way of writing an ASCII space .\" JOIN @@ -398,12 +396,51 @@ For example: \e377 might be a back reference, otherwise the value 255 (decimal) .\" JOIN - \e81 is either a back reference, or a binary zero - followed by the two characters "8" and "1" + \e81 is either a back reference, or the two + characters "8" and "1" .sp -Note that octal values of 100 or greater must not be introduced by a leading -zero, because no more than three octal digits are ever read. +Note that octal values of 100 or greater that are specified using this syntax +must not be introduced by a leading zero, because no more than three octal +digits are ever read. +.P +By default, after \ex that is not followed by {, from zero to two hexadecimal +digits are read (letters can be in upper or lower case). Any number of +hexadecimal digits may appear between \ex{ and }. If a character other than +a hexadecimal digit appears between \ex{ and }, or if there is no terminating +}, an error occurs. .P +If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \ex is +as just described only when it is followed by two hexadecimal digits. +Otherwise, it matches a literal "x" character. In JavaScript mode, support for +code points greater than 256 is provided by \eu, which must be followed by +four hexadecimal digits; otherwise it matches a literal "u" character. +.P +Characters whose value is less than 256 can be defined by either of the two +syntaxes for \ex (or by \eu in JavaScript mode). There is no difference in the +way they are handled. For example, \exdc is exactly the same as \ex{dc} (or +\eu00dc in JavaScript mode). +. +. +.SS "Constraints on character values" +.rs +.sp +Characters that are specified using octal or hexadecimal numbers are +limited to certain values, as follows: +.sp + 8-bit non-UTF mode less than 0x100 + 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint + 16-bit non-UTF mode less than 0x10000 + 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint + 32-bit non-UTF mode less than 0x100000000 + 32-bit UTF-32 mode less than 0x10ffff and a valid codepoint +.sp +Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called +"surrogate" codepoints), and 0xffef. +. +. +.SS "Escape sequences in character classes" +.rs +.sp All the sequences that define a single character value can be used both inside and outside character classes. In addition, inside a character class, \eb is interpreted as the backspace character (hex 08). @@ -494,11 +531,14 @@ classes. They each match one character of the appropriate type. If the current matching point is at the end of the subject string, all of them fail, because there is no character to match. .P -For compatibility with Perl, \es does not match the VT character (code 11). -This makes it different from the the POSIX "space" class. The \es characters -are HT (9), LF (10), FF (12), CR (13), and space (32). If "use locale;" is -included in a Perl script, \es may match the VT character. In PCRE, it never -does. +For compatibility with Perl, \es did not used to match the VT character (code +11), which made it different from the the POSIX "space" class. However, Perl +added VT at release 5.18, and PCRE followed suit at release 8.34. The default +\es characters are now HT (9), LF (10), VT (11), FF (12), CR (13), and space +(32), which are defined as white space in the "C" locale. This list may vary if +locale-specific matching is taking place. For example, in some locales the +"non-breaking space" character (\exA0) is recognized as white space, and in +others the VT character is not. .P A "word" character is an underscore or any character that is a letter or digit. By default, the definition of letters and digits is controlled by PCRE's @@ -513,20 +553,22 @@ in the \fBpcreapi\fP .\" page). For example, in a French locale such as "fr_FR" in Unix-like systems, -or "french" in Windows, some character codes greater than 128 are used for +or "french" in Windows, some character codes greater than 127 are used for accented letters, and these are then matched by \ew. The use of locales with Unicode is discouraged. .P -By default, in a UTF mode, characters with values greater than 128 never match -\ed, \es, or \ew, and always match \eD, \eS, and \eW. These sequences retain -their original meanings from before UTF support was available, mainly for -efficiency reasons. However, if PCRE is compiled with Unicode property support, -and the PCRE_UCP option is set, the behaviour is changed so that Unicode -properties are used to determine character types, as follows: +By default, characters whose code points are greater than 127 never match \ed, +\es, or \ew, and always match \eD, \eS, and \eW, although this may vary for +characters in the range 128-255 when locale-specific matching is happening. +These escape sequences retain their original meanings from before Unicode +support was available, mainly for efficiency reasons. If PCRE is compiled with +Unicode property support, and the PCRE_UCP option is set, the behaviour is +changed so that Unicode properties are used to determine character types, as +follows: .sp - \ed any character that \ep{Nd} matches (decimal digit) - \es any character that \ep{Z} matches, plus HT, LF, FF, CR - \ew any character that \ep{L} or \ep{N} matches, plus underscore + \ed any character that matches \ep{Nd} (decimal digit) + \es any character that matches \ep{Z} or \eh or \ev + \ew any character that matches \ep{L} or \ep{N}, plus underscore .sp The upper case escapes match the inverse sets of characters. Note that \ed matches only decimal digits, whereas \ew matches any Unicode digit, as well as @@ -536,7 +578,7 @@ is noticeably slower when PCRE_UCP is set. .P The sequences \eh, \eH, \ev, and \eV are features that were added to Perl at release 5.10. In contrast to the other sequences, which match only ASCII -characters by default, these always match certain high-valued codepoints, +characters by default, these always match certain high-valued code points, whether or not PCRE_UCP is set. The horizontal space characters are: .sp U+0009 Horizontal tab (HT) @@ -906,9 +948,9 @@ the "mark" property always have the "extend" grapheme breaking property. .sp As well as the standard Unicode properties described above, PCRE supports four more that make it possible to convert traditional escape sequences such as \ew -and \es and POSIX character classes to use Unicode properties. PCRE uses these -non-standard, non-Perl properties internally when PCRE_UCP is set. However, -they may also be used explicitly. These properties are: +and \es to use Unicode properties. PCRE uses these non-standard, non-Perl +properties internally when PCRE_UCP is set. However, they may also be used +explicitly. These properties are: .sp Xan Any alphanumeric character Xps Any POSIX space character @@ -918,8 +960,9 @@ they may also be used explicitly. These properties are: Xan matches characters that have either the L (letter) or the N (number) property. Xps matches the characters tab, linefeed, vertical tab, form feed, or carriage return, and any other character that has the Z (separator) property. -Xsp is the same as Xps, except that vertical tab is excluded. Xwd matches the -same characters as Xan, plus underscore. +Xsp is the same as Xps; it used to exclude vertical tab, for Perl +compatibility, but Perl changed, and so PCRE followed at release 8.34. Xwd +matches the same characters as Xan, plus underscore. .P There is another non-standard property, Xuc, which matches any character that can be represented by a Universal Character Name in C++ and other programming @@ -1215,7 +1258,9 @@ The minus (hyphen) character can be used to specify a range of characters in a character class. For example, [d-m] matches any letter between d and m, inclusive. If a minus character is required in a class, it must be escaped with a backslash or appear in a position where it cannot be interpreted as -indicating a range, typically as the first or last character in the class. +indicating a range, typically as the first or last character in the class, or +immediately after a range. For example, [b-d-z] matches letters in the range b +to d, a hyphen character, or z. .P It is not possible to have the literal character "]" as the end character of a range. A pattern such as [W-]46] is interpreted as a class of two characters @@ -1225,6 +1270,11 @@ the end of range, so [W-\e]46] is interpreted as a class containing a range followed by two other characters. The octal or hexadecimal representation of "]" can also be used to end a range. .P +An error is generated if a POSIX character class (see below) or an escape +sequence other than one that defines a single character appears at a point +where a range ending character is expected. For example, [z-\exff] is valid, +but [A-\ed] and [A-[:digit:]] are not. +.P Ranges operate in the collating sequence of character values. They can also be used for characters specified numerically, for example [\e000-\e037]. Ranges can include any characters that are valid for the current mode. @@ -1263,9 +1313,9 @@ something AND NOT ...". The only metacharacters that are recognized in character classes are backslash, hyphen (only where it can be interpreted as specifying a range), circumflex (only at the start), opening square bracket (only when it can be interpreted as -introducing a POSIX class name - see the next section), and the terminating -closing square bracket. However, escaping other non-alphanumeric characters -does no harm. +introducing a POSIX class name, or for a special compatibility feature - see +the next two sections), and the terminating closing square bracket. However, +escaping other non-alphanumeric characters does no harm. . . .SH "POSIX CHARACTER CLASSES" @@ -1290,15 +1340,17 @@ are: lower lower case letters print printing characters, including space punct printing characters, excluding letters and digits and space - space white space (not quite the same as \es) + space white space (the same as \es from PCRE 8.34) upper upper case letters word "word" characters (same as \ew) xdigit hexadecimal digits .sp -The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), and -space (32). Notice that this list includes the VT character (code 11). This -makes "space" different to \es, which does not include VT (for Perl -compatibility). +The default "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), +and space (32). If locale-specific matching is taking place, the list of space +characters may be different; there may be fewer or more of them. "Space" used +to be different to \es, which did not include VT, for Perl compatibility. +However, Perl changed at release 5.18, and PCRE followed at release 8.34. +"Space" and \es now match the same set of characters. .P The name "word" is a Perl extension, and "blank" is a GNU extension from Perl 5.8. Another Perl extension is negation, which is indicated by a ^ character @@ -1310,11 +1362,11 @@ matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the POSIX syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not supported, and an error is given if they are encountered. .P -By default, in UTF modes, characters with values greater than 128 do not match -any of the POSIX character classes. However, if the PCRE_UCP option is passed -to \fBpcre_compile()\fP, some of the classes are changed so that Unicode -character properties are used. This is achieved by replacing the POSIX classes -by other sequences, as follows: +By default, characters with values greater than 128 do not match any of the +POSIX character classes. However, if the PCRE_UCP option is passed to +\fBpcre_compile()\fP, some of the classes are changed so that Unicode character +properties are used. This is achieved by replacing certain POSIX classes by +other sequences, as follows: .sp [:alnum:] becomes \ep{Xan} [:alpha:] becomes \ep{L} @@ -1325,9 +1377,54 @@ by other sequences, as follows: [:upper:] becomes \ep{Lu} [:word:] becomes \ep{Xwd} .sp -Negated versions, such as [:^alpha:] use \eP instead of \ep. The other POSIX -classes are unchanged, and match only characters with code points less than -128. +Negated versions, such as [:^alpha:] use \eP instead of \ep. Three other POSIX +classes are handled specially in UCP mode: +.TP 10 +[:graph:] +This matches characters that have glyphs that mark the page when printed. In +Unicode property terms, it matches all characters with the L, M, N, P, S, or Cf +properties, except for: +.sp + U+061C Arabic Letter Mark + U+180E Mongolian Vowel Separator + U+2066 - U+2069 Various "isolate"s +.sp +.TP 10 +[:print:] +This matches the same characters as [:graph:] plus space characters that are +not controls, that is, characters with the Zs property. +.TP 10 +[:punct:] +This matches all characters that have the Unicode P (punctuation) property, +plus those characters whose code points are less than 128 that have the S +(Symbol) property. +.P +The other POSIX classes are unchanged, and match only characters with code +points less than 128. +. +. +.SH "COMPATIBILITY FEATURE FOR WORD BOUNDARIES" +.rs +.sp +In the POSIX.2 compliant library that was included in 4.4BSD Unix, the ugly +syntax [[:<:]] and [[:>:]] is used for matching "start of word" and "end of +word". PCRE treats these items as follows: +.sp + [[:<:]] is converted to \eb(?=\ew) + [[:>:]] is converted to \eb(?<=\ew) +.sp +Only these exact character sequences are recognized. A sequence such as +[a[:<:]b] provokes error for an unrecognized POSIX class name. This support is +not compatible with Perl. It is provided to help migrations from other +environments, and is best not used in any new patterns. Note that \eb matches +at the start and the end of a word (see +.\" HTML <a href="#smallassertions"> +.\" </a> +"Simple assertions" +.\" +above), and in a Perl-style pattern the preceding or following character +normally shows which is wanted, without the need for the assertions that are +used above in order to give exactly the POSIX behaviour. . . .SH "VERTICAL BAR" @@ -1547,11 +1644,12 @@ conditions, .\" can be made by name as well as by number. .P -Names consist of up to 32 alphanumeric characters and underscores. Named -capturing parentheses are still allocated numbers as well as names, exactly as -if the names were not present. The PCRE API provides function calls for -extracting the name-to-number translation table from a compiled pattern. There -is also a convenience function for extracting a captured substring by name. +Names consist of up to 32 alphanumeric characters and underscores, but must +start with a non-digit. Named capturing parentheses are still allocated numbers +as well as names, exactly as if the names were not present. The PCRE API +provides function calls for extracting the name-to-number translation table +from a compiled pattern. There is also a convenience function for extracting a +captured substring by name. .P By default, a name must be unique within a pattern, but it is possible to relax this constraint by setting the PCRE_DUPNAMES option at compile time. (Duplicate @@ -1577,9 +1675,20 @@ for the first (and in this example, the only) subpattern of that name that matched. This saves searching to find which numbered subpattern it was. .P If you make a back reference to a non-unique named subpattern from elsewhere in -the pattern, the one that corresponds to the first occurrence of the name is -used. In the absence of duplicate numbers (see the previous section) this is -the one with the lowest number. If you use a named reference in a condition +the pattern, the subpatterns to which the name refers are checked in the order +in which they appear in the overall pattern. The first one that is set is used +for the reference. For example, this pattern matches both "foofoo" and +"barbar" but not "foobar" or "barfoo": +.sp + (?:(?<n>foo)|(?<n>bar))\ek<n> +.sp +.P +If you make a subroutine call to a non-unique named subpattern, the one that +corresponds to the first occurrence of the name is used. In the absence of +duplicate numbers (see the previous section) this is the one with the lowest +number. +.P +If you use a named reference in a condition test (see the .\" .\" HTML <a href="#conditions"> @@ -1599,8 +1708,9 @@ documentation. \fBWarning:\fP You cannot use different names to distinguish between two subpatterns with the same number because PCRE uses only the numbers when matching. For this reason, an error is given at compile time if different names -are given to subpatterns with the same number. However, you can give the same -name to subpatterns with the same number, even when PCRE_DUPNAMES is not set. +are given to subpatterns with the same number. However, you can always give the +same name to subpatterns with the same number, even when PCRE_DUPNAMES is not +set. . . .SH REPETITION @@ -2271,12 +2381,7 @@ This makes the fragment independent of the parentheses in the larger pattern. .sp Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a used subpattern by name. For compatibility with earlier versions of PCRE, which had -this facility before Perl, the syntax (?(name)...) is also recognized. However, -there is a possible ambiguity with this syntax, because subpattern names may -consist entirely of digits. PCRE looks first for a named subpattern; if it -cannot find one and the name consists entirely of digits, PCRE looks for a -subpattern of that number, which must be greater than zero. Using subpattern -names that consist entirely of digits is not recommended. +this facility before Perl, the syntax (?(name)...) is also recognized. .P Rewriting the above example to use a named subpattern gives this: .sp @@ -2698,8 +2803,13 @@ During matching, when PCRE reaches a callout point, the external function is called. It is provided with the number of the callout, the position in the pattern, and, optionally, one item of data originally supplied by the caller of the matching function. The callout function may cause matching to proceed, to -backtrack, or to fail altogether. A complete description of the interface to -the callout function is given in the +backtrack, or to fail altogether. +.P +By default, PCRE implements a number of optimizations at compile time and +matching time, and one side-effect is that sometimes callouts are skipped. If +you need all possible callouts to happen, you need to set options that disable +the relevant optimizations. More details, and a complete description of the +interface to the callout function, are given in the .\" HREF \fBpcrecallout\fP .\" @@ -3060,7 +3170,7 @@ example: .sp ...(*COMMIT)(*PRUNE)... .sp -If there is a matching failure to the right, backtracking onto (*PRUNE) cases +If there is a matching failure to the right, backtracking onto (*PRUNE) causes it to be triggered, and its action is taken. There can never be a backtrack onto (*COMMIT). . @@ -3145,6 +3255,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 26 April 2013 +Last updated: 03 December 2013 Copyright (c) 1997-2013 University of Cambridge. .fi diff --git a/pcre/doc/pcreposix.3 b/pcre/doc/pcreposix.3 index b25a89193c9..77890f36b46 100644 --- a/pcre/doc/pcreposix.3 +++ b/pcre/doc/pcreposix.3 @@ -1,25 +1,22 @@ .TH PCREPOSIX 3 "09 January 2012" "PCRE 8.30" .SH NAME PCRE - Perl-compatible regular expressions. -.SH "SYNOPSIS OF POSIX API" +.SH "SYNOPSIS" .rs .sp .B #include <pcreposix.h> .PP -.SM +.nf .B int regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP, -.ti +5n -.B int \fIcflags\fP); -.PP +.B " int \fIcflags\fP);" +.sp .B int regexec(regex_t *\fIpreg\fP, const char *\fIstring\fP, -.ti +5n -.B size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP); -.PP -.B size_t regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP, -.ti +5n -.B char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP); -.PP +.B " size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);" +.B " size_t regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP," +.B " char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);" +.sp .B void regfree(regex_t *\fIpreg\fP); +.fi . .SH DESCRIPTION .rs diff --git a/pcre/doc/pcreprecompile.3 b/pcre/doc/pcreprecompile.3 index 39eb82b02cc..40f257a98cb 100644 --- a/pcre/doc/pcreprecompile.3 +++ b/pcre/doc/pcreprecompile.3 @@ -1,4 +1,4 @@ -.TH PCREPRECOMPILE 3 "24 June 2012" "PCRE 8.30" +.TH PCREPRECOMPILE 3 "12 November 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH "SAVING AND RE-USING PRECOMPILED PCRE PATTERNS" @@ -90,8 +90,8 @@ study data. .rs .sp Re-using a precompiled pattern is straightforward. Having reloaded it into main -memory, called \fBpcre[16|32]_pattern_to_host_byte_order()\fP if necessary, -you pass its pointer to \fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP in +memory, called \fBpcre[16|32]_pattern_to_host_byte_order()\fP if necessary, you +pass its pointer to \fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP in the usual way. .P However, if you passed a pointer to custom character tables when the pattern @@ -110,15 +110,19 @@ in the .\" documentation. .P +\fBWarning:\fP The tables that \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP use +must be the same as those that were used when the pattern was compiled. If this +is not the case, the behaviour is undefined. +.P If you did not provide custom character tables when the pattern was compiled, the pointer in the compiled pattern is NULL, which causes the matching functions to use PCRE's internal tables. Thus, you do not need to take any special action at run time in this case. .P If you saved study data with the compiled pattern, you need to create your own -\fBpcre[16|32]_extra\fP data block and set the \fIstudy_data\fP field to point to the -reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the -\fIflags\fP field to indicate that study data is present. Then pass the +\fBpcre[16|32]_extra\fP data block and set the \fIstudy_data\fP field to point +to the reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in +the \fIflags\fP field to indicate that study data is present. Then pass the \fBpcre[16|32]_extra\fP block to the matching function in the usual way. If the pattern was studied for just-in-time optimization, that data cannot be saved, and so is lost by a save/restore cycle. @@ -146,6 +150,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 24 June 2012 -Copyright (c) 1997-2012 University of Cambridge. +Last updated: 12 November 2013 +Copyright (c) 1997-2013 University of Cambridge. .fi diff --git a/pcre/doc/pcresyntax.3 b/pcre/doc/pcresyntax.3 index 399bbe2535a..87f0cead743 100644 --- a/pcre/doc/pcresyntax.3 +++ b/pcre/doc/pcresyntax.3 @@ -1,4 +1,4 @@ -.TH PCRESYNTAX 3 "26 April 2013" "PCRE 8.33" +.TH PCRESYNTAX 3 "12 November 2013" "PCRE 8.34" .SH NAME PCRE - Perl-compatible regular expressions .SH "PCRE REGULAR EXPRESSION SYNTAX SUMMARY" @@ -29,9 +29,14 @@ documentation. This document contains a quick-reference summary of the syntax. \en newline (hex 0A) \er carriage return (hex 0D) \et tab (hex 09) + \e0dd character with octal code 0dd \eddd character with octal code ddd, or backreference + \eo{ddd..} character with octal code ddd.. \exhh character with hex code hh \ex{hhh..} character with hex code hhh.. +.sp +Note that \e0dd is always an octal code, and that \e8 and \e9 are the literal +characters "8" and "9". . . .SH "CHARACTER TYPES" @@ -56,9 +61,11 @@ documentation. This document contains a quick-reference summary of the syntax. \eW a "non-word" character \eX a Unicode extended grapheme cluster .sp -In PCRE, by default, \ed, \eD, \es, \eS, \ew, and \eW recognize only ASCII -characters, even in a UTF mode. However, this can be changed by setting the -PCRE_UCP option. +By default, \ed, \es, and \ew match only ASCII characters, even in UTF-8 mode +or in the 16- bit and 32-bit libraries. However, if locale-specific matching is +happening, \es and \ew may also match characters with code points in the range +128-255. If the PCRE_UCP option is set, the behaviour of these escape sequences +is changed to use Unicode properties and they match many more characters. . . .SH "GENERAL CATEGORY PROPERTIES FOR \ep and \eP" @@ -115,10 +122,13 @@ PCRE_UCP option. .sp Xan Alphanumeric: union of properties L and N Xps POSIX space: property Z or tab, NL, VT, FF, CR - Xsp Perl space: property Z or tab, NL, FF, CR + Xsp Perl space: property Z or tab, NL, VT, FF, CR Xuc Univerally-named character: one that can be represented by a Universal Character Name Xwd Perl word: property Xan or underscore +.sp +Perl and POSIX space are now the same. Perl added VT to its space character set +at release 5.18 and PCRE changed at release 8.34. . . .SH "SCRIPT NAMES FOR \ep AND \eP" @@ -355,6 +365,9 @@ newline-setting options with similar syntax: (*UTF32) set UTF-32 mode: 32-bit library (PCRE_UTF32) (*UTF) set appropriate UTF mode for the library in use (*UCP) set PCRE_UCP (use Unicode properties for \ed etc) +.sp +Note that LIMIT_MATCH and LIMIT_RECURSION can only reduce the value of the +limits set by the caller of pcre_exec(), not increase them. . . .SH "LOOKAHEAD AND LOOKBEHIND ASSERTIONS" @@ -495,6 +508,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 26 April 2013 +Last updated: 12 November 2013 Copyright (c) 1997-2013 University of Cambridge. .fi diff --git a/pcre/doc/pcretest.1 b/pcre/doc/pcretest.1 index b71c897f2bb..f17c6f24088 100644 --- a/pcre/doc/pcretest.1 +++ b/pcre/doc/pcretest.1 @@ -1,4 +1,4 @@ -.TH PCRETEST 1 "26 April 2013" "PCRE 8.33" +.TH PCRETEST 1 "12 November 2013" "PCRE 8.34" .SH NAME pcretest - a program for testing Perl-compatible regular expressions. .SH SYNOPSIS @@ -155,6 +155,10 @@ Output the size of each compiled pattern after it has been compiled. This is equivalent to adding \fB/M\fP to each regular expression. The size is given in bytes for both libraries. .TP 10 +\fB-O\fP +Behave as if each pattern has the \fB/O\fP modifier, that is disable +auto-possessification for all patterns. +.TP 10 \fB-o\fP \fIosize\fP Set the number of elements in the output vector that is used when calling \fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP to be \fIosize\fP. The @@ -216,17 +220,21 @@ contains (*MARK) items there may also be differences, for the same reason. The should never be studied (see the \fB/S\fP pattern modifier below). .TP 10 \fB-t\fP -Run each compile, study, and match many times with a timer, and output -resulting time per compile or match (in milliseconds). Do not set \fB-m\fP with -\fB-t\fP, because you will then get the size output a zillion times, and the -timing will be distorted. You can control the number of iterations that are -used for timing by following \fB-t\fP with a number (as a separate item on the -command line). For example, "-t 1000" would iterate 1000 times. The default is -to iterate 500000 times. +Run each compile, study, and match many times with a timer, and output the +resulting times per compile, study, or match (in milliseconds). Do not set +\fB-m\fP with \fB-t\fP, because you will then get the size output a zillion +times, and the timing will be distorted. You can control the number of +iterations that are used for timing by following \fB-t\fP with a number (as a +separate item on the command line). For example, "-t 1000" iterates 1000 times. +The default is to iterate 500000 times. .TP 10 \fB-tm\fP This is like \fB-t\fP except that it times only the matching phase, not the compile or study phases. +.TP 10 +\fB-T\fP \fB-TM\fP +These behave like \fB-t\fP and \fB-tm\fP, but in addition, at the end of a run, +the total times for all compiles, studies, and matches are output. . . .SH DESCRIPTION @@ -246,7 +254,7 @@ option states whether or not \fBreadline()\fP will be used. .P The program handles any number of sets of input on a single input file. Each set starts with a regular expression, and continues with any number of data -lines to be matched against the pattern. +lines to be matched against that pattern. .P Each data line is matched separately and independently. If you want to do multi-line matches, you have to use the \en escape sequence (or \er or \er\en, @@ -320,6 +328,7 @@ sections. \fB/M\fP show compiled memory size \fB/m\fP set PCRE_MULTILINE \fB/N\fP set PCRE_NO_AUTO_CAPTURE + \fB/O\fP set PCRE_NO_AUTO_POSSESS \fB/P\fP use the POSIX wrapper \fB/S\fP study the pattern after compilation \fB/s\fP set PCRE_DOTALL @@ -376,6 +385,7 @@ options that do not correspond to anything in Perl: \fB/f\fP PCRE_FIRSTLINE \fB/J\fP PCRE_DUPNAMES \fB/N\fP PCRE_NO_AUTO_CAPTURE + \fB/O\fP PCRE_NO_AUTO_POSSESS \fB/U\fP PCRE_UNGREEDY \fB/W\fP PCRE_UCP \fB/X\fP PCRE_EXTRA @@ -508,8 +518,8 @@ expression has been compiled, and the results used when the expression is matched. There are a number of qualifying characters that may follow \fB/S\fP. They may appear in any order. .P -If \fBS\fP is followed by an exclamation mark, \fBpcre[16|32]_study()\fP is called -with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a +If \fB/S\fP is followed by an exclamation mark, \fBpcre[16|32]_study()\fP is +called with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a \fBpcre_extra\fP block, even when studying discovers no useful information. .P If \fB/S\fP is followed by a second S character, it suppresses studying, even @@ -585,6 +595,37 @@ The \fB/+\fP modifier works as described above. All other modifiers are ignored. . . +.SS "Locking out certain modifiers" +.rs +.sp +PCRE can be compiled with or without support for certain features such as +UTF-8/16/32 or Unicode properties. Accordingly, the standard tests are split up +into a number of different files that are selected for running depending on +which features are available. When updating the tests, it is all too easy to +put a new test into the wrong file by mistake; for example, to put a test that +requires UTF support into a file that is used when it is not available. To help +detect such mistakes as early as possible, there is a facility for locking out +specific modifiers. If an input line for \fBpcretest\fP starts with the string +"< forbid " the following sequence of characters is taken as a list of +forbidden modifiers. For example, in the test files that must not use UTF or +Unicode property support, this line appears: +.sp + < forbid 8W +.sp +This locks out the /8 and /W modifiers. An immediate error is given if they are +subsequently encountered. If the character string contains < but not >, all the +multi-character modifiers that begin with < are locked out. Otherwise, such +modifiers must be explicitly listed, for example: +.sp + < forbid <JS><cr> +.sp +There must be a single space between < and "forbid" for this feature to be +recognised. If there is not, the line is interpreted either as a request to +re-load a pre-compiled pattern (see "SAVING AND RELOADING COMPILED PATTERNS" +below) or, if there is a another < character, as a pattern that uses < as its +delimiter. +. +. .SH "DATA LINES" .rs .sp @@ -608,6 +649,7 @@ recognized: \ev vertical tab (\ex0b) \ennn octal character (up to 3 octal digits); always a byte unless > 255 in UTF-8 or 16-bit or 32-bit mode + \eo{dd...} octal character (any number of octal digits} \exhh hexadecimal byte (up to 2 hex digits) \ex{hh...} hexadecimal character (any number of hex digits) .\" JOIN @@ -1031,10 +1073,9 @@ exact copy of the compiled pattern. If there is additional study data, this writing the file, \fBpcretest\fP expects to read a new pattern. .P A saved pattern can be reloaded into \fBpcretest\fP by specifying < and a file -name instead of a pattern. The name of the file must not contain a < character, -as otherwise \fBpcretest\fP will interpret the line as a pattern delimited by < -characters. -For example: +name instead of a pattern. There must be no space between < and the file name, +which must not contain a < character, as otherwise \fBpcretest\fP will +interpret the line as a pattern delimited by < characters. For example: .sp re> </some/file Compiled pattern loaded from /some/file @@ -1094,6 +1135,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 26 April 2013 +Last updated: 12 November 2013 Copyright (c) 1997-2013 University of Cambridge. .fi diff --git a/pcre/doc/pcretest.txt b/pcre/doc/pcretest.txt index 2644e27a147..f0609939f5c 100644 --- a/pcre/doc/pcretest.txt +++ b/pcre/doc/pcretest.txt @@ -138,32 +138,35 @@ COMMAND LINE OPTIONS compiled. This is equivalent to adding /M to each regular expression. The size is given in bytes for both libraries. - -o osize Set the number of elements in the output vector that is used - when calling pcre[16|32]_exec() or pcre[16|32]_dfa_exec() to - be osize. The default value is 45, which is enough for 14 + -O Behave as if each pattern has the /O modifier, that is dis- + able auto-possessification for all patterns. + + -o osize Set the number of elements in the output vector that is used + when calling pcre[16|32]_exec() or pcre[16|32]_dfa_exec() to + be osize. The default value is 45, which is enough for 14 capturing subexpressions for pcre[16|32]_exec() or 22 differ- - ent matches for pcre[16|32]_dfa_exec(). The vector size can - be changed for individual matching calls by including \O in + ent matches for pcre[16|32]_dfa_exec(). The vector size can + be changed for individual matching calls by including \O in the data line (see below). - -p Behave as if each pattern has the /P modifier; the POSIX - wrapper API is used to call PCRE. None of the other options - has any effect when -p is set. This option can be used only + -p Behave as if each pattern has the /P modifier; the POSIX + wrapper API is used to call PCRE. None of the other options + has any effect when -p is set. This option can be used only with the 8-bit library. - -q Do not output the version number of pcretest at the start of + -q Do not output the version number of pcretest at the start of execution. - -S size On Unix-like systems, set the size of the run-time stack to + -S size On Unix-like systems, set the size of the run-time stack to size megabytes. - -s or -s+ Behave as if each pattern has the /S modifier; in other - words, force each pattern to be studied. If -s+ is used, all - the JIT compile options are passed to pcre[16|32]_study(), - causing just-in-time optimization to be set up if it is - available, for both full and partial matching. Specific JIT + -s or -s+ Behave as if each pattern has the /S modifier; in other + words, force each pattern to be studied. If -s+ is used, all + the JIT compile options are passed to pcre[16|32]_study(), + causing just-in-time optimization to be set up if it is + available, for both full and partial matching. Specific JIT compile options can be selected by following -s+ with a digit - in the range 1 to 7, which selects the JIT compile modes as + in the range 1 to 7, which selects the JIT compile modes as follows: 1 normal match only @@ -173,115 +176,119 @@ COMMAND LINE OPTIONS 6 soft and hard partial match 7 all three modes (default) - If -s++ is used instead of -s+ (with or without a following - digit), the text "(JIT)" is added to the first output line + If -s++ is used instead of -s+ (with or without a following + digit), the text "(JIT)" is added to the first output line after a match or no match when JIT-compiled code was actually used. - Note that there are pattern options that can override -s, + Note that there are pattern options that can override -s, either specifying no studying at all, or suppressing JIT com- pilation. - If the /I or /D option is present on a pattern (requesting - output about the compiled pattern), information about the - result of studying is not included when studying is caused - only by -s and neither -i nor -d is present on the command - line. This behaviour means that the output from tests that - are run with and without -s should be identical, except when + If the /I or /D option is present on a pattern (requesting + output about the compiled pattern), information about the + result of studying is not included when studying is caused + only by -s and neither -i nor -d is present on the command + line. This behaviour means that the output from tests that + are run with and without -s should be identical, except when options that output information about the actual running of a match are set. - The -M, -t, and -tm options, which give information about - resources used, are likely to produce different output with - and without -s. Output may also differ if the /C option is + The -M, -t, and -tm options, which give information about + resources used, are likely to produce different output with + and without -s. Output may also differ if the /C option is present on an individual pattern. This uses callouts to trace - the the matching process, and this may be different between - studied and non-studied patterns. If the pattern contains - (*MARK) items there may also be differences, for the same + the the matching process, and this may be different between + studied and non-studied patterns. If the pattern contains + (*MARK) items there may also be differences, for the same reason. The -s command line option can be overridden for spe- - cific patterns that should never be studied (see the /S pat- + cific patterns that should never be studied (see the /S pat- tern modifier below). - -t Run each compile, study, and match many times with a timer, - and output resulting time per compile or match (in millisec- - onds). Do not set -m with -t, because you will then get the - size output a zillion times, and the timing will be dis- - torted. You can control the number of iterations that are - used for timing by following -t with a number (as a separate - item on the command line). For example, "-t 1000" would iter- - ate 1000 times. The default is to iterate 500000 times. + -t Run each compile, study, and match many times with a timer, + and output the resulting times per compile, study, or match + (in milliseconds). Do not set -m with -t, because you will + then get the size output a zillion times, and the timing will + be distorted. You can control the number of iterations that + are used for timing by following -t with a number (as a sepa- + rate item on the command line). For example, "-t 1000" iter- + ates 1000 times. The default is to iterate 500000 times. -tm This is like -t except that it times only the matching phase, not the compile or study phases. + -T -TM These behave like -t and -tm, but in addition, at the end of + a run, the total times for all compiles, studies, and matches + are output. + DESCRIPTION - If pcretest is given two filename arguments, it reads from the first + If pcretest is given two filename arguments, it reads from the first and writes to the second. If it is given only one filename argument, it - reads from that file and writes to stdout. Otherwise, it reads from - stdin and writes to stdout, and prompts for each line of input, using + reads from that file and writes to stdout. Otherwise, it reads from + stdin and writes to stdout, and prompts for each line of input, using "re>" to prompt for regular expressions, and "data>" to prompt for data lines. - When pcretest is built, a configuration option can specify that it - should be linked with the libreadline library. When this is done, if + When pcretest is built, a configuration option can specify that it + should be linked with the libreadline library. When this is done, if the input is from a terminal, it is read using the readline() function. - This provides line-editing and history facilities. The output from the + This provides line-editing and history facilities. The output from the -help option states whether or not readline() will be used. The program handles any number of sets of input on a single input file. - Each set starts with a regular expression, and continues with any num- - ber of data lines to be matched against the pattern. + Each set starts with a regular expression, and continues with any num- + ber of data lines to be matched against that pattern. - Each data line is matched separately and independently. If you want to + Each data line is matched separately and independently. If you want to do multi-line matches, you have to use the \n escape sequence (or \r or \r\n, etc., depending on the newline setting) in a single line of input - to encode the newline sequences. There is no limit on the length of - data lines; the input buffer is automatically extended if it is too + to encode the newline sequences. There is no limit on the length of + data lines; the input buffer is automatically extended if it is too small. - An empty line signals the end of the data lines, at which point a new - regular expression is read. The regular expressions are given enclosed + An empty line signals the end of the data lines, at which point a new + regular expression is read. The regular expressions are given enclosed in any non-alphanumeric delimiters other than backslash, for example: /(a|bc)x+yz/ - White space before the initial delimiter is ignored. A regular expres- - sion may be continued over several input lines, in which case the new- - line characters are included within it. It is possible to include the + White space before the initial delimiter is ignored. A regular expres- + sion may be continued over several input lines, in which case the new- + line characters are included within it. It is possible to include the delimiter within the pattern by escaping it, for example /abc\/def/ - If you do so, the escape and the delimiter form part of the pattern, - but since delimiters are always non-alphanumeric, this does not affect - its interpretation. If the terminating delimiter is immediately fol- + If you do so, the escape and the delimiter form part of the pattern, + but since delimiters are always non-alphanumeric, this does not affect + its interpretation. If the terminating delimiter is immediately fol- lowed by a backslash, for example, /abc/\ - then a backslash is added to the end of the pattern. This is done to - provide a way of testing the error condition that arises if a pattern + then a backslash is added to the end of the pattern. This is done to + provide a way of testing the error condition that arises if a pattern finishes with a backslash, because /abc\/ - is interpreted as the first line of a pattern that starts with "abc/", + is interpreted as the first line of a pattern that starts with "abc/", causing pcretest to read the next line as a continuation of the regular expression. PATTERN MODIFIERS - A pattern may be followed by any number of modifiers, which are mostly - single characters, though some of these can be qualified by further - characters. Following Perl usage, these are referred to below as, for - example, "the /i modifier", even though the delimiter of the pattern - need not always be a slash, and no slash is used when writing modi- - fiers. White space may appear between the final pattern delimiter and - the first modifier, and between the modifiers themselves. For refer- - ence, here is a complete list of modifiers. They fall into several + A pattern may be followed by any number of modifiers, which are mostly + single characters, though some of these can be qualified by further + characters. Following Perl usage, these are referred to below as, for + example, "the /i modifier", even though the delimiter of the pattern + need not always be a slash, and no slash is used when writing modi- + fiers. White space may appear between the final pattern delimiter and + the first modifier, and between the modifiers themselves. For refer- + ence, here is a complete list of modifiers. They fall into several groups that are described in detail in the following sections. /8 set UTF mode @@ -307,6 +314,7 @@ PATTERN MODIFIERS /M show compiled memory size /m set PCRE_MULTILINE /N set PCRE_NO_AUTO_CAPTURE + /O set PCRE_NO_AUTO_POSSESS /P use the POSIX wrapper /S study the pattern after compilation /s set PCRE_DOTALL @@ -331,8 +339,8 @@ PATTERN MODIFIERS Perl-compatible modifiers The /i, /m, /s, and /x modifiers set the PCRE_CASELESS, PCRE_MULTILINE, - PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when - pcre[16|32]_compile() is called. These four modifier letters have the + PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when + pcre[16|32]_compile() is called. These four modifier letters have the same effect as they do in Perl. For example: /caseless/i @@ -340,7 +348,7 @@ PATTERN MODIFIERS Modifiers for other PCRE options - The following table shows additional modifiers for setting PCRE com- + The following table shows additional modifiers for setting PCRE com- pile-time options that do not correspond to anything in Perl: /8 PCRE_UTF8 ) when using the 8-bit @@ -359,6 +367,7 @@ PATTERN MODIFIERS /f PCRE_FIRSTLINE /J PCRE_DUPNAMES /N PCRE_NO_AUTO_CAPTURE + /O PCRE_NO_AUTO_POSSESS /U PCRE_UNGREEDY /W PCRE_UCP /X PCRE_EXTRA @@ -372,138 +381,138 @@ PATTERN MODIFIERS /<bsr_unicode> PCRE_BSR_UNICODE /<JS> PCRE_JAVASCRIPT_COMPAT - The modifiers that are enclosed in angle brackets are literal strings - as shown, including the angle brackets, but the letters within can be - in either case. This example sets multiline matching with CRLF as the + The modifiers that are enclosed in angle brackets are literal strings + as shown, including the angle brackets, but the letters within can be + in either case. This example sets multiline matching with CRLF as the line ending sequence: /^abc/m<CRLF> - As well as turning on the PCRE_UTF8/16/32 option, the /8 modifier - causes all non-printing characters in output strings to be printed + As well as turning on the PCRE_UTF8/16/32 option, the /8 modifier + causes all non-printing characters in output strings to be printed using the \x{hh...} notation. Otherwise, those less than 0x100 are out- put in hex without the curly brackets. - Full details of the PCRE options are given in the pcreapi documenta- + Full details of the PCRE options are given in the pcreapi documenta- tion. Finding all matches in a string - Searching for all possible matches within each subject string can be - requested by the /g or /G modifier. After finding a match, PCRE is + Searching for all possible matches within each subject string can be + requested by the /g or /G modifier. After finding a match, PCRE is called again to search the remainder of the subject string. The differ- ence between /g and /G is that the former uses the startoffset argument - to pcre[16|32]_exec() to start searching at a new point within the - entire string (which is in effect what Perl does), whereas the latter - passes over a shortened substring. This makes a difference to the - matching process if the pattern begins with a lookbehind assertion + to pcre[16|32]_exec() to start searching at a new point within the + entire string (which is in effect what Perl does), whereas the latter + passes over a shortened substring. This makes a difference to the + matching process if the pattern begins with a lookbehind assertion (including \b or \B). - If any call to pcre[16|32]_exec() in a /g or /G sequence matches an - empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and - PCRE_ANCHORED flags set in order to search for another, non-empty, - match at the same point. If this second match fails, the start offset - is advanced, and the normal match is retried. This imitates the way + If any call to pcre[16|32]_exec() in a /g or /G sequence matches an + empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and + PCRE_ANCHORED flags set in order to search for another, non-empty, + match at the same point. If this second match fails, the start offset + is advanced, and the normal match is retried. This imitates the way Perl handles such cases when using the /g modifier or the split() func- - tion. Normally, the start offset is advanced by one character, but if - the newline convention recognizes CRLF as a newline, and the current + tion. Normally, the start offset is advanced by one character, but if + the newline convention recognizes CRLF as a newline, and the current character is CR followed by LF, an advance of two is used. Other modifiers There are yet more modifiers for controlling the way pcretest operates. - The /+ modifier requests that as well as outputting the substring that - matched the entire pattern, pcretest should in addition output the - remainder of the subject string. This is useful for tests where the - subject contains multiple copies of the same substring. If the + modi- - fier appears twice, the same action is taken for captured substrings. - In each case the remainder is output on the following line with a plus - character following the capture number. Note that this modifier must - not immediately follow the /S modifier because /S+ and /S++ have other + The /+ modifier requests that as well as outputting the substring that + matched the entire pattern, pcretest should in addition output the + remainder of the subject string. This is useful for tests where the + subject contains multiple copies of the same substring. If the + modi- + fier appears twice, the same action is taken for captured substrings. + In each case the remainder is output on the following line with a plus + character following the capture number. Note that this modifier must + not immediately follow the /S modifier because /S+ and /S++ have other meanings. - The /= modifier requests that the values of all potential captured - parentheses be output after a match. By default, only those up to the + The /= modifier requests that the values of all potential captured + parentheses be output after a match. By default, only those up to the highest one actually used in the match are output (corresponding to the return code from pcre[16|32]_exec()). Values in the offsets vector cor- - responding to higher numbers should be set to -1, and these are output - as "<unset>". This modifier gives a way of checking that this is hap- + responding to higher numbers should be set to -1, and these are output + as "<unset>". This modifier gives a way of checking that this is hap- pening. - The /B modifier is a debugging feature. It requests that pcretest out- - put a representation of the compiled code after compilation. Normally - this information contains length and offset values; however, if /Z is - also present, this data is replaced by spaces. This is a special fea- - ture for use in the automatic test scripts; it ensures that the same + The /B modifier is a debugging feature. It requests that pcretest out- + put a representation of the compiled code after compilation. Normally + this information contains length and offset values; however, if /Z is + also present, this data is replaced by spaces. This is a special fea- + ture for use in the automatic test scripts; it ensures that the same output is generated for different internal link sizes. - The /D modifier is a PCRE debugging feature, and is equivalent to /BI, + The /D modifier is a PCRE debugging feature, and is equivalent to /BI, that is, both the /B and the /I modifiers. - The /F modifier causes pcretest to flip the byte order of the 2-byte + The /F modifier causes pcretest to flip the byte order of the 2-byte and 4-byte fields in the compiled pattern. This facility is for testing - the feature in PCRE that allows it to execute patterns that were com- + the feature in PCRE that allows it to execute patterns that were com- piled on a host with a different endianness. This feature is not avail- - able when the POSIX interface to PCRE is being used, that is, when the + able when the POSIX interface to PCRE is being used, that is, when the /P pattern modifier is specified. See also the section about saving and reloading compiled patterns below. - The /I modifier requests that pcretest output information about the - compiled pattern (whether it is anchored, has a fixed first character, - and so on). It does this by calling pcre[16|32]_fullinfo() after com- - piling a pattern. If the pattern is studied, the results of that are + The /I modifier requests that pcretest output information about the + compiled pattern (whether it is anchored, has a fixed first character, + and so on). It does this by calling pcre[16|32]_fullinfo() after com- + piling a pattern. If the pattern is studied, the results of that are also output. - The /K modifier requests pcretest to show names from backtracking con- - trol verbs that are returned from calls to pcre[16|32]_exec(). It - causes pcretest to create a pcre[16|32]_extra block if one has not - already been created by a call to pcre[16|32]_study(), and to set the - PCRE_EXTRA_MARK flag and the mark field within it, every time that - pcre[16|32]_exec() is called. If the variable that the mark field - points to is non-NULL for a match, non-match, or partial match, - pcretest prints the string to which it points. For a match, this is - shown on a line by itself, tagged with "MK:". For a non-match it is + The /K modifier requests pcretest to show names from backtracking con- + trol verbs that are returned from calls to pcre[16|32]_exec(). It + causes pcretest to create a pcre[16|32]_extra block if one has not + already been created by a call to pcre[16|32]_study(), and to set the + PCRE_EXTRA_MARK flag and the mark field within it, every time that + pcre[16|32]_exec() is called. If the variable that the mark field + points to is non-NULL for a match, non-match, or partial match, + pcretest prints the string to which it points. For a match, this is + shown on a line by itself, tagged with "MK:". For a non-match it is added to the message. - The /L modifier must be followed directly by the name of a locale, for + The /L modifier must be followed directly by the name of a locale, for example, /pattern/Lfr_FR For this reason, it must be the last modifier. The given locale is set, - pcre[16|32]_maketables() is called to build a set of character tables - for the locale, and this is then passed to pcre[16|32]_compile() when - compiling the regular expression. Without an /L (or /T) modifier, NULL - is passed as the tables pointer; that is, /L applies only to the + pcre[16|32]_maketables() is called to build a set of character tables + for the locale, and this is then passed to pcre[16|32]_compile() when + compiling the regular expression. Without an /L (or /T) modifier, NULL + is passed as the tables pointer; that is, /L applies only to the expression on which it appears. - The /M modifier causes the size in bytes of the memory block used to - hold the compiled pattern to be output. This does not include the size - of the pcre[16|32] block; it is just the actual compiled data. If the + The /M modifier causes the size in bytes of the memory block used to + hold the compiled pattern to be output. This does not include the size + of the pcre[16|32] block; it is just the actual compiled data. If the pattern is successfully studied with the PCRE_STUDY_JIT_COMPILE option, the size of the JIT compiled code is also output. - The /S modifier causes pcre[16|32]_study() to be called after the - expression has been compiled, and the results used when the expression + The /S modifier causes pcre[16|32]_study() to be called after the + expression has been compiled, and the results used when the expression is matched. There are a number of qualifying characters that may follow /S. They may appear in any order. - If S is followed by an exclamation mark, pcre[16|32]_study() is called - with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a + If /S is followed by an exclamation mark, pcre[16|32]_study() is called + with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a pcre_extra block, even when studying discovers no useful information. If /S is followed by a second S character, it suppresses studying, even - if it was requested externally by the -s command line option. This - makes it possible to specify that certain patterns are always studied, + if it was requested externally by the -s command line option. This + makes it possible to specify that certain patterns are always studied, and others are never studied, independently of -s. This feature is used in the test files in a few cases where the output is different when the pattern is studied. - If the /S modifier is followed by a + character, the call to - pcre[16|32]_study() is made with all the JIT study options, requesting - just-in-time optimization support if it is available, for both normal - and partial matching. If you want to restrict the JIT compiling modes, + If the /S modifier is followed by a + character, the call to + pcre[16|32]_study() is made with all the JIT study options, requesting + just-in-time optimization support if it is available, for both normal + and partial matching. If you want to restrict the JIT compiling modes, you can follow /S+ with a digit in the range 1 to 7: 1 normal match only @@ -514,40 +523,40 @@ PATTERN MODIFIERS 7 all three modes (default) If /S++ is used instead of /S+ (with or without a following digit), the - text "(JIT)" is added to the first output line after a match or no + text "(JIT)" is added to the first output line after a match or no match when JIT-compiled code was actually used. - Note that there is also an independent /+ modifier; it must not be + Note that there is also an independent /+ modifier; it must not be given immediately after /S or /S+ because this will be misinterpreted. If JIT studying is successful, the compiled JIT code will automatically - be used when pcre[16|32]_exec() is run, except when incompatible run- - time options are specified. For more details, see the pcrejit documen- - tation. See also the \J escape sequence below for a way of setting the + be used when pcre[16|32]_exec() is run, except when incompatible run- + time options are specified. For more details, see the pcrejit documen- + tation. See also the \J escape sequence below for a way of setting the size of the JIT stack. - Finally, if /S is followed by a minus character, JIT compilation is - suppressed, even if it was requested externally by the -s command line - option. This makes it possible to specify that JIT is never to be used + Finally, if /S is followed by a minus character, JIT compilation is + suppressed, even if it was requested externally by the -s command line + option. This makes it possible to specify that JIT is never to be used for certain patterns. - The /T modifier must be followed by a single digit. It causes a spe- + The /T modifier must be followed by a single digit. It causes a spe- cific set of built-in character tables to be passed to pcre[16|32]_com- - pile(). It is used in the standard PCRE tests to check behaviour with + pile(). It is used in the standard PCRE tests to check behaviour with different character tables. The digit specifies the tables as follows: 0 the default ASCII tables, as distributed in pcre_chartables.c.dist 1 a set of tables defining ISO 8859 characters - In table 1, some characters whose codes are greater than 128 are iden- + In table 1, some characters whose codes are greater than 128 are iden- tified as letters, digits, spaces, etc. Using the POSIX wrapper API - The /P modifier causes pcretest to call PCRE via the POSIX wrapper API - rather than its native API. This supports only the 8-bit library. When - /P is set, the following modifiers set options for the regcomp() func- + The /P modifier causes pcretest to call PCRE via the POSIX wrapper API + rather than its native API. This supports only the 8-bit library. When + /P is set, the following modifiers set options for the regcomp() func- tion: /i REG_ICASE @@ -558,9 +567,40 @@ PATTERN MODIFIERS /W REG_UCP ) the POSIX standard /8 REG_UTF8 ) - The /+ modifier works as described above. All other modifiers are + The /+ modifier works as described above. All other modifiers are ignored. + Locking out certain modifiers + + PCRE can be compiled with or without support for certain features such + as UTF-8/16/32 or Unicode properties. Accordingly, the standard tests + are split up into a number of different files that are selected for + running depending on which features are available. When updating the + tests, it is all too easy to put a new test into the wrong file by mis- + take; for example, to put a test that requires UTF support into a file + that is used when it is not available. To help detect such mistakes as + early as possible, there is a facility for locking out specific modi- + fiers. If an input line for pcretest starts with the string "< forbid " + the following sequence of characters is taken as a list of forbidden + modifiers. For example, in the test files that must not use UTF or Uni- + code property support, this line appears: + + < forbid 8W + + This locks out the /8 and /W modifiers. An immediate error is given if + they are subsequently encountered. If the character string contains < + but not >, all the multi-character modifiers that begin with < are + locked out. Otherwise, such modifiers must be explicitly listed, for + example: + + < forbid <JS><cr> + + There must be a single space between < and "forbid" for this feature to + be recognised. If there is not, the line is interpreted either as a + request to re-load a pre-compiled pattern (see "SAVING AND RELOADING + COMPILED PATTERNS" below) or, if there is a another < character, as a + pattern that uses < as its delimiter. + DATA LINES @@ -583,6 +623,7 @@ DATA LINES \v vertical tab (\x0b) \nnn octal character (up to 3 octal digits); always a byte unless > 255 in UTF-8 or 16-bit or 32-bit mode + \o{dd...} octal character (any number of octal digits} \xhh hexadecimal byte (up to 2 hex digits) \x{hh...} hexadecimal character (any number of hex digits) \A pass the PCRE_ANCHORED option to pcre[16|32]_exec() @@ -974,50 +1015,51 @@ SAVING AND RELOADING COMPILED PATTERNS writing the file, pcretest expects to read a new pattern. A saved pattern can be reloaded into pcretest by specifying < and a - file name instead of a pattern. The name of the file must not contain a - < character, as otherwise pcretest will interpret the line as a pattern - delimited by < characters. For example: + file name instead of a pattern. There must be no space between < and + the file name, which must not contain a < character, as otherwise + pcretest will interpret the line as a pattern delimited by < charac- + ters. For example: re> </some/file Compiled pattern loaded from /some/file No study data - If the pattern was previously studied with the JIT optimization, the - JIT information cannot be saved and restored, and so is lost. When the - pattern has been loaded, pcretest proceeds to read data lines in the + If the pattern was previously studied with the JIT optimization, the + JIT information cannot be saved and restored, and so is lost. When the + pattern has been loaded, pcretest proceeds to read data lines in the usual way. - You can copy a file written by pcretest to a different host and reload - it there, even if the new host has opposite endianness to the one on - which the pattern was compiled. For example, you can compile on an i86 - machine and run on a SPARC machine. When a pattern is reloaded on a + You can copy a file written by pcretest to a different host and reload + it there, even if the new host has opposite endianness to the one on + which the pattern was compiled. For example, you can compile on an i86 + machine and run on a SPARC machine. When a pattern is reloaded on a host with different endianness, the confirmation message is changed to: Compiled pattern (byte-inverted) loaded from /some/file The test suite contains some saved pre-compiled patterns with different - endianness. These are reloaded using "<!" instead of just "<". This + endianness. These are reloaded using "<!" instead of just "<". This suppresses the "(byte-inverted)" text so that the output is the same on - all hosts. It also forces debugging output once the pattern has been + all hosts. It also forces debugging output once the pattern has been reloaded. - File names for saving and reloading can be absolute or relative, but - note that the shell facility of expanding a file name that starts with + File names for saving and reloading can be absolute or relative, but + note that the shell facility of expanding a file name that starts with a tilde (~) is not available. - The ability to save and reload files in pcretest is intended for test- - ing and experimentation. It is not intended for production use because - only a single pattern can be written to a file. Furthermore, there is - no facility for supplying custom character tables for use with a - reloaded pattern. If the original pattern was compiled with custom - tables, an attempt to match a subject string using a reloaded pattern - is likely to cause pcretest to crash. Finally, if you attempt to load + The ability to save and reload files in pcretest is intended for test- + ing and experimentation. It is not intended for production use because + only a single pattern can be written to a file. Furthermore, there is + no facility for supplying custom character tables for use with a + reloaded pattern. If the original pattern was compiled with custom + tables, an attempt to match a subject string using a reloaded pattern + is likely to cause pcretest to crash. Finally, if you attempt to load a file that is not in the correct format, the result is undefined. SEE ALSO - pcre(3), pcre16(3), pcre32(3), pcreapi(3), pcrecallout(3), pcrejit, + pcre(3), pcre16(3), pcre32(3), pcreapi(3), pcrecallout(3), pcrejit, pcrematching(3), pcrepartial(d), pcrepattern(3), pcreprecompile(3). @@ -1030,5 +1072,5 @@ AUTHOR REVISION - Last updated: 26 April 2013 + Last updated: 12 November 2013 Copyright (c) 1997-2013 University of Cambridge. diff --git a/pcre/maria-patches/pcre_stack_guard.diff b/pcre/maria-patches/pcre_stack_guard.diff new file mode 100644 index 00000000000..8cf4b7dbb34 --- /dev/null +++ b/pcre/maria-patches/pcre_stack_guard.diff @@ -0,0 +1,57 @@ +=== modified file 'pcre/pcre.h.in' +--- pcre/pcre.h.in 2013-09-26 14:02:17 +0000 ++++ pcre/pcre.h.in 2013-10-02 07:58:29 +0000 +@@ -486,6 +486,7 @@ PCRE_EXP_DECL void (*pcre_free)(void *) + PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t); + PCRE_EXP_DECL void (*pcre_stack_free)(void *); + PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *); ++PCRE_EXP_DECL int (*pcre_stack_guard)(void); + + PCRE_EXP_DECL void *(*pcre16_malloc)(size_t); + PCRE_EXP_DECL void (*pcre16_free)(void *); +@@ -504,6 +505,7 @@ PCRE_EXP_DECL void pcre_free(void *); + PCRE_EXP_DECL void *pcre_stack_malloc(size_t); + PCRE_EXP_DECL void pcre_stack_free(void *); + PCRE_EXP_DECL int pcre_callout(pcre_callout_block *); ++PCRE_EXP_DECL int pcre_stack_guard(void); + + PCRE_EXP_DECL void *pcre16_malloc(size_t); + PCRE_EXP_DECL void pcre16_free(void *); + +=== modified file 'pcre/pcre_compile.c' +--- pcre/pcre_compile.c 2013-09-26 14:02:17 +0000 ++++ pcre/pcre_compile.c 2013-10-02 07:58:29 +0000 +@@ -7107,6 +7107,12 @@ unsigned int orig_bracount; + unsigned int max_bracount; + branch_chain bc; + ++if (pcre_stack_guard && pcre_stack_guard()) ++{ ++ *errorcodeptr= ERR23; ++ return FALSE; ++} ++ + bc.outer = bcptr; + bc.current_branch = code; + + +=== modified file 'pcre/pcre_globals.c' +--- pcre/pcre_globals.c 2013-09-26 14:02:17 +0000 ++++ pcre/pcre_globals.c 2013-10-02 07:58:29 +0000 +@@ -72,6 +72,7 @@ PCRE_EXP_DATA_DEFN void (*PUBL(free))(v + PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = LocalPcreMalloc; + PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = LocalPcreFree; + PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL; ++PCRE_EXP_DATA_DEFN int (*PUBL(stack_guard))(void) = NULL; + + #elif !defined VPCOMPAT + PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = malloc; +@@ -79,6 +80,7 @@ PCRE_EXP_DATA_DEFN void (*PUBL(free))(v + PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = malloc; + PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = free; + PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL; ++PCRE_EXP_DATA_DEFN int (*PUBL(stack_guard))(void) = NULL; + #endif + + /* End of pcre_globals.c */ + diff --git a/pcre/pcre.h.in b/pcre/pcre.h.in index 9de72356285..45cd875dd56 100644 --- a/pcre/pcre.h.in +++ b/pcre/pcre.h.in @@ -150,7 +150,10 @@ with J. */ #define PCRE_NEVER_UTF 0x00010000 /* C1 ) Overlaid */ #define PCRE_DFA_SHORTEST 0x00010000 /* D ) Overlaid */ -#define PCRE_DFA_RESTART 0x00020000 /* D */ +/* This pair use the same bit. */ +#define PCRE_NO_AUTO_POSSESS 0x00020000 /* C1 ) Overlaid */ +#define PCRE_DFA_RESTART 0x00020000 /* D ) Overlaid */ + #define PCRE_FIRSTLINE 0x00040000 /* C3 */ #define PCRE_DUPNAMES 0x00080000 /* C1 */ #define PCRE_NEWLINE_CR 0x00100000 /* C3 E D */ @@ -277,6 +280,7 @@ with J. */ #define PCRE_INFO_REQUIREDCHARFLAGS 22 #define PCRE_INFO_MATCHLIMIT 23 #define PCRE_INFO_RECURSIONLIMIT 24 +#define PCRE_INFO_MATCH_EMPTY 25 /* Request types for pcre_config(). Do not re-arrange, in order to remain compatible. */ @@ -294,6 +298,7 @@ compatible. */ #define PCRE_CONFIG_UTF16 10 #define PCRE_CONFIG_JITTARGET 11 #define PCRE_CONFIG_UTF32 12 +#define PCRE_CONFIG_PARENS_LIMIT 13 /* Request types for pcre_study(). Do not re-arrange, in order to remain compatible. */ @@ -657,6 +662,9 @@ PCRE_EXP_DECL void pcre16_assign_jit_stack(pcre16_extra *, pcre16_jit_callback, void *); PCRE_EXP_DECL void pcre32_assign_jit_stack(pcre32_extra *, pcre32_jit_callback, void *); +PCRE_EXP_DECL void pcre_jit_free_unused_memory(void); +PCRE_EXP_DECL void pcre16_jit_free_unused_memory(void); +PCRE_EXP_DECL void pcre32_jit_free_unused_memory(void); #ifdef __cplusplus } /* extern "C" */ diff --git a/pcre/pcre_chartables.c b/pcre/pcre_chartables.c index 2a39e9ff33a..1e20ec29d05 100644 --- a/pcre/pcre_chartables.c +++ b/pcre/pcre_chartables.c @@ -163,7 +163,7 @@ graph, print, punct, and cntrl. Other classes are built from combinations. */ */ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */ - 0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */ + 0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /* 8- 15 */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */ 0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */ diff --git a/pcre/pcre_chartables.c.dist b/pcre/pcre_chartables.c.dist index 2a39e9ff33a..1e20ec29d05 100644 --- a/pcre/pcre_chartables.c.dist +++ b/pcre/pcre_chartables.c.dist @@ -163,7 +163,7 @@ graph, print, punct, and cntrl. Other classes are built from combinations. */ */ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */ - 0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */ + 0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /* 8- 15 */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */ 0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */ diff --git a/pcre/pcre_compile.c b/pcre/pcre_compile.c index a307372fbfe..cdc7f95304a 100644 --- a/pcre/pcre_compile.c +++ b/pcre/pcre_compile.c @@ -115,6 +115,13 @@ kicks in at the same number of forward references in all cases. */ #define COMPILE_WORK_SIZE (2048*LINK_SIZE) #define COMPILE_WORK_SIZE_MAX (100*COMPILE_WORK_SIZE) +/* This value determines the size of the initial vector that is used for +remembering named groups during the pre-compile. It is allocated on the stack, +but if it is too small, it is expanded using malloc(), in a similar way to the +workspace. The value is the number of slots in the list. */ + +#define NAMED_GROUP_LIST_SIZE 20 + /* The overrun tests check for a slightly smaller size so that they detect the overrun before it actually does run off the end of the data block. */ @@ -253,24 +260,25 @@ static const verbitem verbs[] = { static const int verbcount = sizeof(verbs)/sizeof(verbitem); -/* Substitutes for [[:<:]] and [[:>:]], which mean start and end of word in +/* Substitutes for [[:<:]] and [[:>:]], which mean start and end of word in another regex library. */ static const pcre_uchar sub_start_of_word[] = { CHAR_BACKSLASH, CHAR_b, CHAR_LEFT_PARENTHESIS, CHAR_QUESTION_MARK, - CHAR_EQUALS_SIGN, CHAR_BACKSLASH, CHAR_w, CHAR_RIGHT_PARENTHESIS, '\0' }; + CHAR_EQUALS_SIGN, CHAR_BACKSLASH, CHAR_w, CHAR_RIGHT_PARENTHESIS, '\0' }; static const pcre_uchar sub_end_of_word[] = { CHAR_BACKSLASH, CHAR_b, CHAR_LEFT_PARENTHESIS, CHAR_QUESTION_MARK, CHAR_LESS_THAN_SIGN, CHAR_EQUALS_SIGN, CHAR_BACKSLASH, CHAR_w, - CHAR_RIGHT_PARENTHESIS, '\0' }; + CHAR_RIGHT_PARENTHESIS, '\0' }; /* Tables of names of POSIX character classes and their lengths. The names are now all in a single string, to reduce the number of relocations when a shared library is dynamically loaded. The list of lengths is terminated by a zero length entry. The first three must be alpha, lower, upper, as this is assumed -for handling case independence. */ +for handling case independence. The indices for graph, print, and punct are +needed, so identify them. */ static const char posix_names[] = STRING_alpha0 STRING_lower0 STRING_upper0 STRING_alnum0 @@ -281,6 +289,11 @@ static const char posix_names[] = static const pcre_uint8 posix_name_lengths[] = { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 }; +#define PC_GRAPH 8 +#define PC_PRINT 9 +#define PC_PUNCT 10 + + /* Table of class bit maps for each POSIX class. Each class is formed from a base map, with an optional addition or removal of another map. Then, for some classes, there is some additional tweaking: for [:blank:] the vertical space @@ -308,9 +321,8 @@ static const int posix_class_maps[] = { cbit_xdigit,-1, 0 /* xdigit */ }; -/* Table of substitutes for \d etc when PCRE_UCP is set. The POSIX class -substitutes must be in the order of the names, defined above, and there are -both positive and negative cases. NULL means no substitute. */ +/* Table of substitutes for \d etc when PCRE_UCP is set. They are replaced by +Unicode property escapes. */ #ifdef SUPPORT_UCP static const pcre_uchar string_PNd[] = { @@ -335,12 +347,18 @@ static const pcre_uchar string_pXwd[] = { static const pcre_uchar *substitutes[] = { string_PNd, /* \D */ string_pNd, /* \d */ - string_PXsp, /* \S */ /* NOTE: Xsp is Perl space */ - string_pXsp, /* \s */ + string_PXsp, /* \S */ /* Xsp is Perl space, but from 8.34, Perl */ + string_pXsp, /* \s */ /* space and POSIX space are the same. */ string_PXwd, /* \W */ string_pXwd /* \w */ }; +/* The POSIX class substitutes must be in the order of the POSIX class names, +defined above, and there are both positive and negative cases. NULL means no +general substitute of a Unicode property escape (\p or \P). However, for some +POSIX classes (e.g. graph, print, punct) a special property code is compiled +directly. */ + static const pcre_uchar string_pL[] = { CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET, CHAR_L, CHAR_RIGHT_CURLY_BRACKET, '\0' }; @@ -388,8 +406,8 @@ static const pcre_uchar *posix_substitutes[] = { NULL, /* graph */ NULL, /* print */ NULL, /* punct */ - string_pXps, /* space */ /* NOTE: Xps is POSIX space */ - string_pXwd, /* word */ + string_pXps, /* space */ /* Xps is POSIX space, but from 8.34 */ + string_pXwd, /* word */ /* Perl and POSIX space are the same */ NULL, /* xdigit */ /* Negated cases */ string_PL, /* ^alpha */ @@ -403,8 +421,8 @@ static const pcre_uchar *posix_substitutes[] = { NULL, /* ^graph */ NULL, /* ^print */ NULL, /* ^punct */ - string_PXps, /* ^space */ /* NOTE: Xps is POSIX space */ - string_PXwd, /* ^word */ + string_PXps, /* ^space */ /* Xps is POSIX space, but from 8.34 */ + string_PXwd, /* ^word */ /* Perl and POSIX space are the same */ NULL /* ^xdigit */ }; #define POSIX_SUBSIZE (sizeof(posix_substitutes) / sizeof(pcre_uchar *)) @@ -468,7 +486,7 @@ static const char error_texts[] = "POSIX collating elements are not supported\0" "this version of PCRE is compiled without UTF support\0" "spare error\0" /** DEAD **/ - "character value in \\x{...} sequence is too large\0" + "character value in \\x{} or \\o{} is too large\0" /* 35 */ "invalid condition (?(0)\0" "\\C not allowed in lookbehind assertion\0" @@ -522,6 +540,13 @@ static const char error_texts[] = "character value in \\u.... sequence is too large\0" "invalid UTF-32 string\0" "setting UTF is disabled by the application\0" + "non-hex character in \\x{} (closing brace missing?)\0" + /* 80 */ + "non-octal character in \\o{} (closing brace missing?)\0" + "missing opening brace after \\o\0" + "parentheses are too deeply nested\0" + "invalid range in character class\0" + "group name must start with a non-digit\0" ; /* Table to identify digits and hex digits. This is used when compiling @@ -661,6 +686,183 @@ static const pcre_uint8 ebcdic_chartab[] = { /* chartable partial dup */ #endif +/* This table is used to check whether auto-possessification is possible +between adjacent character-type opcodes. The left-hand (repeated) opcode is +used to select the row, and the right-hand opcode is use to select the column. +A value of 1 means that auto-possessification is OK. For example, the second +value in the first row means that \D+\d can be turned into \D++\d. + +The Unicode property types (\P and \p) have to be present to fill out the table +because of what their opcode values are, but the table values should always be +zero because property types are handled separately in the code. The last four +columns apply to items that cannot be repeated, so there is no need to have +rows for them. Note that OP_DIGIT etc. are generated only when PCRE_UCP is +*not* set. When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */ + +#define APTROWS (LAST_AUTOTAB_LEFT_OP - FIRST_AUTOTAB_OP + 1) +#define APTCOLS (LAST_AUTOTAB_RIGHT_OP - FIRST_AUTOTAB_OP + 1) + +static const pcre_uint8 autoposstab[APTROWS][APTCOLS] = { +/* \D \d \S \s \W \w . .+ \C \P \p \R \H \h \V \v \X \Z \z $ $M */ + { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* \D */ + { 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 }, /* \d */ + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 }, /* \S */ + { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* \s */ + { 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* \W */ + { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 }, /* \w */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* . */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* .+ */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* \C */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* \P */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* \p */ + { 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 }, /* \R */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 }, /* \H */ + { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0 }, /* \h */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0 }, /* \V */ + { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0 }, /* \v */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 } /* \X */ +}; + + +/* This table is used to check whether auto-possessification is possible +between adjacent Unicode property opcodes (OP_PROP and OP_NOTPROP). The +left-hand (repeated) opcode is used to select the row, and the right-hand +opcode is used to select the column. The values are as follows: + + 0 Always return FALSE (never auto-possessify) + 1 Character groups are distinct (possessify if both are OP_PROP) + 2 Check character categories in the same group (general or particular) + 3 TRUE if the two opcodes are not the same (PROP vs NOTPROP) + + 4 Check left general category vs right particular category + 5 Check right general category vs left particular category + + 6 Left alphanum vs right general category + 7 Left space vs right general category + 8 Left word vs right general category + + 9 Right alphanum vs left general category + 10 Right space vs left general category + 11 Right word vs left general category + + 12 Left alphanum vs right particular category + 13 Left space vs right particular category + 14 Left word vs right particular category + + 15 Right alphanum vs left particular category + 16 Right space vs left particular category + 17 Right word vs left particular category +*/ + +static const pcre_uint8 propposstab[PT_TABSIZE][PT_TABSIZE] = { +/* ANY LAMP GC PC SC ALNUM SPACE PXSPACE WORD CLIST UCNC */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_ANY */ + { 0, 3, 0, 0, 0, 3, 1, 1, 0, 0, 0 }, /* PT_LAMP */ + { 0, 0, 2, 4, 0, 9, 10, 10, 11, 0, 0 }, /* PT_GC */ + { 0, 0, 5, 2, 0, 15, 16, 16, 17, 0, 0 }, /* PT_PC */ + { 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 }, /* PT_SC */ + { 0, 3, 6, 12, 0, 3, 1, 1, 0, 0, 0 }, /* PT_ALNUM */ + { 0, 1, 7, 13, 0, 1, 3, 3, 1, 0, 0 }, /* PT_SPACE */ + { 0, 1, 7, 13, 0, 1, 3, 3, 1, 0, 0 }, /* PT_PXSPACE */ + { 0, 0, 8, 14, 0, 0, 1, 1, 3, 0, 0 }, /* PT_WORD */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_CLIST */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 } /* PT_UCNC */ +}; + +/* This table is used to check whether auto-possessification is possible +between adjacent Unicode property opcodes (OP_PROP and OP_NOTPROP) when one +specifies a general category and the other specifies a particular category. The +row is selected by the general category and the column by the particular +category. The value is 1 if the particular category is not part of the general +category. */ + +static const pcre_uint8 catposstab[7][30] = { +/* Cc Cf Cn Co Cs Ll Lm Lo Lt Lu Mc Me Mn Nd Nl No Pc Pd Pe Pf Pi Po Ps Sc Sk Sm So Zl Zp Zs */ + { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* C */ + { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* L */ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* M */ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* N */ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1 }, /* P */ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1 }, /* S */ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 } /* Z */ +}; + +/* This table is used when checking ALNUM, (PX)SPACE, SPACE, and WORD against +a general or particular category. The properties in each row are those +that apply to the character set in question. Duplication means that a little +unnecessary work is done when checking, but this keeps things much simpler +because they can all use the same code. For more details see the comment where +this table is used. + +Note: SPACE and PXSPACE used to be different because Perl excluded VT from +"space", but from Perl 5.18 it's included, so both categories are treated the +same here. */ + +static const pcre_uint8 posspropstab[3][4] = { + { ucp_L, ucp_N, ucp_N, ucp_Nl }, /* ALNUM, 3rd and 4th values redundant */ + { ucp_Z, ucp_Z, ucp_C, ucp_Cc }, /* SPACE and PXSPACE, 2nd value redundant */ + { ucp_L, ucp_N, ucp_P, ucp_Po } /* WORD */ +}; + +/* This table is used when converting repeating opcodes into possessified +versions as a result of an explicit possessive quantifier such as ++. A zero +value means there is no possessified version - in those cases the item in +question must be wrapped in ONCE brackets. The table is truncated at OP_CALLOUT +because all relevant opcodes are less than that. */ + +static const pcre_uint8 opcode_possessify[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 - 15 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16 - 31 */ + + 0, /* NOTI */ + OP_POSSTAR, 0, /* STAR, MINSTAR */ + OP_POSPLUS, 0, /* PLUS, MINPLUS */ + OP_POSQUERY, 0, /* QUERY, MINQUERY */ + OP_POSUPTO, 0, /* UPTO, MINUPTO */ + 0, /* EXACT */ + 0, 0, 0, 0, /* POS{STAR,PLUS,QUERY,UPTO} */ + + OP_POSSTARI, 0, /* STARI, MINSTARI */ + OP_POSPLUSI, 0, /* PLUSI, MINPLUSI */ + OP_POSQUERYI, 0, /* QUERYI, MINQUERYI */ + OP_POSUPTOI, 0, /* UPTOI, MINUPTOI */ + 0, /* EXACTI */ + 0, 0, 0, 0, /* POS{STARI,PLUSI,QUERYI,UPTOI} */ + + OP_NOTPOSSTAR, 0, /* NOTSTAR, NOTMINSTAR */ + OP_NOTPOSPLUS, 0, /* NOTPLUS, NOTMINPLUS */ + OP_NOTPOSQUERY, 0, /* NOTQUERY, NOTMINQUERY */ + OP_NOTPOSUPTO, 0, /* NOTUPTO, NOTMINUPTO */ + 0, /* NOTEXACT */ + 0, 0, 0, 0, /* NOTPOS{STAR,PLUS,QUERY,UPTO} */ + + OP_NOTPOSSTARI, 0, /* NOTSTARI, NOTMINSTARI */ + OP_NOTPOSPLUSI, 0, /* NOTPLUSI, NOTMINPLUSI */ + OP_NOTPOSQUERYI, 0, /* NOTQUERYI, NOTMINQUERYI */ + OP_NOTPOSUPTOI, 0, /* NOTUPTOI, NOTMINUPTOI */ + 0, /* NOTEXACTI */ + 0, 0, 0, 0, /* NOTPOS{STARI,PLUSI,QUERYI,UPTOI} */ + + OP_TYPEPOSSTAR, 0, /* TYPESTAR, TYPEMINSTAR */ + OP_TYPEPOSPLUS, 0, /* TYPEPLUS, TYPEMINPLUS */ + OP_TYPEPOSQUERY, 0, /* TYPEQUERY, TYPEMINQUERY */ + OP_TYPEPOSUPTO, 0, /* TYPEUPTO, TYPEMINUPTO */ + 0, /* TYPEEXACT */ + 0, 0, 0, 0, /* TYPEPOS{STAR,PLUS,QUERY,UPTO} */ + + OP_CRPOSSTAR, 0, /* CRSTAR, CRMINSTAR */ + OP_CRPOSPLUS, 0, /* CRPLUS, CRMINPLUS */ + OP_CRPOSQUERY, 0, /* CRQUERY, CRMINQUERY */ + OP_CRPOSRANGE, 0, /* CRRANGE, CRMINRANGE */ + 0, 0, 0, 0, /* CRPOS{STAR,PLUS,QUERY,RANGE} */ + + 0, 0, 0, /* CLASS, NCLASS, XCLASS */ + 0, 0, /* REF, REFI */ + 0, 0, /* DNREF, DNREFI */ + 0, 0 /* RECURSE, CALLOUT */ +}; + + /************************************************* * Find an error text * @@ -688,6 +890,7 @@ return s; } + /************************************************* * Expand the workspace * *************************************************/ @@ -765,16 +968,15 @@ return (*p == CHAR_RIGHT_CURLY_BRACKET); *************************************************/ /* This function is called when a \ has been encountered. It either returns a -positive value for a simple escape such as \n, or 0 for a data character -which will be placed in chptr. A backreference to group n is returned as -negative n. When UTF-8 is enabled, a positive value greater than 255 may -be returned in chptr. -On entry,ptr is pointing at the \. On exit, it is on the final character of the -escape sequence. +positive value for a simple escape such as \n, or 0 for a data character which +will be placed in chptr. A backreference to group n is returned as negative n. +When UTF-8 is enabled, a positive value greater than 255 may be returned in +chptr. On entry, ptr is pointing at the \. On exit, it is on the final +character of the escape sequence. Arguments: ptrptr points to the pattern position pointer - chptr points to the data character + chptr points to a returned data character errorcodeptr points to the errorcode variable bracount number of previous extracting brackets options the options bits @@ -978,16 +1180,20 @@ else break; /* The handling of escape sequences consisting of a string of digits - starting with one that is not zero is not straightforward. By experiment, - the way Perl works seems to be as follows: + starting with one that is not zero is not straightforward. Perl has changed + over the years. Nowadays \g{} for backreferences and \o{} for octal are + recommended to avoid the ambiguities in the old syntax. Outside a character class, the digits are read as a decimal number. If the - number is less than 10, or if there are that many previous extracting - left brackets, then it is a back reference. Otherwise, up to three octal - digits are read to form an escaped byte. Thus \123 is likely to be octal - 123 (cf \0123, which is octal 012 followed by the literal 3). If the octal - value is greater than 377, the least significant 8 bits are taken. Inside a - character class, \ followed by a digit is always an octal number. */ + number is less than 8 (used to be 10), or if there are that many previous + extracting left brackets, then it is a back reference. Otherwise, up to + three octal digits are read to form an escaped byte. Thus \123 is likely to + be octal 123 (cf \0123, which is octal 012 followed by the literal 3). If + the octal value is greater than 377, the least significant 8 bits are + taken. \8 and \9 are treated as the literal characters 8 and 9. + + Inside a character class, \ followed by a digit is always either a literal + 8 or 9 or an octal number. */ case CHAR_1: case CHAR_2: case CHAR_3: case CHAR_4: case CHAR_5: case CHAR_6: case CHAR_7: case CHAR_8: case CHAR_9: @@ -1014,7 +1220,7 @@ else *errorcodeptr = ERR61; break; } - if (s < 10 || s <= bracount) + if (s < 8 || s <= bracount) /* Check for back reference */ { escape = -s; break; @@ -1022,16 +1228,14 @@ else ptr = oldptr; /* Put the pointer back and fall through */ } - /* Handle an octal number following \. If the first digit is 8 or 9, Perl - generates a binary zero byte and treats the digit as a following literal. - Thus we have to pull back the pointer by one. */ + /* Handle a digit following \ when the number is not a back reference. If + the first digit is 8 or 9, Perl used to generate a binary zero byte and + then treat the digit as a following literal. At least by Perl 5.18 this + changed so as not to insert the binary zero. */ - if ((c = *ptr) >= CHAR_8) - { - ptr--; - c = 0; - break; - } + if ((c = *ptr) >= CHAR_8) break; + + /* Fall through with a digit less than 8 */ /* \0 always starts an octal number, but we may drop through to here with a larger first octal digit. The original code used just to take the least @@ -1048,15 +1252,50 @@ else #endif break; - /* \x is complicated. \x{ddd} is a character number which can be greater - than 0xff in utf or non-8bit mode, but only if the ddd are hex digits. - If not, { is treated as a data character. */ + /* \o is a relatively new Perl feature, supporting a more general way of + specifying character codes in octal. The only supported form is \o{ddd}. */ + + case CHAR_o: + if (ptr[1] != CHAR_LEFT_CURLY_BRACKET) *errorcodeptr = ERR81; else + { + ptr += 2; + c = 0; + overflow = FALSE; + while (*ptr >= CHAR_0 && *ptr <= CHAR_7) + { + register pcre_uint32 cc = *ptr++; + if (c == 0 && cc == CHAR_0) continue; /* Leading zeroes */ +#ifdef COMPILE_PCRE32 + if (c >= 0x20000000l) { overflow = TRUE; break; } +#endif + c = (c << 3) + cc - CHAR_0 ; +#if defined COMPILE_PCRE8 + if (c > (utf ? 0x10ffffU : 0xffU)) { overflow = TRUE; break; } +#elif defined COMPILE_PCRE16 + if (c > (utf ? 0x10ffffU : 0xffffU)) { overflow = TRUE; break; } +#elif defined COMPILE_PCRE32 + if (utf && c > 0x10ffffU) { overflow = TRUE; break; } +#endif + } + if (overflow) + { + while (*ptr >= CHAR_0 && *ptr <= CHAR_7) ptr++; + *errorcodeptr = ERR34; + } + else if (*ptr == CHAR_RIGHT_CURLY_BRACKET) + { + if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73; + } + else *errorcodeptr = ERR80; + } + break; + + /* \x is complicated. In JavaScript, \x must be followed by two hexadecimal + numbers. Otherwise it is a lowercase x letter. */ case CHAR_x: if ((options & PCRE_JAVASCRIPT_COMPAT) != 0) { - /* In JavaScript, \x must be followed by two hexadecimal numbers. - Otherwise it is a lowercase x letter. */ if (MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0 && MAX_255(ptr[2]) && (digitab[ptr[2]] & ctype_xdigit) != 0) { @@ -1073,73 +1312,86 @@ else #endif } } - break; - } + } /* End JavaScript handling */ - if (ptr[1] == CHAR_LEFT_CURLY_BRACKET) - { - const pcre_uchar *pt = ptr + 2; + /* Handle \x in Perl's style. \x{ddd} is a character number which can be + greater than 0xff in utf or non-8bit mode, but only if the ddd are hex + digits. If not, { used to be treated as a data character. However, Perl + seems to read hex digits up to the first non-such, and ignore the rest, so + that, for example \x{zz} matches a binary zero. This seems crazy, so PCRE + now gives an error. */ - c = 0; - overflow = FALSE; - while (MAX_255(*pt) && (digitab[*pt] & ctype_xdigit) != 0) + else + { + if (ptr[1] == CHAR_LEFT_CURLY_BRACKET) { - register pcre_uint32 cc = *pt++; - if (c == 0 && cc == CHAR_0) continue; /* Leading zeroes */ + ptr += 2; + c = 0; + overflow = FALSE; + while (MAX_255(*ptr) && (digitab[*ptr] & ctype_xdigit) != 0) + { + register pcre_uint32 cc = *ptr++; + if (c == 0 && cc == CHAR_0) continue; /* Leading zeroes */ #ifdef COMPILE_PCRE32 - if (c >= 0x10000000l) { overflow = TRUE; break; } + if (c >= 0x10000000l) { overflow = TRUE; break; } #endif #ifndef EBCDIC /* ASCII/UTF-8 coding */ - if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */ - c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10)); + if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */ + c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10)); #else /* EBCDIC coding */ - if (cc >= CHAR_a && cc <= CHAR_z) cc += 64; /* Convert to upper case */ - c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10)); + if (cc >= CHAR_a && cc <= CHAR_z) cc += 64; /* Convert to upper case */ + c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10)); #endif #if defined COMPILE_PCRE8 - if (c > (utf ? 0x10ffffU : 0xffU)) { overflow = TRUE; break; } + if (c > (utf ? 0x10ffffU : 0xffU)) { overflow = TRUE; break; } #elif defined COMPILE_PCRE16 - if (c > (utf ? 0x10ffffU : 0xffffU)) { overflow = TRUE; break; } + if (c > (utf ? 0x10ffffU : 0xffffU)) { overflow = TRUE; break; } #elif defined COMPILE_PCRE32 - if (utf && c > 0x10ffffU) { overflow = TRUE; break; } + if (utf && c > 0x10ffffU) { overflow = TRUE; break; } #endif - } + } - if (overflow) - { - while (MAX_255(*pt) && (digitab[*pt] & ctype_xdigit) != 0) pt++; - *errorcodeptr = ERR34; - } + if (overflow) + { + while (MAX_255(*ptr) && (digitab[*ptr] & ctype_xdigit) != 0) ptr++; + *errorcodeptr = ERR34; + } - if (*pt == CHAR_RIGHT_CURLY_BRACKET) - { - if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73; - ptr = pt; - break; - } + else if (*ptr == CHAR_RIGHT_CURLY_BRACKET) + { + if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73; + } - /* If the sequence of hex digits does not end with '}', then we don't - recognize this construct; fall through to the normal \x handling. */ - } + /* If the sequence of hex digits does not end with '}', give an error. + We used just to recognize this construct and fall through to the normal + \x handling, but nowadays Perl gives an error, which seems much more + sensible, so we do too. */ - /* Read just a single-byte hex-defined char */ + else *errorcodeptr = ERR79; + } /* End of \x{} processing */ - c = 0; - while (i++ < 2 && MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0) - { - pcre_uint32 cc; /* Some compilers don't like */ - cc = *(++ptr); /* ++ in initializers */ + /* Read a single-byte hex-defined char (up to two hex digits after \x) */ + + else + { + c = 0; + while (i++ < 2 && MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0) + { + pcre_uint32 cc; /* Some compilers don't like */ + cc = *(++ptr); /* ++ in initializers */ #ifndef EBCDIC /* ASCII/UTF-8 coding */ - if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */ - c = c * 16 + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10)); + if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */ + c = c * 16 + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10)); #else /* EBCDIC coding */ - if (cc <= CHAR_z) cc += 64; /* Convert to upper case */ - c = c * 16 + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10)); + if (cc <= CHAR_z) cc += 64; /* Convert to upper case */ + c = c * 16 + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10)); #endif - } + } + } /* End of \xdd handling */ + } /* End of Perl-style \x handling */ break; /* For \c, a following letter is upper-cased; then the 0x40 bit is flipped. @@ -1205,6 +1457,8 @@ if ((options & PCRE_UCP) != 0 && escape >= ESC_D && escape <= ESC_w) return escape; } + + #ifdef SUPPORT_UCP /************************************************* * Handle \P and \p * @@ -1302,7 +1556,6 @@ return FALSE; - /************************************************* * Read repeat counts * *************************************************/ @@ -1371,306 +1624,6 @@ return p; /************************************************* -* Subroutine for finding forward reference * -*************************************************/ - -/* This recursive function is called only from find_parens() below. The -top-level call starts at the beginning of the pattern. All other calls must -start at a parenthesis. It scans along a pattern's text looking for capturing -subpatterns, and counting them. If it finds a named pattern that matches the -name it is given, it returns its number. Alternatively, if the name is NULL, it -returns when it reaches a given numbered subpattern. Recursion is used to keep -track of subpatterns that reset the capturing group numbers - the (?| feature. - -This function was originally called only from the second pass, in which we know -that if (?< or (?' or (?P< is encountered, the name will be correctly -terminated because that is checked in the first pass. There is now one call to -this function in the first pass, to check for a recursive back reference by -name (so that we can make the whole group atomic). In this case, we need check -only up to the current position in the pattern, and that is still OK because -and previous occurrences will have been checked. To make this work, the test -for "end of pattern" is a check against cd->end_pattern in the main loop, -instead of looking for a binary zero. This means that the special first-pass -call can adjust cd->end_pattern temporarily. (Checks for binary zero while -processing items within the loop are OK, because afterwards the main loop will -terminate.) - -Arguments: - ptrptr address of the current character pointer (updated) - cd compile background data - name name to seek, or NULL if seeking a numbered subpattern - lorn name length, or subpattern number if name is NULL - xmode TRUE if we are in /x mode - utf TRUE if we are in UTF-8 / UTF-16 / UTF-32 mode - count pointer to the current capturing subpattern number (updated) - -Returns: the number of the named subpattern, or -1 if not found -*/ - -static int -find_parens_sub(pcre_uchar **ptrptr, compile_data *cd, const pcre_uchar *name, int lorn, - BOOL xmode, BOOL utf, int *count) -{ -pcre_uchar *ptr = *ptrptr; -int start_count = *count; -int hwm_count = start_count; -BOOL dup_parens = FALSE; - -/* If the first character is a parenthesis, check on the type of group we are -dealing with. The very first call may not start with a parenthesis. */ - -if (ptr[0] == CHAR_LEFT_PARENTHESIS) - { - /* Handle specials such as (*SKIP) or (*UTF8) etc. */ - - if (ptr[1] == CHAR_ASTERISK) - { - ptr += 2; - while (ptr < cd->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++; - } - - /* Handle a normal, unnamed capturing parenthesis. */ - - else if (ptr[1] != CHAR_QUESTION_MARK) - { - *count += 1; - if (name == NULL && *count == lorn) return *count; - ptr++; - } - - /* All cases now have (? at the start. Remember when we are in a group - where the parenthesis numbers are duplicated. */ - - else if (ptr[2] == CHAR_VERTICAL_LINE) - { - ptr += 3; - dup_parens = TRUE; - } - - /* Handle comments; all characters are allowed until a ket is reached. */ - - else if (ptr[2] == CHAR_NUMBER_SIGN) - { - for (ptr += 3; *ptr != CHAR_NULL; ptr++) - if (*ptr == CHAR_RIGHT_PARENTHESIS) break; - goto FAIL_EXIT; - } - - /* Handle a condition. If it is an assertion, just carry on so that it - is processed as normal. If not, skip to the closing parenthesis of the - condition (there can't be any nested parens). */ - - else if (ptr[2] == CHAR_LEFT_PARENTHESIS) - { - ptr += 2; - if (ptr[1] != CHAR_QUESTION_MARK) - { - while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++; - if (*ptr != CHAR_NULL) ptr++; - } - } - - /* Start with (? but not a condition. */ - - else - { - ptr += 2; - if (*ptr == CHAR_P) ptr++; /* Allow optional P */ - - /* We have to disambiguate (?<! and (?<= from (?<name> for named groups */ - - if ((*ptr == CHAR_LESS_THAN_SIGN && ptr[1] != CHAR_EXCLAMATION_MARK && - ptr[1] != CHAR_EQUALS_SIGN) || *ptr == CHAR_APOSTROPHE) - { - pcre_uchar term; - const pcre_uchar *thisname; - *count += 1; - if (name == NULL && *count == lorn) return *count; - term = *ptr++; - if (term == CHAR_LESS_THAN_SIGN) term = CHAR_GREATER_THAN_SIGN; - thisname = ptr; - while (*ptr != term) ptr++; - if (name != NULL && lorn == (int)(ptr - thisname) && - STRNCMP_UC_UC(name, thisname, (unsigned int)lorn) == 0) - return *count; - term++; - } - } - } - -/* Past any initial parenthesis handling, scan for parentheses or vertical -bars. Stop if we get to cd->end_pattern. Note that this is important for the -first-pass call when this value is temporarily adjusted to stop at the current -position. So DO NOT change this to a test for binary zero. */ - -for (; ptr < cd->end_pattern; ptr++) - { - /* Skip over backslashed characters and also entire \Q...\E */ - - if (*ptr == CHAR_BACKSLASH) - { - if (*(++ptr) == CHAR_NULL) goto FAIL_EXIT; - if (*ptr == CHAR_Q) for (;;) - { - while (*(++ptr) != CHAR_NULL && *ptr != CHAR_BACKSLASH) {}; - if (*ptr == CHAR_NULL) goto FAIL_EXIT; - if (*(++ptr) == CHAR_E) break; - } - continue; - } - - /* Skip over character classes; this logic must be similar to the way they - are handled for real. If the first character is '^', skip it. Also, if the - first few characters (either before or after ^) are \Q\E or \E we skip them - too. This makes for compatibility with Perl. Note the use of STR macros to - encode "Q\\E" so that it works in UTF-8 on EBCDIC platforms. */ - - if (*ptr == CHAR_LEFT_SQUARE_BRACKET) - { - BOOL negate_class = FALSE; - for (;;) - { - if (ptr[1] == CHAR_BACKSLASH) - { - if (ptr[2] == CHAR_E) - ptr+= 2; - else if (STRNCMP_UC_C8(ptr + 2, - STR_Q STR_BACKSLASH STR_E, 3) == 0) - ptr += 4; - else - break; - } - else if (!negate_class && ptr[1] == CHAR_CIRCUMFLEX_ACCENT) - { - negate_class = TRUE; - ptr++; - } - else break; - } - - /* If the next character is ']', it is a data character that must be - skipped, except in JavaScript compatibility mode. */ - - if (ptr[1] == CHAR_RIGHT_SQUARE_BRACKET && - (cd->external_options & PCRE_JAVASCRIPT_COMPAT) == 0) - ptr++; - - while (*(++ptr) != CHAR_RIGHT_SQUARE_BRACKET) - { - if (*ptr == CHAR_NULL) return -1; - if (*ptr == CHAR_BACKSLASH) - { - if (*(++ptr) == CHAR_NULL) goto FAIL_EXIT; - if (*ptr == CHAR_Q) for (;;) - { - while (*(++ptr) != CHAR_NULL && *ptr != CHAR_BACKSLASH) {}; - if (*ptr == CHAR_NULL) goto FAIL_EXIT; - if (*(++ptr) == CHAR_E) break; - } - continue; - } - } - continue; - } - - /* Skip comments in /x mode */ - - if (xmode && *ptr == CHAR_NUMBER_SIGN) - { - ptr++; - while (*ptr != CHAR_NULL) - { - if (IS_NEWLINE(ptr)) { ptr += cd->nllen - 1; break; } - ptr++; -#ifdef SUPPORT_UTF - if (utf) FORWARDCHAR(ptr); -#endif - } - if (*ptr == CHAR_NULL) goto FAIL_EXIT; - continue; - } - - /* Check for the special metacharacters */ - - if (*ptr == CHAR_LEFT_PARENTHESIS) - { - int rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf, count); - if (rc > 0) return rc; - if (*ptr == CHAR_NULL) goto FAIL_EXIT; - } - - else if (*ptr == CHAR_RIGHT_PARENTHESIS) - { - if (dup_parens && *count < hwm_count) *count = hwm_count; - goto FAIL_EXIT; - } - - else if (*ptr == CHAR_VERTICAL_LINE && dup_parens) - { - if (*count > hwm_count) hwm_count = *count; - *count = start_count; - } - } - -FAIL_EXIT: -*ptrptr = ptr; -return -1; -} - - - - -/************************************************* -* Find forward referenced subpattern * -*************************************************/ - -/* This function scans along a pattern's text looking for capturing -subpatterns, and counting them. If it finds a named pattern that matches the -name it is given, it returns its number. Alternatively, if the name is NULL, it -returns when it reaches a given numbered subpattern. This is used for forward -references to subpatterns. We used to be able to start this scan from the -current compiling point, using the current count value from cd->bracount, and -do it all in a single loop, but the addition of the possibility of duplicate -subpattern numbers means that we have to scan from the very start, in order to -take account of such duplicates, and to use a recursive function to keep track -of the different types of group. - -Arguments: - cd compile background data - name name to seek, or NULL if seeking a numbered subpattern - lorn name length, or subpattern number if name is NULL - xmode TRUE if we are in /x mode - utf TRUE if we are in UTF-8 / UTF-16 / UTF-32 mode - -Returns: the number of the found subpattern, or -1 if not found -*/ - -static int -find_parens(compile_data *cd, const pcre_uchar *name, int lorn, BOOL xmode, - BOOL utf) -{ -pcre_uchar *ptr = (pcre_uchar *)cd->start_pattern; -int count = 0; -int rc; - -/* If the pattern does not start with an opening parenthesis, the first call -to find_parens_sub() will scan right to the end (if necessary). However, if it -does start with a parenthesis, find_parens_sub() will return when it hits the -matching closing parens. That is why we have to have a loop. */ - -for (;;) - { - rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf, &count); - if (rc > 0 || *ptr++ == CHAR_NULL) break; - } - -return rc; -} - - - - -/************************************************* * Find first significant op code * *************************************************/ @@ -1709,9 +1662,9 @@ for (;;) case OP_CALLOUT: case OP_CREF: - case OP_NCREF: + case OP_DNCREF: case OP_RREF: - case OP_NRREF: + case OP_DNRREF: case OP_DEF: code += PRIV(OP_lengths)[*code]; break; @@ -1725,7 +1678,6 @@ for (;;) - /************************************************* * Find the fixed length of a branch * *************************************************/ @@ -1849,13 +1801,13 @@ for (;;) case OP_COMMIT: case OP_CREF: case OP_DEF: + case OP_DNCREF: + case OP_DNRREF: case OP_DOLL: case OP_DOLLM: case OP_EOD: case OP_EODN: case OP_FAIL: - case OP_NCREF: - case OP_NRREF: case OP_NOT_WORD_BOUNDARY: case OP_PRUNE: case OP_REVERSE: @@ -1950,16 +1902,20 @@ for (;;) switch (*cc) { - case OP_CRPLUS: - case OP_CRMINPLUS: case OP_CRSTAR: case OP_CRMINSTAR: + case OP_CRPLUS: + case OP_CRMINPLUS: case OP_CRQUERY: case OP_CRMINQUERY: + case OP_CRPOSSTAR: + case OP_CRPOSPLUS: + case OP_CRPOSQUERY: return -1; case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSRANGE: if (GET2(cc,1) != GET2(cc,1+IMM2_SIZE)) return -1; branchlength += (int)GET2(cc,1); cc += 1 + 2 * IMM2_SIZE; @@ -2028,6 +1984,8 @@ for (;;) case OP_QUERYI: case OP_REF: case OP_REFI: + case OP_DNREF: + case OP_DNREFI: case OP_SBRA: case OP_SBRAPOS: case OP_SCBRA: @@ -2064,7 +2022,6 @@ for (;;) - /************************************************* * Scan compiled regex for specific bracket * *************************************************/ @@ -2366,15 +2323,23 @@ Arguments: endcode points to where to stop utf TRUE if in UTF-8 / UTF-16 / UTF-32 mode cd contains pointers to tables etc. + recurses chain of recurse_check to catch mutual recursion Returns: TRUE if what is matched could be empty */ +typedef struct recurse_check { + struct recurse_check *prev; + const pcre_uchar *group; +} recurse_check; + static BOOL could_be_empty_branch(const pcre_uchar *code, const pcre_uchar *endcode, - BOOL utf, compile_data *cd) + BOOL utf, compile_data *cd, recurse_check *recurses) { register pcre_uchar c; +recurse_check this_recurse; + for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE); code < endcode; code = first_significant_code(code + PRIV(OP_lengths)[c], TRUE)) @@ -2402,25 +2367,50 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE); if (c == OP_RECURSE) { - const pcre_uchar *scode; + const pcre_uchar *scode = cd->start_code + GET(code, 1); BOOL empty_branch; - /* Test for forward reference */ + /* Test for forward reference or uncompleted reference. This is disabled + when called to scan a completed pattern by setting cd->start_workspace to + NULL. */ - for (scode = cd->start_workspace; scode < cd->hwm; scode += LINK_SIZE) - if ((int)GET(scode, 0) == (int)(code + 1 - cd->start_code)) return TRUE; + if (cd->start_workspace != NULL) + { + const pcre_uchar *tcode; + for (tcode = cd->start_workspace; tcode < cd->hwm; tcode += LINK_SIZE) + if ((int)GET(tcode, 0) == (int)(code + 1 - cd->start_code)) return TRUE; + if (GET(scode, 1) == 0) return TRUE; /* Unclosed */ + } - /* Not a forward reference, test for completed backward reference */ + /* If we are scanning a completed pattern, there are no forward references + and all groups are complete. We need to detect whether this is a recursive + call, as otherwise there will be an infinite loop. If it is a recursion, + just skip over it. Simple recursions are easily detected. For mutual + recursions we keep a chain on the stack. */ - empty_branch = FALSE; - scode = cd->start_code + GET(code, 1); - if (GET(scode, 1) == 0) return TRUE; /* Unclosed */ + else + { + recurse_check *r = recurses; + const pcre_uchar *endgroup = scode; + + do endgroup += GET(endgroup, 1); while (*endgroup == OP_ALT); + if (code >= scode && code <= endgroup) continue; /* Simple recursion */ - /* Completed backwards reference */ + for (r = recurses; r != NULL; r = r->prev) + if (r->group == scode) break; + if (r != NULL) continue; /* Mutual recursion */ + } + + /* Completed reference; scan the referenced group, remembering it on the + stack chain to detect mutual recursions. */ + + empty_branch = FALSE; + this_recurse.prev = recurses; + this_recurse.group = scode; do { - if (could_be_empty_branch(scode, endcode, utf, cd)) + if (could_be_empty_branch(scode, endcode, utf, cd, &this_recurse)) { empty_branch = TRUE; break; @@ -2476,7 +2466,7 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE); empty_branch = FALSE; do { - if (!empty_branch && could_be_empty_branch(code, endcode, utf, cd)) + if (!empty_branch && could_be_empty_branch(code, endcode, utf, cd, NULL)) empty_branch = TRUE; code += GET(code, 1); } @@ -2518,15 +2508,19 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE); case OP_CRMINSTAR: case OP_CRQUERY: case OP_CRMINQUERY: + case OP_CRPOSSTAR: + case OP_CRPOSQUERY: break; default: /* Non-repeat => class must match */ case OP_CRPLUS: /* These repeats aren't empty */ case OP_CRMINPLUS: + case OP_CRPOSPLUS: return FALSE; case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSRANGE: if (GET2(ccode, 1) > 0) return FALSE; /* Minimum > 0 */ break; } @@ -2534,34 +2528,57 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE); /* Opcodes that must match a character */ + case OP_ANY: + case OP_ALLANY: + case OP_ANYBYTE: + case OP_PROP: case OP_NOTPROP: + case OP_ANYNL: + + case OP_NOT_HSPACE: + case OP_HSPACE: + case OP_NOT_VSPACE: + case OP_VSPACE: case OP_EXTUNI: + case OP_NOT_DIGIT: case OP_DIGIT: case OP_NOT_WHITESPACE: case OP_WHITESPACE: case OP_NOT_WORDCHAR: case OP_WORDCHAR: - case OP_ANY: - case OP_ALLANY: - case OP_ANYBYTE: + case OP_CHAR: case OP_CHARI: case OP_NOT: case OP_NOTI: + case OP_PLUS: + case OP_PLUSI: case OP_MINPLUS: - case OP_POSPLUS: - case OP_EXACT: + case OP_MINPLUSI: + case OP_NOTPLUS: + case OP_NOTPLUSI: case OP_NOTMINPLUS: + case OP_NOTMINPLUSI: + + case OP_POSPLUS: + case OP_POSPLUSI: case OP_NOTPOSPLUS: + case OP_NOTPOSPLUSI: + + case OP_EXACT: + case OP_EXACTI: case OP_NOTEXACT: + case OP_NOTEXACTI: + case OP_TYPEPLUS: case OP_TYPEMINPLUS: case OP_TYPEPOSPLUS: case OP_TYPEEXACT: + return FALSE; /* These are going to continue, as they may be empty, but we have to @@ -2595,30 +2612,58 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE); return TRUE; /* In UTF-8 mode, STAR, MINSTAR, POSSTAR, QUERY, MINQUERY, POSQUERY, UPTO, - MINUPTO, and POSUPTO may be followed by a multibyte character */ + MINUPTO, and POSUPTO and their caseless and negative versions may be + followed by a multibyte character. */ #if defined SUPPORT_UTF && !defined COMPILE_PCRE32 case OP_STAR: case OP_STARI: + case OP_NOTSTAR: + case OP_NOTSTARI: + case OP_MINSTAR: case OP_MINSTARI: + case OP_NOTMINSTAR: + case OP_NOTMINSTARI: + case OP_POSSTAR: case OP_POSSTARI: + case OP_NOTPOSSTAR: + case OP_NOTPOSSTARI: + case OP_QUERY: case OP_QUERYI: + case OP_NOTQUERY: + case OP_NOTQUERYI: + case OP_MINQUERY: case OP_MINQUERYI: + case OP_NOTMINQUERY: + case OP_NOTMINQUERYI: + case OP_POSQUERY: case OP_POSQUERYI: + case OP_NOTPOSQUERY: + case OP_NOTPOSQUERYI: + if (utf && HAS_EXTRALEN(code[1])) code += GET_EXTRALEN(code[1]); break; case OP_UPTO: case OP_UPTOI: + case OP_NOTUPTO: + case OP_NOTUPTOI: + case OP_MINUPTO: case OP_MINUPTOI: + case OP_NOTMINUPTO: + case OP_NOTMINUPTOI: + case OP_POSUPTO: case OP_POSUPTOI: + case OP_NOTPOSUPTO: + case OP_NOTPOSUPTOI: + if (utf && HAS_EXTRALEN(code[1 + IMM2_SIZE])) code += GET_EXTRALEN(code[1 + IMM2_SIZE]); break; #endif @@ -2672,7 +2717,7 @@ could_be_empty(const pcre_uchar *code, const pcre_uchar *endcode, { while (bcptr != NULL && bcptr->current_branch >= code) { - if (!could_be_empty_branch(bcptr->current_branch, endcode, utf, cd)) + if (!could_be_empty_branch(bcptr->current_branch, endcode, utf, cd, NULL)) return FALSE; bcptr = bcptr->outer; } @@ -2682,6 +2727,1072 @@ return TRUE; /************************************************* +* Base opcode of repeated opcodes * +*************************************************/ + +/* Returns the base opcode for repeated single character type opcodes. If the +opcode is not a repeated character type, it returns with the original value. + +Arguments: c opcode +Returns: base opcode for the type +*/ + +static pcre_uchar +get_repeat_base(pcre_uchar c) +{ +return (c > OP_TYPEPOSUPTO)? c : + (c >= OP_TYPESTAR)? OP_TYPESTAR : + (c >= OP_NOTSTARI)? OP_NOTSTARI : + (c >= OP_NOTSTAR)? OP_NOTSTAR : + (c >= OP_STARI)? OP_STARI : + OP_STAR; +} + + + +#ifdef SUPPORT_UCP +/************************************************* +* Check a character and a property * +*************************************************/ + +/* This function is called by check_auto_possessive() when a property item +is adjacent to a fixed character. + +Arguments: + c the character + ptype the property type + pdata the data for the type + negated TRUE if it's a negated property (\P or \p{^) + +Returns: TRUE if auto-possessifying is OK +*/ + +static BOOL +check_char_prop(pcre_uint32 c, unsigned int ptype, unsigned int pdata, + BOOL negated) +{ +const pcre_uint32 *p; +const ucd_record *prop = GET_UCD(c); + +switch(ptype) + { + case PT_LAMP: + return (prop->chartype == ucp_Lu || + prop->chartype == ucp_Ll || + prop->chartype == ucp_Lt) == negated; + + case PT_GC: + return (pdata == PRIV(ucp_gentype)[prop->chartype]) == negated; + + case PT_PC: + return (pdata == prop->chartype) == negated; + + case PT_SC: + return (pdata == prop->script) == negated; + + /* These are specials */ + + case PT_ALNUM: + return (PRIV(ucp_gentype)[prop->chartype] == ucp_L || + PRIV(ucp_gentype)[prop->chartype] == ucp_N) == negated; + + /* Perl space used to exclude VT, but from Perl 5.18 it is included, which + means that Perl space and POSIX space are now identical. PCRE was changed + at release 8.34. */ + + case PT_SPACE: /* Perl space */ + case PT_PXSPACE: /* POSIX space */ + switch(c) + { + HSPACE_CASES: + VSPACE_CASES: + return negated; + + default: + return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == negated; + } + break; /* Control never reaches here */ + + case PT_WORD: + return (PRIV(ucp_gentype)[prop->chartype] == ucp_L || + PRIV(ucp_gentype)[prop->chartype] == ucp_N || + c == CHAR_UNDERSCORE) == negated; + + case PT_CLIST: + p = PRIV(ucd_caseless_sets) + prop->caseset; + for (;;) + { + if (c < *p) return !negated; + if (c == *p++) return negated; + } + break; /* Control never reaches here */ + } + +return FALSE; +} +#endif /* SUPPORT_UCP */ + + + +/************************************************* +* Fill the character property list * +*************************************************/ + +/* Checks whether the code points to an opcode that can take part in auto- +possessification, and if so, fills a list with its properties. + +Arguments: + code points to start of expression + utf TRUE if in UTF-8 / UTF-16 / UTF-32 mode + fcc points to case-flipping table + list points to output list + list[0] will be filled with the opcode + list[1] will be non-zero if this opcode + can match an empty character string + list[2..7] depends on the opcode + +Returns: points to the start of the next opcode if *code is accepted + NULL if *code is not accepted +*/ + +static const pcre_uchar * +get_chr_property_list(const pcre_uchar *code, BOOL utf, + const pcre_uint8 *fcc, pcre_uint32 *list) +{ +pcre_uchar c = *code; +pcre_uchar base; +const pcre_uchar *end; +pcre_uint32 chr; + +#ifdef SUPPORT_UCP +pcre_uint32 *clist_dest; +const pcre_uint32 *clist_src; +#else +utf = utf; /* Suppress "unused parameter" compiler warning */ +#endif + +list[0] = c; +list[1] = FALSE; +code++; + +if (c >= OP_STAR && c <= OP_TYPEPOSUPTO) + { + base = get_repeat_base(c); + c -= (base - OP_STAR); + + if (c == OP_UPTO || c == OP_MINUPTO || c == OP_EXACT || c == OP_POSUPTO) + code += IMM2_SIZE; + + list[1] = (c != OP_PLUS && c != OP_MINPLUS && c != OP_EXACT && c != OP_POSPLUS); + + switch(base) + { + case OP_STAR: + list[0] = OP_CHAR; + break; + + case OP_STARI: + list[0] = OP_CHARI; + break; + + case OP_NOTSTAR: + list[0] = OP_NOT; + break; + + case OP_NOTSTARI: + list[0] = OP_NOTI; + break; + + case OP_TYPESTAR: + list[0] = *code; + code++; + break; + } + c = list[0]; + } + +switch(c) + { + case OP_NOT_DIGIT: + case OP_DIGIT: + case OP_NOT_WHITESPACE: + case OP_WHITESPACE: + case OP_NOT_WORDCHAR: + case OP_WORDCHAR: + case OP_ANY: + case OP_ALLANY: + case OP_ANYNL: + case OP_NOT_HSPACE: + case OP_HSPACE: + case OP_NOT_VSPACE: + case OP_VSPACE: + case OP_EXTUNI: + case OP_EODN: + case OP_EOD: + case OP_DOLL: + case OP_DOLLM: + return code; + + case OP_CHAR: + case OP_NOT: + GETCHARINCTEST(chr, code); + list[2] = chr; + list[3] = NOTACHAR; + return code; + + case OP_CHARI: + case OP_NOTI: + list[0] = (c == OP_CHARI) ? OP_CHAR : OP_NOT; + GETCHARINCTEST(chr, code); + list[2] = chr; + +#ifdef SUPPORT_UCP + if (chr < 128 || (chr < 256 && !utf)) + list[3] = fcc[chr]; + else + list[3] = UCD_OTHERCASE(chr); +#elif defined SUPPORT_UTF || !defined COMPILE_PCRE8 + list[3] = (chr < 256) ? fcc[chr] : chr; +#else + list[3] = fcc[chr]; +#endif + + /* The othercase might be the same value. */ + + if (chr == list[3]) + list[3] = NOTACHAR; + else + list[4] = NOTACHAR; + return code; + +#ifdef SUPPORT_UCP + case OP_PROP: + case OP_NOTPROP: + if (code[0] != PT_CLIST) + { + list[2] = code[0]; + list[3] = code[1]; + return code + 2; + } + + /* Convert only if we have enough space. */ + + clist_src = PRIV(ucd_caseless_sets) + code[1]; + clist_dest = list + 2; + code += 2; + + do { + if (clist_dest >= list + 8) + { + /* Early return if there is not enough space. This should never + happen, since all clists are shorter than 5 character now. */ + list[2] = code[0]; + list[3] = code[1]; + return code; + } + *clist_dest++ = *clist_src; + } + while(*clist_src++ != NOTACHAR); + + /* All characters are stored. The terminating NOTACHAR + is copied form the clist itself. */ + + list[0] = (c == OP_PROP) ? OP_CHAR : OP_NOT; + return code; +#endif + + case OP_NCLASS: + case OP_CLASS: +#if defined SUPPORT_UTF || !defined COMPILE_PCRE8 + case OP_XCLASS: + if (c == OP_XCLASS) + end = code + GET(code, 0) - 1; + else +#endif + end = code + 32 / sizeof(pcre_uchar); + + switch(*end) + { + case OP_CRSTAR: + case OP_CRMINSTAR: + case OP_CRQUERY: + case OP_CRMINQUERY: + case OP_CRPOSSTAR: + case OP_CRPOSQUERY: + list[1] = TRUE; + end++; + break; + + case OP_CRPLUS: + case OP_CRMINPLUS: + case OP_CRPOSPLUS: + end++; + break; + + case OP_CRRANGE: + case OP_CRMINRANGE: + case OP_CRPOSRANGE: + list[1] = (GET2(end, 1) == 0); + end += 1 + 2 * IMM2_SIZE; + break; + } + list[2] = end - code; + return end; + } +return NULL; /* Opcode not accepted */ +} + + + +/************************************************* +* Scan further character sets for match * +*************************************************/ + +/* Checks whether the base and the current opcode have a common character, in +which case the base cannot be possessified. + +Arguments: + code points to the byte code + utf TRUE in UTF-8 / UTF-16 / UTF-32 mode + cd static compile data + base_list the data list of the base opcode + +Returns: TRUE if the auto-possessification is possible +*/ + +static BOOL +compare_opcodes(const pcre_uchar *code, BOOL utf, const compile_data *cd, + const pcre_uint32 *base_list, const pcre_uchar *base_end) +{ +pcre_uchar c; +pcre_uint32 list[8]; +const pcre_uint32 *chr_ptr; +const pcre_uint32 *ochr_ptr; +const pcre_uint32 *list_ptr; +const pcre_uchar *next_code; +const pcre_uint8 *class_bitset; +const pcre_uint32 *set1, *set2, *set_end; +pcre_uint32 chr; +BOOL accepted, invert_bits; + +/* Note: the base_list[1] contains whether the current opcode has greedy +(represented by a non-zero value) quantifier. This is a different from +other character type lists, which stores here that the character iterator +matches to an empty string (also represented by a non-zero value). */ + +for(;;) + { + /* All operations move the code pointer forward. + Therefore infinite recursions are not possible. */ + + c = *code; + + /* Skip over callouts */ + + if (c == OP_CALLOUT) + { + code += PRIV(OP_lengths)[c]; + continue; + } + + if (c == OP_ALT) + { + do code += GET(code, 1); while (*code == OP_ALT); + c = *code; + } + + switch(c) + { + case OP_END: + case OP_KETRPOS: + /* TRUE only in greedy case. The non-greedy case could be replaced by + an OP_EXACT, but it is probably not worth it. (And note that OP_EXACT + uses more memory, which we cannot get at this stage.) */ + + return base_list[1] != 0; + + case OP_KET: + /* If the bracket is capturing, and referenced by an OP_RECURSE, or + it is an atomic sub-pattern (assert, once, etc.) the non-greedy case + cannot be converted to a possessive form. */ + + if (base_list[1] == 0) return FALSE; + + switch(*(code - GET(code, 1))) + { + case OP_ASSERT: + case OP_ASSERT_NOT: + case OP_ASSERTBACK: + case OP_ASSERTBACK_NOT: + case OP_ONCE: + case OP_ONCE_NC: + /* Atomic sub-patterns and assertions can always auto-possessify their + last iterator. */ + return TRUE; + } + + code += PRIV(OP_lengths)[c]; + continue; + + case OP_ONCE: + case OP_ONCE_NC: + case OP_BRA: + case OP_CBRA: + next_code = code + GET(code, 1); + code += PRIV(OP_lengths)[c]; + + while (*next_code == OP_ALT) + { + if (!compare_opcodes(code, utf, cd, base_list, base_end)) return FALSE; + code = next_code + 1 + LINK_SIZE; + next_code += GET(next_code, 1); + } + continue; + + case OP_BRAZERO: + case OP_BRAMINZERO: + + next_code = code + 1; + if (*next_code != OP_BRA && *next_code != OP_CBRA + && *next_code != OP_ONCE && *next_code != OP_ONCE_NC) return FALSE; + + do next_code += GET(next_code, 1); while (*next_code == OP_ALT); + + /* The bracket content will be checked by the + OP_BRA/OP_CBRA case above. */ + next_code += 1 + LINK_SIZE; + if (!compare_opcodes(next_code, utf, cd, base_list, base_end)) + return FALSE; + + code += PRIV(OP_lengths)[c]; + continue; + } + + /* Check for a supported opcode, and load its properties. */ + + code = get_chr_property_list(code, utf, cd->fcc, list); + if (code == NULL) return FALSE; /* Unsupported */ + + /* If either opcode is a small character list, set pointers for comparing + characters from that list with another list, or with a property. */ + + if (base_list[0] == OP_CHAR) + { + chr_ptr = base_list + 2; + list_ptr = list; + } + else if (list[0] == OP_CHAR) + { + chr_ptr = list + 2; + list_ptr = base_list; + } + + /* Character bitsets can also be compared to certain opcodes. */ + + else if (base_list[0] == OP_CLASS || list[0] == OP_CLASS +#ifdef COMPILE_PCRE8 + /* In 8 bit, non-UTF mode, OP_CLASS and OP_NCLASS are the same. */ + || (!utf && (base_list[0] == OP_NCLASS || list[0] == OP_NCLASS)) +#endif + ) + { +#ifdef COMPILE_PCRE8 + if (base_list[0] == OP_CLASS || (!utf && base_list[0] == OP_NCLASS)) +#else + if (base_list[0] == OP_CLASS) +#endif + { + set1 = (pcre_uint32 *)(base_end - base_list[2]); + list_ptr = list; + } + else + { + set1 = (pcre_uint32 *)(code - list[2]); + list_ptr = base_list; + } + + invert_bits = FALSE; + switch(list_ptr[0]) + { + case OP_CLASS: + case OP_NCLASS: + set2 = (pcre_uint32 *) + ((list_ptr == list ? code : base_end) - list_ptr[2]); + break; + + /* OP_XCLASS cannot be supported here, because its bitset + is not necessarily complete. E.g: [a-\0x{200}] is stored + as a character range, and the appropriate bits are not set. */ + + case OP_NOT_DIGIT: + invert_bits = TRUE; + /* Fall through */ + case OP_DIGIT: + set2 = (pcre_uint32 *)(cd->cbits + cbit_digit); + break; + + case OP_NOT_WHITESPACE: + invert_bits = TRUE; + /* Fall through */ + case OP_WHITESPACE: + set2 = (pcre_uint32 *)(cd->cbits + cbit_space); + break; + + case OP_NOT_WORDCHAR: + invert_bits = TRUE; + /* Fall through */ + case OP_WORDCHAR: + set2 = (pcre_uint32 *)(cd->cbits + cbit_word); + break; + + default: + return FALSE; + } + + /* Compare 4 bytes to improve speed. */ + set_end = set1 + (32 / 4); + if (invert_bits) + { + do + { + if ((*set1++ & ~(*set2++)) != 0) return FALSE; + } + while (set1 < set_end); + } + else + { + do + { + if ((*set1++ & *set2++) != 0) return FALSE; + } + while (set1 < set_end); + } + + if (list[1] == 0) return TRUE; + /* Might be an empty repeat. */ + continue; + } + + /* Some property combinations also acceptable. Unicode property opcodes are + processed specially; the rest can be handled with a lookup table. */ + + else + { + pcre_uint32 leftop, rightop; + + leftop = base_list[0]; + rightop = list[0]; + +#ifdef SUPPORT_UCP + accepted = FALSE; /* Always set in non-unicode case. */ + if (leftop == OP_PROP || leftop == OP_NOTPROP) + { + if (rightop == OP_EOD) + accepted = TRUE; + else if (rightop == OP_PROP || rightop == OP_NOTPROP) + { + int n; + const pcre_uint8 *p; + BOOL same = leftop == rightop; + BOOL lisprop = leftop == OP_PROP; + BOOL risprop = rightop == OP_PROP; + BOOL bothprop = lisprop && risprop; + + /* There's a table that specifies how each combination is to be + processed: + 0 Always return FALSE (never auto-possessify) + 1 Character groups are distinct (possessify if both are OP_PROP) + 2 Check character categories in the same group (general or particular) + 3 Return TRUE if the two opcodes are not the same + ... see comments below + */ + + n = propposstab[base_list[2]][list[2]]; + switch(n) + { + case 0: break; + case 1: accepted = bothprop; break; + case 2: accepted = (base_list[3] == list[3]) != same; break; + case 3: accepted = !same; break; + + case 4: /* Left general category, right particular category */ + accepted = risprop && catposstab[base_list[3]][list[3]] == same; + break; + + case 5: /* Right general category, left particular category */ + accepted = lisprop && catposstab[list[3]][base_list[3]] == same; + break; + + /* This code is logically tricky. Think hard before fiddling with it. + The posspropstab table has four entries per row. Each row relates to + one of PCRE's special properties such as ALNUM or SPACE or WORD. + Only WORD actually needs all four entries, but using repeats for the + others means they can all use the same code below. + + The first two entries in each row are Unicode general categories, and + apply always, because all the characters they include are part of the + PCRE character set. The third and fourth entries are a general and a + particular category, respectively, that include one or more relevant + characters. One or the other is used, depending on whether the check + is for a general or a particular category. However, in both cases the + category contains more characters than the specials that are defined + for the property being tested against. Therefore, it cannot be used + in a NOTPROP case. + + Example: the row for WORD contains ucp_L, ucp_N, ucp_P, ucp_Po. + Underscore is covered by ucp_P or ucp_Po. */ + + case 6: /* Left alphanum vs right general category */ + case 7: /* Left space vs right general category */ + case 8: /* Left word vs right general category */ + p = posspropstab[n-6]; + accepted = risprop && lisprop == + (list[3] != p[0] && + list[3] != p[1] && + (list[3] != p[2] || !lisprop)); + break; + + case 9: /* Right alphanum vs left general category */ + case 10: /* Right space vs left general category */ + case 11: /* Right word vs left general category */ + p = posspropstab[n-9]; + accepted = lisprop && risprop == + (base_list[3] != p[0] && + base_list[3] != p[1] && + (base_list[3] != p[2] || !risprop)); + break; + + case 12: /* Left alphanum vs right particular category */ + case 13: /* Left space vs right particular category */ + case 14: /* Left word vs right particular category */ + p = posspropstab[n-12]; + accepted = risprop && lisprop == + (catposstab[p[0]][list[3]] && + catposstab[p[1]][list[3]] && + (list[3] != p[3] || !lisprop)); + break; + + case 15: /* Right alphanum vs left particular category */ + case 16: /* Right space vs left particular category */ + case 17: /* Right word vs left particular category */ + p = posspropstab[n-15]; + accepted = lisprop && risprop == + (catposstab[p[0]][base_list[3]] && + catposstab[p[1]][base_list[3]] && + (base_list[3] != p[3] || !risprop)); + break; + } + } + } + + else +#endif /* SUPPORT_UCP */ + + accepted = leftop >= FIRST_AUTOTAB_OP && leftop <= LAST_AUTOTAB_LEFT_OP && + rightop >= FIRST_AUTOTAB_OP && rightop <= LAST_AUTOTAB_RIGHT_OP && + autoposstab[leftop - FIRST_AUTOTAB_OP][rightop - FIRST_AUTOTAB_OP]; + + if (!accepted) + return FALSE; + + if (list[1] == 0) return TRUE; + /* Might be an empty repeat. */ + continue; + } + + /* Control reaches here only if one of the items is a small character list. + All characters are checked against the other side. */ + + do + { + chr = *chr_ptr; + + switch(list_ptr[0]) + { + case OP_CHAR: + ochr_ptr = list_ptr + 2; + do + { + if (chr == *ochr_ptr) return FALSE; + ochr_ptr++; + } + while(*ochr_ptr != NOTACHAR); + break; + + case OP_NOT: + ochr_ptr = list_ptr + 2; + do + { + if (chr == *ochr_ptr) + break; + ochr_ptr++; + } + while(*ochr_ptr != NOTACHAR); + if (*ochr_ptr == NOTACHAR) return FALSE; /* Not found */ + break; + + /* Note that OP_DIGIT etc. are generated only when PCRE_UCP is *not* + set. When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */ + + case OP_DIGIT: + if (chr < 256 && (cd->ctypes[chr] & ctype_digit) != 0) return FALSE; + break; + + case OP_NOT_DIGIT: + if (chr > 255 || (cd->ctypes[chr] & ctype_digit) == 0) return FALSE; + break; + + case OP_WHITESPACE: + if (chr < 256 && (cd->ctypes[chr] & ctype_space) != 0) return FALSE; + break; + + case OP_NOT_WHITESPACE: + if (chr > 255 || (cd->ctypes[chr] & ctype_space) == 0) return FALSE; + break; + + case OP_WORDCHAR: + if (chr < 255 && (cd->ctypes[chr] & ctype_word) != 0) return FALSE; + break; + + case OP_NOT_WORDCHAR: + if (chr > 255 || (cd->ctypes[chr] & ctype_word) == 0) return FALSE; + break; + + case OP_HSPACE: + switch(chr) + { + HSPACE_CASES: return FALSE; + default: break; + } + break; + + case OP_NOT_HSPACE: + switch(chr) + { + HSPACE_CASES: break; + default: return FALSE; + } + break; + + case OP_ANYNL: + case OP_VSPACE: + switch(chr) + { + VSPACE_CASES: return FALSE; + default: break; + } + break; + + case OP_NOT_VSPACE: + switch(chr) + { + VSPACE_CASES: break; + default: return FALSE; + } + break; + + case OP_DOLL: + case OP_EODN: + switch (chr) + { + case CHAR_CR: + case CHAR_LF: + case CHAR_VT: + case CHAR_FF: + case CHAR_NEL: +#ifndef EBCDIC + case 0x2028: + case 0x2029: +#endif /* Not EBCDIC */ + return FALSE; + } + break; + + case OP_EOD: /* Can always possessify before \z */ + break; + +#ifdef SUPPORT_UCP + case OP_PROP: + case OP_NOTPROP: + if (!check_char_prop(chr, list_ptr[2], list_ptr[3], + list_ptr[0] == OP_NOTPROP)) + return FALSE; + break; +#endif + + case OP_NCLASS: + if (chr > 255) return FALSE; + /* Fall through */ + + case OP_CLASS: + if (chr > 255) break; + class_bitset = (pcre_uint8 *) + ((list_ptr == list ? code : base_end) - list_ptr[2]); + if ((class_bitset[chr >> 3] & (1 << (chr & 7))) != 0) return FALSE; + break; + +#if defined SUPPORT_UTF || !defined COMPILE_PCRE8 + case OP_XCLASS: + if (PRIV(xclass)(chr, (list_ptr == list ? code : base_end) - + list_ptr[2] + LINK_SIZE, utf)) return FALSE; + break; +#endif + + default: + return FALSE; + } + + chr_ptr++; + } + while(*chr_ptr != NOTACHAR); + + /* At least one character must be matched from this opcode. */ + + if (list[1] == 0) return TRUE; + } + +return FALSE; +} + + + +/************************************************* +* Scan compiled regex for auto-possession * +*************************************************/ + +/* Replaces single character iterations with their possessive alternatives +if appropriate. This function modifies the compiled opcode! + +Arguments: + code points to start of the byte code + utf TRUE in UTF-8 / UTF-16 / UTF-32 mode + cd static compile data + +Returns: nothing +*/ + +static void +auto_possessify(pcre_uchar *code, BOOL utf, const compile_data *cd) +{ +register pcre_uchar c; +const pcre_uchar *end; +pcre_uchar *repeat_opcode; +pcre_uint32 list[8]; + +for (;;) + { + c = *code; + + if (c >= OP_STAR && c <= OP_TYPEPOSUPTO) + { + c -= get_repeat_base(c) - OP_STAR; + end = (c <= OP_MINUPTO) ? + get_chr_property_list(code, utf, cd->fcc, list) : NULL; + list[1] = c == OP_STAR || c == OP_PLUS || c == OP_QUERY || c == OP_UPTO; + + if (end != NULL && compare_opcodes(end, utf, cd, list, end)) + { + switch(c) + { + case OP_STAR: + *code += OP_POSSTAR - OP_STAR; + break; + + case OP_MINSTAR: + *code += OP_POSSTAR - OP_MINSTAR; + break; + + case OP_PLUS: + *code += OP_POSPLUS - OP_PLUS; + break; + + case OP_MINPLUS: + *code += OP_POSPLUS - OP_MINPLUS; + break; + + case OP_QUERY: + *code += OP_POSQUERY - OP_QUERY; + break; + + case OP_MINQUERY: + *code += OP_POSQUERY - OP_MINQUERY; + break; + + case OP_UPTO: + *code += OP_POSUPTO - OP_UPTO; + break; + + case OP_MINUPTO: + *code += OP_MINUPTO - OP_UPTO; + break; + } + } + c = *code; + } + else if (c == OP_CLASS || c == OP_NCLASS || c == OP_XCLASS) + { +#if defined SUPPORT_UTF || !defined COMPILE_PCRE8 + if (c == OP_XCLASS) + repeat_opcode = code + GET(code, 1); + else +#endif + repeat_opcode = code + 1 + (32 / sizeof(pcre_uchar)); + + c = *repeat_opcode; + if (c >= OP_CRSTAR && c <= OP_CRMINRANGE) + { + /* end must not be NULL. */ + end = get_chr_property_list(code, utf, cd->fcc, list); + + list[1] = (c & 1) == 0; + + if (compare_opcodes(end, utf, cd, list, end)) + { + switch (c) + { + case OP_CRSTAR: + case OP_CRMINSTAR: + *repeat_opcode = OP_CRPOSSTAR; + break; + + case OP_CRPLUS: + case OP_CRMINPLUS: + *repeat_opcode = OP_CRPOSPLUS; + break; + + case OP_CRQUERY: + case OP_CRMINQUERY: + *repeat_opcode = OP_CRPOSQUERY; + break; + + case OP_CRRANGE: + case OP_CRMINRANGE: + *repeat_opcode = OP_CRPOSRANGE; + break; + } + } + } + c = *code; + } + + switch(c) + { + case OP_END: + return; + + case OP_TYPESTAR: + case OP_TYPEMINSTAR: + case OP_TYPEPLUS: + case OP_TYPEMINPLUS: + case OP_TYPEQUERY: + case OP_TYPEMINQUERY: + case OP_TYPEPOSSTAR: + case OP_TYPEPOSPLUS: + case OP_TYPEPOSQUERY: + if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2; + break; + + case OP_TYPEUPTO: + case OP_TYPEMINUPTO: + case OP_TYPEEXACT: + case OP_TYPEPOSUPTO: + if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP) + code += 2; + break; + +#if defined SUPPORT_UTF || !defined COMPILE_PCRE8 + case OP_XCLASS: + code += GET(code, 1); + break; +#endif + + case OP_MARK: + case OP_PRUNE_ARG: + case OP_SKIP_ARG: + case OP_THEN_ARG: + code += code[1]; + break; + } + + /* Add in the fixed length from the table */ + + code += PRIV(OP_lengths)[c]; + + /* In UTF-8 mode, opcodes that are followed by a character may be followed by + a multi-byte character. The length in the table is a minimum, so we have to + arrange to skip the extra bytes. */ + +#if defined SUPPORT_UTF && !defined COMPILE_PCRE32 + if (utf) switch(c) + { + case OP_CHAR: + case OP_CHARI: + case OP_NOT: + case OP_NOTI: + case OP_STAR: + case OP_MINSTAR: + case OP_PLUS: + case OP_MINPLUS: + case OP_QUERY: + case OP_MINQUERY: + case OP_UPTO: + case OP_MINUPTO: + case OP_EXACT: + case OP_POSSTAR: + case OP_POSPLUS: + case OP_POSQUERY: + case OP_POSUPTO: + case OP_STARI: + case OP_MINSTARI: + case OP_PLUSI: + case OP_MINPLUSI: + case OP_QUERYI: + case OP_MINQUERYI: + case OP_UPTOI: + case OP_MINUPTOI: + case OP_EXACTI: + case OP_POSSTARI: + case OP_POSPLUSI: + case OP_POSQUERYI: + case OP_POSUPTOI: + case OP_NOTSTAR: + case OP_NOTMINSTAR: + case OP_NOTPLUS: + case OP_NOTMINPLUS: + case OP_NOTQUERY: + case OP_NOTMINQUERY: + case OP_NOTUPTO: + case OP_NOTMINUPTO: + case OP_NOTEXACT: + case OP_NOTPOSSTAR: + case OP_NOTPOSPLUS: + case OP_NOTPOSQUERY: + case OP_NOTPOSUPTO: + case OP_NOTSTARI: + case OP_NOTMINSTARI: + case OP_NOTPLUSI: + case OP_NOTMINPLUSI: + case OP_NOTQUERYI: + case OP_NOTMINQUERYI: + case OP_NOTUPTOI: + case OP_NOTMINUPTOI: + case OP_NOTEXACTI: + case OP_NOTPOSSTARI: + case OP_NOTPOSPLUSI: + case OP_NOTPOSQUERYI: + case OP_NOTPOSUPTOI: + if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]); + break; + } +#else + (void)(utf); /* Keep compiler happy by referencing function argument */ +#endif + } +} + + + +/************************************************* * Check for POSIX class syntax * *************************************************/ @@ -2702,7 +3813,7 @@ class, but [abc[:x\]pqr:]] is (so that an error can be generated). The code below handles the special case of \], but does not try to do any other escape processing. This makes it different from Perl for cases such as [:l\ower:] where Perl recognizes it as the POSIX class "lower" but PCRE does not recognize -"l\ower". This is a lesser evil that not diagnosing bad classes when Perl does, +"l\ower". This is a lesser evil than not diagnosing bad classes when Perl does, I think. A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not. @@ -2964,477 +4075,11 @@ for (++c; c <= d; c++) *cptr = c; /* Rest of input range */ return 0; } - - - -/************************************************* -* Check a character and a property * -*************************************************/ - -/* This function is called by check_auto_possessive() when a property item -is adjacent to a fixed character. - -Arguments: - c the character - ptype the property type - pdata the data for the type - negated TRUE if it's a negated property (\P or \p{^) - -Returns: TRUE if auto-possessifying is OK -*/ - -static BOOL -check_char_prop(pcre_uint32 c, unsigned int ptype, unsigned int pdata, BOOL negated) -{ -#ifdef SUPPORT_UCP -const pcre_uint32 *p; -#endif - -const ucd_record *prop = GET_UCD(c); - -switch(ptype) - { - case PT_LAMP: - return (prop->chartype == ucp_Lu || - prop->chartype == ucp_Ll || - prop->chartype == ucp_Lt) == negated; - - case PT_GC: - return (pdata == PRIV(ucp_gentype)[prop->chartype]) == negated; - - case PT_PC: - return (pdata == prop->chartype) == negated; - - case PT_SC: - return (pdata == prop->script) == negated; - - /* These are specials */ - - case PT_ALNUM: - return (PRIV(ucp_gentype)[prop->chartype] == ucp_L || - PRIV(ucp_gentype)[prop->chartype] == ucp_N) == negated; - - case PT_SPACE: /* Perl space */ - return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR) - == negated; - - case PT_PXSPACE: /* POSIX space */ - return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || - c == CHAR_FF || c == CHAR_CR) - == negated; - - case PT_WORD: - return (PRIV(ucp_gentype)[prop->chartype] == ucp_L || - PRIV(ucp_gentype)[prop->chartype] == ucp_N || - c == CHAR_UNDERSCORE) == negated; - -#ifdef SUPPORT_UCP - case PT_CLIST: - p = PRIV(ucd_caseless_sets) + prop->caseset; - for (;;) - { - if (c < *p) return !negated; - if (c == *p++) return negated; - } - break; /* Control never reaches here */ -#endif - } - -return FALSE; -} #endif /* SUPPORT_UCP */ /************************************************* -* Check if auto-possessifying is possible * -*************************************************/ - -/* This function is called for unlimited repeats of certain items, to see -whether the next thing could possibly match the repeated item. If not, it makes -sense to automatically possessify the repeated item. - -Arguments: - previous pointer to the repeated opcode - utf TRUE in UTF-8 / UTF-16 / UTF-32 mode - ptr next character in pattern - options options bits - cd contains pointers to tables etc. - -Returns: TRUE if possessifying is wanted -*/ - -static BOOL -check_auto_possessive(const pcre_uchar *previous, BOOL utf, - const pcre_uchar *ptr, int options, compile_data *cd) -{ -pcre_uint32 c = NOTACHAR; -pcre_uint32 next; -int escape; -pcre_uchar op_code = *previous++; - -/* Skip whitespace and comments in extended mode */ - -if ((options & PCRE_EXTENDED) != 0) - { - for (;;) - { - while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_space) != 0) ptr++; - if (*ptr == CHAR_NUMBER_SIGN) - { - ptr++; - while (*ptr != CHAR_NULL) - { - if (IS_NEWLINE(ptr)) { ptr += cd->nllen; break; } - ptr++; -#ifdef SUPPORT_UTF - if (utf) FORWARDCHAR(ptr); -#endif - } - } - else break; - } - } - -/* If the next item is one that we can handle, get its value. A non-negative -value is a character, a negative value is an escape value. */ - -if (*ptr == CHAR_BACKSLASH) - { - int temperrorcode = 0; - escape = check_escape(&ptr, &next, &temperrorcode, cd->bracount, options, - FALSE); - if (temperrorcode != 0) return FALSE; - ptr++; /* Point after the escape sequence */ - } -else if (!MAX_255(*ptr) || (cd->ctypes[*ptr] & ctype_meta) == 0) - { - escape = 0; -#ifdef SUPPORT_UTF - if (utf) { GETCHARINC(next, ptr); } else -#endif - next = *ptr++; - } -else return FALSE; - -/* Skip whitespace and comments in extended mode */ - -if ((options & PCRE_EXTENDED) != 0) - { - for (;;) - { - while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_space) != 0) ptr++; - if (*ptr == CHAR_NUMBER_SIGN) - { - ptr++; - while (*ptr != CHAR_NULL) - { - if (IS_NEWLINE(ptr)) { ptr += cd->nllen; break; } - ptr++; -#ifdef SUPPORT_UTF - if (utf) FORWARDCHAR(ptr); -#endif - } - } - else break; - } - } - -/* If the next thing is itself optional, we have to give up. */ - -if (*ptr == CHAR_ASTERISK || *ptr == CHAR_QUESTION_MARK || - STRNCMP_UC_C8(ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0) - return FALSE; - -/* If the previous item is a character, get its value. */ - -if (op_code == OP_CHAR || op_code == OP_CHARI || - op_code == OP_NOT || op_code == OP_NOTI) - { -#ifdef SUPPORT_UTF - GETCHARTEST(c, previous); -#else - c = *previous; -#endif - } - -/* Now compare the next item with the previous opcode. First, handle cases when -the next item is a character. */ - -if (escape == 0) - { - /* For a caseless UTF match, the next character may have more than one other - case, which maps to the special PT_CLIST property. Check this first. */ - -#ifdef SUPPORT_UCP - if (utf && c != NOTACHAR && (options & PCRE_CASELESS) != 0) - { - unsigned int ocs = UCD_CASESET(next); - if (ocs > 0) return check_char_prop(c, PT_CLIST, ocs, op_code >= OP_NOT); - } -#endif - - switch(op_code) - { - case OP_CHAR: - return c != next; - - /* For CHARI (caseless character) we must check the other case. If we have - Unicode property support, we can use it to test the other case of - high-valued characters. We know that next can have only one other case, - because multi-other-case characters are dealt with above. */ - - case OP_CHARI: - if (c == next) return FALSE; -#ifdef SUPPORT_UTF - if (utf) - { - pcre_uint32 othercase; - if (next < 128) othercase = cd->fcc[next]; else -#ifdef SUPPORT_UCP - othercase = UCD_OTHERCASE(next); -#else - othercase = NOTACHAR; -#endif - return c != othercase; - } - else -#endif /* SUPPORT_UTF */ - return (c != TABLE_GET(next, cd->fcc, next)); /* Not UTF */ - - case OP_NOT: - return c == next; - - case OP_NOTI: - if (c == next) return TRUE; -#ifdef SUPPORT_UTF - if (utf) - { - pcre_uint32 othercase; - if (next < 128) othercase = cd->fcc[next]; else -#ifdef SUPPORT_UCP - othercase = UCD_OTHERCASE(next); -#else - othercase = NOTACHAR; -#endif - return c == othercase; - } - else -#endif /* SUPPORT_UTF */ - return (c == TABLE_GET(next, cd->fcc, next)); /* Not UTF */ - - /* Note that OP_DIGIT etc. are generated only when PCRE_UCP is *not* set. - When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */ - - case OP_DIGIT: - return next > 255 || (cd->ctypes[next] & ctype_digit) == 0; - - case OP_NOT_DIGIT: - return next <= 255 && (cd->ctypes[next] & ctype_digit) != 0; - - case OP_WHITESPACE: - return next > 255 || (cd->ctypes[next] & ctype_space) == 0; - - case OP_NOT_WHITESPACE: - return next <= 255 && (cd->ctypes[next] & ctype_space) != 0; - - case OP_WORDCHAR: - return next > 255 || (cd->ctypes[next] & ctype_word) == 0; - - case OP_NOT_WORDCHAR: - return next <= 255 && (cd->ctypes[next] & ctype_word) != 0; - - case OP_HSPACE: - case OP_NOT_HSPACE: - switch(next) - { - HSPACE_CASES: - return op_code == OP_NOT_HSPACE; - - default: - return op_code != OP_NOT_HSPACE; - } - - case OP_ANYNL: - case OP_VSPACE: - case OP_NOT_VSPACE: - switch(next) - { - VSPACE_CASES: - return op_code == OP_NOT_VSPACE; - - default: - return op_code != OP_NOT_VSPACE; - } - -#ifdef SUPPORT_UCP - case OP_PROP: - return check_char_prop(next, previous[0], previous[1], FALSE); - - case OP_NOTPROP: - return check_char_prop(next, previous[0], previous[1], TRUE); -#endif - - default: - return FALSE; - } - } - -/* Handle the case when the next item is \d, \s, etc. Note that when PCRE_UCP -is set, \d turns into ESC_du rather than ESC_d, etc., so ESC_d etc. are -generated only when PCRE_UCP is *not* set, that is, when only ASCII -characteristics are recognized. Similarly, the opcodes OP_DIGIT etc. are -replaced by OP_PROP codes when PCRE_UCP is set. */ - -switch(op_code) - { - case OP_CHAR: - case OP_CHARI: - switch(escape) - { - case ESC_d: - return c > 255 || (cd->ctypes[c] & ctype_digit) == 0; - - case ESC_D: - return c <= 255 && (cd->ctypes[c] & ctype_digit) != 0; - - case ESC_s: - return c > 255 || (cd->ctypes[c] & ctype_space) == 0; - - case ESC_S: - return c <= 255 && (cd->ctypes[c] & ctype_space) != 0; - - case ESC_w: - return c > 255 || (cd->ctypes[c] & ctype_word) == 0; - - case ESC_W: - return c <= 255 && (cd->ctypes[c] & ctype_word) != 0; - - case ESC_h: - case ESC_H: - switch(c) - { - HSPACE_CASES: - return escape != ESC_h; - - default: - return escape == ESC_h; - } - - case ESC_v: - case ESC_V: - switch(c) - { - VSPACE_CASES: - return escape != ESC_v; - - default: - return escape == ESC_v; - } - - /* When PCRE_UCP is set, these values get generated for \d etc. Find - their substitutions and process them. The result will always be either - ESC_p or ESC_P. Then fall through to process those values. */ - -#ifdef SUPPORT_UCP - case ESC_du: - case ESC_DU: - case ESC_wu: - case ESC_WU: - case ESC_su: - case ESC_SU: - { - int temperrorcode = 0; - ptr = substitutes[escape - ESC_DU]; - escape = check_escape(&ptr, &next, &temperrorcode, 0, options, FALSE); - if (temperrorcode != 0) return FALSE; - ptr++; /* For compatibility */ - } - /* Fall through */ - - case ESC_p: - case ESC_P: - { - unsigned int ptype = 0, pdata = 0; - int errorcodeptr; - BOOL negated; - - ptr--; /* Make ptr point at the p or P */ - if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcodeptr)) - return FALSE; - ptr++; /* Point past the final curly ket */ - - /* If the property item is optional, we have to give up. (When generated - from \d etc by PCRE_UCP, this test will have been applied much earlier, - to the original \d etc. At this point, ptr will point to a zero byte. */ - - if (*ptr == CHAR_ASTERISK || *ptr == CHAR_QUESTION_MARK || - STRNCMP_UC_C8(ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0) - return FALSE; - - /* Do the property check. */ - - return check_char_prop(c, ptype, pdata, (escape == ESC_P) != negated); - } -#endif - - default: - return FALSE; - } - - /* In principle, support for Unicode properties should be integrated here as - well. It means re-organizing the above code so as to get hold of the property - values before switching on the op-code. However, I wonder how many patterns - combine ASCII \d etc with Unicode properties? (Note that if PCRE_UCP is set, - these op-codes are never generated.) */ - - case OP_DIGIT: - return escape == ESC_D || escape == ESC_s || escape == ESC_W || - escape == ESC_h || escape == ESC_v || escape == ESC_R; - - case OP_NOT_DIGIT: - return escape == ESC_d; - - case OP_WHITESPACE: - return escape == ESC_S || escape == ESC_d || escape == ESC_w; - - case OP_NOT_WHITESPACE: - return escape == ESC_s || escape == ESC_h || escape == ESC_v || escape == ESC_R; - - case OP_HSPACE: - return escape == ESC_S || escape == ESC_H || escape == ESC_d || - escape == ESC_w || escape == ESC_v || escape == ESC_R; - - case OP_NOT_HSPACE: - return escape == ESC_h; - - /* Can't have \S in here because VT matches \S (Perl anomaly) */ - case OP_ANYNL: - case OP_VSPACE: - return escape == ESC_V || escape == ESC_d || escape == ESC_w; - - case OP_NOT_VSPACE: - return escape == ESC_v || escape == ESC_R; - - case OP_WORDCHAR: - return escape == ESC_W || escape == ESC_s || escape == ESC_h || - escape == ESC_v || escape == ESC_R; - - case OP_NOT_WORDCHAR: - return escape == ESC_w || escape == ESC_d; - - default: - return FALSE; - } - -/* Control does not reach here */ -} - - - -/************************************************* * Add a character or range to a class * *************************************************/ @@ -3683,22 +4328,22 @@ to find out the amount of memory needed, as well as during the real compile phase. The value of lengthptr distinguishes the two phases. Arguments: - optionsptr pointer to the option bits - codeptr points to the pointer to the current code point - ptrptr points to the current pattern pointer - errorcodeptr points to error code variable - firstcharptr place to put the first required character + optionsptr pointer to the option bits + codeptr points to the pointer to the current code point + ptrptr points to the current pattern pointer + errorcodeptr points to error code variable + firstcharptr place to put the first required character firstcharflagsptr place to put the first character flags, or a negative number - reqcharptr place to put the last required character - reqcharflagsptr place to put the last required character flags, or a negative number - bcptr points to current branch chain - cond_depth conditional nesting depth - cd contains pointers to tables etc. - lengthptr NULL during the real compile phase - points to length accumulator during pre-compile phase - -Returns: TRUE on success - FALSE, with *errorcodeptr set non-zero on error + reqcharptr place to put the last required character + reqcharflagsptr place to put the last required character flags, or a negative number + bcptr points to current branch chain + cond_depth conditional nesting depth + cd contains pointers to tables etc. + lengthptr NULL during the real compile phase + points to length accumulator during pre-compile phase + +Returns: TRUE on success + FALSE, with *errorcodeptr set non-zero on error */ static BOOL @@ -3921,58 +4566,67 @@ for (;; ptr++) } goto NORMAL_CHAR; } + /* Control does not reach here. */ } - /* Fill in length of a previous callout, except when the next thing is - a quantifier. */ - - is_quantifier = - c == CHAR_ASTERISK || c == CHAR_PLUS || c == CHAR_QUESTION_MARK || - (c == CHAR_LEFT_CURLY_BRACKET && is_counted_repeat(ptr+1)); - - if (!is_quantifier && previous_callout != NULL && - after_manual_callout-- <= 0) - { - if (lengthptr == NULL) /* Don't attempt in pre-compile phase */ - complete_callout(previous_callout, ptr, cd); - previous_callout = NULL; - } - - /* In extended mode, skip white space and comments. */ + /* In extended mode, skip white space and comments. We need a loop in order + to check for more white space and more comments after a comment. */ if ((options & PCRE_EXTENDED) != 0) { - if (MAX_255(*ptr) && (cd->ctypes[c] & ctype_space) != 0) continue; - if (c == CHAR_NUMBER_SIGN) + for (;;) { + while (MAX_255(c) && (cd->ctypes[c] & ctype_space) != 0) c = *(++ptr); + if (c != CHAR_NUMBER_SIGN) break; ptr++; while (*ptr != CHAR_NULL) { - if (IS_NEWLINE(ptr)) { ptr += cd->nllen - 1; break; } + if (IS_NEWLINE(ptr)) /* For non-fixed-length newline cases, */ + { /* IS_NEWLINE sets cd->nllen. */ + ptr += cd->nllen; + break; + } ptr++; #ifdef SUPPORT_UTF if (utf) FORWARDCHAR(ptr); #endif } - if (*ptr != CHAR_NULL) continue; - - /* Else fall through to handle end of string */ - c = 0; + c = *ptr; /* Either NULL or the char after a newline */ } } - /* No auto callout for quantifiers. */ + /* See if the next thing is a quantifier. */ - if ((options & PCRE_AUTO_CALLOUT) != 0 && !is_quantifier) + is_quantifier = + c == CHAR_ASTERISK || c == CHAR_PLUS || c == CHAR_QUESTION_MARK || + (c == CHAR_LEFT_CURLY_BRACKET && is_counted_repeat(ptr+1)); + + /* Fill in length of a previous callout, except when the next thing is a + quantifier or when processing a property substitution string in UCP mode. */ + + if (!is_quantifier && previous_callout != NULL && nestptr == NULL && + after_manual_callout-- <= 0) + { + if (lengthptr == NULL) /* Don't attempt in pre-compile phase */ + complete_callout(previous_callout, ptr, cd); + previous_callout = NULL; + } + + /* Create auto callout, except for quantifiers, or while processing property + strings that are substituted for \w etc in UCP mode. */ + + if ((options & PCRE_AUTO_CALLOUT) != 0 && !is_quantifier && nestptr == NULL) { previous_callout = code; code = auto_callout(code, ptr, cd); } + /* Process the next pattern item. */ + switch(c) { /* ===================================================================*/ - case 0: /* The branch terminates at string end */ + case CHAR_NULL: /* The branch terminates at string end */ case CHAR_VERTICAL_LINE: /* or | or ) */ case CHAR_RIGHT_PARENTHESIS: *firstcharptr = firstchar; @@ -4056,23 +4710,29 @@ for (;; ptr++) by \b(?=\w) and \b(?<=\w) respectively. Sequences like [a[:<:]] are erroneous and are handled by the normal code below. */ + /* In another (POSIX) regex library, the ugly syntax [[:<:]] and [[:>:]] is + used for "start of word" and "end of word". As these are otherwise illegal + sequences, we don't break anything by recognizing them. They are replaced + by \b(?=\w) and \b(?<=\w) respectively. Sequences like [a[:<:]] are + erroneous and are handled by the normal code below. */ + case CHAR_LEFT_SQUARE_BRACKET: if (STRNCMP_UC_C8(ptr+1, STRING_WEIRD_STARTWORD, 6) == 0) { nestptr = ptr + 7; ptr = sub_start_of_word - 1; - continue; - } + continue; + } if (STRNCMP_UC_C8(ptr+1, STRING_WEIRD_ENDWORD, 6) == 0) { nestptr = ptr + 7; ptr = sub_end_of_word - 1; - continue; - } + continue; + } /* Handle a real character class. */ - + previous = code; /* PCRE supports POSIX class stuff inside a class. Perl gives an error if @@ -4237,24 +4897,58 @@ for (;; ptr++) posix_class = 0; /* When PCRE_UCP is set, some of the POSIX classes are converted to - different escape sequences that use Unicode properties. */ + different escape sequences that use Unicode properties \p or \P. Others + that are not available via \p or \P generate XCL_PROP/XCL_NOTPROP + directly. */ #ifdef SUPPORT_UCP if ((options & PCRE_UCP) != 0) { + unsigned int ptype = 0; int pc = posix_class + ((local_negate)? POSIX_SUBSIZE/2 : 0); + + /* The posix_substitutes table specifies which POSIX classes can be + converted to \p or \P items. */ + if (posix_substitutes[pc] != NULL) { nestptr = tempptr + 1; ptr = posix_substitutes[pc] - 1; continue; } + + /* There are three other classes that generate special property calls + that are recognized only in an XCLASS. */ + + else switch(posix_class) + { + case PC_GRAPH: + ptype = PT_PXGRAPH; + /* Fall through */ + case PC_PRINT: + if (ptype == 0) ptype = PT_PXPRINT; + /* Fall through */ + case PC_PUNCT: + if (ptype == 0) ptype = PT_PXPUNCT; + *class_uchardata++ = local_negate? XCL_NOTPROP : XCL_PROP; + *class_uchardata++ = ptype; + *class_uchardata++ = 0; + ptr = tempptr + 1; + continue; + + /* For all other POSIX classes, no special action is taken in UCP + mode. Fall through to the non_UCP case. */ + + default: + break; + } } #endif - /* In the non-UCP case, we build the bit map for the POSIX class in a - chunk of local store because we may be adding and subtracting from it, - and we don't want to subtract bits that may be in the main map already. - At the end we or the result into the bit map that is being built. */ + /* In the non-UCP case, or when UCP makes no difference, we build the + bit map for the POSIX class in a chunk of local store because we may be + adding and subtracting from it, and we don't want to subtract bits that + may be in the main map already. At the end we or the result into the + bit map that is being built. */ posix_class *= 3; @@ -4371,21 +5065,20 @@ for (;; ptr++) for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_word]; continue; - /* Perl 5.004 onwards omits VT from \s, but we must preserve it - if it was previously set by something earlier in the character - class. Luckily, the value of CHAR_VT is 0x0b in both ASCII and - EBCDIC, so we lazily just adjust the appropriate bit. */ + /* Perl 5.004 onwards omitted VT from \s, but restored it at Perl + 5.18. Before PCRE 8.34, we had to preserve the VT bit if it was + previously set by something earlier in the character class. + Luckily, the value of CHAR_VT is 0x0b in both ASCII and EBCDIC, so + we could just adjust the appropriate bit. From PCRE 8.34 we no + longer treat \s and \S specially. */ case ESC_s: - classbits[0] |= cbits[cbit_space]; - classbits[1] |= cbits[cbit_space+1] & ~0x08; - for (c = 2; c < 32; c++) classbits[c] |= cbits[c+cbit_space]; + for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_space]; continue; case ESC_S: should_flip_negation = TRUE; for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_space]; - classbits[1] |= 0x08; /* Perl 5.004 onwards omits VT from \s */ continue; /* The rest apply in both UCP and non-UCP cases. */ @@ -4507,26 +5200,43 @@ for (;; ptr++) #endif d = *ptr; /* Not UTF-8 mode */ - /* The second part of a range can be a single-character escape, but - not any of the other escapes. Perl 5.6 treats a hyphen as a literal - in such circumstances. */ + /* The second part of a range can be a single-character escape + sequence, but not any of the other escapes. Perl treats a hyphen as a + literal in such circumstances. However, in Perl's warning mode, a + warning is given, so PCRE now faults it as it is almost certainly a + mistake on the user's part. */ - if (!inescq && d == CHAR_BACKSLASH) + if (!inescq) { - int descape; - descape = check_escape(&ptr, &d, errorcodeptr, cd->bracount, options, TRUE); - if (*errorcodeptr != 0) goto FAILED; + if (d == CHAR_BACKSLASH) + { + int descape; + descape = check_escape(&ptr, &d, errorcodeptr, cd->bracount, options, TRUE); + if (*errorcodeptr != 0) goto FAILED; - /* \b is backspace; any other special means the '-' was literal. */ + /* 0 means a character was put into d; \b is backspace; any other + special causes an error. */ - if (descape != 0) - { - if (descape == ESC_b) d = CHAR_BS; else + if (descape != 0) { - ptr = oldptr; - goto CLASS_SINGLE_CHARACTER; /* A few lines below */ + if (descape == ESC_b) d = CHAR_BS; else + { + *errorcodeptr = ERR83; + goto FAILED; + } } } + + /* A hyphen followed by a POSIX class is treated in the same way. */ + + else if (d == CHAR_LEFT_SQUARE_BRACKET && + (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT || + ptr[1] == CHAR_EQUALS_SIGN) && + check_posix_syntax(ptr, &tempptr)) + { + *errorcodeptr = ERR83; + goto FAILED; + } } /* Check that the two values are in the correct order. Optimize @@ -4790,6 +5500,34 @@ for (;; ptr++) tempcode = previous; + /* Before checking for a possessive quantifier, we must skip over + whitespace and comments in extended mode because Perl allows white space at + this point. */ + + if ((options & PCRE_EXTENDED) != 0) + { + const pcre_uchar *p = ptr + 1; + for (;;) + { + while (MAX_255(*p) && (cd->ctypes[*p] & ctype_space) != 0) p++; + if (*p != CHAR_NUMBER_SIGN) break; + p++; + while (*p != CHAR_NULL) + { + if (IS_NEWLINE(p)) /* For non-fixed-length newline cases, */ + { /* IS_NEWLINE sets cd->nllen. */ + p += cd->nllen; + break; + } + p++; +#ifdef SUPPORT_UTF + if (utf) FORWARDCHAR(p); +#endif + } /* Loop for comment characters */ + } /* Loop for multiple comments */ + ptr = p - 1; /* Character before the next significant one. */ + } + /* If the next character is '+', we have a possessive quantifier. This implies greediness, whatever the setting of the PCRE_UNGREEDY option. If the next character is '?' this is a minimizing repeat, by default, @@ -4884,19 +5622,6 @@ for (;; ptr++) } } - /* If the repetition is unlimited, it pays to see if the next thing on - the line is something that cannot possibly match this character. If so, - automatically possessifying this item gains some performance in the case - where the match fails. */ - - if (!possessive_quantifier && - repeat_max < 0 && - check_auto_possessive(previous, utf, ptr + 1, options, cd)) - { - repeat_type = 0; /* Force greedy */ - possessive_quantifier = TRUE; - } - goto OUTPUT_SINGLE_REPEAT; /* Code shared with single character types */ } @@ -4914,14 +5639,6 @@ for (;; ptr++) op_type = OP_TYPESTAR - OP_STAR; /* Use type opcodes */ c = *previous; - if (!possessive_quantifier && - repeat_max < 0 && - check_auto_possessive(previous, utf, ptr + 1, options, cd)) - { - repeat_type = 0; /* Force greedy */ - possessive_quantifier = TRUE; - } - OUTPUT_SINGLE_REPEAT: if (*previous == OP_PROP || *previous == OP_NOTPROP) { @@ -5070,13 +5787,12 @@ for (;; ptr++) /* If previous was a character class or a back reference, we put the repeat stuff after it, but just skip the item if the repeat was {0,0}. */ - else if (*previous == OP_CLASS || - *previous == OP_NCLASS || + else if (*previous == OP_CLASS || *previous == OP_NCLASS || #if defined SUPPORT_UTF || !defined COMPILE_PCRE8 *previous == OP_XCLASS || #endif - *previous == OP_REF || - *previous == OP_REFI) + *previous == OP_REF || *previous == OP_REFI || + *previous == OP_DNREF || *previous == OP_DNREFI) { if (repeat_max == 0) { @@ -5104,8 +5820,9 @@ for (;; ptr++) opcodes such as BRA and CBRA, as this is the place where they get converted into the more special varieties such as BRAPOS and SBRA. A test for >= OP_ASSERT and <= OP_COND includes ASSERT, ASSERT_NOT, ASSERTBACK, - ASSERTBACK_NOT, ONCE, BRA, CBRA, and COND. Originally, PCRE did not allow - repetition of assertions, but now it does, for Perl compatibility. */ + ASSERTBACK_NOT, ONCE, ONCE_NC, BRA, BRAPOS, CBRA, CBRAPOS, and COND. + Originally, PCRE did not allow repetition of assertions, but now it does, + for Perl compatibility. */ else if (*previous >= OP_ASSERT && *previous <= OP_COND) { @@ -5123,7 +5840,7 @@ for (;; ptr++) /* There is no sense in actually repeating assertions. The only potential use of repetition is in cases when the assertion is optional. Therefore, if the minimum is greater than zero, just ignore the repeat. If the - maximum is not not zero or one, set it to 1. */ + maximum is not zero or one, set it to 1. */ if (*previous < OP_ONCE) /* Assertion */ { @@ -5426,7 +6143,7 @@ for (;; ptr++) pcre_uchar *scode = bracode; do { - if (could_be_empty_branch(scode, ketcode, utf, cd)) + if (could_be_empty_branch(scode, ketcode, utf, cd, NULL)) { *bracode += OP_SBRA - OP_BRA; break; @@ -5496,43 +6213,105 @@ for (;; ptr++) goto FAILED; } - /* If the character following a repeat is '+', or if certain optimization - tests above succeeded, possessive_quantifier is TRUE. For some opcodes, - there are special alternative opcodes for this case. For anything else, we - wrap the entire repeated item inside OP_ONCE brackets. Logically, the '+' - notation is just syntactic sugar, taken from Sun's Java package, but the - special opcodes can optimize it. + /* If the character following a repeat is '+', possessive_quantifier is + TRUE. For some opcodes, there are special alternative opcodes for this + case. For anything else, we wrap the entire repeated item inside OP_ONCE + brackets. Logically, the '+' notation is just syntactic sugar, taken from + Sun's Java package, but the special opcodes can optimize it. Some (but not all) possessively repeated subpatterns have already been completely handled in the code just above. For them, possessive_quantifier - is always FALSE at this stage. - - Note that the repeated item starts at tempcode, not at previous, which - might be the first part of a string whose (former) last char we repeated. - - Possessifying an 'exact' quantifier has no effect, so we can ignore it. But - an 'upto' may follow. We skip over an 'exact' item, and then test the - length of what remains before proceeding. */ + is always FALSE at this stage. Note that the repeated item starts at + tempcode, not at previous, which might be the first part of a string whose + (former) last char we repeated. */ if (possessive_quantifier) { int len; - if (*tempcode == OP_TYPEEXACT) + /* Possessifying an EXACT quantifier has no effect, so we can ignore it. + However, QUERY, STAR, or UPTO may follow (for quantifiers such as {5,6}, + {5,}, or {5,10}). We skip over an EXACT item; if the length of what + remains is greater than zero, there's a further opcode that can be + handled. If not, do nothing, leaving the EXACT alone. */ + + switch(*tempcode) + { + case OP_TYPEEXACT: tempcode += PRIV(OP_lengths)[*tempcode] + ((tempcode[1 + IMM2_SIZE] == OP_PROP || tempcode[1 + IMM2_SIZE] == OP_NOTPROP)? 2 : 0); + break; - else if (*tempcode == OP_EXACT || *tempcode == OP_NOTEXACT) - { + /* CHAR opcodes are used for exacts whose count is 1. */ + + case OP_CHAR: + case OP_CHARI: + case OP_NOT: + case OP_NOTI: + case OP_EXACT: + case OP_EXACTI: + case OP_NOTEXACT: + case OP_NOTEXACTI: tempcode += PRIV(OP_lengths)[*tempcode]; #ifdef SUPPORT_UTF if (utf && HAS_EXTRALEN(tempcode[-1])) tempcode += GET_EXTRALEN(tempcode[-1]); #endif + break; + + /* For the class opcodes, the repeat operator appears at the end; + adjust tempcode to point to it. */ + + case OP_CLASS: + case OP_NCLASS: + tempcode += 1 + 32/sizeof(pcre_uchar); + break; + +#if defined SUPPORT_UTF || !defined COMPILE_PCRE8 + case OP_XCLASS: + tempcode += GET(tempcode, 1); + break; +#endif } + /* If tempcode is equal to code (which points to the end of the repeated + item), it means we have skipped an EXACT item but there is no following + QUERY, STAR, or UPTO; the value of len will be 0, and we do nothing. In + all other cases, tempcode will be pointing to the repeat opcode, and will + be less than code, so the value of len will be greater than 0. */ + len = (int)(code - tempcode); + if (len > 0) + { + unsigned int repcode = *tempcode; + + /* There is a table for possessifying opcodes, all of which are less + than OP_CALLOUT. A zero entry means there is no possessified version. + */ + + if (repcode < OP_CALLOUT && opcode_possessify[repcode] > 0) + *tempcode = opcode_possessify[repcode]; + + /* For opcode without a special possessified version, wrap the item in + ONCE brackets. Because we are moving code along, we must ensure that any + pending recursive references are updated. */ + + else + { + *code = OP_END; + adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, save_hwm); + memmove(tempcode + 1 + LINK_SIZE, tempcode, IN_UCHARS(len)); + code += 1 + LINK_SIZE; + len += 1 + LINK_SIZE; + tempcode[0] = OP_ONCE; + *code++ = OP_KET; + PUTINC(code, 0, len); + PUT(tempcode, 1, len); + } + } + +#ifdef NEVER if (len > 0) switch (*tempcode) { case OP_STAR: *tempcode = OP_POSSTAR; break; @@ -5560,6 +6339,11 @@ for (;; ptr++) case OP_TYPEQUERY: *tempcode = OP_TYPEPOSQUERY; break; case OP_TYPEUPTO: *tempcode = OP_TYPEPOSUPTO; break; + case OP_CRSTAR: *tempcode = OP_CRPOSSTAR; break; + case OP_CRPLUS: *tempcode = OP_CRPOSPLUS; break; + case OP_CRQUERY: *tempcode = OP_CRPOSQUERY; break; + case OP_CRRANGE: *tempcode = OP_CRPOSRANGE; break; + /* Because we are moving code along, we must ensure that any pending recursive references are updated. */ @@ -5575,6 +6359,7 @@ for (;; ptr++) PUT(tempcode, 1, len); break; } +#endif } /* In all case we no longer have a previous item. We also set the @@ -5763,17 +6548,16 @@ for (;; ptr++) tempptr = ptr; /* A condition can be an assertion, a number (referring to a numbered - group), a name (referring to a named group), or 'R', referring to - recursion. R<digits> and R&name are also permitted for recursion tests. + group's having been set), a name (referring to a named group), or 'R', + referring to recursion. R<digits> and R&name are also permitted for + recursion tests. - There are several syntaxes for testing a named group: (?(name)) is used - by Python; Perl 5.10 onwards uses (?(<name>) or (?('name')). + There are ways of testing a named group: (?(name)) is used by Python; + Perl 5.10 onwards uses (?(<name>) or (?('name')). - There are two unfortunate ambiguities, caused by history. (a) 'R' can - be the recursive thing or the name 'R' (and similarly for 'R' followed - by digits), and (b) a number could be a name that consists of digits. - In both cases, we look for a name first; if not found, we try the other - cases. + There is one unfortunate ambiguity, caused by history. 'R' can be the + recursive thing or the name 'R' (and similarly for 'R' followed by + digits). We look for a name first; if not found, we try the other case. For compatibility with auto-callouts, we allow a callout to be specified before a condition that is an assertion. First, check for the @@ -5797,8 +6581,8 @@ for (;; ptr++) tempptr[2] == CHAR_LESS_THAN_SIGN)) break; - /* Most other conditions use OP_CREF (a couple change to OP_RREF - below), and all need to skip 1+IMM2_SIZE bytes at the start of the group. */ + /* Other conditions use OP_CREF/OP_DNCREF/OP_RREF/OP_DNRREF, and all + need to skip at least 1+IMM2_SIZE bytes at the start of the group. */ code[1+LINK_SIZE] = OP_CREF; skipbytes = 1+IMM2_SIZE; @@ -5806,7 +6590,8 @@ for (;; ptr++) /* Check for a test for recursion in a named group. */ - if (ptr[1] == CHAR_R && ptr[2] == CHAR_AMPERSAND) + ptr++; + if (*ptr == CHAR_R && ptr[1] == CHAR_AMPERSAND) { terminator = -1; ptr += 2; @@ -5814,14 +6599,15 @@ for (;; ptr++) } /* Check for a test for a named group's having been set, using the Perl - syntax (?(<name>) or (?('name') */ + syntax (?(<name>) or (?('name'), and also allow for the original PCRE + syntax of (?(name) or for (?(+n), (?(-n), and just (?(n). */ - else if (ptr[1] == CHAR_LESS_THAN_SIGN) + else if (*ptr == CHAR_LESS_THAN_SIGN) { terminator = CHAR_GREATER_THAN_SIGN; ptr++; } - else if (ptr[1] == CHAR_APOSTROPHE) + else if (*ptr == CHAR_APOSTROPHE) { terminator = CHAR_APOSTROPHE; ptr++; @@ -5829,35 +6615,55 @@ for (;; ptr++) else { terminator = CHAR_NULL; - if (ptr[1] == CHAR_MINUS || ptr[1] == CHAR_PLUS) refsign = *(++ptr); + if (*ptr == CHAR_MINUS || *ptr == CHAR_PLUS) refsign = *ptr++; + else if (IS_DIGIT(*ptr)) refsign = 0; } - /* We now expect to read a name; any thing else is an error */ + /* Handle a number */ - if (!MAX_255(ptr[1]) || (cd->ctypes[ptr[1]] & ctype_word) == 0) + if (refsign >= 0) { - ptr += 1; /* To get the right offset */ - *errorcodeptr = ERR28; - goto FAILED; + recno = 0; + while (IS_DIGIT(*ptr)) + { + recno = recno * 10 + (int)(*ptr - CHAR_0); + ptr++; + } } - /* Read the name, but also get it as a number if it's all digits */ + /* Otherwise we expect to read a name; anything else is an error. When + a name is one of a number of duplicates, a different opcode is used and + it needs more memory. Unfortunately we cannot tell whether a name is a + duplicate in the first pass, so we have to allow for more memory. */ - recno = 0; - name = ++ptr; - while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) + else { - if (recno >= 0) - recno = (IS_DIGIT(*ptr))? recno * 10 + (int)(*ptr - CHAR_0) : -1; - ptr++; + if (IS_DIGIT(*ptr)) + { + *errorcodeptr = ERR84; + goto FAILED; + } + if (!MAX_255(*ptr) || (cd->ctypes[*ptr] & ctype_word) == 0) + { + *errorcodeptr = ERR28; /* Assertion expected */ + goto FAILED; + } + name = ptr++; + while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) + { + ptr++; + } + namelen = (int)(ptr - name); + if (lengthptr != NULL) *lengthptr += IMM2_SIZE; } - namelen = (int)(ptr - name); + + /* Check the terminator */ if ((terminator > 0 && *ptr++ != (pcre_uchar)terminator) || *ptr++ != CHAR_RIGHT_PARENTHESIS) { - ptr--; /* Error offset */ - *errorcodeptr = ERR26; + ptr--; /* Error offset */ + *errorcodeptr = ERR26; /* Malformed number or name */ goto FAILED; } @@ -5866,18 +6672,18 @@ for (;; ptr++) if (lengthptr != NULL) break; /* In the real compile we do the work of looking for the actual - reference. If the string started with "+" or "-" we require the rest to - be digits, in which case recno will be set. */ + reference. If refsign is not negative, it means we have a number in + recno. */ - if (refsign > 0) + if (refsign >= 0) { if (recno <= 0) { - *errorcodeptr = ERR58; + *errorcodeptr = ERR35; goto FAILED; } - recno = (refsign == CHAR_MINUS)? - cd->bracount - recno + 1 : recno +cd->bracount; + if (refsign != 0) recno = (refsign == CHAR_MINUS)? + cd->bracount - recno + 1 : recno + cd->bracount; if (recno <= 0 || recno > cd->final_bracount) { *errorcodeptr = ERR15; @@ -5887,11 +6693,7 @@ for (;; ptr++) break; } - /* Otherwise (did not start with "+" or "-"), start by looking for the - name. If we find a name, add one to the opcode to change OP_CREF or - OP_RREF into OP_NCREF or OP_NRREF. These behave exactly the same, - except they record that the reference was originally to a name. The - information is used to check duplicate names. */ + /* Otherwise look for the name. */ slot = cd->name_table; for (i = 0; i < cd->names_found; i++) @@ -5900,29 +6702,40 @@ for (;; ptr++) slot += cd->name_entry_size; } - /* Found a previous named subpattern */ + /* Found the named subpattern. If the name is duplicated, add one to + the opcode to change CREF/RREF into DNCREF/DNRREF and insert + appropriate data values. Otherwise, just insert the unique subpattern + number. */ if (i < cd->names_found) { - recno = GET2(slot, 0); - PUT2(code, 2+LINK_SIZE, recno); - code[1+LINK_SIZE]++; - } - - /* Search the pattern for a forward reference */ - - else if ((i = find_parens(cd, name, namelen, - (options & PCRE_EXTENDED) != 0, utf)) > 0) - { - PUT2(code, 2+LINK_SIZE, i); - code[1+LINK_SIZE]++; + int offset = i++; + int count = 1; + recno = GET2(slot, 0); /* Number from first found */ + for (; i < cd->names_found; i++) + { + slot += cd->name_entry_size; + if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) != 0) break; + count++; + } + if (count > 1) + { + PUT2(code, 2+LINK_SIZE, offset); + PUT2(code, 2+LINK_SIZE+IMM2_SIZE, count); + skipbytes += IMM2_SIZE; + code[1+LINK_SIZE]++; + } + else /* Not a duplicated name */ + { + PUT2(code, 2+LINK_SIZE, recno); + } } /* If terminator == CHAR_NULL it means that the name followed directly after the opening parenthesis [e.g. (?(abc)...] and in this case there are some further alternatives to try. For the cases where terminator != - 0 [things like (?(<name>... or (?('name')... or (?(R&name)... ] we have - now checked all the possibilities, so give an error. */ + CHAR_NULL [things like (?(<name>... or (?('name')... or (?(R&name)... ] + we have now checked all the possibilities, so give an error. */ else if (terminator != CHAR_NULL) { @@ -5959,19 +6772,11 @@ for (;; ptr++) skipbytes = 1; } - /* Check for the "name" actually being a subpattern number. We are - in the second pass here, so final_bracount is set. */ - - else if (recno > 0 && recno <= cd->final_bracount) - { - PUT2(code, 2+LINK_SIZE, recno); - } - - /* Either an unidentified subpattern, or a reference to (?(0) */ + /* Reference to an unidentified subpattern. */ else { - *errorcodeptr = (recno == 0)? ERR35: ERR15; + *errorcodeptr = ERR15; goto FAILED; } break; @@ -5984,11 +6789,18 @@ for (;; ptr++) ptr++; break; + /* Optimize (?!) to (*FAIL) unless it is quantified - which is a weird + thing to do, but Perl allows all assertions to be quantified, and when + they contain capturing parentheses there may be a potential use for + this feature. Not that that applies to a quantified (?!) but we allow + it for uniformity. */ /* ------------------------------------------------------------ */ case CHAR_EXCLAMATION_MARK: /* Negative lookahead */ ptr++; - if (*ptr == CHAR_RIGHT_PARENTHESIS) /* Optimize (?!) */ + if (*ptr == CHAR_RIGHT_PARENTHESIS && ptr[1] != CHAR_ASTERISK && + ptr[1] != CHAR_PLUS && ptr[1] != CHAR_QUESTION_MARK && + (ptr[1] != CHAR_LEFT_CURLY_BRACKET || !is_counted_repeat(ptr+2))) { *code++ = OP_FAIL; previous = NULL; @@ -6081,124 +6893,110 @@ for (;; ptr++) /* ------------------------------------------------------------ */ DEFINE_NAME: /* Come here from (?< handling */ case CHAR_APOSTROPHE: + terminator = (*ptr == CHAR_LESS_THAN_SIGN)? + CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE; + name = ++ptr; + if (IS_DIGIT(*ptr)) { - terminator = (*ptr == CHAR_LESS_THAN_SIGN)? - CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE; - name = ++ptr; + *errorcodeptr = ERR84; /* Group name must start with non-digit */ + goto FAILED; + } + while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++; + namelen = (int)(ptr - name); - while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++; - namelen = (int)(ptr - name); + /* In the pre-compile phase, do a syntax check, remember the longest + name, and then remember the group in a vector, expanding it if + necessary. Duplicates for the same number are skipped; other duplicates + are checked for validity. In the actual compile, there is nothing to + do. */ - /* In the pre-compile phase, just do a syntax check. */ + if (lengthptr != NULL) + { + named_group *ng; + pcre_uint32 number = cd->bracount + 1; - if (lengthptr != NULL) + if (*ptr != (pcre_uchar)terminator) { - if (*ptr != (pcre_uchar)terminator) - { - *errorcodeptr = ERR42; - goto FAILED; - } - if (cd->names_found >= MAX_NAME_COUNT) + *errorcodeptr = ERR42; + goto FAILED; + } + + if (cd->names_found >= MAX_NAME_COUNT) + { + *errorcodeptr = ERR49; + goto FAILED; + } + + if (namelen + IMM2_SIZE + 1 > cd->name_entry_size) + { + cd->name_entry_size = namelen + IMM2_SIZE + 1; + if (namelen > MAX_NAME_SIZE) { - *errorcodeptr = ERR49; + *errorcodeptr = ERR48; goto FAILED; } - if (namelen + IMM2_SIZE + 1 > cd->name_entry_size) + } + + /* Scan the list to check for duplicates. For duplicate names, if the + number is the same, break the loop, which causes the name to be + discarded; otherwise, if DUPNAMES is not set, give an error. + If it is set, allow the name with a different number, but continue + scanning in case this is a duplicate with the same number. For + non-duplicate names, give an error if the number is duplicated. */ + + ng = cd->named_groups; + for (i = 0; i < cd->names_found; i++, ng++) + { + if (namelen == ng->length && + STRNCMP_UC_UC(name, ng->name, namelen) == 0) { - cd->name_entry_size = namelen + IMM2_SIZE + 1; - if (namelen > MAX_NAME_SIZE) + if (ng->number == number) break; + if ((options & PCRE_DUPNAMES) == 0) { - *errorcodeptr = ERR48; + *errorcodeptr = ERR43; goto FAILED; } + cd->dupnames = TRUE; /* Duplicate names exist */ + } + else if (ng->number == number) + { + *errorcodeptr = ERR65; + goto FAILED; } } - /* In the real compile, create the entry in the table, maintaining - alphabetical order. Duplicate names for different numbers are - permitted only if PCRE_DUPNAMES is set. Duplicate names for the same - number are always OK. (An existing number can be re-used if (?| - appears in the pattern.) In either event, a duplicate name results in - a duplicate entry in the table, even if the number is the same. This - is because the number of names, and hence the table size, is computed - in the pre-compile, and it affects various numbers and pointers which - would all have to be modified, and the compiled code moved down, if - duplicates with the same number were omitted from the table. This - doesn't seem worth the hassle. However, *different* names for the - same number are not permitted. */ - - else + if (i >= cd->names_found) /* Not a duplicate with same number */ { - BOOL dupname = FALSE; - slot = cd->name_table; + /* Increase the list size if necessary */ - for (i = 0; i < cd->names_found; i++) + if (cd->names_found >= cd->named_group_list_size) { - int crc = memcmp(name, slot+IMM2_SIZE, IN_UCHARS(namelen)); - if (crc == 0) - { - if (slot[IMM2_SIZE+namelen] == 0) - { - if (GET2(slot, 0) != cd->bracount + 1 && - (options & PCRE_DUPNAMES) == 0) - { - *errorcodeptr = ERR43; - goto FAILED; - } - else dupname = TRUE; - } - else crc = -1; /* Current name is a substring */ - } + int newsize = cd->named_group_list_size * 2; + named_group *newspace = (PUBL(malloc)) + (newsize * sizeof(named_group)); - /* Make space in the table and break the loop for an earlier - name. For a duplicate or later name, carry on. We do this for - duplicates so that in the simple case (when ?(| is not used) they - are in order of their numbers. */ - - if (crc < 0) + if (newspace == NULL) { - memmove(slot + cd->name_entry_size, slot, - IN_UCHARS((cd->names_found - i) * cd->name_entry_size)); - break; + *errorcodeptr = ERR21; + goto FAILED; } - /* Continue the loop for a later or duplicate name */ - - slot += cd->name_entry_size; + memcpy(newspace, cd->named_groups, + cd->named_group_list_size * sizeof(named_group)); + if (cd->named_group_list_size > NAMED_GROUP_LIST_SIZE) + (PUBL(free))((void *)cd->named_groups); + cd->named_groups = newspace; + cd->named_group_list_size = newsize; } - /* For non-duplicate names, check for a duplicate number before - adding the new name. */ - - if (!dupname) - { - pcre_uchar *cslot = cd->name_table; - for (i = 0; i < cd->names_found; i++) - { - if (cslot != slot) - { - if (GET2(cslot, 0) == cd->bracount + 1) - { - *errorcodeptr = ERR65; - goto FAILED; - } - } - else i--; - cslot += cd->name_entry_size; - } - } - - PUT2(slot, 0, cd->bracount + 1); - memcpy(slot + IMM2_SIZE, name, IN_UCHARS(namelen)); - slot[IMM2_SIZE + namelen] = 0; + cd->named_groups[cd->names_found].name = name; + cd->named_groups[cd->names_found].length = namelen; + cd->named_groups[cd->names_found].number = number; + cd->names_found++; } } - /* In both pre-compile and compile, count the number of names we've - encountered. */ - - cd->names_found++; - ptr++; /* Move past > or ' */ + ptr++; /* Move past > or ' in both passes. */ goto NUMBERED_GROUP; @@ -6216,6 +7014,11 @@ for (;; ptr++) NAMED_REF_OR_RECURSE: name = ++ptr; + if (IS_DIGIT(*ptr)) + { + *errorcodeptr = ERR84; /* Group name must start with non-digit */ + goto FAILED; + } while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++; namelen = (int)(ptr - name); @@ -6228,7 +7031,7 @@ for (;; ptr++) if (lengthptr != NULL) { - const pcre_uchar *temp; + named_group *ng; if (namelen == 0) { @@ -6246,27 +7049,29 @@ for (;; ptr++) goto FAILED; } - /* The name table does not exist in the first pass, so we cannot - do a simple search as in the code below. Instead, we have to scan the - pattern to find the number. It is important that we scan it only as - far as we have got because the syntax of named subpatterns has not - been checked for the rest of the pattern, and find_parens() assumes - correct syntax. In any case, it's a waste of resources to scan - further. We stop the scan at the current point by temporarily - adjusting the value of cd->endpattern. */ - - temp = cd->end_pattern; - cd->end_pattern = ptr; - recno = find_parens(cd, name, namelen, - (options & PCRE_EXTENDED) != 0, utf); - cd->end_pattern = temp; - if (recno < 0) recno = 0; /* Forward ref; set dummy number */ + /* The name table does not exist in the first pass; instead we must + scan the list of names encountered so far in order to get the + number. If the name is not found, set the value to 0 for a forward + reference. */ + + ng = cd->named_groups; + for (i = 0; i < cd->names_found; i++, ng++) + { + if (namelen == ng->length && + STRNCMP_UC_UC(name, ng->name, namelen) == 0) + break; + } + recno = (i < cd->names_found)? ng->number : 0; + + /* Count named back references. */ + + if (!is_recurse) cd->namedrefcount++; } - /* In the real compile, seek the name in the table. We check the name + /* In the real compile, search the name table. We check the name first, and then check that we have reached the end of the name in the - table. That way, if the name that is longer than any in the table, - the comparison will fail without reading beyond the table entry. */ + table. That way, if the name is longer than any in the table, the + comparison will fail without reading beyond the table entry. */ else { @@ -6279,24 +7084,76 @@ for (;; ptr++) slot += cd->name_entry_size; } - if (i < cd->names_found) /* Back reference */ + if (i < cd->names_found) { recno = GET2(slot, 0); } - else if ((recno = /* Forward back reference */ - find_parens(cd, name, namelen, - (options & PCRE_EXTENDED) != 0, utf)) <= 0) + else { *errorcodeptr = ERR15; goto FAILED; } } - /* In both phases, we can now go to the code than handles numerical - recursion or backreferences. */ + /* In both phases, for recursions, we can now go to the code than + handles numerical recursion. */ if (is_recurse) goto HANDLE_RECURSION; - else goto HANDLE_REFERENCE; + + /* In the second pass we must see if the name is duplicated. If so, we + generate a different opcode. */ + + if (lengthptr == NULL && cd->dupnames) + { + int count = 1; + unsigned int index = i; + pcre_uchar *cslot = slot + cd->name_entry_size; + + for (i++; i < cd->names_found; i++) + { + if (STRCMP_UC_UC(slot + IMM2_SIZE, cslot + IMM2_SIZE) != 0) break; + count++; + cslot += cd->name_entry_size; + } + + if (count > 1) + { + if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE; + previous = code; + *code++ = ((options & PCRE_CASELESS) != 0)? OP_DNREFI : OP_DNREF; + PUT2INC(code, 0, index); + PUT2INC(code, 0, count); + + /* Process each potentially referenced group. */ + + for (; slot < cslot; slot += cd->name_entry_size) + { + open_capitem *oc; + recno = GET2(slot, 0); + cd->backref_map |= (recno < 32)? (1 << recno) : 1; + if (recno > cd->top_backref) cd->top_backref = recno; + + /* Check to see if this back reference is recursive, that it, it + is inside the group that it references. A flag is set so that the + group can be made atomic. */ + + for (oc = cd->open_caps; oc != NULL; oc = oc->next) + { + if (oc->number == recno) + { + oc->flag = TRUE; + break; + } + } + } + + continue; /* End of back ref handling */ + } + } + + /* First pass, or a non-duplicated name. */ + + goto HANDLE_REFERENCE; /* ------------------------------------------------------------ */ @@ -6395,8 +7252,7 @@ for (;; ptr++) if (called == NULL) { - if (find_parens(cd, NULL, recno, - (options & PCRE_EXTENDED) != 0, utf) < 0) + if (recno > cd->final_bracount) { *errorcodeptr = ERR15; goto FAILED; @@ -6555,10 +7411,19 @@ for (;; ptr++) skipbytes = IMM2_SIZE; } - /* Process nested bracketed regex. Assertions used not to be repeatable, - but this was changed for Perl compatibility, so all kinds can now be - repeated. We copy code into a non-register variable (tempcode) in order to - be able to pass its address because some compilers complain otherwise. */ + /* Process nested bracketed regex. First check for parentheses nested too + deeply. */ + + if ((cd->parens_depth += 1) > PARENS_NEST_LIMIT) + { + *errorcodeptr = ERR82; + goto FAILED; + } + + /* Assertions used not to be repeatable, but this was changed for Perl + compatibility, so all kinds can now be repeated. We copy code into a + non-register variable (tempcode) in order to be able to pass its address + because some compilers complain otherwise. */ previous = code; /* For handling repetition */ *code = bravalue; @@ -6589,6 +7454,8 @@ for (;; ptr++) )) goto FAILED; + cd->parens_depth -= 1; + /* If this was an atomic group and there are no capturing groups within it, generate OP_ONCE_NC instead of OP_ONCE. */ @@ -6803,44 +7670,31 @@ for (;; ptr++) if (escape == ESC_g) { const pcre_uchar *p; + pcre_uint32 cf; + save_hwm = cd->hwm; /* Normally this is set when '(' is read */ terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)? CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE; /* These two statements stop the compiler for warning about possibly unset variables caused by the jump to HANDLE_NUMERICAL_RECURSION. In - fact, because we actually check for a number below, the paths that + fact, because we do the check for a number below, the paths that would actually be in error are never taken. */ skipbytes = 0; reset_bracount = FALSE; - /* Test for a name */ + /* If it's not a signed or unsigned number, treat it as a name. */ - if (ptr[1] != CHAR_PLUS && ptr[1] != CHAR_MINUS) + cf = ptr[1]; + if (cf != CHAR_PLUS && cf != CHAR_MINUS && !IS_DIGIT(cf)) { - BOOL is_a_number = TRUE; - for (p = ptr + 1; *p != CHAR_NULL && *p != (pcre_uchar)terminator; p++) - { - if (!MAX_255(*p)) { is_a_number = FALSE; break; } - if ((cd->ctypes[*p] & ctype_digit) == 0) is_a_number = FALSE; - if ((cd->ctypes[*p] & ctype_word) == 0) break; - } - if (*p != (pcre_uchar)terminator) - { - *errorcodeptr = ERR57; - break; - } - if (is_a_number) - { - ptr++; - goto HANDLE_NUMERICAL_RECURSION; - } is_recurse = TRUE; goto NAMED_REF_OR_RECURSE; } - /* Test a signed number in angle brackets or quotes. */ + /* Signed or unsigned number (cf = ptr[1]) is known to be plus or minus + or a digit. */ p = ptr + 2; while (IS_DIGIT(*p)) p++; @@ -6880,7 +7734,10 @@ for (;; ptr++) open_capitem *oc; recno = -escape; - HANDLE_REFERENCE: /* Come here from named backref handling */ + /* Come here from named backref handling when the reference is to a + single group (i.e. not to a duplicated name. */ + + HANDLE_REFERENCE: if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE; previous = code; *code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF; @@ -6977,8 +7834,8 @@ for (;; ptr++) /* ===================================================================*/ /* Handle a literal character. It is guaranteed not to be whitespace or # - when the extended flag is set. If we are in UTF-8 mode, it may be a - multi-byte literal character. */ + when the extended flag is set. If we are in a UTF mode, it may be a + multi-unit literal character. */ default: NORMAL_CHAR: @@ -7009,7 +7866,8 @@ for (;; ptr++) *code++ = OP_PROP; *code++ = PT_CLIST; *code++ = c; - if (firstcharflags == REQ_UNSET) firstcharflags = zerofirstcharflags = REQ_NONE; + if (firstcharflags == REQ_UNSET) + firstcharflags = zerofirstcharflags = REQ_NONE; break; } } @@ -7098,24 +7956,24 @@ out the amount of memory needed, as well as during the real compile phase. The value of lengthptr distinguishes the two phases. Arguments: - options option bits, including any changes for this subpattern - codeptr -> the address of the current code pointer - ptrptr -> the address of the current pattern pointer - errorcodeptr -> pointer to error code variable - lookbehind TRUE if this is a lookbehind assertion - reset_bracount TRUE to reset the count for each branch - skipbytes skip this many bytes at start (for brackets and OP_COND) - cond_depth depth of nesting for conditional subpatterns - firstcharptr place to put the first required character + options option bits, including any changes for this subpattern + codeptr -> the address of the current code pointer + ptrptr -> the address of the current pattern pointer + errorcodeptr -> pointer to error code variable + lookbehind TRUE if this is a lookbehind assertion + reset_bracount TRUE to reset the count for each branch + skipbytes skip this many bytes at start (for brackets and OP_COND) + cond_depth depth of nesting for conditional subpatterns + firstcharptr place to put the first required character firstcharflagsptr place to put the first character flags, or a negative number - reqcharptr place to put the last required character - reqcharflagsptr place to put the last required character flags, or a negative number - bcptr pointer to the chain of currently open branches - cd points to the data block with tables pointers etc. - lengthptr NULL during the real compile phase - points to length accumulator during pre-compile phase - -Returns: TRUE on success + reqcharptr place to put the last required character + reqcharflagsptr place to put the last required character flags, or a negative number + bcptr pointer to the chain of currently open branches + cd points to the data block with tables pointers etc. + lengthptr NULL during the real compile phase + points to length accumulator during pre-compile phase + +Returns: TRUE on success */ static BOOL @@ -7572,9 +8430,9 @@ do { switch (*scode) { case OP_CREF: - case OP_NCREF: + case OP_DNCREF: case OP_RREF: - case OP_NRREF: + case OP_DNRREF: case OP_DEF: return FALSE; @@ -7658,13 +8516,14 @@ return TRUE; discarded, because they can cause conflicts with actual literals that follow. However, if we end up without a first char setting for an unanchored pattern, it is worth scanning the regex to see if there is an initial asserted first -char. If all branches start with the same asserted char, or with a bracket all -of whose alternatives start with the same asserted char (recurse ad lib), then -we return that char, otherwise -1. +char. If all branches start with the same asserted char, or with a +non-conditional bracket all of whose alternatives start with the same asserted +char (recurse ad lib), then we return that char, with the flags set to zero or +REQ_CASELESS; otherwise return zero with REQ_NONE in the flags. Arguments: code points to start of expression (the bracket) - flags points to the first char flags, or to REQ_NONE + flags points to the first char flags, or to REQ_NONE inassert TRUE if in an assertion Returns: the fixed first char, or 0 with REQ_NONE in flags @@ -7701,7 +8560,6 @@ do { case OP_ASSERT: case OP_ONCE: case OP_ONCE_NC: - case OP_COND: d = find_firstassertedchar(scode, &dflags, op == OP_ASSERT); if (dflags < 0) return 0; @@ -7746,6 +8604,61 @@ return c; /************************************************* +* Add an entry to the name/number table * +*************************************************/ + +/* This function is called between compiling passes to add an entry to the +name/number table, maintaining alphabetical order. Checking for permitted +and forbidden duplicates has already been done. + +Arguments: + cd the compile data block + name the name to add + length the length of the name + groupno the group number + +Returns: nothing +*/ + +static void +add_name(compile_data *cd, const pcre_uchar *name, int length, + unsigned int groupno) +{ +int i; +pcre_uchar *slot = cd->name_table; + +for (i = 0; i < cd->names_found; i++) + { + int crc = memcmp(name, slot+IMM2_SIZE, IN_UCHARS(length)); + if (crc == 0 && slot[IMM2_SIZE+length] != 0) + crc = -1; /* Current name is a substring */ + + /* Make space in the table and break the loop for an earlier name. For a + duplicate or later name, carry on. We do this for duplicates so that in the + simple case (when ?(| is not used) they are in order of their numbers. In all + cases they are in the order in which they appear in the pattern. */ + + if (crc < 0) + { + memmove(slot + cd->name_entry_size, slot, + IN_UCHARS((cd->names_found - i) * cd->name_entry_size)); + break; + } + + /* Continue the loop for a later or duplicate name */ + + slot += cd->name_entry_size; + } + +PUT2(slot, 0, groupno); +memcpy(slot + IMM2_SIZE, name, IN_UCHARS(length)); +slot[IMM2_SIZE + length] = 0; +cd->names_found++; +} + + + +/************************************************* * Compile a Regular Expression * *************************************************/ @@ -7832,6 +8745,11 @@ new memory is obtained from malloc(). */ pcre_uchar cworkspace[COMPILE_WORK_SIZE]; +/* This vector is used for remembering name groups during the pre-compile. In a +similar way to cworkspace, it can be expanded using malloc() if necessary. */ + +named_group named_groups[NAMED_GROUP_LIST_SIZE]; + /* Set this early so that early errors get offset 0. */ ptr = (const pcre_uchar *)pattern; @@ -7911,6 +8829,8 @@ PCRE_UTF8 == PCRE_UTF16 == PCRE_UTF32. */ { skipatstart += 6; options |= PCRE_UTF8; continue; } else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UCP_RIGHTPAR, 4) == 0) { skipatstart += 6; options |= PCRE_UCP; continue; } + else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_AUTO_POSSESS_RIGHTPAR, 16) == 0) + { skipatstart += 18; options |= PCRE_NO_AUTO_POSSESS; continue; } else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_START_OPT_RIGHTPAR, 13) == 0) { skipatstart += 15; options |= PCRE_NO_START_OPTIMIZE; continue; } @@ -8094,13 +9014,18 @@ cd->bracount = cd->final_bracount = 0; cd->names_found = 0; cd->name_entry_size = 0; cd->name_table = NULL; +cd->dupnames = FALSE; +cd->namedrefcount = 0; cd->start_code = cworkspace; cd->hwm = cworkspace; cd->start_workspace = cworkspace; cd->workspace_size = COMPILE_WORK_SIZE; +cd->named_groups = named_groups; +cd->named_group_list_size = NAMED_GROUP_LIST_SIZE; cd->start_pattern = (const pcre_uchar *)pattern; cd->end_pattern = (const pcre_uchar *)(pattern + STRLEN_UC((const pcre_uchar *)pattern)); cd->req_varyopt = 0; +cd->parens_depth = 0; cd->assert_depth = 0; cd->max_lookbehind = 0; cd->external_options = options; @@ -8115,6 +9040,7 @@ outside can help speed up starting point checks. */ ptr += skipatstart; code = cworkspace; *code = OP_BRA; + (void)compile_regex(cd->external_options, &code, &ptr, &errorcode, FALSE, FALSE, 0, 0, &firstchar, &firstcharflags, &reqchar, &reqcharflags, NULL, cd, &length); @@ -8129,14 +9055,23 @@ if (length > MAX_PATTERN_SIZE) goto PCRE_EARLY_ERROR_RETURN; } -/* Compute the size of data block needed and get it, either from malloc or -externally provided function. Integer overflow should no longer be possible -because nowadays we limit the maximum value of cd->names_found and -cd->name_entry_size. */ +/* If there are groups with duplicate names and there are also references by +name, we must allow for the possibility of named references to duplicated +groups. These require an extra data item each. */ -size = sizeof(REAL_PCRE) + (length + cd->names_found * cd->name_entry_size) * sizeof(pcre_uchar); -re = (REAL_PCRE *)(PUBL(malloc))(size); +if (cd->dupnames && cd->namedrefcount > 0) + length += cd->namedrefcount * IMM2_SIZE * sizeof(pcre_uchar); + +/* Compute the size of the data block for storing the compiled pattern. Integer +overflow should no longer be possible because nowadays we limit the maximum +value of cd->names_found and cd->name_entry_size. */ + +size = sizeof(REAL_PCRE) + + (length + cd->names_found * cd->name_entry_size) * sizeof(pcre_uchar); +/* Get the memory. */ + +re = (REAL_PCRE *)(PUBL(malloc))(size); if (re == NULL) { errorcode = ERR21; @@ -8177,10 +9112,10 @@ field; this time it's used for remembering forward references to subpatterns. */ cd->final_bracount = cd->bracount; /* Save for checking forward references */ +cd->parens_depth = 0; cd->assert_depth = 0; cd->bracount = 0; cd->max_lookbehind = 0; -cd->names_found = 0; cd->name_table = (pcre_uchar *)re + re->name_table_offset; codestart = cd->name_table + re->name_entry_size * re->name_count; cd->start_code = codestart; @@ -8191,6 +9126,20 @@ cd->had_pruneorskip = FALSE; cd->check_lookbehind = FALSE; cd->open_caps = NULL; +/* If any named groups were found, create the name/number table from the list +created in the first pass. */ + +if (cd->names_found > 0) + { + int i = cd->names_found; + named_group *ng = cd->named_groups; + cd->names_found = 0; + for (; i > 0; i--, ng++) + add_name(cd, ng->name, ng->length, ng->number); + if (cd->named_group_list_size > NAMED_GROUP_LIST_SIZE) + (PUBL(free))((void *)cd->named_groups); + } + /* Set up a starting, non-extracting bracket, then compile the expression. On error, errorcode will be set non-zero, so we don't need to look at the result of the function here. */ @@ -8254,16 +9203,24 @@ if (cd->hwm > cd->start_workspace) } } -/* If the workspace had to be expanded, free the new memory. */ +/* If the workspace had to be expanded, free the new memory. Set the pointer to +NULL to indicate that forward references have been filled in. */ if (cd->workspace_size > COMPILE_WORK_SIZE) (PUBL(free))((void *)cd->start_workspace); +cd->start_workspace = NULL; /* Give an error if there's back reference to a non-existent capturing subpattern. */ if (errorcode == 0 && re->top_backref > re->top_bracket) errorcode = ERR15; +/* Unless disabled, check whether single character iterators can be +auto-possessified. The function overwrites the appropriate opcode values. */ + +if ((options & PCRE_NO_AUTO_POSSESS) == 0) + auto_possessify((pcre_uchar *)codestart, utf, cd); + /* If there were any lookbehind assertions that contained OP_RECURSE (recursions or subroutine calls), a flag is set for them to be checked here, because they may contain forward references. Actual recursions cannot be fixed @@ -8461,6 +9418,20 @@ if (code - codestart > length) } #endif /* PCRE_DEBUG */ +/* Check for a pattern than can match an empty string, so that this information +can be provided to applications. */ + +do + { + if (could_be_empty_branch(codestart, code, utf, cd, NULL)) + { + re->flags |= PCRE_MATCH_EMPTY; + break; + } + codestart += GET(codestart, 1); + } +while (*codestart == OP_ALT); + #if defined COMPILE_PCRE8 return (pcre *)re; #elif defined COMPILE_PCRE16 @@ -8471,3 +9442,4 @@ return (pcre32 *)re; } /* End of pcre_compile.c */ + diff --git a/pcre/pcre_config.c b/pcre/pcre_config.c index 3d5689f62c3..1cbdd9c960c 100644 --- a/pcre/pcre_config.c +++ b/pcre/pcre_config.c @@ -161,6 +161,10 @@ switch (what) *((int *)where) = POSIX_MALLOC_THRESHOLD; break; + case PCRE_CONFIG_PARENS_LIMIT: + *((unsigned long int *)where) = PARENS_NEST_LIMIT; + break; + case PCRE_CONFIG_MATCH_LIMIT: *((unsigned long int *)where) = MATCH_LIMIT; break; diff --git a/pcre/pcre_dfa_exec.c b/pcre/pcre_dfa_exec.c index 02bd3f05534..4cbcf9106c4 100644 --- a/pcre/pcre_dfa_exec.c +++ b/pcre/pcre_dfa_exec.c @@ -120,7 +120,7 @@ static const pcre_uint8 coptable[] = { 0, 0, /* \P, \p */ 0, 0, 0, 0, 0, /* \R, \H, \h, \V, \v */ 0, /* \X */ - 0, 0, 0, 0, 0, 0, /* \Z, \z, ^, ^M, $, $M */ + 0, 0, 0, 0, 0, 0, /* \Z, \z, $, $M, ^, ^M */ 1, /* Char */ 1, /* Chari */ 1, /* not */ @@ -151,11 +151,14 @@ static const pcre_uint8 coptable[] = { /* Character class & ref repeats */ 0, 0, 0, 0, 0, 0, /* *, *?, +, +?, ?, ?? */ 0, 0, /* CRRANGE, CRMINRANGE */ + 0, 0, 0, 0, /* Possessive *+, ++, ?+, CRPOSRANGE */ 0, /* CLASS */ 0, /* NCLASS */ 0, /* XCLASS - variable length */ 0, /* REF */ 0, /* REFI */ + 0, /* DNREF */ + 0, /* DNREFI */ 0, /* RECURSE */ 0, /* CALLOUT */ 0, /* Alt */ @@ -171,8 +174,8 @@ static const pcre_uint8 coptable[] = { 0, 0, /* ONCE, ONCE_NC */ 0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */ 0, 0, 0, 0, 0, /* SBRA, SBRAPOS, SCBRA, SCBRAPOS, SCOND */ - 0, 0, /* CREF, NCREF */ - 0, 0, /* RREF, NRREF */ + 0, 0, /* CREF, DNCREF */ + 0, 0, /* RREF, DNRREF */ 0, /* DEF */ 0, 0, 0, /* BRAZERO, BRAMINZERO, BRAPOSZERO */ 0, 0, 0, /* MARK, PRUNE, PRUNE_ARG */ @@ -194,7 +197,7 @@ static const pcre_uint8 poptable[] = { 1, 1, /* \P, \p */ 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ 1, /* \X */ - 0, 0, 0, 0, 0, 0, /* \Z, \z, ^, ^M, $, $M */ + 0, 0, 0, 0, 0, 0, /* \Z, \z, $, $M, ^, ^M */ 1, /* Char */ 1, /* Chari */ 1, /* not */ @@ -220,11 +223,14 @@ static const pcre_uint8 poptable[] = { /* Character class & ref repeats */ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */ 1, 1, /* CRRANGE, CRMINRANGE */ + 1, 1, 1, 1, /* Possessive *+, ++, ?+, CRPOSRANGE */ 1, /* CLASS */ 1, /* NCLASS */ 1, /* XCLASS - variable length */ 0, /* REF */ 0, /* REFI */ + 0, /* DNREF */ + 0, /* DNREFI */ 0, /* RECURSE */ 0, /* CALLOUT */ 0, /* Alt */ @@ -240,8 +246,8 @@ static const pcre_uint8 poptable[] = { 0, 0, /* ONCE, ONCE_NC */ 0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */ 0, 0, 0, 0, 0, /* SBRA, SBRAPOS, SCBRA, SCBRAPOS, SCOND */ - 0, 0, /* CREF, NCREF */ - 0, 0, /* RREF, NRREF */ + 0, 0, /* CREF, DNCREF */ + 0, 0, /* RREF, DNRREF */ 0, /* DEF */ 0, 0, 0, /* BRAZERO, BRAMINZERO, BRAPOSZERO */ 0, 0, 0, /* MARK, PRUNE, PRUNE_ARG */ @@ -1094,15 +1100,23 @@ for (;;) PRIV(ucp_gentype)[prop->chartype] == ucp_N; break; - case PT_SPACE: /* Perl space */ - OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR; - break; + /* Perl space used to exclude VT, but from Perl 5.18 it is included, + which means that Perl space and POSIX space are now identical. PCRE + was changed at release 8.34. */ + case PT_SPACE: /* Perl space */ case PT_PXSPACE: /* POSIX space */ - OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || - c == CHAR_FF || c == CHAR_CR; + switch(c) + { + HSPACE_CASES: + VSPACE_CASES: + OK = TRUE; + break; + + default: + OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z; + break; + } break; case PT_WORD: @@ -1344,15 +1358,23 @@ for (;;) PRIV(ucp_gentype)[prop->chartype] == ucp_N; break; - case PT_SPACE: /* Perl space */ - OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR; - break; + /* Perl space used to exclude VT, but from Perl 5.18 it is included, + which means that Perl space and POSIX space are now identical. PCRE + was changed at release 8.34. */ + case PT_SPACE: /* Perl space */ case PT_PXSPACE: /* POSIX space */ - OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || - c == CHAR_FF || c == CHAR_CR; + switch(c) + { + HSPACE_CASES: + VSPACE_CASES: + OK = TRUE; + break; + + default: + OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z; + break; + } break; case PT_WORD: @@ -1588,15 +1610,23 @@ for (;;) PRIV(ucp_gentype)[prop->chartype] == ucp_N; break; - case PT_SPACE: /* Perl space */ - OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR; - break; + /* Perl space used to exclude VT, but from Perl 5.18 it is included, + which means that Perl space and POSIX space are now identical. PCRE + was changed at release 8.34. */ + case PT_SPACE: /* Perl space */ case PT_PXSPACE: /* POSIX space */ - OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || - c == CHAR_FF || c == CHAR_CR; + switch(c) + { + HSPACE_CASES: + VSPACE_CASES: + OK = TRUE; + break; + + default: + OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z; + break; + } break; case PT_WORD: @@ -1857,15 +1887,23 @@ for (;;) PRIV(ucp_gentype)[prop->chartype] == ucp_N; break; - case PT_SPACE: /* Perl space */ - OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR; - break; + /* Perl space used to exclude VT, but from Perl 5.18 it is included, + which means that Perl space and POSIX space are now identical. PCRE + was changed at release 8.34. */ + case PT_SPACE: /* Perl space */ case PT_PXSPACE: /* POSIX space */ - OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || - c == CHAR_FF || c == CHAR_CR; + switch(c) + { + HSPACE_CASES: + VSPACE_CASES: + OK = TRUE; + break; + + default: + OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z; + break; + } break; case PT_WORD: @@ -2533,31 +2571,65 @@ for (;;) { case OP_CRSTAR: case OP_CRMINSTAR: + case OP_CRPOSSTAR: ADD_ACTIVE(next_state_offset + 1, 0); - if (isinclass) { ADD_NEW(state_offset, 0); } + if (isinclass) + { + if (*ecode == OP_CRPOSSTAR) + { + active_count--; /* Remove non-match possibility */ + next_active_state--; + } + ADD_NEW(state_offset, 0); + } break; case OP_CRPLUS: case OP_CRMINPLUS: + case OP_CRPOSPLUS: count = current_state->count; /* Already matched */ if (count > 0) { ADD_ACTIVE(next_state_offset + 1, 0); } - if (isinclass) { count++; ADD_NEW(state_offset, count); } + if (isinclass) + { + if (count > 0 && *ecode == OP_CRPOSPLUS) + { + active_count--; /* Remove non-match possibility */ + next_active_state--; + } + count++; + ADD_NEW(state_offset, count); + } break; case OP_CRQUERY: case OP_CRMINQUERY: + case OP_CRPOSQUERY: ADD_ACTIVE(next_state_offset + 1, 0); - if (isinclass) { ADD_NEW(next_state_offset + 1, 0); } + if (isinclass) + { + if (*ecode == OP_CRPOSQUERY) + { + active_count--; /* Remove non-match possibility */ + next_active_state--; + } + ADD_NEW(next_state_offset + 1, 0); + } break; case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSRANGE: count = current_state->count; /* Already matched */ if (count >= (int)GET2(ecode, 1)) { ADD_ACTIVE(next_state_offset + 1 + 2 * IMM2_SIZE, 0); } if (isinclass) { int max = (int)GET2(ecode, 1 + IMM2_SIZE); + if (*ecode == OP_CRPOSRANGE) + { + active_count--; /* Remove non-match possibility */ + next_active_state--; + } if (++count >= max && max != 0) /* Max 0 => no limit */ { ADD_NEW(next_state_offset + 1 + 2 * IMM2_SIZE, 0); } else @@ -2657,9 +2729,11 @@ for (;;) condcode = code[LINK_SIZE+1]; - /* Back reference conditions are not supported */ + /* Back reference conditions and duplicate named recursion conditions + are not supported */ - if (condcode == OP_CREF || condcode == OP_NCREF) + if (condcode == OP_CREF || condcode == OP_DNCREF || + condcode == OP_DNRREF) return PCRE_ERROR_DFA_UCOND; /* The DEFINE condition is always false */ @@ -2671,7 +2745,7 @@ for (;;) which means "test if in any recursion". We can't test for specifically recursed groups. */ - else if (condcode == OP_RREF || condcode == OP_NRREF) + else if (condcode == OP_RREF) { int value = GET2(code, LINK_SIZE + 2); if (value != RREF_ANY) return PCRE_ERROR_DFA_UCOND; diff --git a/pcre/pcre_exec.c b/pcre/pcre_exec.c index ab76d020d16..a3f0c1923f2 100644 --- a/pcre/pcre_exec.c +++ b/pcre/pcre_exec.c @@ -107,8 +107,8 @@ because the offset vector is always a multiple of 3 long. */ /* Min and max values for the common repeats; for the maxima, 0 => infinity */ -static const char rep_min[] = { 0, 0, 1, 1, 0, 0 }; -static const char rep_max[] = { 0, 0, 0, 0, 1, 1 }; +static const char rep_min[] = { 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, }; +static const char rep_max[] = { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, }; #ifdef PCRE_DEBUG /************************************************* @@ -167,7 +167,7 @@ match_ref(int offset, register PCRE_PUCHAR eptr, int length, match_data *md, { PCRE_PUCHAR eptr_start = eptr; register PCRE_PUCHAR p = md->start_subject + md->offset_vector[offset]; -#ifdef SUPPORT_UTF +#if defined SUPPORT_UTF && defined SUPPORT_UCP BOOL utf = md->utf; #endif @@ -195,8 +195,7 @@ ASCII characters. */ if (caseless) { -#ifdef SUPPORT_UTF -#ifdef SUPPORT_UCP +#if defined SUPPORT_UTF && defined SUPPORT_UCP if (utf) { /* Match characters up to the end of the reference. NOTE: the number of @@ -230,7 +229,6 @@ if (caseless) } else #endif -#endif /* The same code works when not in UTF-8 mode and in UTF-8 mode when there is no UCP support. */ @@ -312,7 +310,7 @@ enum { RM1=1, RM2, RM3, RM4, RM5, RM6, RM7, RM8, RM9, RM10, RM31, RM32, RM33, RM34, RM35, RM36, RM37, RM38, RM39, RM40, RM41, RM42, RM43, RM44, RM45, RM46, RM47, RM48, RM49, RM50, RM51, RM52, RM53, RM54, RM55, RM56, RM57, RM58, RM59, RM60, - RM61, RM62, RM63, RM64, RM65, RM66, RM67, RM68 }; + RM61, RM62, RM63, RM64, RM65, RM66, RM67 }; /* These versions of the macros use the stack, as normal. There are debugging versions and production versions. Note that the "rw" argument of RMATCH isn't @@ -1173,6 +1171,7 @@ for (;;) ecode = md->start_code + code_offset; save_capture_last = md->capture_last; matched_once = TRUE; + mstart = md->start_match_ptr; /* In case \K changed it */ continue; } @@ -1245,6 +1244,7 @@ for (;;) eptr = md->end_match_ptr; ecode = md->start_code + code_offset; matched_once = TRUE; + mstart = md->start_match_ptr; /* In case \K reset it */ continue; } @@ -1274,25 +1274,32 @@ for (;;) /* Control never reaches here. */ - /* Conditional group: compilation checked that there are no more than - two branches. If the condition is false, skipping the first branch takes us - past the end if there is only one branch, but that's OK because that is - exactly what going to the ket would do. */ + /* Conditional group: compilation checked that there are no more than two + branches. If the condition is false, skipping the first branch takes us + past the end of the item if there is only one branch, but that's exactly + what we want. */ case OP_COND: case OP_SCOND: - codelink = GET(ecode, 1); + + /* The variable codelink will be added to ecode when the condition is + false, to get to the second branch. Setting it to the offset to the ALT + or KET, then incrementing ecode achieves this effect. We now have ecode + pointing to the condition or callout. */ + + codelink = GET(ecode, 1); /* Offset to the second branch */ + ecode += 1 + LINK_SIZE; /* From this opcode */ /* Because of the way auto-callout works during compile, a callout item is inserted between OP_COND and an assertion condition. */ - if (ecode[LINK_SIZE+1] == OP_CALLOUT) + if (*ecode == OP_CALLOUT) { if (PUBL(callout) != NULL) { PUBL(callout_block) cb; cb.version = 2; /* Version 1 of the callout block */ - cb.callout_number = ecode[LINK_SIZE+2]; + cb.callout_number = ecode[1]; cb.offset_vector = md->offset_vector; #if defined COMPILE_PCRE8 cb.subject = (PCRE_SPTR)md->start_subject; @@ -1304,8 +1311,8 @@ for (;;) cb.subject_length = (int)(md->end_subject - md->start_subject); cb.start_match = (int)(mstart - md->start_subject); cb.current_position = (int)(eptr - md->start_subject); - cb.pattern_position = GET(ecode, LINK_SIZE + 3); - cb.next_item_length = GET(ecode, 3 + 2*LINK_SIZE); + cb.pattern_position = GET(ecode, 2); + cb.next_item_length = GET(ecode, 2 + LINK_SIZE); cb.capture_top = offset_top/2; cb.capture_last = md->capture_last & CAPLMASK; /* Internal change requires this for API compatibility. */ @@ -1315,207 +1322,119 @@ for (;;) if ((rrc = (*PUBL(callout))(&cb)) > 0) RRETURN(MATCH_NOMATCH); if (rrc < 0) RRETURN(rrc); } + + /* Advance ecode past the callout, so it now points to the condition. We + must adjust codelink so that the value of ecode+codelink is unchanged. */ + ecode += PRIV(OP_lengths)[OP_CALLOUT]; codelink -= PRIV(OP_lengths)[OP_CALLOUT]; } - condcode = ecode[LINK_SIZE+1]; + /* Test the various possible conditions */ - /* Now see what the actual condition is */ - - if (condcode == OP_RREF || condcode == OP_NRREF) /* Recursion test */ + condition = FALSE; + switch(condcode = *ecode) { - if (md->recursive == NULL) /* Not recursing => FALSE */ - { - condition = FALSE; - ecode += GET(ecode, 1); - } - else + case OP_RREF: /* Numbered group recursion test */ + if (md->recursive != NULL) /* Not recursing => FALSE */ { - unsigned int recno = GET2(ecode, LINK_SIZE + 2); /* Recursion group number*/ + unsigned int recno = GET2(ecode, 1); /* Recursion group number*/ condition = (recno == RREF_ANY || recno == md->recursive->group_num); + } + break; - /* If the test is for recursion into a specific subpattern, and it is - false, but the test was set up by name, scan the table to see if the - name refers to any other numbers, and test them. The condition is true - if any one is set. */ - - if (!condition && condcode == OP_NRREF) + case OP_DNRREF: /* Duplicate named group recursion test */ + if (md->recursive != NULL) + { + int count = GET2(ecode, 1 + IMM2_SIZE); + pcre_uchar *slot = md->name_table + GET2(ecode, 1) * md->name_entry_size; + while (count-- > 0) { - pcre_uchar *slotA = md->name_table; - for (i = 0; i < md->name_count; i++) - { - if (GET2(slotA, 0) == recno) break; - slotA += md->name_entry_size; - } - - /* Found a name for the number - there can be only one; duplicate - names for different numbers are allowed, but not vice versa. First - scan down for duplicates. */ - - if (i < md->name_count) - { - pcre_uchar *slotB = slotA; - while (slotB > md->name_table) - { - slotB -= md->name_entry_size; - if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0) - { - condition = GET2(slotB, 0) == md->recursive->group_num; - if (condition) break; - } - else break; - } - - /* Scan up for duplicates */ - - if (!condition) - { - slotB = slotA; - for (i++; i < md->name_count; i++) - { - slotB += md->name_entry_size; - if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0) - { - condition = GET2(slotB, 0) == md->recursive->group_num; - if (condition) break; - } - else break; - } - } - } + unsigned int recno = GET2(slot, 0); + condition = recno == md->recursive->group_num; + if (condition) break; + slot += md->name_entry_size; } - - /* Chose branch according to the condition */ - - ecode += condition? 1 + IMM2_SIZE : GET(ecode, 1); } - } + break; - else if (condcode == OP_CREF || condcode == OP_NCREF) /* Group used test */ - { - offset = GET2(ecode, LINK_SIZE+2) << 1; /* Doubled ref number */ + case OP_CREF: /* Numbered group used test */ + offset = GET2(ecode, 1) << 1; /* Doubled ref number */ condition = offset < offset_top && md->offset_vector[offset] >= 0; + break; - /* If the numbered capture is unset, but the reference was by name, - scan the table to see if the name refers to any other numbers, and test - them. The condition is true if any one is set. This is tediously similar - to the code above, but not close enough to try to amalgamate. */ - - if (!condition && condcode == OP_NCREF) + case OP_DNCREF: /* Duplicate named group used test */ { - unsigned int refno = offset >> 1; - pcre_uchar *slotA = md->name_table; - - for (i = 0; i < md->name_count; i++) + int count = GET2(ecode, 1 + IMM2_SIZE); + pcre_uchar *slot = md->name_table + GET2(ecode, 1) * md->name_entry_size; + while (count-- > 0) { - if (GET2(slotA, 0) == refno) break; - slotA += md->name_entry_size; - } - - /* Found a name for the number - there can be only one; duplicate names - for different numbers are allowed, but not vice versa. First scan down - for duplicates. */ - - if (i < md->name_count) - { - pcre_uchar *slotB = slotA; - while (slotB > md->name_table) - { - slotB -= md->name_entry_size; - if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0) - { - offset = GET2(slotB, 0) << 1; - condition = offset < offset_top && - md->offset_vector[offset] >= 0; - if (condition) break; - } - else break; - } - - /* Scan up for duplicates */ - - if (!condition) - { - slotB = slotA; - for (i++; i < md->name_count; i++) - { - slotB += md->name_entry_size; - if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0) - { - offset = GET2(slotB, 0) << 1; - condition = offset < offset_top && - md->offset_vector[offset] >= 0; - if (condition) break; - } - else break; - } - } + offset = GET2(slot, 0) << 1; + condition = offset < offset_top && md->offset_vector[offset] >= 0; + if (condition) break; + slot += md->name_entry_size; } } + break; - /* Chose branch according to the condition */ - - ecode += condition? 1 + IMM2_SIZE : GET(ecode, 1); - } - - else if (condcode == OP_DEF) /* DEFINE - always false */ - { - condition = FALSE; - ecode += GET(ecode, 1); - } + case OP_DEF: /* DEFINE - always false */ + break; - /* The condition is an assertion. Call match() to evaluate it - setting - md->match_function_type to MATCH_CONDASSERT causes it to stop at the end of - an assertion. */ + /* The condition is an assertion. Call match() to evaluate it - setting + md->match_function_type to MATCH_CONDASSERT causes it to stop at the end + of an assertion. */ - else - { + default: md->match_function_type = MATCH_CONDASSERT; - RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM3); + RMATCH(eptr, ecode, offset_top, md, NULL, RM3); if (rrc == MATCH_MATCH) { if (md->end_offset_top > offset_top) offset_top = md->end_offset_top; /* Captures may have happened */ condition = TRUE; - ecode += 1 + LINK_SIZE + GET(ecode, LINK_SIZE + 2); + + /* Advance ecode past the assertion to the start of the first branch, + but adjust it so that the general choosing code below works. */ + + ecode += GET(ecode, 1); while (*ecode == OP_ALT) ecode += GET(ecode, 1); + ecode += 1 + LINK_SIZE - PRIV(OP_lengths)[condcode]; } /* PCRE doesn't allow the effect of (*THEN) to escape beyond an - assertion; it is therefore treated as NOMATCH. */ + assertion; it is therefore treated as NOMATCH. Any other return is an + error. */ else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) { RRETURN(rrc); /* Need braces because of following else */ } - else - { - condition = FALSE; - ecode += codelink; - } + break; } - /* We are now at the branch that is to be obeyed. As there is only one, can - use tail recursion to avoid using another stack frame, except when there is - unlimited repeat of a possibly empty group. In the latter case, a recursive - call to match() is always required, unless the second alternative doesn't - exist, in which case we can just plough on. Note that, for compatibility - with Perl, the | in a conditional group is NOT treated as creating two - alternatives. If a THEN is encountered in the branch, it propagates out to - the enclosing alternative (unless nested in a deeper set of alternatives, - of course). */ - - if (condition || *ecode == OP_ALT) + /* Choose branch according to the condition */ + + ecode += condition? PRIV(OP_lengths)[condcode] : codelink; + + /* We are now at the branch that is to be obeyed. As there is only one, we + can use tail recursion to avoid using another stack frame, except when + there is unlimited repeat of a possibly empty group. In the latter case, a + recursive call to match() is always required, unless the second alternative + doesn't exist, in which case we can just plough on. Note that, for + compatibility with Perl, the | in a conditional group is NOT treated as + creating two alternatives. If a THEN is encountered in the branch, it + propagates out to the enclosing alternative (unless nested in a deeper set + of alternatives, of course). */ + + if (condition || ecode[-(1+LINK_SIZE)] == OP_ALT) { if (op != OP_SCOND) { - ecode += 1 + LINK_SIZE; goto TAIL_RECURSE; } md->match_function_type = MATCH_CBEGROUP; - RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM49); + RMATCH(eptr, ecode, offset_top, md, eptrb, RM49); RRETURN(rrc); } @@ -1523,7 +1442,6 @@ for (;;) else { - ecode += 1 + LINK_SIZE; } break; @@ -2089,6 +2007,7 @@ for (;;) if (*ecode == OP_KETRPOS) { + md->start_match_ptr = mstart; /* In case \K reset it */ md->end_match_ptr = eptr; md->end_offset_top = offset_top; RRETURN(MATCH_KETRPOS); @@ -2656,19 +2575,24 @@ for (;;) RRETURN(MATCH_NOMATCH); break; - case PT_SPACE: /* Perl space */ - if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR) - == (op == OP_NOTPROP)) - RRETURN(MATCH_NOMATCH); - break; + /* Perl space used to exclude VT, but from Perl 5.18 it is included, + which means that Perl space and POSIX space are now identical. PCRE + was changed at release 8.34. */ + case PT_SPACE: /* Perl space */ case PT_PXSPACE: /* POSIX space */ - if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || - c == CHAR_FF || c == CHAR_CR) - == (op == OP_NOTPROP)) - RRETURN(MATCH_NOMATCH); + switch(c) + { + HSPACE_CASES: + VSPACE_CASES: + if (op == OP_NOTPROP) RRETURN(MATCH_NOMATCH); + break; + + default: + if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == + (op == OP_NOTPROP)) RRETURN(MATCH_NOMATCH); + break; + } break; case PT_WORD: @@ -2742,15 +2666,7 @@ for (;;) similar code to character type repeats - written out again for speed. However, if the referenced string is the empty string, always treat it as matched, any number of times (otherwise there could be infinite - loops). */ - - case OP_REF: - case OP_REFI: - caseless = op == OP_REFI; - offset = GET2(ecode, 1) << 1; /* Doubled ref number */ - ecode += 1 + IMM2_SIZE; - - /* If the reference is unset, there are two possibilities: + loops). If the reference is unset, there are two possibilities: (a) In the default, Perl-compatible state, set the length negative; this ensures that every attempt at a match fails. We can't just fail @@ -2760,8 +2676,39 @@ for (;;) so that the back reference matches an empty string. Otherwise, set the length to the length of what was matched by the - referenced subpattern. */ + referenced subpattern. + + The OP_REF and OP_REFI opcodes are used for a reference to a numbered group + or to a non-duplicated named group. For a duplicated named group, OP_DNREF + and OP_DNREFI are used. In this case we must scan the list of groups to + which the name refers, and use the first one that is set. */ + + case OP_DNREF: + case OP_DNREFI: + caseless = op == OP_DNREFI; + { + int count = GET2(ecode, 1+IMM2_SIZE); + pcre_uchar *slot = md->name_table + GET2(ecode, 1) * md->name_entry_size; + ecode += 1 + 2*IMM2_SIZE; + + while (count-- > 0) + { + offset = GET2(slot, 0) << 1; + if (offset < offset_top && md->offset_vector[offset] >= 0) break; + slot += md->name_entry_size; + } + if (count < 0) + length = (md->jscript_compat)? 0 : -1; + else + length = md->offset_vector[offset+1] - md->offset_vector[offset]; + } + goto REF_REPEAT; + case OP_REF: + case OP_REFI: + caseless = op == OP_REFI; + offset = GET2(ecode, 1) << 1; /* Doubled ref number */ + ecode += 1 + IMM2_SIZE; if (offset >= offset_top || md->offset_vector[offset] < 0) length = (md->jscript_compat)? 0 : -1; else @@ -2769,6 +2716,7 @@ for (;;) /* Set up for repetition, or handle the non-repeated case */ + REF_REPEAT: switch (*ecode) { case OP_CRSTAR: @@ -2917,8 +2865,12 @@ for (;;) case OP_CRMINPLUS: case OP_CRQUERY: case OP_CRMINQUERY: + case OP_CRPOSSTAR: + case OP_CRPOSPLUS: + case OP_CRPOSQUERY: c = *ecode++ - OP_CRSTAR; - minimize = (c & 1) != 0; + if (c < OP_CRPOSSTAR - OP_CRSTAR) minimize = (c & 1) != 0; + else possessive = TRUE; min = rep_min[c]; /* Pick up values from tables; */ max = rep_max[c]; /* zero for max => infinity */ if (max == 0) max = INT_MAX; @@ -2926,7 +2878,9 @@ for (;;) case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSRANGE: minimize = (*ecode == OP_CRMINRANGE); + possessive = (*ecode == OP_CRPOSRANGE); min = GET2(ecode, 1); max = GET2(ecode, 1 + IMM2_SIZE); if (max == 0) max = INT_MAX; @@ -3068,6 +3022,9 @@ for (;;) if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break; eptr += len; } + + if (possessive) continue; /* No backtracking */ + for (;;) { RMATCH(eptr, ecode, offset_top, md, eptrb, RM18); @@ -3098,6 +3055,9 @@ for (;;) if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break; eptr++; } + + if (possessive) continue; /* No backtracking */ + while (eptr >= pp) { RMATCH(eptr, ecode, offset_top, md, eptrb, RM19); @@ -3113,9 +3073,10 @@ for (;;) /* Control never gets here */ - /* Match an extended character class. This opcode is encountered only - when UTF-8 mode mode is supported. Nevertheless, we may not be in UTF-8 - mode, because Unicode properties are supported in non-UTF-8 mode. */ + /* Match an extended character class. In the 8-bit library, this opcode is + encountered only when UTF-8 mode mode is supported. In the 16-bit and + 32-bit libraries, codepoints greater than 255 may be encountered even when + UTF is not supported. */ #if defined SUPPORT_UTF || !defined COMPILE_PCRE8 case OP_XCLASS: @@ -3131,8 +3092,12 @@ for (;;) case OP_CRMINPLUS: case OP_CRQUERY: case OP_CRMINQUERY: + case OP_CRPOSSTAR: + case OP_CRPOSPLUS: + case OP_CRPOSQUERY: c = *ecode++ - OP_CRSTAR; - minimize = (c & 1) != 0; + if (c < OP_CRPOSSTAR - OP_CRSTAR) minimize = (c & 1) != 0; + else possessive = TRUE; min = rep_min[c]; /* Pick up values from tables; */ max = rep_max[c]; /* zero for max => infinity */ if (max == 0) max = INT_MAX; @@ -3140,7 +3105,9 @@ for (;;) case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSRANGE: minimize = (*ecode == OP_CRMINRANGE); + possessive = (*ecode == OP_CRPOSRANGE); min = GET2(ecode, 1); max = GET2(ecode, 1 + IMM2_SIZE); if (max == 0) max = INT_MAX; @@ -3212,6 +3179,9 @@ for (;;) if (!PRIV(xclass)(c, data, utf)) break; eptr += len; } + + if (possessive) continue; /* No backtracking */ + for(;;) { RMATCH(eptr, ecode, offset_top, md, eptrb, RM21); @@ -3590,7 +3560,6 @@ for (;;) if (fc != cc && foc != cc) break; eptr++; } - if (possessive) continue; /* No backtracking */ for (;;) { @@ -3599,9 +3568,8 @@ for (;;) eptr--; if (rrc != MATCH_NOMATCH) RRETURN(rrc); } - RRETURN(MATCH_NOMATCH); + /* Control never gets here */ } - /* Control never gets here */ } /* Caseful comparisons (includes all multi-byte characters) */ @@ -3657,7 +3625,7 @@ for (;;) eptr--; if (rrc != MATCH_NOMATCH) RRETURN(rrc); } - RRETURN(MATCH_NOMATCH); + /* Control never gets here */ } } /* Control never gets here */ @@ -3942,10 +3910,8 @@ for (;;) eptr--; } } - - RRETURN(MATCH_NOMATCH); + /* Control never gets here */ } - /* Control never gets here */ } /* Caseful comparisons */ @@ -4079,8 +4045,7 @@ for (;;) eptr--; } } - - RRETURN(MATCH_NOMATCH); + /* Control never gets here */ } } /* Control never gets here */ @@ -4262,7 +4227,12 @@ for (;;) } break; + /* Perl space used to exclude VT, but from Perl 5.18 it is included, + which means that Perl space and POSIX space are now identical. PCRE + was changed at release 8.34. */ + case PT_SPACE: /* Perl space */ + case PT_PXSPACE: /* POSIX space */ for (i = 1; i <= min; i++) { if (eptr >= md->end_subject) @@ -4271,26 +4241,18 @@ for (;;) RRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); - if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || - c == CHAR_FF || c == CHAR_CR) - == prop_fail_result) - RRETURN(MATCH_NOMATCH); - } - break; - - case PT_PXSPACE: /* POSIX space */ - for (i = 1; i <= min; i++) - { - if (eptr >= md->end_subject) + switch(c) { - SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + HSPACE_CASES: + VSPACE_CASES: + if (prop_fail_result) RRETURN(MATCH_NOMATCH); + break; + + default: + if ((UCD_CATEGORY(c) == ucp_Z) == prop_fail_result) + RRETURN(MATCH_NOMATCH); + break; } - GETCHARINCTEST(c, eptr); - if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || - c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) - == prop_fail_result) - RRETURN(MATCH_NOMATCH); } break; @@ -5010,25 +4972,11 @@ for (;;) } /* Control never gets here */ - case PT_SPACE: /* Perl space */ - for (fi = min;; fi++) - { - RMATCH(eptr, ecode, offset_top, md, eptrb, RM60); - if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); - if (eptr >= md->end_subject) - { - SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); - } - GETCHARINCTEST(c, eptr); - if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || - c == CHAR_FF || c == CHAR_CR) - == prop_fail_result) - RRETURN(MATCH_NOMATCH); - } - /* Control never gets here */ + /* Perl space used to exclude VT, but from Perl 5.18 it is included, + which means that Perl space and POSIX space are now identical. PCRE + was changed at release 8.34. */ + case PT_SPACE: /* Perl space */ case PT_PXSPACE: /* POSIX space */ for (fi = min;; fi++) { @@ -5041,10 +4989,18 @@ for (;;) RRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); - if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || - c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) - == prop_fail_result) - RRETURN(MATCH_NOMATCH); + switch(c) + { + HSPACE_CASES: + VSPACE_CASES: + if (prop_fail_result) RRETURN(MATCH_NOMATCH); + break; + + default: + if ((UCD_CATEGORY(c) == ucp_Z) == prop_fail_result) + RRETURN(MATCH_NOMATCH); + break; + } } /* Control never gets here */ @@ -5097,7 +5053,7 @@ for (;;) case PT_UCNC: for (fi = min;; fi++) { - RMATCH(eptr, ecode, offset_top, md, eptrb, RM68); + RMATCH(eptr, ecode, offset_top, md, eptrb, RM60); if (rrc != MATCH_NOMATCH) RRETURN(rrc); if (fi >= max) RRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) @@ -5528,7 +5484,12 @@ for (;;) } break; + /* Perl space used to exclude VT, but from Perl 5.18 it is included, + which means that Perl space and POSIX space are now identical. PCRE + was changed at release 8.34. */ + case PT_SPACE: /* Perl space */ + case PT_PXSPACE: /* POSIX space */ for (i = min; i < max; i++) { int len = 1; @@ -5538,30 +5499,21 @@ for (;;) break; } GETCHARLENTEST(c, eptr, len); - if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || - c == CHAR_FF || c == CHAR_CR) - == prop_fail_result) + switch(c) + { + HSPACE_CASES: + VSPACE_CASES: + if (prop_fail_result) goto ENDLOOP99; /* Break the loop */ break; - eptr+= len; - } - break; - case PT_PXSPACE: /* POSIX space */ - for (i = min; i < max; i++) - { - int len = 1; - if (eptr >= md->end_subject) - { - SCHECK_PARTIAL(); + default: + if ((UCD_CATEGORY(c) == ucp_Z) == prop_fail_result) + goto ENDLOOP99; /* Break the loop */ break; } - GETCHARLENTEST(c, eptr, len); - if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || - c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) - == prop_fail_result) - break; eptr+= len; } + ENDLOOP99: break; case PT_WORD: @@ -5642,7 +5594,7 @@ for (;;) } } - /* Match extended Unicode sequences. We will get here only if the + /* Match extended Unicode grapheme clusters. We will get here only if the support is in the binary; otherwise a compile-time error occurs. */ else if (ctype == OP_EXTUNI) @@ -5675,21 +5627,41 @@ for (;;) /* eptr is now past the end of the maximum run */ if (possessive) continue; /* No backtracking */ + for(;;) { - if (eptr == pp) goto TAIL_RECURSE; + int lgb, rgb; + PCRE_PUCHAR fptr; + + if (eptr == pp) goto TAIL_RECURSE; /* At start of char run */ RMATCH(eptr, ecode, offset_top, md, eptrb, RM45); if (rrc != MATCH_NOMATCH) RRETURN(rrc); + + /* Backtracking over an extended grapheme cluster involves inspecting + the previous two characters (if present) to see if a break is + permitted between them. */ + eptr--; - for (;;) /* Move back over one extended */ + if (!utf) c = *eptr; else + { + BACKCHAR(eptr); + GETCHAR(c, eptr); + } + rgb = UCD_GRAPHBREAK(c); + + for (;;) { - if (!utf) c = *eptr; else + if (eptr == pp) goto TAIL_RECURSE; /* At start of char run */ + fptr = eptr - 1; + if (!utf) c = *fptr; else { - BACKCHAR(eptr); - GETCHAR(c, eptr); + BACKCHAR(fptr); + GETCHAR(c, fptr); } - if (UCD_CATEGORY(c) != ucp_M) break; - eptr--; + lgb = UCD_GRAPHBREAK(c); + if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break; + eptr = fptr; + rgb = lgb; } } } @@ -6211,11 +6183,8 @@ for (;;) } } - /* Get here if we can't make it match with any permitted repetitions */ - - RRETURN(MATCH_NOMATCH); + /* Control never gets here */ } - /* Control never gets here */ /* There's been some horrible disaster. Arrival here can only mean there is something seriously wrong in the code above or the OP_xxx definitions. */ @@ -6249,15 +6218,15 @@ switch (frame->Xwhere) LBL(53) LBL(54) LBL(55) LBL(56) LBL(57) LBL(58) LBL(63) LBL(64) LBL(65) LBL(66) #if defined SUPPORT_UTF || !defined COMPILE_PCRE8 - LBL(21) + LBL(20) LBL(21) #endif #ifdef SUPPORT_UTF - LBL(16) LBL(18) LBL(20) + LBL(16) LBL(18) LBL(22) LBL(23) LBL(28) LBL(30) LBL(32) LBL(34) LBL(42) LBL(46) #ifdef SUPPORT_UCP LBL(36) LBL(37) LBL(38) LBL(39) LBL(40) LBL(41) LBL(44) LBL(45) - LBL(59) LBL(60) LBL(61) LBL(62) LBL(67) LBL(68) + LBL(59) LBL(60) LBL(61) LBL(62) LBL(67) #endif /* SUPPORT_UCP */ #endif /* SUPPORT_UTF */ default: @@ -6410,7 +6379,7 @@ const pcre_uint8 *start_bits = NULL; PCRE_PUCHAR start_match = (PCRE_PUCHAR)subject + start_offset; PCRE_PUCHAR end_subject; PCRE_PUCHAR start_partial = NULL; -PCRE_PUCHAR match_partial; +PCRE_PUCHAR match_partial = NULL; PCRE_PUCHAR req_char_ptr = start_match - 1; const pcre_study_data *study; @@ -7178,7 +7147,7 @@ if (rc != MATCH_NOMATCH && rc != PCRE_ERROR_PARTIAL) /* Handle partial matches - disable any mark data */ -if (start_partial != NULL) +if (match_partial != NULL) { DPRINTF((">>>> returning PCRE_ERROR_PARTIAL\n")); md->mark = NULL; diff --git a/pcre/pcre_fullinfo.c b/pcre/pcre_fullinfo.c index c4eb5c0e1ad..a6c2ece6ca5 100644 --- a/pcre/pcre_fullinfo.c +++ b/pcre/pcre_fullinfo.c @@ -232,6 +232,10 @@ switch (what) *((pcre_uint32 *)where) = re->limit_recursion; break; + case PCRE_INFO_MATCH_EMPTY: + *((int *)where) = (re->flags & PCRE_MATCH_EMPTY) != 0; + break; + default: return PCRE_ERROR_BADOPTION; } diff --git a/pcre/pcre_internal.h b/pcre/pcre_internal.h index cd6ef3ed83e..0b9798c5541 100644 --- a/pcre/pcre_internal.h +++ b/pcre/pcre_internal.h @@ -1149,6 +1149,7 @@ compatibility. */ #define PCRE_HASTHEN 0x00001000 /* pattern contains (*THEN) */ #define PCRE_MLSET 0x00002000 /* match limit set by regex */ #define PCRE_RLSET 0x00004000 /* recursion limit set by regex */ +#define PCRE_MATCH_EMPTY 0x00008000 /* pattern can match empty string */ #if defined COMPILE_PCRE8 #define PCRE_MODE PCRE_MODE8 @@ -1173,7 +1174,8 @@ time, run time, or study time, respectively. */ #define PUBLIC_COMPILE_OPTIONS \ (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \ PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \ - PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \ + PCRE_NO_AUTO_CAPTURE|PCRE_NO_AUTO_POSSESS| \ + PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \ PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \ PCRE_JAVASCRIPT_COMPAT|PCRE_UCP|PCRE_NO_START_OPTIMIZE|PCRE_NEVER_UTF) @@ -1531,22 +1533,25 @@ a positive value. */ #define STRING_xdigit "xdigit" #define STRING_DEFINE "DEFINE" - -#define STRING_CR_RIGHTPAR "CR)" -#define STRING_LF_RIGHTPAR "LF)" -#define STRING_CRLF_RIGHTPAR "CRLF)" -#define STRING_ANY_RIGHTPAR "ANY)" -#define STRING_ANYCRLF_RIGHTPAR "ANYCRLF)" -#define STRING_BSR_ANYCRLF_RIGHTPAR "BSR_ANYCRLF)" -#define STRING_BSR_UNICODE_RIGHTPAR "BSR_UNICODE)" -#define STRING_UTF8_RIGHTPAR "UTF8)" -#define STRING_UTF16_RIGHTPAR "UTF16)" -#define STRING_UTF32_RIGHTPAR "UTF32)" -#define STRING_UTF_RIGHTPAR "UTF)" -#define STRING_UCP_RIGHTPAR "UCP)" -#define STRING_NO_START_OPT_RIGHTPAR "NO_START_OPT)" -#define STRING_LIMIT_MATCH_EQ "LIMIT_MATCH=" -#define STRING_LIMIT_RECURSION_EQ "LIMIT_RECURSION=" +#define STRING_WEIRD_STARTWORD "[:<:]]" +#define STRING_WEIRD_ENDWORD "[:>:]]" + +#define STRING_CR_RIGHTPAR "CR)" +#define STRING_LF_RIGHTPAR "LF)" +#define STRING_CRLF_RIGHTPAR "CRLF)" +#define STRING_ANY_RIGHTPAR "ANY)" +#define STRING_ANYCRLF_RIGHTPAR "ANYCRLF)" +#define STRING_BSR_ANYCRLF_RIGHTPAR "BSR_ANYCRLF)" +#define STRING_BSR_UNICODE_RIGHTPAR "BSR_UNICODE)" +#define STRING_UTF8_RIGHTPAR "UTF8)" +#define STRING_UTF16_RIGHTPAR "UTF16)" +#define STRING_UTF32_RIGHTPAR "UTF32)" +#define STRING_UTF_RIGHTPAR "UTF)" +#define STRING_UCP_RIGHTPAR "UCP)" +#define STRING_NO_AUTO_POSSESS_RIGHTPAR "NO_AUTO_POSSESS)" +#define STRING_NO_START_OPT_RIGHTPAR "NO_START_OPT)" +#define STRING_LIMIT_MATCH_EQ "LIMIT_MATCH=" +#define STRING_LIMIT_RECURSION_EQ "LIMIT_RECURSION=" #else /* SUPPORT_UTF */ @@ -1797,21 +1802,22 @@ only. */ #define STRING_WEIRD_STARTWORD STR_LEFT_SQUARE_BRACKET STR_COLON STR_LESS_THAN_SIGN STR_COLON STR_RIGHT_SQUARE_BRACKET STR_RIGHT_SQUARE_BRACKET #define STRING_WEIRD_ENDWORD STR_LEFT_SQUARE_BRACKET STR_COLON STR_GREATER_THAN_SIGN STR_COLON STR_RIGHT_SQUARE_BRACKET STR_RIGHT_SQUARE_BRACKET -#define STRING_CR_RIGHTPAR STR_C STR_R STR_RIGHT_PARENTHESIS -#define STRING_LF_RIGHTPAR STR_L STR_F STR_RIGHT_PARENTHESIS -#define STRING_CRLF_RIGHTPAR STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS -#define STRING_ANY_RIGHTPAR STR_A STR_N STR_Y STR_RIGHT_PARENTHESIS -#define STRING_ANYCRLF_RIGHTPAR STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS -#define STRING_BSR_ANYCRLF_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS -#define STRING_BSR_UNICODE_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_U STR_N STR_I STR_C STR_O STR_D STR_E STR_RIGHT_PARENTHESIS -#define STRING_UTF8_RIGHTPAR STR_U STR_T STR_F STR_8 STR_RIGHT_PARENTHESIS -#define STRING_UTF16_RIGHTPAR STR_U STR_T STR_F STR_1 STR_6 STR_RIGHT_PARENTHESIS -#define STRING_UTF32_RIGHTPAR STR_U STR_T STR_F STR_3 STR_2 STR_RIGHT_PARENTHESIS -#define STRING_UTF_RIGHTPAR STR_U STR_T STR_F STR_RIGHT_PARENTHESIS -#define STRING_UCP_RIGHTPAR STR_U STR_C STR_P STR_RIGHT_PARENTHESIS -#define STRING_NO_START_OPT_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_S STR_T STR_A STR_R STR_T STR_UNDERSCORE STR_O STR_P STR_T STR_RIGHT_PARENTHESIS -#define STRING_LIMIT_MATCH_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_M STR_A STR_T STR_C STR_H STR_EQUALS_SIGN -#define STRING_LIMIT_RECURSION_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_R STR_E STR_C STR_U STR_R STR_S STR_I STR_O STR_N STR_EQUALS_SIGN +#define STRING_CR_RIGHTPAR STR_C STR_R STR_RIGHT_PARENTHESIS +#define STRING_LF_RIGHTPAR STR_L STR_F STR_RIGHT_PARENTHESIS +#define STRING_CRLF_RIGHTPAR STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS +#define STRING_ANY_RIGHTPAR STR_A STR_N STR_Y STR_RIGHT_PARENTHESIS +#define STRING_ANYCRLF_RIGHTPAR STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS +#define STRING_BSR_ANYCRLF_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS +#define STRING_BSR_UNICODE_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_U STR_N STR_I STR_C STR_O STR_D STR_E STR_RIGHT_PARENTHESIS +#define STRING_UTF8_RIGHTPAR STR_U STR_T STR_F STR_8 STR_RIGHT_PARENTHESIS +#define STRING_UTF16_RIGHTPAR STR_U STR_T STR_F STR_1 STR_6 STR_RIGHT_PARENTHESIS +#define STRING_UTF32_RIGHTPAR STR_U STR_T STR_F STR_3 STR_2 STR_RIGHT_PARENTHESIS +#define STRING_UTF_RIGHTPAR STR_U STR_T STR_F STR_RIGHT_PARENTHESIS +#define STRING_UCP_RIGHTPAR STR_U STR_C STR_P STR_RIGHT_PARENTHESIS +#define STRING_NO_AUTO_POSSESS_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_A STR_U STR_T STR_O STR_UNDERSCORE STR_P STR_O STR_S STR_S STR_E STR_S STR_S STR_RIGHT_PARENTHESIS +#define STRING_NO_START_OPT_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_S STR_T STR_A STR_R STR_T STR_UNDERSCORE STR_O STR_P STR_T STR_RIGHT_PARENTHESIS +#define STRING_LIMIT_MATCH_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_M STR_A STR_T STR_C STR_H STR_EQUALS_SIGN +#define STRING_LIMIT_RECURSION_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_R STR_E STR_C STR_U STR_R STR_S STR_I STR_O STR_N STR_EQUALS_SIGN #endif /* SUPPORT_UTF */ @@ -1853,6 +1859,17 @@ only. */ #define PT_WORD 8 /* Word - L plus N plus underscore */ #define PT_CLIST 9 /* Pseudo-property: match character list */ #define PT_UCNC 10 /* Universal Character nameable character */ +#define PT_TABSIZE 11 /* Size of square table for autopossessify tests */ + +/* The following special properties are used only in XCLASS items, when POSIX +classes are specified and PCRE_UCP is set - in other words, for Unicode +handling of these classes. They are not available via the \p or \P escapes like +those in the above list, and so they do not take part in the autopossessifying +table. */ + +#define PT_PXGRAPH 11 /* [:graph:] - characters that mark the paper */ +#define PT_PXPRINT 12 /* [:print:] - [:graph:] plus non-control spaces */ +#define PT_PXPUNCT 13 /* [:punct:] - punctuation characters */ /* Flag bits and data types for the extended class (OP_XCLASS) for classes that contain characters with values greater than 255. */ @@ -1867,9 +1884,9 @@ contain characters with values greater than 255. */ #define XCL_NOTPROP 4 /* Unicode inverted property (ditto) */ /* These are escaped items that aren't just an encoding of a particular data -value such as \n. They must have non-zero values, as check_escape() returns -0 for a data character. Also, they must appear in the same order as in the opcode -definitions below, up to ESC_z. There's a dummy for OP_ALLANY because it +value such as \n. They must have non-zero values, as check_escape() returns 0 +for a data character. Also, they must appear in the same order as in the +opcode definitions below, up to ESC_z. There's a dummy for OP_ALLANY because it corresponds to "." in DOTALL mode rather than an escape sequence. It is also used for [^] in JavaScript compatibility mode, and for \C in non-utf mode. In non-DOTALL mode, "." behaves like \N. @@ -1892,12 +1909,31 @@ enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, ESC_E, ESC_Q, ESC_g, ESC_k, ESC_DU, ESC_du, ESC_SU, ESC_su, ESC_WU, ESC_wu }; -/* Opcode table: Starting from 1 (i.e. after OP_END), the values up to -OP_EOD must correspond in order to the list of escapes immediately above. -*** NOTE NOTE NOTE *** Whenever this list is updated, the two macro definitions -that follow must also be updated to match. There are also tables called -"coptable" and "poptable" in pcre_dfa_exec.c that must be updated. */ +/********************** Opcode definitions ******************/ + +/****** NOTE NOTE NOTE ****** + +Starting from 1 (i.e. after OP_END), the values up to OP_EOD must correspond in +order to the list of escapes immediately above. Furthermore, values up to +OP_DOLLM must not be changed without adjusting the table called autoposstab in +pcre_compile.c + +Whenever this list is updated, the two macro definitions that follow must be +updated to match. The possessification table called "opcode_possessify" in +pcre_compile.c must also be updated, and also the tables called "coptable" +and "poptable" in pcre_dfa_exec.c. + +****** NOTE NOTE NOTE ******/ + + +/* The values between FIRST_AUTOTAB_OP and LAST_AUTOTAB_RIGHT_OP, inclusive, +are used in a table for deciding whether a repeated character type can be +auto-possessified. */ + +#define FIRST_AUTOTAB_OP OP_NOT_DIGIT +#define LAST_AUTOTAB_LEFT_OP OP_EXTUNI +#define LAST_AUTOTAB_RIGHT_OP OP_DOLLM enum { OP_END, /* 0 End of pattern */ @@ -1930,10 +1966,15 @@ enum { OP_EODN, /* 23 End of data or \n at end of data (\Z) */ OP_EOD, /* 24 End of data (\z) */ - OP_CIRC, /* 25 Start of line - not multiline */ - OP_CIRCM, /* 26 Start of line - multiline */ - OP_DOLL, /* 27 End of line - not multiline */ - OP_DOLLM, /* 28 End of line - multiline */ + /* Line end assertions */ + + OP_DOLL, /* 25 End of line - not multiline */ + OP_DOLLM, /* 26 End of line - multiline */ + OP_CIRC, /* 27 Start of line - not multiline */ + OP_CIRCM, /* 28 Start of line - multiline */ + + /* Single characters; caseful must precede the caseless ones */ + OP_CHAR, /* 29 Match one character, casefully */ OP_CHARI, /* 30 Match one character, caselessly */ OP_NOT, /* 31 Match one character, not the given one, casefully */ @@ -1942,7 +1983,7 @@ enum { /* The following sets of 13 opcodes must always be kept in step because the offset from the first one is used to generate the others. */ - /**** Single characters, caseful, must precede the caseless ones ****/ + /* Repeated characters; caseful must precede the caseless ones */ OP_STAR, /* 33 The maximizing and minimizing versions of */ OP_MINSTAR, /* 34 these six opcodes must come in pairs, with */ @@ -1960,7 +2001,7 @@ enum { OP_POSQUERY, /* 44 Posesssified query, caseful */ OP_POSUPTO, /* 45 Possessified upto, caseful */ - /**** Single characters, caseless, must follow the caseful ones */ + /* Repeated characters; caseless must follow the caseful ones */ OP_STARI, /* 46 */ OP_MINSTARI, /* 47 */ @@ -1978,8 +2019,8 @@ enum { OP_POSQUERYI, /* 57 Posesssified query, caseless */ OP_POSUPTOI, /* 58 Possessified upto, caseless */ - /**** The negated ones must follow the non-negated ones, and match them ****/ - /**** Negated single character, caseful; must precede the caseless ones ****/ + /* The negated ones must follow the non-negated ones, and match them */ + /* Negated repeated character, caseful; must precede the caseless ones */ OP_NOTSTAR, /* 59 The maximizing and minimizing versions of */ OP_NOTMINSTAR, /* 60 these six opcodes must come in pairs, with */ @@ -1997,7 +2038,7 @@ enum { OP_NOTPOSQUERY, /* 70 */ OP_NOTPOSUPTO, /* 71 */ - /**** Negated single character, caseless; must follow the caseful ones ****/ + /* Negated repeated character, caseless; must follow the caseful ones */ OP_NOTSTARI, /* 72 */ OP_NOTMINSTARI, /* 73 */ @@ -2015,7 +2056,7 @@ enum { OP_NOTPOSQUERYI, /* 83 */ OP_NOTPOSUPTOI, /* 84 */ - /**** Character types ****/ + /* Character types */ OP_TYPESTAR, /* 85 The maximizing and minimizing versions of */ OP_TYPEMINSTAR, /* 86 these six opcodes must come in pairs, with */ @@ -2046,89 +2087,96 @@ enum { OP_CRRANGE, /* 104 These are different to the three sets above. */ OP_CRMINRANGE, /* 105 */ + OP_CRPOSSTAR, /* 106 Possessified versions */ + OP_CRPOSPLUS, /* 107 */ + OP_CRPOSQUERY, /* 108 */ + OP_CRPOSRANGE, /* 109 */ + /* End of quantifier opcodes */ - OP_CLASS, /* 106 Match a character class, chars < 256 only */ - OP_NCLASS, /* 107 Same, but the bitmap was created from a negative + OP_CLASS, /* 110 Match a character class, chars < 256 only */ + OP_NCLASS, /* 111 Same, but the bitmap was created from a negative class - the difference is relevant only when a character > 255 is encountered. */ - OP_XCLASS, /* 108 Extended class for handling > 255 chars within the + OP_XCLASS, /* 112 Extended class for handling > 255 chars within the class. This does both positive and negative. */ - OP_REF, /* 109 Match a back reference, casefully */ - OP_REFI, /* 110 Match a back reference, caselessly */ - OP_RECURSE, /* 111 Match a numbered subpattern (possibly recursive) */ - OP_CALLOUT, /* 112 Call out to external function if provided */ - - OP_ALT, /* 113 Start of alternation */ - OP_KET, /* 114 End of group that doesn't have an unbounded repeat */ - OP_KETRMAX, /* 115 These two must remain together and in this */ - OP_KETRMIN, /* 116 order. They are for groups the repeat for ever. */ - OP_KETRPOS, /* 117 Possessive unlimited repeat. */ + OP_REF, /* 113 Match a back reference, casefully */ + OP_REFI, /* 114 Match a back reference, caselessly */ + OP_DNREF, /* 115 Match a duplicate name backref, casefully */ + OP_DNREFI, /* 116 Match a duplicate name backref, caselessly */ + OP_RECURSE, /* 117 Match a numbered subpattern (possibly recursive) */ + OP_CALLOUT, /* 118 Call out to external function if provided */ + + OP_ALT, /* 119 Start of alternation */ + OP_KET, /* 120 End of group that doesn't have an unbounded repeat */ + OP_KETRMAX, /* 121 These two must remain together and in this */ + OP_KETRMIN, /* 122 order. They are for groups the repeat for ever. */ + OP_KETRPOS, /* 123 Possessive unlimited repeat. */ /* The assertions must come before BRA, CBRA, ONCE, and COND, and the four asserts must remain in order. */ - OP_REVERSE, /* 118 Move pointer back - used in lookbehind assertions */ - OP_ASSERT, /* 119 Positive lookahead */ - OP_ASSERT_NOT, /* 120 Negative lookahead */ - OP_ASSERTBACK, /* 121 Positive lookbehind */ - OP_ASSERTBACK_NOT, /* 122 Negative lookbehind */ + OP_REVERSE, /* 124 Move pointer back - used in lookbehind assertions */ + OP_ASSERT, /* 125 Positive lookahead */ + OP_ASSERT_NOT, /* 126 Negative lookahead */ + OP_ASSERTBACK, /* 127 Positive lookbehind */ + OP_ASSERTBACK_NOT, /* 128 Negative lookbehind */ /* ONCE, ONCE_NC, BRA, BRAPOS, CBRA, CBRAPOS, and COND must come immediately after the assertions, with ONCE first, as there's a test for >= ONCE for a subpattern that isn't an assertion. The POS versions must immediately follow the non-POS versions in each case. */ - OP_ONCE, /* 123 Atomic group, contains captures */ - OP_ONCE_NC, /* 124 Atomic group containing no captures */ - OP_BRA, /* 125 Start of non-capturing bracket */ - OP_BRAPOS, /* 126 Ditto, with unlimited, possessive repeat */ - OP_CBRA, /* 127 Start of capturing bracket */ - OP_CBRAPOS, /* 128 Ditto, with unlimited, possessive repeat */ - OP_COND, /* 129 Conditional group */ + OP_ONCE, /* 129 Atomic group, contains captures */ + OP_ONCE_NC, /* 130 Atomic group containing no captures */ + OP_BRA, /* 131 Start of non-capturing bracket */ + OP_BRAPOS, /* 132 Ditto, with unlimited, possessive repeat */ + OP_CBRA, /* 133 Start of capturing bracket */ + OP_CBRAPOS, /* 134 Ditto, with unlimited, possessive repeat */ + OP_COND, /* 135 Conditional group */ /* These five must follow the previous five, in the same order. There's a check for >= SBRA to distinguish the two sets. */ - OP_SBRA, /* 130 Start of non-capturing bracket, check empty */ - OP_SBRAPOS, /* 131 Ditto, with unlimited, possessive repeat */ - OP_SCBRA, /* 132 Start of capturing bracket, check empty */ - OP_SCBRAPOS, /* 133 Ditto, with unlimited, possessive repeat */ - OP_SCOND, /* 134 Conditional group, check empty */ + OP_SBRA, /* 136 Start of non-capturing bracket, check empty */ + OP_SBRAPOS, /* 137 Ditto, with unlimited, possessive repeat */ + OP_SCBRA, /* 138 Start of capturing bracket, check empty */ + OP_SCBRAPOS, /* 139 Ditto, with unlimited, possessive repeat */ + OP_SCOND, /* 140 Conditional group, check empty */ /* The next two pairs must (respectively) be kept together. */ - OP_CREF, /* 135 Used to hold a capture number as condition */ - OP_NCREF, /* 136 Same, but generated by a name reference*/ - OP_RREF, /* 137 Used to hold a recursion number as condition */ - OP_NRREF, /* 138 Same, but generated by a name reference*/ - OP_DEF, /* 139 The DEFINE condition */ + OP_CREF, /* 141 Used to hold a capture number as condition */ + OP_DNCREF, /* 142 Used to point to duplicate names as a condition */ + OP_RREF, /* 143 Used to hold a recursion number as condition */ + OP_DNRREF, /* 144 Used to point to duplicate names as a condition */ + OP_DEF, /* 145 The DEFINE condition */ - OP_BRAZERO, /* 140 These two must remain together and in this */ - OP_BRAMINZERO, /* 141 order. */ - OP_BRAPOSZERO, /* 142 */ + OP_BRAZERO, /* 146 These two must remain together and in this */ + OP_BRAMINZERO, /* 147 order. */ + OP_BRAPOSZERO, /* 148 */ /* These are backtracking control verbs */ - OP_MARK, /* 143 always has an argument */ - OP_PRUNE, /* 144 */ - OP_PRUNE_ARG, /* 145 same, but with argument */ - OP_SKIP, /* 146 */ - OP_SKIP_ARG, /* 147 same, but with argument */ - OP_THEN, /* 148 */ - OP_THEN_ARG, /* 149 same, but with argument */ - OP_COMMIT, /* 150 */ + OP_MARK, /* 149 always has an argument */ + OP_PRUNE, /* 150 */ + OP_PRUNE_ARG, /* 151 same, but with argument */ + OP_SKIP, /* 152 */ + OP_SKIP_ARG, /* 153 same, but with argument */ + OP_THEN, /* 154 */ + OP_THEN_ARG, /* 155 same, but with argument */ + OP_COMMIT, /* 156 */ /* These are forced failure and success verbs */ - OP_FAIL, /* 151 */ - OP_ACCEPT, /* 152 */ - OP_ASSERT_ACCEPT, /* 153 Used inside assertions */ - OP_CLOSE, /* 154 Used before OP_ACCEPT to close open captures */ + OP_FAIL, /* 157 */ + OP_ACCEPT, /* 158 */ + OP_ASSERT_ACCEPT, /* 159 Used inside assertions */ + OP_CLOSE, /* 160 Used before OP_ACCEPT to close open captures */ /* This is used to skip a subpattern with a {0} quantifier */ - OP_SKIPZERO, /* 155 */ + OP_SKIPZERO, /* 161 */ /* This is not an opcode, but is used to check that tables indexed by opcode are the correct length, in order to catch updating errors - there have been @@ -2139,7 +2187,8 @@ enum { /* *** NOTE NOTE NOTE *** Whenever the list above is updated, the two macro definitions that follow must also be updated to match. There are also tables -called "coptable" and "poptable" in pcre_dfa_exec.c that must be updated. */ +called "opcode_possessify" in pcre_compile.c and "coptable" and "poptable" in +pcre_dfa_exec.c that must be updated. */ /* This macro defines textual names for all the opcodes. These are used only @@ -2152,7 +2201,7 @@ some cases doesn't actually use these names at all). */ "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte", \ "notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v", \ "extuni", "\\Z", "\\z", \ - "^", "^", "$", "$", "char", "chari", "not", "noti", \ + "$", "$", "^", "^", "char", "chari", "not", "noti", \ "*", "*?", "+", "+?", "?", "??", \ "{", "{", "{", \ "*+","++", "?+", "{", \ @@ -2168,7 +2217,8 @@ some cases doesn't actually use these names at all). */ "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \ "*+","++", "?+", "{", \ "*", "*?", "+", "+?", "?", "??", "{", "{", \ - "class", "nclass", "xclass", "Ref", "Refi", \ + "*+","++", "?+", "{", \ + "class", "nclass", "xclass", "Ref", "Refi", "DnRef", "DnRefi", \ "Recurse", "Callout", \ "Alt", "Ket", "KetRmax", "KetRmin", "KetRpos", \ "Reverse", "Assert", "Assert not", "AssertB", "AssertB not", \ @@ -2177,7 +2227,7 @@ some cases doesn't actually use these names at all). */ "Cond", \ "SBra", "SBraPos", "SCBra", "SCBraPos", \ "SCond", \ - "Cond ref", "Cond nref", "Cond rec", "Cond nrec", "Cond def", \ + "Cond ref", "Cond dnref", "Cond rec", "Cond dnrec", "Cond def", \ "Brazero", "Braminzero", "Braposzero", \ "*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP", \ "*THEN", "*THEN", "*COMMIT", "*FAIL", \ @@ -2202,7 +2252,7 @@ in UTF-8 mode. The code that uses this table must know about such things. */ 3, 3, /* \P, \p */ \ 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ \ 1, /* \X */ \ - 1, 1, 1, 1, 1, 1, /* \Z, \z, ^, ^M, $, $M */ \ + 1, 1, 1, 1, 1, 1, /* \Z, \z, $, $M ^, ^M */ \ 2, /* Char - the minimum length */ \ 2, /* Chari - the minimum length */ \ 2, /* not */ \ @@ -2233,11 +2283,14 @@ in UTF-8 mode. The code that uses this table must know about such things. */ /* Character class & ref repeats */ \ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */ \ 1+2*IMM2_SIZE, 1+2*IMM2_SIZE, /* CRRANGE, CRMINRANGE */ \ + 1, 1, 1, 1+2*IMM2_SIZE, /* Possessive *+, ++, ?+, CRPOSRANGE */ \ 1+(32/sizeof(pcre_uchar)), /* CLASS */ \ 1+(32/sizeof(pcre_uchar)), /* NCLASS */ \ 0, /* XCLASS - variable length */ \ 1+IMM2_SIZE, /* REF */ \ 1+IMM2_SIZE, /* REFI */ \ + 1+2*IMM2_SIZE, /* DNREF */ \ + 1+2*IMM2_SIZE, /* DNREFI */ \ 1+LINK_SIZE, /* RECURSE */ \ 2+2*LINK_SIZE, /* CALLOUT */ \ 1+LINK_SIZE, /* Alt */ \ @@ -2262,8 +2315,8 @@ in UTF-8 mode. The code that uses this table must know about such things. */ 1+LINK_SIZE+IMM2_SIZE, /* SCBRA */ \ 1+LINK_SIZE+IMM2_SIZE, /* SCBRAPOS */ \ 1+LINK_SIZE, /* SCOND */ \ - 1+IMM2_SIZE, 1+IMM2_SIZE, /* CREF, NCREF */ \ - 1+IMM2_SIZE, 1+IMM2_SIZE, /* RREF, NRREF */ \ + 1+IMM2_SIZE, 1+2*IMM2_SIZE, /* CREF, DNCREF */ \ + 1+IMM2_SIZE, 1+2*IMM2_SIZE, /* RREF, DNRREF */ \ 1, /* DEF */ \ 1, 1, 1, /* BRAZERO, BRAMINZERO, BRAPOSZERO */ \ 3, 1, 3, /* MARK, PRUNE, PRUNE_ARG */ \ @@ -2272,8 +2325,7 @@ in UTF-8 mode. The code that uses this table must know about such things. */ 1, 1, 1, 1, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */ \ 1+IMM2_SIZE, 1 /* CLOSE, SKIPZERO */ -/* A magic value for OP_RREF and OP_NRREF to indicate the "any recursion" -condition. */ +/* A magic value for OP_RREF to indicate the "any recursion" condition. */ #define RREF_ANY 0xffff @@ -2288,9 +2340,11 @@ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49, ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59, ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69, - ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERRCOUNT }; + ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERR79, + ERR80, ERR81, ERR82, ERR83, ERR84, ERRCOUNT }; /* JIT compiling modes. The function list is indexed by them. */ + enum { JIT_COMPILE, JIT_PARTIAL_SOFT_COMPILE, JIT_PARTIAL_HARD_COMPILE, JIT_NUMBER_OF_COMPILE_MODES }; @@ -2408,6 +2462,15 @@ typedef struct open_capitem { pcre_uint16 flag; /* Set TRUE if recursive back ref */ } open_capitem; +/* Structure for building a list of named groups during the first pass of +compiling. */ + +typedef struct named_group { + const pcre_uchar *name; /* Points to the name in the pattern */ + int length; /* Length of the name */ + pcre_uint32 number; /* Group number */ +} named_group; + /* Structure for passing "static" information around between the functions doing the compiling, so that they are thread-safe. */ @@ -2420,17 +2483,21 @@ typedef struct compile_data { const pcre_uchar *start_code; /* The start of the compiled code */ const pcre_uchar *start_pattern; /* The start of the pattern */ const pcre_uchar *end_pattern; /* The end of the pattern */ - open_capitem *open_caps; /* Chain of open capture items */ pcre_uchar *hwm; /* High watermark of workspace */ + open_capitem *open_caps; /* Chain of open capture items */ + named_group *named_groups; /* Points to vector in pre-compile */ pcre_uchar *name_table; /* The name/number table */ int names_found; /* Number of entries so far */ int name_entry_size; /* Size of each entry */ + int named_group_list_size; /* Number of entries in the list */ int workspace_size; /* Size of workspace */ unsigned int bracount; /* Count of capturing parens as we compile */ int final_bracount; /* Saved value after first pass */ int max_lookbehind; /* Maximum lookbehind (characters) */ int top_backref; /* Maximum back reference */ unsigned int backref_map; /* Bitmap of low back refs */ + unsigned int namedrefcount; /* Number of backreferences by name */ + int parens_depth; /* Depth of nested parentheses */ int assert_depth; /* Depth of nested assertions */ pcre_uint32 external_options; /* External (initial) options */ pcre_uint32 external_flags; /* External flag bits to be set */ @@ -2438,6 +2505,7 @@ typedef struct compile_data { BOOL had_accept; /* (*ACCEPT) encountered */ BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */ BOOL check_lookbehind; /* Lookbehinds need later checking */ + BOOL dupnames; /* Duplicate names exist */ int nltype; /* Newline type */ int nllen; /* Newline string length */ pcre_uchar nl[4]; /* Newline string when fixed length */ diff --git a/pcre/pcre_jit_compile.c b/pcre/pcre_jit_compile.c index 201416dd264..63b32c51670 100644 --- a/pcre/pcre_jit_compile.c +++ b/pcre/pcre_jit_compile.c @@ -371,7 +371,7 @@ typedef struct compiler_common { sljit_sw ctypes; int digits[2 + MAX_RANGE_SIZE]; /* Named capturing brackets. */ - sljit_uw name_table; + pcre_uchar *name_table; sljit_sw name_count; sljit_sw name_entry_size; @@ -481,8 +481,8 @@ to characters. The vector data is divided into two groups: the first group contains the start / end character pointers, and the second is the start pointers when the end of the capturing group has not yet reached. */ #define OVECTOR_START (common->ovector_start) -#define OVECTOR(i) (OVECTOR_START + (i) * sizeof(sljit_sw)) -#define OVECTOR_PRIV(i) (common->cbra_ptr + (i) * sizeof(sljit_sw)) +#define OVECTOR(i) (OVECTOR_START + (i) * (sljit_sw)sizeof(sljit_sw)) +#define OVECTOR_PRIV(i) (common->cbra_ptr + (i) * (sljit_sw)sizeof(sljit_sw)) #define PRIVATE_DATA(cc) (common->private_data_ptrs[(cc) - common->start]) #if defined COMPILE_PCRE8 @@ -585,10 +585,16 @@ switch(*cc) case OP_CRMINQUERY: case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSSTAR: + case OP_CRPOSPLUS: + case OP_CRPOSQUERY: + case OP_CRPOSRANGE: case OP_CLASS: case OP_NCLASS: case OP_REF: case OP_REFI: + case OP_DNREF: + case OP_DNREFI: case OP_RECURSE: case OP_CALLOUT: case OP_ALT: @@ -614,9 +620,9 @@ switch(*cc) case OP_SCBRAPOS: case OP_SCOND: case OP_CREF: - case OP_NCREF: + case OP_DNCREF: case OP_RREF: - case OP_NRREF: + case OP_DNRREF: case OP_DEF: case OP_BRAZERO: case OP_BRAMINZERO: @@ -736,10 +742,8 @@ switch(*cc) static BOOL check_opcode_types(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend) { -pcre_uchar *name; -pcre_uchar *name2; -unsigned int cbra_index; -int i; +int count; +pcre_uchar *slot; /* Calculate important variables (like stack size) and checks whether all opcodes are supported. */ while (cc < ccend) @@ -773,29 +777,21 @@ while (cc < ccend) break; case OP_CREF: - i = GET2(cc, 1); - common->optimized_cbracket[i] = 0; + common->optimized_cbracket[GET2(cc, 1)] = 0; cc += 1 + IMM2_SIZE; break; - case OP_NCREF: - cbra_index = GET2(cc, 1); - name = (pcre_uchar *)common->name_table; - name2 = name; - for (i = 0; i < common->name_count; i++) - { - if (GET2(name, 0) == cbra_index) break; - name += common->name_entry_size; - } - SLJIT_ASSERT(i != common->name_count); - - for (i = 0; i < common->name_count; i++) + case OP_DNREF: + case OP_DNREFI: + case OP_DNCREF: + count = GET2(cc, 1 + IMM2_SIZE); + slot = common->name_table + GET2(cc, 1) * common->name_entry_size; + while (count-- > 0) { - if (STRCMP_UC_UC(name2 + IMM2_SIZE, name + IMM2_SIZE) == 0) - common->optimized_cbracket[GET2(name2, 0)] = 0; - name2 += common->name_entry_size; + common->optimized_cbracket[GET2(slot, 0)] = 0; + slot += common->name_entry_size; } - cc += 1 + IMM2_SIZE; + cc += 1 + 2 * IMM2_SIZE; break; case OP_RECURSE: @@ -4027,14 +4023,15 @@ DEFINE_COMPILER; jump_list *found = NULL; jump_list **list = (*cc & XCL_NOT) == 0 ? &found : backtracks; pcre_int32 c, charoffset; -const pcre_uint32 *other_cases; struct sljit_jump *jump = NULL; pcre_uchar *ccbegin; int compares, invertcmp, numberofcmps; + #ifdef SUPPORT_UCP BOOL needstype = FALSE, needsscript = FALSE, needschar = FALSE; BOOL charsaved = FALSE; int typereg = TMP1, scriptreg = TMP1; +const pcre_uint32 *other_cases; pcre_int32 typeoffset; #endif @@ -4130,6 +4127,9 @@ while (*cc != XCL_END) case PT_SPACE: case PT_PXSPACE: case PT_WORD: + case PT_PXGRAPH: + case PT_PXPRINT: + case PT_PXPUNCT: needstype = TRUE; needschar = TRUE; break; @@ -4317,16 +4317,15 @@ while (*cc != XCL_END) case PT_SPACE: case PT_PXSPACE: - if (*cc == PT_SPACE) - { - OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0); - jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 11 - charoffset); - } SET_CHAR_OFFSET(9); - OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 13 - 9); + OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd - 0x9); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL); - if (*cc == PT_SPACE) - JUMPHERE(jump); + + OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x9); + OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL); + + OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e - 0x9); + OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL); SET_TYPE_OFFSET(ucp_Zl); OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Zl); @@ -4418,6 +4417,67 @@ while (*cc != XCL_END) OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_GREATER_EQUAL); jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp); break; + + case PT_PXGRAPH: + /* C and Z groups are the farthest two groups. */ + SET_TYPE_OFFSET(ucp_Ll); + OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll); + OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_GREATER); + + jump = CMP(SLJIT_C_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll); + + /* In case of ucp_Cf, we overwrite the result. */ + SET_CHAR_OFFSET(0x2066); + OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066); + OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL); + + OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066); + OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL); + + OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e - 0x2066); + OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL); + + JUMPHERE(jump); + jump = CMP(SLJIT_C_ZERO ^ invertcmp, TMP2, 0, SLJIT_IMM, 0); + break; + + case PT_PXPRINT: + /* C and Z groups are the farthest two groups. */ + SET_TYPE_OFFSET(ucp_Ll); + OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll); + OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_GREATER); + + OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Ll); + OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_C_NOT_EQUAL); + + jump = CMP(SLJIT_C_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll); + + /* In case of ucp_Cf, we overwrite the result. */ + SET_CHAR_OFFSET(0x2066); + OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066); + OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL); + + OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066); + OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL); + + JUMPHERE(jump); + jump = CMP(SLJIT_C_ZERO ^ invertcmp, TMP2, 0, SLJIT_IMM, 0); + break; + + case PT_PXPUNCT: + SET_TYPE_OFFSET(ucp_Sc); + OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Sc); + OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL); + + SET_CHAR_OFFSET(0); + OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xff); + OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL); + + SET_TYPE_OFFSET(ucp_Pc); + OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Ps - ucp_Pc); + OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL); + jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp); + break; } cc += 2; } @@ -5056,28 +5116,6 @@ if (context.length > 0) return compile_char1_matchingpath(common, *cc, cc + 1, backtracks); } -static struct sljit_jump *compile_ref_checks(compiler_common *common, pcre_uchar *cc, jump_list **backtracks) -{ -DEFINE_COMPILER; -int offset = GET2(cc, 1) << 1; - -OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset)); -if (!common->jscript_compat) - { - if (backtracks == NULL) - { - /* OVECTOR(1) contains the "string begin - 1" constant. */ - OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)); - OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1)); - OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL); - return JUMP(SLJIT_C_NOT_ZERO); - } - add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1))); - } -return CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1)); -} - /* Forward definitions. */ static void compile_matchingpath(compiler_common *, pcre_uchar *, pcre_uchar *, backtrack_common *); static void compile_backtrackingpath(compiler_common *, struct backtrack_common *); @@ -5110,24 +5148,65 @@ static void compile_backtrackingpath(compiler_common *, struct backtrack_common #define BACKTRACK_AS(type) ((type *)backtrack) -static pcre_uchar *compile_ref_matchingpath(compiler_common *common, pcre_uchar *cc, jump_list **backtracks, BOOL withchecks, BOOL emptyfail) +static void compile_dnref_search(compiler_common *common, pcre_uchar *cc, jump_list **backtracks) +{ +/* The OVECTOR offset goes to TMP2. */ +DEFINE_COMPILER; +int count = GET2(cc, 1 + IMM2_SIZE); +pcre_uchar *slot = common->name_table + GET2(cc, 1) * common->name_entry_size; +unsigned int offset; +jump_list *found = NULL; + +SLJIT_ASSERT(*cc == OP_DNREF || *cc == OP_DNREFI); + +OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)); + +count--; +while (count-- > 0) + { + offset = GET2(slot, 0) << 1; + GET_LOCAL_BASE(TMP2, 0, OVECTOR(offset)); + add_jump(compiler, &found, CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0)); + slot += common->name_entry_size; + } + +offset = GET2(slot, 0) << 1; +GET_LOCAL_BASE(TMP2, 0, OVECTOR(offset)); +if (backtracks != NULL && !common->jscript_compat) + add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0)); + +set_jumps(found, LABEL()); +} + +static void compile_ref_matchingpath(compiler_common *common, pcre_uchar *cc, jump_list **backtracks, BOOL withchecks, BOOL emptyfail) { DEFINE_COMPILER; -int offset = GET2(cc, 1) << 1; +BOOL ref = (*cc == OP_REF || *cc == OP_REFI); +int offset = 0; struct sljit_jump *jump = NULL; struct sljit_jump *partial; struct sljit_jump *nopartial; -OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset)); -/* OVECTOR(1) contains the "string begin - 1" constant. */ -if (withchecks && !common->jscript_compat) - add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1))); +if (ref) + { + offset = GET2(cc, 1) << 1; + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset)); + /* OVECTOR(1) contains the "string begin - 1" constant. */ + if (withchecks && !common->jscript_compat) + add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1))); + } +else + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0); #if defined SUPPORT_UTF && defined SUPPORT_UCP if (common->utf && *cc == OP_REFI) { SLJIT_ASSERT(TMP1 == SLJIT_SCRATCH_REG1 && STACK_TOP == SLJIT_SCRATCH_REG2 && TMP2 == SLJIT_SCRATCH_REG3); - OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1)); + if (ref) + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1)); + else + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw)); + if (withchecks) jump = CMP(SLJIT_C_EQUAL, TMP1, 0, TMP2, 0); @@ -5152,7 +5231,11 @@ if (common->utf && *cc == OP_REFI) else #endif /* SUPPORT_UTF && SUPPORT_UCP */ { - OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP1, 0); + if (ref) + OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP1, 0); + else + OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw), TMP1, 0); + if (withchecks) jump = JUMP(SLJIT_C_ZERO); @@ -5189,14 +5272,15 @@ if (jump != NULL) else JUMPHERE(jump); } -return cc + 1 + IMM2_SIZE; } static SLJIT_INLINE pcre_uchar *compile_ref_iterator_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent) { DEFINE_COMPILER; +BOOL ref = (*cc == OP_REF || *cc == OP_REFI); backtrack_common *backtrack; pcre_uchar type; +int offset = 0; struct sljit_label *label; struct sljit_jump *zerolength; struct sljit_jump *jump = NULL; @@ -5206,7 +5290,13 @@ BOOL minimize; PUSH_BACKTRACK(sizeof(iterator_backtrack), cc, NULL); +if (ref) + offset = GET2(cc, 1) << 1; +else + cc += IMM2_SIZE; type = cc[1 + IMM2_SIZE]; + +SLJIT_COMPILE_ASSERT((OP_CRSTAR & 0x1) == 0, crstar_opcode_must_be_even); minimize = (type & 0x1) != 0; switch(type) { @@ -5244,25 +5334,52 @@ if (!minimize) if (min == 0) { allocate_stack(common, 2); + if (ref) + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset)); OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0); /* Temporary release of STR_PTR. */ OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw)); - zerolength = compile_ref_checks(common, ccbegin, NULL); + /* Handles both invalid and empty cases. Since the minimum repeat, + is zero the invalid case is basically the same as an empty case. */ + if (ref) + zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1)); + else + { + compile_dnref_search(common, ccbegin, NULL); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0); + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, TMP2, 0); + zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw)); + } /* Restore if not zero length. */ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw)); } else { allocate_stack(common, 1); + if (ref) + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset)); OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0); - zerolength = compile_ref_checks(common, ccbegin, &backtrack->topbacktracks); + if (ref) + { + add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1))); + zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1)); + } + else + { + compile_dnref_search(common, ccbegin, &backtrack->topbacktracks); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0); + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, TMP2, 0); + zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw)); + } } if (min > 1 || max > 1) OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, SLJIT_IMM, 0); label = LABEL(); + if (!ref) + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1); compile_ref_matchingpath(common, ccbegin, &backtrack->topbacktracks, FALSE, FALSE); if (min > 1 || max > 1) @@ -5297,24 +5414,52 @@ if (!minimize) return cc; } -allocate_stack(common, 2); +allocate_stack(common, ref ? 2 : 3); +if (ref) + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset)); OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0); if (type != OP_CRMINSTAR) OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0); if (min == 0) { - zerolength = compile_ref_checks(common, ccbegin, NULL); + /* Handles both invalid and empty cases. Since the minimum repeat, + is zero the invalid case is basically the same as an empty case. */ + if (ref) + zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1)); + else + { + compile_dnref_search(common, ccbegin, NULL); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0); + OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP2, 0); + zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw)); + } + /* Length is non-zero, we can match real repeats. */ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); jump = JUMP(SLJIT_JUMP); } else - zerolength = compile_ref_checks(common, ccbegin, &backtrack->topbacktracks); + { + if (ref) + { + add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1))); + zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1)); + } + else + { + compile_dnref_search(common, ccbegin, &backtrack->topbacktracks); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0); + OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP2, 0); + zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw)); + } + } BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL(); if (max > 0) add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, max)); +if (!ref) + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(2)); compile_ref_matchingpath(common, ccbegin, &backtrack->topbacktracks, TRUE, TRUE); OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0); @@ -5902,116 +6047,6 @@ common->accept = save_accept; return cc + 1 + LINK_SIZE; } -static sljit_sw SLJIT_CALL do_searchovector(sljit_uw refno, sljit_sw* locals, pcre_uchar *name_table) -{ -int condition = FALSE; -pcre_uchar *slotA = name_table; -pcre_uchar *slotB; -sljit_sw name_count = locals[LOCALS0 / sizeof(sljit_sw)]; -sljit_sw name_entry_size = locals[LOCALS1 / sizeof(sljit_sw)]; -sljit_sw no_capture; -int i; - -locals += refno & 0xff; -refno >>= 8; -no_capture = locals[1]; - -for (i = 0; i < name_count; i++) - { - if (GET2(slotA, 0) == refno) break; - slotA += name_entry_size; - } - -if (i < name_count) - { - /* Found a name for the number - there can be only one; duplicate names - for different numbers are allowed, but not vice versa. First scan down - for duplicates. */ - - slotB = slotA; - while (slotB > name_table) - { - slotB -= name_entry_size; - if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0) - { - condition = locals[GET2(slotB, 0) << 1] != no_capture; - if (condition) break; - } - else break; - } - - /* Scan up for duplicates */ - if (!condition) - { - slotB = slotA; - for (i++; i < name_count; i++) - { - slotB += name_entry_size; - if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0) - { - condition = locals[GET2(slotB, 0) << 1] != no_capture; - if (condition) break; - } - else break; - } - } - } -return condition; -} - -static sljit_sw SLJIT_CALL do_searchgroups(sljit_uw recno, sljit_uw* locals, pcre_uchar *name_table) -{ -int condition = FALSE; -pcre_uchar *slotA = name_table; -pcre_uchar *slotB; -sljit_uw name_count = locals[LOCALS0 / sizeof(sljit_sw)]; -sljit_uw name_entry_size = locals[LOCALS1 / sizeof(sljit_sw)]; -sljit_uw group_num = locals[POSSESSIVE0 / sizeof(sljit_sw)]; -sljit_uw i; - -for (i = 0; i < name_count; i++) - { - if (GET2(slotA, 0) == recno) break; - slotA += name_entry_size; - } - -if (i < name_count) - { - /* Found a name for the number - there can be only one; duplicate - names for different numbers are allowed, but not vice versa. First - scan down for duplicates. */ - - slotB = slotA; - while (slotB > name_table) - { - slotB -= name_entry_size; - if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0) - { - condition = GET2(slotB, 0) == group_num; - if (condition) break; - } - else break; - } - - /* Scan up for duplicates */ - if (!condition) - { - slotB = slotA; - for (i++; i < name_count; i++) - { - slotB += name_entry_size; - if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0) - { - condition = GET2(slotB, 0) == group_num; - if (condition) break; - } - else break; - } - } - } -return condition; -} - static SLJIT_INLINE void match_once_common(compiler_common *common, pcre_uchar ket, int framesize, int private_data_ptr, BOOL has_alternatives, BOOL needs_control_head) { DEFINE_COMPILER; @@ -6144,11 +6179,12 @@ backtrack_common *backtrack; pcre_uchar opcode; int private_data_ptr = 0; int offset = 0; -int stacksize; +int i, stacksize; int repeat_ptr = 0, repeat_length = 0; int repeat_type = 0, repeat_count = 0; pcre_uchar *ccbegin; pcre_uchar *matchingpath; +pcre_uchar *slot; pcre_uchar bra = OP_BRA; pcre_uchar ket; assert_backtrack *assert; @@ -6198,20 +6234,8 @@ SLJIT_ASSERT(!((bra == OP_BRAZERO && ket == OP_KETRMIN) || (bra == OP_BRAMINZERO cc += GET(cc, 1); has_alternatives = *cc == OP_ALT; -if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND)) - { - has_alternatives = (*matchingpath == OP_RREF) ? FALSE : TRUE; - if (*matchingpath == OP_NRREF) - { - stacksize = GET2(matchingpath, 1); - if (common->currententry == NULL || stacksize == RREF_ANY) - has_alternatives = FALSE; - else if (common->currententry->start == 0) - has_alternatives = stacksize != 0; - else - has_alternatives = stacksize != (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE); - } - } +if (SLJIT_UNLIKELY(opcode == OP_COND || opcode == OP_SCOND)) + has_alternatives = (*matchingpath == OP_RREF || *matchingpath == OP_DNRREF) ? FALSE : TRUE; if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN)) opcode = OP_SCOND; @@ -6448,47 +6472,73 @@ if (opcode == OP_COND || opcode == OP_SCOND) CMP(SLJIT_C_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(GET2(matchingpath, 1) << 1), SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1))); matchingpath += 1 + IMM2_SIZE; } - else if (*matchingpath == OP_NCREF) + else if (*matchingpath == OP_DNCREF) { SLJIT_ASSERT(has_alternatives); - stacksize = GET2(matchingpath, 1); - jump = CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(stacksize << 1), SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)); - - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, STACK_TOP, 0); - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, SLJIT_IMM, common->name_count); - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, SLJIT_IMM, common->name_entry_size); - OP1(SLJIT_MOV, SLJIT_SCRATCH_REG1, 0, SLJIT_IMM, (stacksize << 8) | (common->ovector_start / sizeof(sljit_sw))); - GET_LOCAL_BASE(SLJIT_SCRATCH_REG2, 0, 0); - OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, common->name_table); - sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_searchovector)); - OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1); - add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed), CMP(SLJIT_C_EQUAL, SLJIT_SCRATCH_REG1, 0, SLJIT_IMM, 0)); - JUMPHERE(jump); - matchingpath += 1 + IMM2_SIZE; + i = GET2(matchingpath, 1 + IMM2_SIZE); + slot = common->name_table + GET2(matchingpath, 1) * common->name_entry_size; + OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)); + OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(GET2(slot, 0) << 1), TMP1, 0); + slot += common->name_entry_size; + i--; + while (i-- > 0) + { + OP2(SLJIT_SUB, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(GET2(slot, 0) << 1), TMP1, 0); + OP2(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, STR_PTR, 0); + slot += common->name_entry_size; + } + OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0); + add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed), JUMP(SLJIT_C_ZERO)); + matchingpath += 1 + 2 * IMM2_SIZE; } - else if (*matchingpath == OP_RREF || *matchingpath == OP_NRREF) + else if (*matchingpath == OP_RREF || *matchingpath == OP_DNRREF) { /* Never has other case. */ BACKTRACK_AS(bracket_backtrack)->u.condfailed = NULL; + SLJIT_ASSERT(!has_alternatives); - stacksize = GET2(matchingpath, 1); - if (common->currententry == NULL) - stacksize = 0; - else if (stacksize == RREF_ANY) - stacksize = 1; - else if (common->currententry->start == 0) - stacksize = stacksize == 0; - else - stacksize = stacksize == (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE); - - if (*matchingpath == OP_RREF || stacksize || common->currententry == NULL) + if (*matchingpath == OP_RREF) { - SLJIT_ASSERT(!has_alternatives); + stacksize = GET2(matchingpath, 1); + if (common->currententry == NULL) + stacksize = 0; + else if (stacksize == RREF_ANY) + stacksize = 1; + else if (common->currententry->start == 0) + stacksize = stacksize == 0; + else + stacksize = stacksize == (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE); + if (stacksize != 0) matchingpath += 1 + IMM2_SIZE; + } + else + { + if (common->currententry == NULL || common->currententry->start == 0) + stacksize = 0; else { + stacksize = GET2(matchingpath, 1 + IMM2_SIZE); + slot = common->name_table + GET2(matchingpath, 1) * common->name_entry_size; + i = (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE); + while (stacksize > 0) + { + if ((int)GET2(slot, 0) == i) + break; + slot += common->name_entry_size; + stacksize--; + } + } + + if (stacksize != 0) + matchingpath += 1 + 2 * IMM2_SIZE; + } + + /* The stacksize == 0 is a common "else" case. */ + if (stacksize == 0) + { if (*cc == OP_ALT) { matchingpath = cc + 1 + LINK_SIZE; @@ -6497,24 +6547,6 @@ if (opcode == OP_COND || opcode == OP_SCOND) else matchingpath = cc; } - } - else - { - SLJIT_ASSERT(has_alternatives); - - stacksize = GET2(matchingpath, 1); - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, STACK_TOP, 0); - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, SLJIT_IMM, common->name_count); - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, SLJIT_IMM, common->name_entry_size); - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, SLJIT_IMM, GET2(common->start, common->currententry->start + 1 + LINK_SIZE)); - OP1(SLJIT_MOV, SLJIT_SCRATCH_REG1, 0, SLJIT_IMM, stacksize); - GET_LOCAL_BASE(SLJIT_SCRATCH_REG2, 0, 0); - OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, common->name_table); - sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_searchgroups)); - OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1); - add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed), CMP(SLJIT_C_EQUAL, SLJIT_SCRATCH_REG1, 0, SLJIT_IMM, 0)); - matchingpath += 1 + IMM2_SIZE; - } } else { @@ -6956,7 +6988,7 @@ count_match(common); return cc + 1 + LINK_SIZE; } -static SLJIT_INLINE pcre_uchar *get_iterator_parameters(compiler_common *common, pcre_uchar *cc, pcre_uchar *opcode, pcre_uchar *type, int *arg1, int *arg2, pcre_uchar **end) +static SLJIT_INLINE pcre_uchar *get_iterator_parameters(compiler_common *common, pcre_uchar *cc, pcre_uchar *opcode, pcre_uchar *type, int *max, int *min, pcre_uchar **end) { int class_len; @@ -6992,7 +7024,7 @@ else if (*opcode >= OP_TYPESTAR && *opcode <= OP_TYPEPOSUPTO) } else { - SLJIT_ASSERT(*opcode >= OP_CLASS || *opcode <= OP_XCLASS); + SLJIT_ASSERT(*opcode == OP_CLASS || *opcode == OP_NCLASS || *opcode == OP_XCLASS); *type = *opcode; cc++; class_len = (*type < OP_XCLASS) ? (int)(1 + (32 / sizeof(pcre_uchar))) : GET(cc, 0); @@ -7003,18 +7035,24 @@ else if (end != NULL) *end = cc + class_len; } + else if (*opcode >= OP_CRPOSSTAR && *opcode <= OP_CRPOSQUERY) + { + *opcode -= OP_CRPOSSTAR - OP_POSSTAR; + if (end != NULL) + *end = cc + class_len; + } else { - SLJIT_ASSERT(*opcode == OP_CRRANGE || *opcode == OP_CRMINRANGE); - *arg1 = GET2(cc, (class_len + IMM2_SIZE)); - *arg2 = GET2(cc, class_len); + SLJIT_ASSERT(*opcode == OP_CRRANGE || *opcode == OP_CRMINRANGE || *opcode == OP_CRPOSRANGE); + *max = GET2(cc, (class_len + IMM2_SIZE)); + *min = GET2(cc, class_len); - if (*arg2 == 0) + if (*min == 0) { - SLJIT_ASSERT(*arg1 != 0); - *opcode = (*opcode == OP_CRRANGE) ? OP_UPTO : OP_MINUPTO; + SLJIT_ASSERT(*max != 0); + *opcode = (*opcode == OP_CRRANGE) ? OP_UPTO : (*opcode == OP_CRMINRANGE ? OP_MINUPTO : OP_POSUPTO); } - if (*arg1 == *arg2) + if (*max == *min) *opcode = OP_EXACT; if (end != NULL) @@ -7025,7 +7063,7 @@ else if (*opcode == OP_UPTO || *opcode == OP_MINUPTO || *opcode == OP_EXACT || *opcode == OP_POSUPTO) { - *arg1 = GET2(cc, 0); + *max = GET2(cc, 0); cc += IMM2_SIZE; } @@ -7054,7 +7092,7 @@ DEFINE_COMPILER; backtrack_common *backtrack; pcre_uchar opcode; pcre_uchar type; -int arg1 = -1, arg2 = -1; +int max = -1, min = -1; pcre_uchar* end; jump_list *nomatch = NULL; struct sljit_jump *jump = NULL; @@ -7067,7 +7105,7 @@ int tmp_base, tmp_offset; PUSH_BACKTRACK(sizeof(iterator_backtrack), cc, NULL); -cc = get_iterator_parameters(common, cc, &opcode, &type, &arg1, &arg2, &end); +cc = get_iterator_parameters(common, cc, &opcode, &type, &max, &min, &end); switch(type) { @@ -7138,10 +7176,10 @@ switch(opcode) { OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0); OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1); - if (opcode == OP_CRRANGE && arg2 > 0) - CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg2, label); - if (opcode == OP_UPTO || (opcode == OP_CRRANGE && arg1 > 0)) - jump = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, arg1); + if (opcode == OP_CRRANGE && min > 0) + CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, min, label); + if (opcode == OP_UPTO || (opcode == OP_CRRANGE && max > 0)) + jump = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, max); OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, TMP1, 0); } @@ -7168,7 +7206,7 @@ switch(opcode) OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); if (opcode <= OP_PLUS) JUMPTO(SLJIT_JUMP, label); - else if (opcode == OP_CRRANGE && arg1 == 0) + else if (opcode == OP_CRRANGE && max == 0) { OP2(SLJIT_ADD, base, offset1, base, offset1, SLJIT_IMM, 1); JUMPTO(SLJIT_JUMP, label); @@ -7178,11 +7216,11 @@ switch(opcode) OP1(SLJIT_MOV, TMP1, 0, base, offset1); OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1); OP1(SLJIT_MOV, base, offset1, TMP1, 0); - CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg1 + 1, label); + CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, max + 1, label); } set_jumps(nomatch, LABEL()); if (opcode == OP_CRRANGE) - add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_LESS, base, offset1, SLJIT_IMM, arg2 + 1)); + add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_LESS, base, offset1, SLJIT_IMM, min + 1)); OP1(SLJIT_MOV, STR_PTR, 0, base, offset0); } BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL(); @@ -7220,7 +7258,7 @@ switch(opcode) break; case OP_EXACT: - OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, arg1); + OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max); label = LABEL(); compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks); OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); @@ -7233,7 +7271,7 @@ switch(opcode) if (opcode == OP_POSPLUS) compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks); if (opcode == OP_POSUPTO) - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, arg1); + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, max); OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0); label = LABEL(); compile_char1_matchingpath(common, type, cc, &nomatch); @@ -7257,6 +7295,34 @@ switch(opcode) OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset); break; + case OP_CRPOSRANGE: + /* Combination of OP_EXACT and OP_POSSTAR or OP_POSUPTO */ + OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, min); + label = LABEL(); + compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks); + OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); + JUMPTO(SLJIT_C_NOT_ZERO, label); + + if (max != 0) + { + SLJIT_ASSERT(max - min > 0); + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, max - min); + } + OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0); + label = LABEL(); + compile_char1_matchingpath(common, type, cc, &nomatch); + OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0); + if (max == 0) + JUMPTO(SLJIT_JUMP, label); + else + { + OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, 1); + JUMPTO(SLJIT_C_NOT_ZERO, label); + } + set_jumps(nomatch, LABEL()); + OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset); + break; + default: SLJIT_ASSERT_STOP(); break; @@ -7534,7 +7600,7 @@ while (cc < ccend) case OP_CLASS: case OP_NCLASS: - if (cc[1 + (32 / sizeof(pcre_uchar))] >= OP_CRSTAR && cc[1 + (32 / sizeof(pcre_uchar))] <= OP_CRMINRANGE) + if (cc[1 + (32 / sizeof(pcre_uchar))] >= OP_CRSTAR && cc[1 + (32 / sizeof(pcre_uchar))] <= OP_CRPOSRANGE) cc = compile_iterator_matchingpath(common, cc, parent); else cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks); @@ -7542,7 +7608,7 @@ while (cc < ccend) #if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32 case OP_XCLASS: - if (*(cc + GET(cc, 1)) >= OP_CRSTAR && *(cc + GET(cc, 1)) <= OP_CRMINRANGE) + if (*(cc + GET(cc, 1)) >= OP_CRSTAR && *(cc + GET(cc, 1)) <= OP_CRPOSRANGE) cc = compile_iterator_matchingpath(common, cc, parent); else cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks); @@ -7551,10 +7617,25 @@ while (cc < ccend) case OP_REF: case OP_REFI: - if (cc[1 + IMM2_SIZE] >= OP_CRSTAR && cc[1 + IMM2_SIZE] <= OP_CRMINRANGE) + if (cc[1 + IMM2_SIZE] >= OP_CRSTAR && cc[1 + IMM2_SIZE] <= OP_CRPOSRANGE) + cc = compile_ref_iterator_matchingpath(common, cc, parent); + else + { + compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE, FALSE); + cc += 1 + IMM2_SIZE; + } + break; + + case OP_DNREF: + case OP_DNREFI: + if (cc[1 + 2 * IMM2_SIZE] >= OP_CRSTAR && cc[1 + 2 * IMM2_SIZE] <= OP_CRPOSRANGE) cc = compile_ref_iterator_matchingpath(common, cc, parent); else - cc = compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE, FALSE); + { + compile_dnref_search(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks); + compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE, FALSE); + cc += 1 + 2 * IMM2_SIZE; + } break; case OP_RECURSE: @@ -7707,7 +7788,7 @@ DEFINE_COMPILER; pcre_uchar *cc = current->cc; pcre_uchar opcode; pcre_uchar type; -int arg1 = -1, arg2 = -1; +int max = -1, min = -1; struct sljit_label *label = NULL; struct sljit_jump *jump = NULL; jump_list *jumplist = NULL; @@ -7716,7 +7797,7 @@ int base = (private_data_ptr == 0) ? SLJIT_MEM1(STACK_TOP) : SLJIT_MEM1(SLJIT_LO int offset0 = (private_data_ptr == 0) ? STACK(0) : private_data_ptr; int offset1 = (private_data_ptr == 0) ? STACK(1) : private_data_ptr + (int)sizeof(sljit_sw); -cc = get_iterator_parameters(common, cc, &opcode, &type, &arg1, &arg2, NULL); +cc = get_iterator_parameters(common, cc, &opcode, &type, &max, &min, NULL); switch(opcode) { @@ -7735,7 +7816,7 @@ switch(opcode) else { if (opcode == OP_UPTO) - arg2 = 0; + min = 0; if (opcode <= OP_PLUS) { OP1(SLJIT_MOV, STR_PTR, 0, base, offset0); @@ -7745,7 +7826,7 @@ switch(opcode) { OP1(SLJIT_MOV, TMP1, 0, base, offset1); OP1(SLJIT_MOV, STR_PTR, 0, base, offset0); - jump = CMP(SLJIT_C_LESS_EQUAL, TMP1, 0, SLJIT_IMM, arg2 + 1); + jump = CMP(SLJIT_C_LESS_EQUAL, TMP1, 0, SLJIT_IMM, min + 1); OP2(SLJIT_SUB, base, offset1, TMP1, 0, SLJIT_IMM, 1); } skip_char_back(common); @@ -7790,12 +7871,12 @@ switch(opcode) OP1(SLJIT_MOV, base, offset1, TMP1, 0); if (opcode == OP_CRMINRANGE) - CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg2 + 1, label); + CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, min + 1, label); - if (opcode == OP_CRMINRANGE && arg1 == 0) + if (opcode == OP_CRMINRANGE && max == 0) JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath); else - CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg1 + 2, CURRENT_AS(iterator_backtrack)->matchingpath); + CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, max + 2, CURRENT_AS(iterator_backtrack)->matchingpath); set_jumps(jumplist, LABEL()); if (private_data_ptr == 0) @@ -7830,6 +7911,7 @@ switch(opcode) case OP_EXACT: case OP_POSPLUS: + case OP_CRPOSRANGE: set_jumps(current->topbacktracks, LABEL()); break; @@ -7848,11 +7930,14 @@ static SLJIT_INLINE void compile_ref_iterator_backtrackingpath(compiler_common * { DEFINE_COMPILER; pcre_uchar *cc = current->cc; +BOOL ref = (*cc == OP_REF || *cc == OP_REFI); pcre_uchar type; -type = cc[1 + IMM2_SIZE]; +type = cc[ref ? 1 + IMM2_SIZE : 1 + 2 * IMM2_SIZE]; + if ((type & 0x1) == 0) { + /* Maximize case. */ set_jumps(current->topbacktracks, LABEL()); OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); free_stack(common, 1); @@ -7863,7 +7948,7 @@ if ((type & 0x1) == 0) OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(iterator_backtrack)->matchingpath); set_jumps(current->topbacktracks, LABEL()); -free_stack(common, 2); +free_stack(common, ref ? 2 : 3); } static SLJIT_INLINE void compile_recurse_backtrackingpath(compiler_common *common, struct backtrack_common *current) @@ -8664,6 +8749,8 @@ while (current) case OP_REF: case OP_REFI: + case OP_DNREF: + case OP_DNREFI: compile_ref_iterator_backtrackingpath(common, current); break; @@ -8958,7 +9045,7 @@ else common->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; common->ctypes = (sljit_sw)(tables + ctypes_offset); common->digits[0] = -2; -common->name_table = (sljit_sw)((pcre_uchar *)re + re->name_table_offset); +common->name_table = ((pcre_uchar *)re) + re->name_table_offset; common->name_count = re->name_count; common->name_entry_size = re->name_entry_size; common->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0; @@ -9696,6 +9783,20 @@ if (extra != NULL && } } +#if defined COMPILE_PCRE8 +PCRE_EXP_DECL void +pcre_jit_free_unused_memory(void) +#elif defined COMPILE_PCRE16 +PCRE_EXP_DECL void +pcre16_jit_free_unused_memory(void) +#elif defined COMPILE_PCRE32 +PCRE_EXP_DECL void +pcre32_jit_free_unused_memory(void) +#endif +{ +sljit_free_unused_memory_exec(); +} + #else /* SUPPORT_JIT */ /* These are dummy functions to avoid linking errors when JIT support is not @@ -9747,6 +9848,19 @@ pcre32_assign_jit_stack(pcre32_extra *extra, pcre32_jit_callback callback, void (void)userdata; } +#if defined COMPILE_PCRE8 +PCRE_EXP_DECL void +pcre_jit_free_unused_memory(void) +#elif defined COMPILE_PCRE16 +PCRE_EXP_DECL void +pcre16_jit_free_unused_memory(void) +#elif defined COMPILE_PCRE32 +PCRE_EXP_DECL void +pcre32_jit_free_unused_memory(void) +#endif +{ +} + #endif /* End of pcre_jit_compile.c */ diff --git a/pcre/pcre_jit_test.c b/pcre/pcre_jit_test.c index 1c247c58117..cabd2560c57 100644 --- a/pcre/pcre_jit_test.c +++ b/pcre/pcre_jit_test.c @@ -501,6 +501,22 @@ static struct regression_test_case regression_test_cases[] = { { MUAP, 0 | F_PROPERTY, "(\\P{N})\\1{1,2}ww", "wwwww" }, { PCRE_UCP, 0 | F_PROPERTY, "(\\P{N})\\1{2,}", ".www." }, { CMUAP, 0, "(\xf0\x90\x90\x80)\\1", "\xf0\x90\x90\xa8\xf0\x90\x90\xa8" }, + { MUA | PCRE_DUPNAMES, 0 | F_NOMATCH, "\\k<A>{1,3}(?<A>aa)(?<A>bb)", "aabb" }, + { MUA | PCRE_DUPNAMES | PCRE_JAVASCRIPT_COMPAT, 0, "\\k<A>{1,3}(?<A>aa)(?<A>bb)", "aabb" }, + { MUA | PCRE_DUPNAMES | PCRE_JAVASCRIPT_COMPAT, 0, "\\k<A>*(?<A>aa)(?<A>bb)", "aabb" }, + { MUA | PCRE_DUPNAMES, 0, "(?<A>aa)(?<A>bb)\\k<A>{0,3}aaaaaa", "aabbaaaaaa" }, + { MUA | PCRE_DUPNAMES, 0, "(?<A>aa)(?<A>bb)\\k<A>{2,5}bb", "aabbaaaabb" }, + { MUA | PCRE_DUPNAMES, 0, "(?:(?<A>aa)|(?<A>bb))\\k<A>{0,3}m", "aaaaaaaabbbbaabbbbm" }, + { MUA | PCRE_DUPNAMES, 0 | F_NOMATCH, "\\k<A>{1,3}?(?<A>aa)(?<A>bb)", "aabb" }, + { MUA | PCRE_DUPNAMES | PCRE_JAVASCRIPT_COMPAT, 0, "\\k<A>{1,3}?(?<A>aa)(?<A>bb)", "aabb" }, + { MUA | PCRE_DUPNAMES, 0, "\\k<A>*?(?<A>aa)(?<A>bb)", "aabb" }, + { MUA | PCRE_DUPNAMES, 0, "(?:(?<A>aa)|(?<A>bb))\\k<A>{0,3}?m", "aaaaaabbbbbbaabbbbbbbbbbm" }, + { MUA | PCRE_DUPNAMES, 0, "(?:(?<A>aa)|(?<A>bb))\\k<A>*?m", "aaaaaabbbbbbaabbbbbbbbbbm" }, + { MUA | PCRE_DUPNAMES, 0, "(?:(?<A>aa)|(?<A>bb))\\k<A>{2,3}?", "aaaabbbbaaaabbbbbbbbbb" }, + { CMUA | PCRE_DUPNAMES, 0, "(?:(?<A>AA)|(?<A>BB))\\k<A>{0,3}M", "aaaaaaaabbbbaabbbbm" }, + { CMUA | PCRE_DUPNAMES, 0, "(?:(?<A>AA)|(?<A>BB))\\k<A>{1,3}M", "aaaaaaaabbbbaabbbbm" }, + { CMUA | PCRE_DUPNAMES, 0, "(?:(?<A>AA)|(?<A>BB))\\k<A>{0,3}?M", "aaaaaabbbbbbaabbbbbbbbbbm" }, + { CMUA | PCRE_DUPNAMES, 0, "(?:(?<A>AA)|(?<A>BB))\\k<A>{2,3}?", "aaaabbbbaaaabbbbbbbbbb" }, /* Assertions. */ { MUA, 0, "(?=xx|yy|zz)\\w{4}", "abczzdefg" }, @@ -1374,7 +1390,7 @@ static int regression_tests(void) #endif /* printf("[%d-%d-%d|%d-%d|%d-%d|%d-%d]%s", - return_value8[0], return_value16[0], + return_value8[0], return_value16[0], return_value32[0], ovector8_1[0], ovector8_1[1], ovector16_1[0], ovector16_1[1], ovector32_1[0], ovector32_1[1], diff --git a/pcre/pcre_maketables.c b/pcre/pcre_maketables.c index 610a669586b..a44a6eaa905 100644 --- a/pcre/pcre_maketables.c +++ b/pcre/pcre_maketables.c @@ -98,13 +98,17 @@ for (i = 0; i < 256; i++) *p++ = tolower(i); for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i); /* Then the character class tables. Don't try to be clever and save effort on -exclusive ones - in some locales things may be different. Note that the table -for "space" includes everything "isspace" gives, including VT in the default -locale. This makes it work for the POSIX class [:space:]. Note also that it is -possible for a character to be alnum or alpha without being lower or upper, -such as "male and female ordinals" (\xAA and \xBA) in the fr_FR locale (at -least under Debian Linux's locales as of 12/2005). So we must test for alnum -specially. */ +exclusive ones - in some locales things may be different. + +Note that the table for "space" includes everything "isspace" gives, including +VT in the default locale. This makes it work for the POSIX class [:space:]. +From release 8.34 is is also correct for Perl space, because Perl added VT at +release 5.18. + +Note also that it is possible for a character to be alnum or alpha without +being lower or upper, such as "male and female ordinals" (\xAA and \xBA) in the +fr_FR locale (at least under Debian Linux's locales as of 12/2005). So we must +test for alnum specially. */ memset(p, 0, cbit_length); for (i = 0; i < 256; i++) @@ -123,14 +127,15 @@ for (i = 0; i < 256; i++) } p += cbit_length; -/* Finally, the character type table. In this, we exclude VT from the white -space chars, because Perl doesn't recognize it as such for \s and for comments -within regexes. */ +/* Finally, the character type table. In this, we used to exclude VT from the +white space chars, because Perl didn't recognize it as such for \s and for +comments within regexes. However, Perl changed at release 5.18, so PCRE changed +at release 8.34. */ for (i = 0; i < 256; i++) { int x = 0; - if (i != CHAR_VT && isspace(i)) x += ctype_space; + if (isspace(i)) x += ctype_space; if (isalpha(i)) x += ctype_letter; if (isdigit(i)) x += ctype_digit; if (isxdigit(i)) x += ctype_xdigit; diff --git a/pcre/pcre_printint.c b/pcre/pcre_printint.c index 10b575426b3..e4ef152d071 100644 --- a/pcre/pcre_printint.c +++ b/pcre/pcre_printint.c @@ -425,10 +425,19 @@ for(;;) break; case OP_CREF: - case OP_NCREF: fprintf(f, "%3d %s", GET2(code,1), priv_OP_names[*code]); break; + case OP_DNCREF: + { + pcre_uchar *entry = (pcre_uchar *)re + offset + (GET2(code, 1) * size) + + IMM2_SIZE; + fprintf(f, " %s Cond ref <", flag); + print_puchar(f, entry); + fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); + } + break; + case OP_RREF: c = GET2(code, 1); if (c == RREF_ANY) @@ -437,12 +446,14 @@ for(;;) fprintf(f, " Cond recurse %d", c); break; - case OP_NRREF: - c = GET2(code, 1); - if (c == RREF_ANY) - fprintf(f, " Cond nrecurse any"); - else - fprintf(f, " Cond nrecurse %d", c); + case OP_DNRREF: + { + pcre_uchar *entry = (pcre_uchar *)re + offset + (GET2(code, 1) * size) + + IMM2_SIZE; + fprintf(f, " %s Cond recurse <", flag); + print_puchar(f, entry); + fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); + } break; case OP_DEF: @@ -598,6 +609,20 @@ for(;;) ccode = code + priv_OP_lengths[*code]; goto CLASS_REF_REPEAT; + case OP_DNREFI: + flag = "/i"; + /* Fall through */ + case OP_DNREF: + { + pcre_uchar *entry = (pcre_uchar *)re + offset + (GET2(code, 1) * size) + + IMM2_SIZE; + fprintf(f, " %s \\k<", flag); + print_puchar(f, entry); + fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); + } + ccode = code + priv_OP_lengths[*code]; + goto CLASS_REF_REPEAT; + case OP_CALLOUT: fprintf(f, " %s %d %d %d", priv_OP_names[*code], code[1], GET(code,2), GET(code, 2 + LINK_SIZE)); @@ -608,9 +633,9 @@ for(;;) print_prop(f, code, " ", ""); break; - /* OP_XCLASS can only occur in UTF or PCRE16 modes. However, there's no - harm in having this code always here, and it makes it less messy without - all those #ifdefs. */ + /* OP_XCLASS cannot occur in 8-bit, non-UTF mode. However, there's no harm + in having this code always here, and it makes it less messy without all + those #ifdefs. */ case OP_CLASS: case OP_NCLASS: @@ -671,26 +696,51 @@ for(;;) pcre_uchar ch; while ((ch = *ccode++) != XCL_END) { - if (ch == XCL_PROP) - { - unsigned int ptype = *ccode++; - unsigned int pvalue = *ccode++; - fprintf(f, "\\p{%s}", get_ucpname(ptype, pvalue)); - } - else if (ch == XCL_NOTPROP) - { - unsigned int ptype = *ccode++; - unsigned int pvalue = *ccode++; - fprintf(f, "\\P{%s}", get_ucpname(ptype, pvalue)); - } - else + BOOL not = FALSE; + const char *notch = ""; + + switch(ch) { + case XCL_NOTPROP: + not = TRUE; + notch = "^"; + /* Fall through */ + + case XCL_PROP: + { + unsigned int ptype = *ccode++; + unsigned int pvalue = *ccode++; + + switch(ptype) + { + case PT_PXGRAPH: + fprintf(f, "[:%sgraph:]", notch); + break; + + case PT_PXPRINT: + fprintf(f, "[:%sprint:]", notch); + break; + + case PT_PXPUNCT: + fprintf(f, "[:%spunct:]", notch); + break; + + default: + fprintf(f, "\\%c{%s}", (not? 'P':'p'), + get_ucpname(ptype, pvalue)); + break; + } + } + break; + + default: ccode += 1 + print_char(f, ccode, utf); if (ch == XCL_RANGE) { fprintf(f, "-"); ccode += 1 + print_char(f, ccode, utf); } + break; } } } @@ -710,17 +760,22 @@ for(;;) case OP_CRMINPLUS: case OP_CRQUERY: case OP_CRMINQUERY: + case OP_CRPOSSTAR: + case OP_CRPOSPLUS: + case OP_CRPOSQUERY: fprintf(f, "%s", priv_OP_names[*ccode]); extra += priv_OP_lengths[*ccode]; break; case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSRANGE: min = GET2(ccode,1); max = GET2(ccode,1 + IMM2_SIZE); if (max == 0) fprintf(f, "{%u,}", min); else fprintf(f, "{%u,%u}", min, max); if (*ccode == OP_CRMINRANGE) fprintf(f, "?"); + else if (*ccode == OP_CRPOSRANGE) fprintf(f, "+"); extra += priv_OP_lengths[*ccode]; break; diff --git a/pcre/pcre_study.c b/pcre/pcre_study.c index 12d2a66817b..c2aff517a5d 100644 --- a/pcre/pcre_study.c +++ b/pcre/pcre_study.c @@ -66,8 +66,9 @@ string of that length that matches. In UTF8 mode, the result is in characters rather than bytes. Arguments: + re compiled pattern block code pointer to start of group (the bracket) - startcode pointer to start of the whole pattern + startcode pointer to start of the whole pattern's code options the compiling options int RECURSE depth @@ -78,8 +79,8 @@ Returns: the minimum length */ static int -find_minlength(const pcre_uchar *code, const pcre_uchar *startcode, int options, - int recurse_depth) +find_minlength(const REAL_PCRE *re, const pcre_uchar *code, + const pcre_uchar *startcode, int options, int recurse_depth) { int length = -1; /* PCRE_UTF16 has the same value as PCRE_UTF8. */ @@ -129,7 +130,7 @@ for (;;) case OP_SBRAPOS: case OP_ONCE: case OP_ONCE_NC: - d = find_minlength(cc, startcode, options, recurse_depth); + d = find_minlength(re, cc, startcode, options, recurse_depth); if (d < 0) return d; branchlength += d; do cc += GET(cc, 1); while (*cc == OP_ALT); @@ -175,9 +176,9 @@ for (;;) case OP_REVERSE: case OP_CREF: - case OP_NCREF: + case OP_DNCREF: case OP_RREF: - case OP_NRREF: + case OP_DNRREF: case OP_DEF: case OP_CALLOUT: case OP_SOD: @@ -341,6 +342,7 @@ for (;;) { case OP_CRPLUS: case OP_CRMINPLUS: + case OP_CRPOSPLUS: branchlength++; /* Fall through */ @@ -348,11 +350,14 @@ for (;;) case OP_CRMINSTAR: case OP_CRQUERY: case OP_CRMINQUERY: + case OP_CRPOSSTAR: + case OP_CRPOSQUERY: cc++; break; case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSRANGE: branchlength += GET2(cc,1); cc += 1 + 2 * IMM2_SIZE; break; @@ -375,7 +380,38 @@ for (;;) matches an empty string (by default it causes a matching failure), so in that case we must set the minimum length to zero. */ - case OP_REF: + case OP_DNREF: /* Duplicate named pattern back reference */ + case OP_DNREFI: + if ((options & PCRE_JAVASCRIPT_COMPAT) == 0) + { + int count = GET2(cc, 1+IMM2_SIZE); + pcre_uchar *slot = (pcre_uchar *)re + + re->name_table_offset + GET2(cc, 1) * re->name_entry_size; + d = INT_MAX; + while (count-- > 0) + { + ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(slot, 0)); + if (cs == NULL) return -2; + do ce += GET(ce, 1); while (*ce == OP_ALT); + if (cc > cs && cc < ce) + { + d = 0; + had_recurse = TRUE; + break; + } + else + { + int dd = find_minlength(re, cs, startcode, options, recurse_depth); + if (dd < d) d = dd; + } + slot += re->name_entry_size; + } + } + else d = 0; + cc += 1 + 2*IMM2_SIZE; + goto REPEAT_BACK_REFERENCE; + + case OP_REF: /* Single back reference */ case OP_REFI: if ((options & PCRE_JAVASCRIPT_COMPAT) == 0) { @@ -389,7 +425,7 @@ for (;;) } else { - d = find_minlength(cs, startcode, options, recurse_depth); + d = find_minlength(re, cs, startcode, options, recurse_depth); } } else d = 0; @@ -397,24 +433,29 @@ for (;;) /* Handle repeated back references */ + REPEAT_BACK_REFERENCE: switch (*cc) { case OP_CRSTAR: case OP_CRMINSTAR: case OP_CRQUERY: case OP_CRMINQUERY: + case OP_CRPOSSTAR: + case OP_CRPOSQUERY: min = 0; cc++; break; case OP_CRPLUS: case OP_CRMINPLUS: + case OP_CRPOSPLUS: min = 1; cc++; break; case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSRANGE: min = GET2(cc, 1); cc += 1 + 2 * IMM2_SIZE; break; @@ -437,7 +478,8 @@ for (;;) had_recurse = TRUE; else { - branchlength += find_minlength(cs, startcode, options, recurse_depth + 1); + branchlength += find_minlength(re, cs, startcode, options, + recurse_depth + 1); } cc += 1 + LINK_SIZE; break; @@ -778,6 +820,10 @@ do case OP_COND: case OP_CREF: case OP_DEF: + case OP_DNCREF: + case OP_DNREF: + case OP_DNREFI: + case OP_DNRREF: case OP_DOLL: case OP_DOLLM: case OP_END: @@ -786,7 +832,6 @@ do case OP_EXTUNI: case OP_FAIL: case OP_MARK: - case OP_NCREF: case OP_NOT: case OP_NOTEXACT: case OP_NOTEXACTI: @@ -818,7 +863,6 @@ do case OP_NOTUPTOI: case OP_NOT_HSPACE: case OP_NOT_VSPACE: - case OP_NRREF: case OP_PROP: case OP_PRUNE: case OP_PRUNE_ARG: @@ -1183,24 +1227,16 @@ do set_type_bits(start_bits, cbit_digit, table_limit, cd); break; - /* The cbit_space table has vertical tab as whitespace; we have to - ensure it gets set as not whitespace. Luckily, the code value is the - same (0x0b) in ASCII and EBCDIC, so we can just adjust the appropriate - bit. */ + /* The cbit_space table has vertical tab as whitespace; we no longer + have to play fancy tricks because Perl added VT to its whitespace at + release 5.18. PCRE added it at release 8.34. */ case OP_NOT_WHITESPACE: set_nottype_bits(start_bits, cbit_space, table_limit, cd); - start_bits[1] |= 0x08; break; - /* The cbit_space table has vertical tab as whitespace; we have to - avoid setting it. Luckily, the code value is the same (0x0b) in ASCII - and EBCDIC, so we can just adjust the appropriate bit. */ - case OP_WHITESPACE: - c = start_bits[1]; /* Save in case it was already set */ set_type_bits(start_bits, cbit_space, table_limit, cd); - start_bits[1] = (start_bits[1] & ~0x08) | c; break; case OP_NOT_WORDCHAR: @@ -1277,11 +1313,14 @@ do case OP_CRMINSTAR: case OP_CRQUERY: case OP_CRMINQUERY: + case OP_CRPOSSTAR: + case OP_CRPOSQUERY: tcode++; break; case OP_CRRANGE: case OP_CRMINRANGE: + case OP_CRPOSRANGE: if (GET2(tcode, 1) == 0) tcode += 1 + 2 * IMM2_SIZE; else try_next = FALSE; break; @@ -1346,6 +1385,7 @@ pcre_uchar *code; compile_data compile_block; const REAL_PCRE *re = (const REAL_PCRE *)external_re; + *errorptr = NULL; if (re == NULL || re->magic_number != MAGIC_NUMBER) @@ -1422,7 +1462,7 @@ if ((re->options & PCRE_ANCHORED) == 0 && /* Find the minimum length of subject string. */ -switch(min = find_minlength(code, code, re->options, 0)) +switch(min = find_minlength(re, code, code, re->options, 0)) { case -2: *errorptr = "internal error: missing capturing bracket"; return NULL; case -3: *errorptr = "internal error: opcode not recognized"; return NULL; diff --git a/pcre/pcre_ucd.c b/pcre/pcre_ucd.c index 56f31a1e69b..46ea70c44cc 100644 --- a/pcre/pcre_ucd.c +++ b/pcre/pcre_ucd.c @@ -20,7 +20,7 @@ needed. */ /* Unicode character database. */ /* This file was autogenerated by the MultiStage2.py script. */ -/* Total size: 65696 bytes, block size: 128. */ +/* Total size: 65688 bytes, block size: 128. */ /* The tables herein are needed only when UCP support is built into PCRE. This module should not be referenced otherwise, so @@ -79,7 +79,7 @@ const pcre_uint32 PRIV(ucd_caseless_sets)[] = { #ifndef PCRE_INCLUDED -const ucd_record PRIV(ucd_records)[] = { /* 5024 bytes, record size 8 */ +const ucd_record PRIV(ucd_records)[] = { /* 5016 bytes, record size 8 */ { 9, 0, 2, 0, 0, }, /* 0 */ { 9, 0, 1, 0, 0, }, /* 1 */ { 9, 0, 0, 0, 0, }, /* 2 */ @@ -422,7 +422,7 @@ const ucd_record PRIV(ucd_records)[] = { /* 5024 bytes, record size 8 */ { 37, 21, 12, 0, 0, }, /* 339 */ { 37, 17, 12, 0, 0, }, /* 340 */ { 37, 12, 3, 0, 0, }, /* 341 */ - { 37, 29, 12, 0, 0, }, /* 342 */ + { 37, 1, 2, 0, 0, }, /* 342 */ { 37, 13, 12, 0, 0, }, /* 343 */ { 37, 7, 12, 0, 0, }, /* 344 */ { 37, 6, 12, 0, 0, }, /* 345 */ @@ -598,116 +598,115 @@ const ucd_record PRIV(ucd_records)[] = { /* 5024 bytes, record size 8 */ { 83, 10, 5, 0, 0, }, /* 515 */ { 83, 7, 12, 0, 0, }, /* 516 */ { 83, 21, 12, 0, 0, }, /* 517 */ - { 83, 6, 12, 0, 0, }, /* 518 */ - { 83, 13, 12, 0, 0, }, /* 519 */ - { 67, 7, 12, 0, 0, }, /* 520 */ - { 67, 12, 3, 0, 0, }, /* 521 */ - { 67, 10, 5, 0, 0, }, /* 522 */ - { 67, 13, 12, 0, 0, }, /* 523 */ - { 67, 21, 12, 0, 0, }, /* 524 */ - { 38, 6, 12, 0, 0, }, /* 525 */ - { 91, 7, 12, 0, 0, }, /* 526 */ - { 91, 12, 3, 0, 0, }, /* 527 */ - { 91, 6, 12, 0, 0, }, /* 528 */ - { 91, 21, 12, 0, 0, }, /* 529 */ - { 86, 7, 12, 0, 0, }, /* 530 */ - { 86, 10, 5, 0, 0, }, /* 531 */ - { 86, 12, 3, 0, 0, }, /* 532 */ - { 86, 21, 12, 0, 0, }, /* 533 */ - { 86, 6, 12, 0, 0, }, /* 534 */ - { 86, 13, 12, 0, 0, }, /* 535 */ - { 23, 7, 9, 0, 0, }, /* 536 */ - { 23, 7, 10, 0, 0, }, /* 537 */ - { 9, 4, 2, 0, 0, }, /* 538 */ - { 9, 3, 12, 0, 0, }, /* 539 */ - { 25, 25, 12, 0, 0, }, /* 540 */ - { 0, 24, 12, 0, 0, }, /* 541 */ - { 9, 6, 3, 0, 0, }, /* 542 */ - { 35, 7, 12, 0, 0, }, /* 543 */ - { 19, 14, 12, 0, 0, }, /* 544 */ - { 19, 15, 12, 0, 0, }, /* 545 */ - { 19, 26, 12, 0, 0, }, /* 546 */ - { 70, 7, 12, 0, 0, }, /* 547 */ - { 66, 7, 12, 0, 0, }, /* 548 */ - { 41, 7, 12, 0, 0, }, /* 549 */ - { 41, 15, 12, 0, 0, }, /* 550 */ - { 18, 7, 12, 0, 0, }, /* 551 */ - { 18, 14, 12, 0, 0, }, /* 552 */ - { 59, 7, 12, 0, 0, }, /* 553 */ - { 59, 21, 12, 0, 0, }, /* 554 */ - { 42, 7, 12, 0, 0, }, /* 555 */ - { 42, 21, 12, 0, 0, }, /* 556 */ - { 42, 14, 12, 0, 0, }, /* 557 */ - { 13, 9, 12, 0, 40, }, /* 558 */ - { 13, 5, 12, 0, -40, }, /* 559 */ - { 46, 7, 12, 0, 0, }, /* 560 */ - { 44, 7, 12, 0, 0, }, /* 561 */ - { 44, 13, 12, 0, 0, }, /* 562 */ - { 11, 7, 12, 0, 0, }, /* 563 */ - { 80, 7, 12, 0, 0, }, /* 564 */ - { 80, 21, 12, 0, 0, }, /* 565 */ - { 80, 15, 12, 0, 0, }, /* 566 */ - { 65, 7, 12, 0, 0, }, /* 567 */ - { 65, 15, 12, 0, 0, }, /* 568 */ - { 65, 21, 12, 0, 0, }, /* 569 */ - { 71, 7, 12, 0, 0, }, /* 570 */ - { 71, 21, 12, 0, 0, }, /* 571 */ - { 97, 7, 12, 0, 0, }, /* 572 */ - { 96, 7, 12, 0, 0, }, /* 573 */ - { 30, 7, 12, 0, 0, }, /* 574 */ - { 30, 12, 3, 0, 0, }, /* 575 */ - { 30, 15, 12, 0, 0, }, /* 576 */ - { 30, 21, 12, 0, 0, }, /* 577 */ - { 87, 7, 12, 0, 0, }, /* 578 */ - { 87, 15, 12, 0, 0, }, /* 579 */ - { 87, 21, 12, 0, 0, }, /* 580 */ - { 77, 7, 12, 0, 0, }, /* 581 */ - { 77, 21, 12, 0, 0, }, /* 582 */ - { 82, 7, 12, 0, 0, }, /* 583 */ - { 82, 15, 12, 0, 0, }, /* 584 */ - { 81, 7, 12, 0, 0, }, /* 585 */ - { 81, 15, 12, 0, 0, }, /* 586 */ - { 88, 7, 12, 0, 0, }, /* 587 */ - { 0, 15, 12, 0, 0, }, /* 588 */ - { 93, 10, 5, 0, 0, }, /* 589 */ - { 93, 12, 3, 0, 0, }, /* 590 */ - { 93, 7, 12, 0, 0, }, /* 591 */ - { 93, 21, 12, 0, 0, }, /* 592 */ - { 93, 15, 12, 0, 0, }, /* 593 */ - { 93, 13, 12, 0, 0, }, /* 594 */ - { 84, 12, 3, 0, 0, }, /* 595 */ - { 84, 10, 5, 0, 0, }, /* 596 */ - { 84, 7, 12, 0, 0, }, /* 597 */ - { 84, 21, 12, 0, 0, }, /* 598 */ - { 84, 1, 2, 0, 0, }, /* 599 */ - { 100, 7, 12, 0, 0, }, /* 600 */ - { 100, 13, 12, 0, 0, }, /* 601 */ - { 95, 12, 3, 0, 0, }, /* 602 */ - { 95, 7, 12, 0, 0, }, /* 603 */ - { 95, 10, 5, 0, 0, }, /* 604 */ - { 95, 13, 12, 0, 0, }, /* 605 */ - { 95, 21, 12, 0, 0, }, /* 606 */ - { 99, 12, 3, 0, 0, }, /* 607 */ - { 99, 10, 5, 0, 0, }, /* 608 */ - { 99, 7, 12, 0, 0, }, /* 609 */ - { 99, 21, 12, 0, 0, }, /* 610 */ - { 99, 13, 12, 0, 0, }, /* 611 */ - { 101, 7, 12, 0, 0, }, /* 612 */ - { 101, 12, 3, 0, 0, }, /* 613 */ - { 101, 10, 5, 0, 0, }, /* 614 */ - { 101, 13, 12, 0, 0, }, /* 615 */ - { 62, 7, 12, 0, 0, }, /* 616 */ - { 62, 14, 12, 0, 0, }, /* 617 */ - { 62, 21, 12, 0, 0, }, /* 618 */ - { 79, 7, 12, 0, 0, }, /* 619 */ - { 98, 7, 12, 0, 0, }, /* 620 */ - { 98, 10, 5, 0, 0, }, /* 621 */ - { 98, 12, 3, 0, 0, }, /* 622 */ - { 98, 6, 12, 0, 0, }, /* 623 */ - { 9, 10, 3, 0, 0, }, /* 624 */ - { 19, 12, 3, 0, 0, }, /* 625 */ - { 9, 26, 11, 0, 0, }, /* 626 */ - { 26, 26, 12, 0, 0, }, /* 627 */ + { 83, 13, 12, 0, 0, }, /* 518 */ + { 67, 7, 12, 0, 0, }, /* 519 */ + { 67, 12, 3, 0, 0, }, /* 520 */ + { 67, 10, 5, 0, 0, }, /* 521 */ + { 67, 13, 12, 0, 0, }, /* 522 */ + { 67, 21, 12, 0, 0, }, /* 523 */ + { 38, 6, 12, 0, 0, }, /* 524 */ + { 91, 7, 12, 0, 0, }, /* 525 */ + { 91, 12, 3, 0, 0, }, /* 526 */ + { 91, 6, 12, 0, 0, }, /* 527 */ + { 91, 21, 12, 0, 0, }, /* 528 */ + { 86, 7, 12, 0, 0, }, /* 529 */ + { 86, 10, 5, 0, 0, }, /* 530 */ + { 86, 12, 3, 0, 0, }, /* 531 */ + { 86, 21, 12, 0, 0, }, /* 532 */ + { 86, 6, 12, 0, 0, }, /* 533 */ + { 86, 13, 12, 0, 0, }, /* 534 */ + { 23, 7, 9, 0, 0, }, /* 535 */ + { 23, 7, 10, 0, 0, }, /* 536 */ + { 9, 4, 2, 0, 0, }, /* 537 */ + { 9, 3, 12, 0, 0, }, /* 538 */ + { 25, 25, 12, 0, 0, }, /* 539 */ + { 0, 24, 12, 0, 0, }, /* 540 */ + { 9, 6, 3, 0, 0, }, /* 541 */ + { 35, 7, 12, 0, 0, }, /* 542 */ + { 19, 14, 12, 0, 0, }, /* 543 */ + { 19, 15, 12, 0, 0, }, /* 544 */ + { 19, 26, 12, 0, 0, }, /* 545 */ + { 70, 7, 12, 0, 0, }, /* 546 */ + { 66, 7, 12, 0, 0, }, /* 547 */ + { 41, 7, 12, 0, 0, }, /* 548 */ + { 41, 15, 12, 0, 0, }, /* 549 */ + { 18, 7, 12, 0, 0, }, /* 550 */ + { 18, 14, 12, 0, 0, }, /* 551 */ + { 59, 7, 12, 0, 0, }, /* 552 */ + { 59, 21, 12, 0, 0, }, /* 553 */ + { 42, 7, 12, 0, 0, }, /* 554 */ + { 42, 21, 12, 0, 0, }, /* 555 */ + { 42, 14, 12, 0, 0, }, /* 556 */ + { 13, 9, 12, 0, 40, }, /* 557 */ + { 13, 5, 12, 0, -40, }, /* 558 */ + { 46, 7, 12, 0, 0, }, /* 559 */ + { 44, 7, 12, 0, 0, }, /* 560 */ + { 44, 13, 12, 0, 0, }, /* 561 */ + { 11, 7, 12, 0, 0, }, /* 562 */ + { 80, 7, 12, 0, 0, }, /* 563 */ + { 80, 21, 12, 0, 0, }, /* 564 */ + { 80, 15, 12, 0, 0, }, /* 565 */ + { 65, 7, 12, 0, 0, }, /* 566 */ + { 65, 15, 12, 0, 0, }, /* 567 */ + { 65, 21, 12, 0, 0, }, /* 568 */ + { 71, 7, 12, 0, 0, }, /* 569 */ + { 71, 21, 12, 0, 0, }, /* 570 */ + { 97, 7, 12, 0, 0, }, /* 571 */ + { 96, 7, 12, 0, 0, }, /* 572 */ + { 30, 7, 12, 0, 0, }, /* 573 */ + { 30, 12, 3, 0, 0, }, /* 574 */ + { 30, 15, 12, 0, 0, }, /* 575 */ + { 30, 21, 12, 0, 0, }, /* 576 */ + { 87, 7, 12, 0, 0, }, /* 577 */ + { 87, 15, 12, 0, 0, }, /* 578 */ + { 87, 21, 12, 0, 0, }, /* 579 */ + { 77, 7, 12, 0, 0, }, /* 580 */ + { 77, 21, 12, 0, 0, }, /* 581 */ + { 82, 7, 12, 0, 0, }, /* 582 */ + { 82, 15, 12, 0, 0, }, /* 583 */ + { 81, 7, 12, 0, 0, }, /* 584 */ + { 81, 15, 12, 0, 0, }, /* 585 */ + { 88, 7, 12, 0, 0, }, /* 586 */ + { 0, 15, 12, 0, 0, }, /* 587 */ + { 93, 10, 5, 0, 0, }, /* 588 */ + { 93, 12, 3, 0, 0, }, /* 589 */ + { 93, 7, 12, 0, 0, }, /* 590 */ + { 93, 21, 12, 0, 0, }, /* 591 */ + { 93, 15, 12, 0, 0, }, /* 592 */ + { 93, 13, 12, 0, 0, }, /* 593 */ + { 84, 12, 3, 0, 0, }, /* 594 */ + { 84, 10, 5, 0, 0, }, /* 595 */ + { 84, 7, 12, 0, 0, }, /* 596 */ + { 84, 21, 12, 0, 0, }, /* 597 */ + { 84, 1, 2, 0, 0, }, /* 598 */ + { 100, 7, 12, 0, 0, }, /* 599 */ + { 100, 13, 12, 0, 0, }, /* 600 */ + { 95, 12, 3, 0, 0, }, /* 601 */ + { 95, 7, 12, 0, 0, }, /* 602 */ + { 95, 10, 5, 0, 0, }, /* 603 */ + { 95, 13, 12, 0, 0, }, /* 604 */ + { 95, 21, 12, 0, 0, }, /* 605 */ + { 99, 12, 3, 0, 0, }, /* 606 */ + { 99, 10, 5, 0, 0, }, /* 607 */ + { 99, 7, 12, 0, 0, }, /* 608 */ + { 99, 21, 12, 0, 0, }, /* 609 */ + { 99, 13, 12, 0, 0, }, /* 610 */ + { 101, 7, 12, 0, 0, }, /* 611 */ + { 101, 12, 3, 0, 0, }, /* 612 */ + { 101, 10, 5, 0, 0, }, /* 613 */ + { 101, 13, 12, 0, 0, }, /* 614 */ + { 62, 7, 12, 0, 0, }, /* 615 */ + { 62, 14, 12, 0, 0, }, /* 616 */ + { 62, 21, 12, 0, 0, }, /* 617 */ + { 79, 7, 12, 0, 0, }, /* 618 */ + { 98, 7, 12, 0, 0, }, /* 619 */ + { 98, 10, 5, 0, 0, }, /* 620 */ + { 98, 12, 3, 0, 0, }, /* 621 */ + { 98, 6, 12, 0, 0, }, /* 622 */ + { 9, 10, 3, 0, 0, }, /* 623 */ + { 19, 12, 3, 0, 0, }, /* 624 */ + { 9, 26, 11, 0, 0, }, /* 625 */ + { 26, 26, 12, 0, 0, }, /* 626 */ }; const pcre_uint8 PRIV(ucd_stage1)[] = { /* 8704 bytes */ @@ -1380,7 +1379,7 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ /* block 12 */ 185,185,185,185,185,109,186,186,186,187,187,188, 4,187,189,189, -190,190,190,190,190,190,190,190,190,190,190, 4,109,109,187, 4, +190,190,190,190,190,190,190,190,190,190,190, 4,185,109,187, 4, 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, 102,191,191,191,191,191,191,191,191,191,191,104,104,104,104,104, @@ -1760,7 +1759,7 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ /* block 50 */ 360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, -360,360,360,360,360,360,360,361,361,362,362,362,109,109,363,363, +360,360,360,360,360,360,360,361,361,362,362,361,109,109,363,363, 364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364, 364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364, 364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364, @@ -1885,7 +1884,7 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 21, 25, 4, 4, 4, 4, 15, 15, 4, 4, 4, 8, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4, 15, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, - 22, 22, 22, 22, 22,426,426,426,426,426, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22,426, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,101,109,109, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,101, /* block 63 */ @@ -1929,7 +1928,7 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, /* block 67 */ - 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 6, 7, 6, 7, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 19, 19, 19, 19, 19, 19, 19, 6, 7, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, @@ -2353,30 +2352,30 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, 516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, 516,516,516,514,515,515,514,514,514,514,515,515,514,515,515,515, -515,517,517,517,517,517,517,517,517,517,517,517,517,517,109,518, -519,519,519,519,519,519,519,519,519,519,109,109,109,109,517,517, +515,517,517,517,517,517,517,517,517,517,517,517,517,517,109,102, +518,518,518,518,518,518,518,518,518,518,109,109,109,109,517,517, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 110 */ -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, -520,520,520,520,520,520,520,520,520,521,521,521,521,521,521,522, -522,521,521,522,522,521,521,109,109,109,109,109,109,109,109,109, -520,520,520,521,520,520,520,520,520,520,520,520,521,522,109,109, -523,523,523,523,523,523,523,523,523,523,109,109,524,524,524,524, +519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, +519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, +519,519,519,519,519,519,519,519,519,520,520,520,520,520,520,521, +521,520,520,521,521,520,520,109,109,109,109,109,109,109,109,109, +519,519,519,520,519,519,519,519,519,519,519,519,520,521,109,109, +522,522,522,522,522,522,522,522,522,522,109,109,523,523,523,523, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, -525,295,295,295,295,295,295,301,301,301,295,296,109,109,109,109, +524,295,295,295,295,295,295,301,301,301,295,296,109,109,109,109, /* block 111 */ -526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526, -526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526, -526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526, -527,526,527,527,527,526,526,527,527,526,526,526,526,526,527,527, -526,527,526,109,109,109,109,109,109,109,109,109,109,109,109,109, -109,109,109,109,109,109,109,109,109,109,109,526,526,528,529,529, -530,530,530,530,530,530,530,530,530,530,530,531,532,532,531,531, -533,533,530,534,534,531,532,109,109,109,109,109,109,109,109,109, +525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525, +525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525, +525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525, +526,525,526,526,526,525,525,526,526,525,525,525,525,525,526,526, +525,526,525,109,109,109,109,109,109,109,109,109,109,109,109,109, +109,109,109,109,109,109,109,109,109,109,109,525,525,527,528,528, +529,529,529,529,529,529,529,529,529,529,529,530,531,531,530,530, +532,532,529,533,533,530,531,109,109,109,109,109,109,109,109,109, /* block 112 */ 109,308,308,308,308,308,308,109,109,308,308,308,308,308,308,109, @@ -2393,85 +2392,85 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, -530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530, -530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530, -530,530,530,531,531,532,531,531,532,531,531,533,531,532,109,109, -535,535,535,535,535,535,535,535,535,535,109,109,109,109,109,109, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, +529,529,529,530,530,531,530,530,531,530,530,532,530,531,109,109, +534,534,534,534,534,534,534,534,534,534,109,109,109,109,109,109, /* block 114 */ -536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, /* block 115 */ -537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537, +536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536, /* block 116 */ -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, /* block 117 */ -537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537, +536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536, /* block 118 */ -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, /* block 119 */ -537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537, +536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536, /* block 120 */ -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, /* block 121 */ -537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537, -537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, -537,537,537,537,109,109,109,109,109,109,109,109,109,109,109,109, +536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536, +536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, +536,536,536,536,109,109,109,109,109,109,109,109,109,109,109,109, 306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306, 306,306,306,306,306,306,306,109,109,109,109,307,307,307,307,307, 307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307, @@ -2479,6 +2478,16 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 307,307,307,307,307,307,307,307,307,307,307,307,109,109,109,109, /* block 122 */ +537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, +537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537, + +/* block 123 */ 538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, 538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, 538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, @@ -2488,16 +2497,6 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, 538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, -/* block 123 */ -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, - /* block 124 */ 475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475, 475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475, @@ -2521,7 +2520,7 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ /* block 126 */ 33, 33, 33, 33, 33, 33, 33,109,109,109,109,109,109,109,109,109, 109,109,109,178,178,178,178,178,109,109,109,109,109,184,181,184, -184,184,184,184,184,184,184,184,184,540,184,184,184,184,184,184, +184,184,184,184,184,184,184,184,184,539,184,184,184,184,184,184, 184,184,184,184,184,184,184,109,184,184,184,184,184,109,184,109, 184,184,109,184,184,109,184,184,184,184,184,184,184,184,184,184, 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, @@ -2532,8 +2531,8 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, -191,191,541,541,541,541,541,541,541,541,541,541,541,541,541,541, -541,541,109,109,109,109,109,109,109,109,109,109,109,109,109,109, +191,191,540,540,540,540,540,540,540,540,540,540,540,540,540,540, +540,540,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,191,191,191,191,191,191,191,191,191,191,191,191,191, 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, @@ -2600,7 +2599,7 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ /* block 134 */ 469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469, -469,469,469,469,469,469,469,469,469,469,469,469,469,469,542,542, +469,469,469,469,469,469,469,469,469,469,469,469,469,469,541,541, 472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472, 472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,109, 109,109,472,472,472,472,472,472,109,109,472,472,472,472,472,472, @@ -2609,37 +2608,37 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 426,426,426,426,426,426,426,426,426, 22, 22, 22, 19, 19,109,109, /* block 135 */ -543,543,543,543,543,543,543,543,543,543,543,543,109,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,109,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,109,543,543,109,543, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,109,109, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,109,109, +542,542,542,542,542,542,542,542,542,542,542,542,109,542,542,542, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542, +542,542,542,542,542,542,542,109,542,542,542,542,542,542,542,542, +542,542,542,542,542,542,542,542,542,542,542,109,542,542,109,542, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,109,109, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 136 */ -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,109,109,109,109,109, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542, +542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542, +542,542,542,542,542,542,542,542,542,542,542,109,109,109,109,109, /* block 137 */ 4, 4, 4,109,109,109,109, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,109,109,109, 19, 19, 19, 19, 19, 19, 19, 19, 19, -544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544, -544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544, -544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544, -544,544,544,544,544,545,545,545,545,546,546,546,546,546,546,546, +543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, +543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, +543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, +543,543,543,543,543,544,544,544,544,545,545,545,545,545,545,545, /* block 138 */ -546,546,546,546,546,546,546,546,546,546,545,109,109,109,109,109, +545,545,545,545,545,545,545,545,545,545,544,109,109,109,109,109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, @@ -2649,49 +2648,49 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,104,109,109, /* block 139 */ +546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546, +546,546,546,546,546,546,546,546,546,546,546,546,546,109,109,109, 547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547, -547,547,547,547,547,547,547,547,547,547,547,547,547,109,109,109, -548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548, -548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548, -548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548, -548,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, +547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547, +547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547, +547,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 140 */ -549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549, -549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,109, -550,550,550,550,109,109,109,109,109,109,109,109,109,109,109,109, -551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551, -551,552,551,551,551,551,551,551,551,551,552,109,109,109,109,109, +548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548, +548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,109, +549,549,549,549,109,109,109,109,109,109,109,109,109,109,109,109, +550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550, +550,551,550,550,550,550,550,550,550,550,551,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 141 */ -553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553, -553,553,553,553,553,553,553,553,553,553,553,553,553,553,109,554, -555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555, -555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555, -555,555,555,555,109,109,109,109,555,555,555,555,555,555,555,555, -556,557,557,557,557,557,109,109,109,109,109,109,109,109,109,109, +552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552, +552,552,552,552,552,552,552,552,552,552,552,552,552,552,109,553, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,109,109,109,109,554,554,554,554,554,554,554,554, +555,556,556,556,556,556,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 142 */ +557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557, +557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557, +557,557,557,557,557,557,557,557,558,558,558,558,558,558,558,558, 558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558, 558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558, -558,558,558,558,558,558,558,558,559,559,559,559,559,559,559,559, 559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, 559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560, -560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560, -560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560, +559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, /* block 143 */ -561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561, -561,561,561,561,561,561,561,561,561,561,561,561,561,561,109,109, -562,562,562,562,562,562,562,562,562,562,109,109,109,109,109,109, +560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560, +560,560,560,560,560,560,560,560,560,560,560,560,560,560,109,109, +561,561,561,561,561,561,561,561,561,561,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, @@ -2699,61 +2698,61 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 144 */ -563,563,563,563,563,563,109,109,563,109,563,563,563,563,563,563, +562,562,562,562,562,562,109,109,562,109,562,562,562,562,562,562, +562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562, +562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562, +562,562,562,562,562,562,109,562,562,109,109,109,562,109,109,562, 563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563, -563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563, -563,563,563,563,563,563,109,563,563,109,109,109,563,109,109,563, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,109,565,566,566,566,566,566,566,566,566, +563,563,563,563,563,563,109,564,565,565,565,565,565,565,565,565, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 145 */ -567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567, -567,567,567,567,567,567,568,568,568,568,568,568,109,109,109,569, -570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, -570,570,570,570,570,570,570,570,570,570,109,109,109,109,109,571, +566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566, +566,566,566,566,566,566,567,567,567,567,567,567,109,109,109,568, +569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569, +569,569,569,569,569,569,569,569,569,569,109,109,109,109,109,570, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 146 */ +571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571, +571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571, 572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, -572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, -573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, -573,573,573,573,573,573,573,573,109,109,109,109,109,109,573,573, +572,572,572,572,572,572,572,572,109,109,109,109,109,109,572,572, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 147 */ -574,575,575,575,109,575,575,109,109,109,109,109,575,575,575,575, -574,574,574,574,109,574,574,574,109,574,574,574,574,574,574,574, -574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574, -574,574,574,574,109,109,109,109,575,575,575,109,109,109,109,575, -576,576,576,576,576,576,576,576,109,109,109,109,109,109,109,109, -577,577,577,577,577,577,577,577,577,109,109,109,109,109,109,109, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,579,579,580, +573,574,574,574,109,574,574,109,109,109,109,109,574,574,574,574, +573,573,573,573,109,573,573,573,109,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,109,109,109,109,574,574,574,109,109,109,109,574, +575,575,575,575,575,575,575,575,109,109,109,109,109,109,109,109, +576,576,576,576,576,576,576,576,576,109,109,109,109,109,109,109, +577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, +577,577,577,577,577,577,577,577,577,577,577,577,577,578,578,579, /* block 148 */ -581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, -581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, -581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, -581,581,581,581,581,581,109,109,109,582,582,582,582,582,582,582, -583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, -583,583,583,583,583,583,109,109,584,584,584,584,584,584,584,584, -585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, -585,585,585,109,109,109,109,109,586,586,586,586,586,586,586,586, +580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580, +580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580, +580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580, +580,580,580,580,580,580,109,109,109,581,581,581,581,581,581,581, +582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582, +582,582,582,582,582,582,109,109,583,583,583,583,583,583,583,583, +584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, +584,584,584,109,109,109,109,109,585,585,585,585,585,585,585,585, /* block 149 */ -587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, -587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, -587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, -587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, -587,587,587,587,587,587,587,587,587,109,109,109,109,109,109,109, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, @@ -2765,103 +2764,103 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, -588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588, -588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,109, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,109, /* block 151 */ -589,590,589,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,590,590,590,590,590,590,590,590, -590,590,590,590,590,590,590,592,592,592,592,592,592,592,109,109, -109,109,593,593,593,593,593,593,593,593,593,593,593,593,593,593, -593,593,593,593,593,593,594,594,594,594,594,594,594,594,594,594, +588,589,588,590,590,590,590,590,590,590,590,590,590,590,590,590, +590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, +590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, +590,590,590,590,590,590,590,590,589,589,589,589,589,589,589,589, +589,589,589,589,589,589,589,591,591,591,591,591,591,591,109,109, +109,109,592,592,592,592,592,592,592,592,592,592,592,592,592,592, +592,592,592,592,592,592,593,593,593,593,593,593,593,593,593,593, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 152 */ -595,595,596,597,597,597,597,597,597,597,597,597,597,597,597,597, -597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597, -597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597, -596,596,596,595,595,595,595,596,596,595,595,598,598,599,598,598, -598,598,109,109,109,109,109,109,109,109,109,109,109,109,109,109, -600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, -600,600,600,600,600,600,600,600,600,109,109,109,109,109,109,109, -601,601,601,601,601,601,601,601,601,601,109,109,109,109,109,109, +594,594,595,596,596,596,596,596,596,596,596,596,596,596,596,596, +596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596, +596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596, +595,595,595,594,594,594,594,595,595,594,594,597,597,598,597,597, +597,597,109,109,109,109,109,109,109,109,109,109,109,109,109,109, +599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599, +599,599,599,599,599,599,599,599,599,109,109,109,109,109,109,109, +600,600,600,600,600,600,600,600,600,600,109,109,109,109,109,109, /* block 153 */ -602,602,602,603,603,603,603,603,603,603,603,603,603,603,603,603, -603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603, -603,603,603,603,603,603,603,602,602,602,602,602,604,602,602,602, -602,602,602,602,602,109,605,605,605,605,605,605,605,605,605,605, -606,606,606,606,109,109,109,109,109,109,109,109,109,109,109,109, +601,601,601,602,602,602,602,602,602,602,602,602,602,602,602,602, +602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602, +602,602,602,602,602,602,602,601,601,601,601,601,603,601,601,601, +601,601,601,601,601,109,604,604,604,604,604,604,604,604,604,604, +605,605,605,605,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 154 */ -607,607,608,609,609,609,609,609,609,609,609,609,609,609,609,609, -609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609, -609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609, -609,609,609,608,608,608,607,607,607,607,607,607,607,607,607,608, -608,609,609,609,609,610,610,610,610,109,109,109,109,109,109,109, -611,611,611,611,611,611,611,611,611,611,109,109,109,109,109,109, +606,606,607,608,608,608,608,608,608,608,608,608,608,608,608,608, +608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608, +608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608, +608,608,608,607,607,607,606,606,606,606,606,606,606,606,606,607, +607,608,608,608,608,609,609,609,609,109,109,109,109,109,109,109, +610,610,610,610,610,610,610,610,610,610,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 155 */ -612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612, -612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612, -612,612,612,612,612,612,612,612,612,612,612,613,614,613,614,614, -613,613,613,613,613,613,614,613,109,109,109,109,109,109,109,109, -615,615,615,615,615,615,615,615,615,615,109,109,109,109,109,109, +611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611, +611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611, +611,611,611,611,611,611,611,611,611,611,611,612,613,612,613,613, +612,612,612,612,612,612,613,612,109,109,109,109,109,109,109,109, +614,614,614,614,614,614,614,614,614,614,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 156 */ -616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, -616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, -616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, -616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, -616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, -616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, -616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, -616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, /* block 157 */ +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615, +615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,109, +109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, + +/* block 158 */ 616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, 616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, 616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, 616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, 616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, 616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616, -616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,109, -109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, - -/* block 158 */ -617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,109,109,109,109,109,109,109,109,109,109,109,109,109, -618,618,618,618,109,109,109,109,109,109,109,109,109,109,109,109, +616,616,616,109,109,109,109,109,109,109,109,109,109,109,109,109, +617,617,617,617,109,109,109,109,109,109,109,109,109,109,109,109, /* block 159 */ -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, /* block 160 */ -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, -619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,109, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618, +618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, @@ -2889,18 +2888,18 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 163 */ +619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, +619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, +619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, +619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, +619,619,619,619,619,109,109,109,109,109,109,109,109,109,109,109, +619,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620, 620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620, -620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620, -620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620, -620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620, -620,620,620,620,620,109,109,109,109,109,109,109,109,109,109,109, -620,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621, -621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621, -621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,109, +620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,109, /* block 164 */ -109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,622, -622,622,622,623,623,623,623,623,623,623,623,623,623,623,623,623, +109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,621, +621,621,621,622,622,622,622,622,622,622,622,622,622,622,622,622, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, @@ -2935,8 +2934,8 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19,624,395,104,104,104, 19, 19, 19,395,624,624, -624,624,624, 22, 22, 22, 22, 22, 22, 22, 22,104,104,104,104,104, + 19, 19, 19, 19, 19,623,395,104,104,104, 19, 19, 19,395,623,623, +623,623,623, 22, 22, 22, 22, 22, 22, 22, 22,104,104,104,104,104, /* block 168 */ 104,104,104, 19, 19,104,104,104,104,104,104,104, 19, 19, 19, 19, @@ -2949,11 +2948,11 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* block 169 */ -546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546, -546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546, -546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546, -546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546, -546,546,625,625,625,546,109,109,109,109,109,109,109,109,109,109, +545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, +545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, +545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, +545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, +545,545,624,624,624,545,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, @@ -3105,11 +3104,11 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, 109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, -109,109,109,109,109,109,626,626,626,626,626,626,626,626,626,626, -626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626, +109,109,109,109,109,109,625,625,625,625,625,625,625,625,625,625, +625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625, /* block 185 */ -627, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,109, +626, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109, @@ -3279,14 +3278,14 @@ const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */ 426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426, /* block 202 */ -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,109,109, +538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, +538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, +538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, +538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, +538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, +538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, +538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, +538,538,538,538,538,538,538,538,538,538,538,538,538,538,109,109, }; diff --git a/pcre/pcre_xclass.c b/pcre/pcre_xclass.c index d777acb57c9..ad153be7851 100644 --- a/pcre/pcre_xclass.c +++ b/pcre/pcre_xclass.c @@ -128,55 +128,62 @@ while ((t = *data++) != XCL_END) else /* XCL_PROP & XCL_NOTPROP */ { const ucd_record *prop = GET_UCD(c); + BOOL isprop = t == XCL_PROP; switch(*data) { case PT_ANY: - if (t == XCL_PROP) return !negated; + if (isprop) return !negated; break; case PT_LAMP: if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || - prop->chartype == ucp_Lt) == (t == XCL_PROP)) return !negated; + prop->chartype == ucp_Lt) == isprop) return !negated; break; case PT_GC: - if ((data[1] == PRIV(ucp_gentype)[prop->chartype]) == (t == XCL_PROP)) + if ((data[1] == PRIV(ucp_gentype)[prop->chartype]) == isprop) return !negated; break; case PT_PC: - if ((data[1] == prop->chartype) == (t == XCL_PROP)) return !negated; + if ((data[1] == prop->chartype) == isprop) return !negated; break; case PT_SC: - if ((data[1] == prop->script) == (t == XCL_PROP)) return !negated; + if ((data[1] == prop->script) == isprop) return !negated; break; case PT_ALNUM: if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || - PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (t == XCL_PROP)) + PRIV(ucp_gentype)[prop->chartype] == ucp_N) == isprop) return !negated; break; - case PT_SPACE: /* Perl space */ - if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR) - == (t == XCL_PROP)) - return !negated; - break; + /* Perl space used to exclude VT, but from Perl 5.18 it is included, + which means that Perl space and POSIX space are now identical. PCRE + was changed at release 8.34. */ + case PT_SPACE: /* Perl space */ case PT_PXSPACE: /* POSIX space */ - if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z || - c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || - c == CHAR_FF || c == CHAR_CR) == (t == XCL_PROP)) - return !negated; + switch(c) + { + HSPACE_CASES: + VSPACE_CASES: + if (isprop) return !negated; + break; + + default: + if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == isprop) + return !negated; + break; + } break; case PT_WORD: if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || PRIV(ucp_gentype)[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE) - == (t == XCL_PROP)) + == isprop) return !negated; break; @@ -184,16 +191,60 @@ while ((t = *data++) != XCL_END) if (c < 0xa0) { if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT || - c == CHAR_GRAVE_ACCENT) == (t == XCL_PROP)) + c == CHAR_GRAVE_ACCENT) == isprop) return !negated; } else { - if ((c < 0xd800 || c > 0xdfff) == (t == XCL_PROP)) + if ((c < 0xd800 || c > 0xdfff) == isprop) return !negated; } break; + /* The following three properties can occur only in an XCLASS, as there + is no \p or \P coding for them. */ + + /* Graphic character. Implement this as not Z (space or separator) and + not C (other), except for Cf (format) with a few exceptions. This seems + to be what Perl does. The exceptional characters are: + + U+061C Arabic Letter Mark + U+180E Mongolian Vowel Separator + U+2066 - U+2069 Various "isolate"s + */ + + case PT_PXGRAPH: + if ((PRIV(ucp_gentype)[prop->chartype] != ucp_Z && + (PRIV(ucp_gentype)[prop->chartype] != ucp_C || + (prop->chartype == ucp_Cf && + c != 0x061c && c != 0x180e && (c < 0x2066 || c > 0x2069)) + )) == isprop) + return !negated; + break; + + /* Printable character: same as graphic, with the addition of Zs, i.e. + not Zl and not Zp, and U+180E. */ + + case PT_PXPRINT: + if ((prop->chartype != ucp_Zl && + prop->chartype != ucp_Zp && + (PRIV(ucp_gentype)[prop->chartype] != ucp_C || + (prop->chartype == ucp_Cf && + c != 0x061c && (c < 0x2066 || c > 0x2069)) + )) == isprop) + return !negated; + break; + + /* Punctuation: all Unicode punctuation, plus ASCII characters that + Unicode treats as symbols rather than punctuation, for Perl + compatibility (these are $+<=>^`|~). */ + + case PT_PXPUNCT: + if ((PRIV(ucp_gentype)[prop->chartype] == ucp_P || + (c < 256 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop) + return !negated; + break; + /* This should never occur, but compilers may mutter if there is no default. */ diff --git a/pcre/pcregrep.c b/pcre/pcregrep.c index 64023483d2d..f6b6ec39608 100644 --- a/pcre/pcregrep.c +++ b/pcre/pcregrep.c @@ -3,10 +3,16 @@ *************************************************/ /* This is a grep program that uses the PCRE regular expression library to do -its pattern matching. On a Unix or Win32 system it can recurse into -directories. +its pattern matching. On Unix-like, Windows, and native z/OS systems it can +recurse into directories, and in z/OS it can handle PDS files. - Copyright (c) 1997-2012 University of Cambridge +Note that for native z/OS, in addition to defining the NATIVE_ZOS macro, an +additional header is required. That header is not included in the main PCRE +distribution because other apparatus is needed to compile pcregrep for z/OS. +The header can be found in the special z/OS distribution, which is available +from www.zaconsultants.net or from www.cbttape.org. + + Copyright (c) 1997-2013 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -530,17 +536,29 @@ while (fn != NULL) * OS-specific functions * *************************************************/ -/* These functions are defined so that they can be made system specific, -although at present the only ones are for Unix, Win32, and for "no support". */ +/* These functions are defined so that they can be made system specific. +At present there are versions for Unix-style environments, Windows, native +z/OS, and "no support". */ -/************* Directory scanning in Unix ***********/ +/************* Directory scanning Unix-style and z/OS ***********/ -#if defined HAVE_SYS_STAT_H && defined HAVE_DIRENT_H && defined HAVE_SYS_TYPES_H +#if (defined HAVE_SYS_STAT_H && defined HAVE_DIRENT_H && defined HAVE_SYS_TYPES_H) || defined NATIVE_ZOS #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> +#if defined NATIVE_ZOS +/************* Directory and PDS/E scanning for z/OS ***********/ +/************* z/OS looks mostly like Unix with USS ************/ +/* However, z/OS needs the #include statements in this header */ +#include "pcrzosfs.h" +/* That header is not included in the main PCRE distribution because + other apparatus is needed to compile pcregrep for z/OS. The header + can be found in the special z/OS distribution, which is available + from www.zaconsultants.net or from www.cbttape.org. */ +#endif + typedef DIR directory_type; #define FILESEP '/' @@ -579,7 +597,7 @@ closedir(dir); } -/************* Test for regular file in Unix **********/ +/************* Test for regular file, Unix-style **********/ static int isregfile(char *filename) @@ -591,8 +609,26 @@ return (statbuf.st_mode & S_IFMT) == S_IFREG; } -/************* Test for a terminal in Unix **********/ +#if defined NATIVE_ZOS +/************* Test for a terminal in z/OS **********/ +/* isatty() does not work in a TSO environment, so always give FALSE.*/ + +static BOOL +is_stdout_tty(void) +{ +return FALSE; +} + +static BOOL +is_file_tty(FILE *f) +{ +return FALSE; +} + + +/************* Test for a terminal, Unix-style **********/ +#else static BOOL is_stdout_tty(void) { @@ -604,9 +640,12 @@ is_file_tty(FILE *f) { return isatty(fileno(f)); } +#endif + +/* End of Unix-style or native z/OS environment functions. */ -/************* Directory scanning in Win32 ***********/ +/************* Directory scanning in Windows ***********/ /* I (Philip Hazel) have no means of testing this code. It was contributed by Lionel Fourquaux. David Burgess added a patch to define INVALID_FILE_ATTRIBUTES @@ -709,7 +748,7 @@ free(dir); } -/************* Test for regular file in Win32 **********/ +/************* Test for regular file in Windows **********/ /* I don't know how to do this, or if it can be done; assume all paths are regular if they are not directories. */ @@ -720,7 +759,7 @@ return !isdirectory(filename); } -/************* Test for a terminal in Win32 **********/ +/************* Test for a terminal in Windows **********/ /* I don't know how to do this; assume never */ @@ -736,6 +775,8 @@ is_file_tty(FILE *f) return FALSE; } +/* End of Windows functions */ + /************* Directory scanning when we can't do it ***********/ @@ -752,7 +793,7 @@ char *readdirectory(directory_type *dir) { return (char*)0;} void closedirectory(directory_type *dir) {} -/************* Test for regular when we can't do it **********/ +/************* Test for regular file when we can't do it **********/ /* Assume all files are regular. */ @@ -773,7 +814,7 @@ is_file_tty(FILE *f) return FALSE; } -#endif +#endif /* End of system-specific functions */ @@ -1835,7 +1876,7 @@ while (ptr < endptr) { char *endmatch = ptr + offsets[1]; t = ptr; - while (t < endmatch) + while (t <= endmatch) { t = end_of_line(t, endptr, &endlinelength); if (t < endmatch) linenumber++; else break; @@ -2068,6 +2109,11 @@ BZFILE *inbz2 = NULL; int pathlen; #endif +#if defined NATIVE_ZOS +int zos_type; +FILE *zos_test_file; +#endif + /* If the file name is "-" we scan stdin */ if (strcmp(pathname, "-") == 0) @@ -2088,6 +2134,45 @@ lastcomp = (lastcomp == NULL)? pathname : lastcomp + 1; Otherwise, scan the directory and recurse for each path within it. The scanning code is localized so it can be made system-specific. */ + +/* For z/OS, determine the file type. */ + +#if defined NATIVE_ZOS +zos_test_file = fopen(pathname,"rb"); + +if (zos_test_file == NULL) + { + if (!silent) fprintf(stderr, "pcregrep: failed to test next file %s\n", + pathname, strerror(errno)); + return -1; + } +zos_type = identifyzosfiletype (zos_test_file); +fclose (zos_test_file); + +/* Handle a PDS in separate code */ + +if (zos_type == __ZOS_PDS || zos_type == __ZOS_PDSE) + { + return travelonpdsdir (pathname, only_one_at_top); + } + +/* Deal with regular files in the normal way below. These types are: + zos_type == __ZOS_PDS_MEMBER + zos_type == __ZOS_PS + zos_type == __ZOS_VSAM_KSDS + zos_type == __ZOS_VSAM_ESDS + zos_type == __ZOS_VSAM_RRDS +*/ + +/* Handle a z/OS directory using common code. */ + +else if (zos_type == __ZOS_HFS) + { +#endif /* NATIVE_ZOS */ + + +/* Handle directories: common code for all OS */ + if (isdirectory(pathname)) { if (dee_action == dee_SKIP || @@ -2122,12 +2207,22 @@ if (isdirectory(pathname)) } } -/* If the file is not a directory and not a regular file, skip it if that's -been requested. Otherwise, check for explicit include/exclude. */ +#if defined NATIVE_ZOS + } +#endif + +/* If the file is not a directory, check for a regular file, and if it is not, +skip it if that's been requested. Otherwise, check for an explicit inclusion or +exclusion. */ -else if ((!isregfile(pathname) && DEE_action == DEE_SKIP) || - !test_incexc(lastcomp, include_patterns, exclude_patterns)) - return -1; +else if ( +#if defined NATIVE_ZOS + (zos_type == __ZOS_NOFILE && DEE_action == DEE_SKIP) || +#else /* all other OS */ + (!isregfile(pathname) && DEE_action == DEE_SKIP) || +#endif + !test_incexc(lastcomp, include_patterns, exclude_patterns)) + return -1; /* File skipped */ /* Control reaches here if we have a regular file, or if we have a directory and recursion or skipping was not requested, or if we have anything else and diff --git a/pcre/pcreposix.c b/pcre/pcreposix.c index 95fa39d6fe8..7cf4a4a657b 100644 --- a/pcre/pcreposix.c +++ b/pcre/pcreposix.c @@ -110,7 +110,7 @@ static const int eint[] = { REG_BADPAT, /* POSIX collating elements are not supported */ REG_INVARG, /* this version of PCRE is not compiled with PCRE_UTF8 support */ REG_BADPAT, /* spare error */ - REG_BADPAT, /* character value in \x{...} sequence is too large */ + REG_BADPAT, /* character value in \x{} or \o{} is too large */ /* 35 */ REG_BADPAT, /* invalid condition (?(0) */ REG_BADPAT, /* \C not allowed in lookbehind assertion */ @@ -163,7 +163,14 @@ static const int eint[] = { REG_BADPAT, /* overlong MARK name */ REG_BADPAT, /* character value in \u.... sequence is too large */ REG_BADPAT, /* invalid UTF-32 string (should not occur) */ - REG_BADPAT /* setting UTF is disabled by the application */ + REG_BADPAT, /* setting UTF is disabled by the application */ + REG_BADPAT, /* non-hex character in \\x{} (closing brace missing?) */ + /* 80 */ + REG_BADPAT, /* non-octal character in \o{} (closing brace missing?) */ + REG_BADPAT, /* missing opening brace after \o */ + REG_BADPAT, /* parentheses too deeply nested */ + REG_BADPAT, /* invalid range in character class */ + REG_BADPAT /* group name must start with a non-digit */ }; /* Table of texts corresponding to POSIX error codes */ diff --git a/pcre/pcreposix.h b/pcre/pcreposix.h index b900a9697f3..c77c0b0523c 100644 --- a/pcre/pcreposix.h +++ b/pcre/pcreposix.h @@ -64,10 +64,6 @@ extern "C" { #define REG_UNGREEDY 0x0200 /* NOT defined by POSIX; maps to PCRE_UNGREEDY */ #define REG_UCP 0x0400 /* NOT defined by POSIX; maps to PCRE_UCP */ -/*Defined in regex.h */ -#define REG_ATOI 255 /* convert name to number (!) */ -#define REG_ITOA 0400 /* convert number to name (!) */ - /* This is not used by PCRE, but by defining it we make it easier to slot PCRE into existing programs that make POSIX calls. */ diff --git a/pcre/pcretest.c b/pcre/pcretest.c index 57ee041ef66..8452d2bab6f 100644 --- a/pcre/pcretest.c +++ b/pcre/pcretest.c @@ -1016,8 +1016,6 @@ static int jit_was_used; static int locale_set = 0; static int show_malloc; static int use_utf; -static size_t gotten_store; -static size_t first_gotten_store = 0; static const unsigned char *last_callout_mark = NULL; /* The buffers grow automatically if very long input lines are encountered. */ @@ -1290,7 +1288,7 @@ graph, print, punct, and cntrl. Other classes are built from combinations. */ */ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */ - 0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */ + 0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /* 8- 15 */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */ 0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */ @@ -1322,9 +1320,9 @@ graph, print, punct, and cntrl. Other classes are built from combinations. */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */ -/* This is a set of tables that came originally from a Windows user. It seems to -be at least an approximation of ISO 8859. In particular, there are characters -greater than 128 that are marked as spaces, letters, etc. */ +/* This is a set of tables that came originally from a Windows user. It seems +to be at least an approximation of ISO 8859. In particular, there are +characters greater than 128 that are marked as spaces, letters, etc. */ static const pcre_uint8 tables1[] = { 0,1,2,3,4,5,6,7, @@ -1916,7 +1914,7 @@ for (;;) } } -return NULL; /* Control never gets here */ +/* Control never gets here */ } @@ -2031,9 +2029,9 @@ return yield; static int strlen16(PCRE_SPTR16 p) { -int len = 0; -while (*p++ != 0) len++; -return len; +PCRE_SPTR16 pp = p; +while (*pp != 0) pp++; +return (int)(pp - p); } #endif /* SUPPORT_PCRE16 */ @@ -2046,9 +2044,9 @@ return len; static int strlen32(PCRE_SPTR32 p) { -int len = 0; -while (*p++ != 0) len++; -return len; +PCRE_SPTR32 pp = p; +while (*pp != 0) pp++; +return (int)(pp - p); } #endif /* SUPPORT_PCRE32 */ @@ -2322,8 +2320,6 @@ show_malloc variable is set only during matching. */ static void *new_malloc(size_t size) { void *block = malloc(size); -gotten_store = size; -if (first_gotten_store == 0) first_gotten_store = size; if (show_malloc) fprintf(outfile, "malloc %3d %p\n", (int)size, block); return block; @@ -2827,7 +2823,7 @@ return 0; /************************************************* -* Check newline indicator * +* Check multicharacter option * *************************************************/ /* This is used both at compile and run-time to check for <xxx> escapes. Print @@ -2836,12 +2832,14 @@ a message and return 0 if there is no match. Arguments: p points after the leading '<' f file for error message + nl TRUE to check only for newline settings + stype "modifier" or "escape sequence" Returns: appropriate PCRE_NEWLINE_xxx flags, or 0 */ static int -check_newline(pcre_uint8 *p, FILE *f) +check_mc_option(pcre_uint8 *p, FILE *f, BOOL nl, const char *stype) { if (strncmpic(p, (pcre_uint8 *)"cr>", 3) == 0) return PCRE_NEWLINE_CR; if (strncmpic(p, (pcre_uint8 *)"lf>", 3) == 0) return PCRE_NEWLINE_LF; @@ -2850,7 +2848,13 @@ if (strncmpic(p, (pcre_uint8 *)"anycrlf>", 8) == 0) return PCRE_NEWLINE_ANYCRLF; if (strncmpic(p, (pcre_uint8 *)"any>", 4) == 0) return PCRE_NEWLINE_ANY; if (strncmpic(p, (pcre_uint8 *)"bsr_anycrlf>", 12) == 0) return PCRE_BSR_ANYCRLF; if (strncmpic(p, (pcre_uint8 *)"bsr_unicode>", 12) == 0) return PCRE_BSR_UNICODE; -fprintf(f, "Unknown newline type at: <%s\n", p); + +if (!nl) + { + if (strncmpic(p, (pcre_uint8 *)"JS>", 3) == 0) return PCRE_JAVASCRIPT_COMPAT; + } + +fprintf(f, "Unknown %s at: <%s\n", stype, p); return 0; } @@ -2897,6 +2901,7 @@ printf(" -help show usage information\n"); printf(" -i show information about compiled patterns\n" " -M find MATCH_LIMIT minimum for each subject\n" " -m output memory used information\n" + " -O set PCRE_NO_AUTO_POSSESS on each pattern\n" " -o <n> set size of offsets vector to <n>\n"); #if !defined NOPOSIX printf(" -p use POSIX interface\n"); @@ -2913,6 +2918,8 @@ printf(" -s force each pattern to be studied at basic level\n" printf(" -t <n> time compilation and execution, repeating <n> times\n"); printf(" -tm time execution (matching) only\n"); printf(" -tm <n> time execution (matching) only, repeating <n> times\n"); +printf(" -T same as -t, but show total times at the end\n"); +printf(" -TM same as -tm, but show total time at the end\n"); } @@ -2932,9 +2939,11 @@ const char *version; int options = 0; int study_options = 0; int default_find_match_limit = FALSE; +pcre_uint32 default_options = 0; int op = 1; int timeit = 0; int timeitm = 0; +int showtotaltimes = 0; int showinfo = 0; int showstore = 0; int force_study = -1; @@ -2950,7 +2959,11 @@ int verify_jit = 0; int yield = 0; int stack_size; pcre_uint8 *dbuffer = NULL; +pcre_uint8 lockout[24] = { 0 }; size_t dbuffer_size = 1u << 14; +clock_t total_compile_time = 0; +clock_t total_study_time = 0; +clock_t total_match_time = 0; #if !defined NOPOSIX int posix = 0; @@ -3073,6 +3086,7 @@ while (argc > 1 && argv[op][0] == '-') else if (strcmp(arg, "-i") == 0) showinfo = 1; else if (strcmp(arg, "-d") == 0) showinfo = debug = 1; else if (strcmp(arg, "-M") == 0) default_find_match_limit = TRUE; + else if (strcmp(arg, "-O") == 0) default_options |= PCRE_NO_AUTO_POSSESS; #if !defined NODFA else if (strcmp(arg, "-dfa") == 0) all_use_dfa = 1; #endif @@ -3083,10 +3097,12 @@ while (argc > 1 && argv[op][0] == '-') op++; argc--; } - else if (strcmp(arg, "-t") == 0 || strcmp(arg, "-tm") == 0) + else if (strcmp(arg, "-t") == 0 || strcmp(arg, "-tm") == 0 || + strcmp(arg, "-T") == 0 || strcmp(arg, "-TM") == 0) { - int both = arg[2] == 0; int temp; + int both = arg[2] == 0; + showtotaltimes = arg[1] == 'T'; if (argc > 2 && (temp = get_value((pcre_uint8 *)argv[op+1], &endptr), *endptr == 0)) { @@ -3287,6 +3303,8 @@ are set, either both UTFs are supported or both are not supported. */ printf(" Internal link size = %d\n", rc); (void)PCRE_CONFIG(PCRE_CONFIG_POSIX_MALLOC_THRESHOLD, &rc); printf(" POSIX malloc threshold = %d\n", rc); + (void)PCRE_CONFIG(PCRE_CONFIG_PARENS_LIMIT, &lrc); + printf(" Parentheses nest limit = %ld\n", lrc); (void)PCRE_CONFIG(PCRE_CONFIG_MATCH_LIMIT, &lrc); printf(" Default match limit = %ld\n", lrc); (void)PCRE_CONFIG(PCRE_CONFIG_MATCH_LIMIT_RECURSION, &lrc); @@ -3378,7 +3396,7 @@ pcre32_stack_malloc = stack_malloc; pcre32_stack_free = stack_free; #endif -/* Heading line unless quiet, then prompt for first regex if stdin */ +/* Heading line unless quiet */ if (!quiet) fprintf(outfile, "PCRE version %s\n\n", version); @@ -3401,7 +3419,7 @@ while (!done) const pcre_uint8 *tables = NULL; unsigned long int get_options; unsigned long int true_size, true_study_size = 0; - size_t size, regex_gotten_store; + size_t size; int do_allcaps = 0; int do_mark = 0; int do_study = 0; @@ -3430,6 +3448,30 @@ while (!done) while (isspace(*p)) p++; if (*p == 0) continue; + /* Handle option lock-out setting */ + + if (*p == '<' && p[1] == ' ') + { + p += 2; + while (isspace(*p)) p++; + if (strncmp((char *)p, "forbid ", 7) == 0) + { + p += 7; + while (isspace(*p)) p++; + pp = lockout; + while (!isspace(*p) && pp < lockout + sizeof(lockout) - 1) + *pp++ = *p++; + *pp = 0; + } + else + { + printf("** Unrecognized special command '%s'\n", p); + yield = 1; + goto EXIT; + } + continue; + } + /* See if the pattern is to be loaded pre-compiled from a file. */ if (*p == '<' && strchr((char *)(p+1), '<') == NULL) @@ -3456,8 +3498,6 @@ while (!done) fprintf(outfile, "Failed to open %s: %s\n", p, strerror(errno)); continue; } - - first_gotten_store = 0; if (fread(sbuf, 1, 8, f) != 8) goto FAIL_READ; true_size = @@ -3473,8 +3513,6 @@ while (!done) yield = 1; goto EXIT; } - regex_gotten_store = first_gotten_store; - if (fread(re, 1, true_size, f) != true_size) goto FAIL_READ; magic = REAL_PCRE_MAGIC(re); @@ -3613,14 +3651,62 @@ while (!done) *pp++ = 0; strcpy((char *)pbuffer, (char *)p); - /* Look for options after final delimiter */ + /* Look for modifiers and options after the final delimiter. */ - options = 0; + options = default_options; study_options = force_study_options; log_store = showstore; /* default from command line */ while (*pp != 0) { + /* Check to see whether this modifier has been locked out for this file. + This is complicated for the multi-character options that begin with '<'. + If there is no '>' in the lockout string, all multi-character modifiers are + locked out. */ + + if (strchr((char *)lockout, *pp) != NULL) + { + if (*pp == '<' && strchr((char *)lockout, '>') != NULL) + { + int x = check_mc_option(pp+1, outfile, FALSE, "modifier"); + if (x == 0) goto SKIP_DATA; + + for (ppp = lockout; *ppp != 0; ppp++) + { + if (*ppp == '<') + { + int y = check_mc_option(ppp+1, outfile, FALSE, "modifier"); + if (y == 0) + { + printf("** Error in modifier forbid data - giving up.\n"); + yield = 1; + goto EXIT; + } + if (x == y) + { + ppp = pp; + while (*ppp != '>') ppp++; + printf("** The %.*s modifier is locked out - giving up.\n", + (int)(ppp - pp + 1), pp); + yield = 1; + goto EXIT; + } + } + } + } + + /* The single-character modifiers are straightforward. */ + + else + { + printf("** The /%c modifier is locked out - giving up.\n", *pp); + yield = 1; + goto EXIT; + } + } + + /* The modifier is not locked out; handle it. */ + switch (*pp++) { case 'f': options |= PCRE_FIRSTLINE; break; @@ -3647,6 +3733,7 @@ while (!done) case 'K': do_mark = 1; break; case 'M': log_store = 1; break; case 'N': options |= PCRE_NO_AUTO_CAPTURE; break; + case 'O': options |= PCRE_NO_AUTO_POSSESS; break; #if !defined NOPOSIX case 'P': do_posix = 1; break; @@ -3744,18 +3831,10 @@ while (!done) case '<': { - if (strncmpic(pp, (pcre_uint8 *)"JS>", 3) == 0) - { - options |= PCRE_JAVASCRIPT_COMPAT; - pp += 3; - } - else - { - int x = check_newline(pp, outfile); - if (x == 0) goto SKIP_DATA; - options |= x; - while (*pp++ != '>'); - } + int x = check_mc_option(pp, outfile, FALSE, "modifier"); + if (x == 0) goto SKIP_DATA; + options |= x; + while (*pp++ != '>'); } break; @@ -3765,7 +3844,7 @@ while (!done) break; default: - fprintf(outfile, "** Unknown option '%c'\n", pp[-1]); + fprintf(outfile, "** Unknown modifier '%c'\n", pp[-1]); goto SKIP_DATA; } } @@ -3788,7 +3867,6 @@ while (!done) if ((options & PCRE_UCP) != 0) cflags |= REG_UCP; if ((options & PCRE_UNGREEDY) != 0) cflags |= REG_UNGREEDY; - first_gotten_store = 0; rc = regcomp(&preg, (char *)p, cflags); /* Compilation failed; go back for another re, skipping to blank line @@ -3875,13 +3953,12 @@ while (!done) PCRE_COMPILE(re, p, options, &error, &erroroffset, tables); if (re != NULL) free(re); } - time_taken = clock() - start_time; + total_compile_time += (time_taken = clock() - start_time); fprintf(outfile, "Compile time %.4f milliseconds\n", (((double)time_taken * 1000.0) / (double)timeit) / (double)CLOCKS_PER_SEC); } - first_gotten_store = 0; PCRE_COMPILE(re, p, options, &error, &erroroffset, tables); /* Compilation failed; go back for another re, skipping to blank line @@ -3921,7 +3998,6 @@ while (!done) and remember the store that was got. */ true_size = REAL_PCRE_SIZE(re); - regex_gotten_store = first_gotten_store; /* Output code size information if requested */ @@ -3944,8 +4020,9 @@ while (!done) if (REAL_PCRE_FLAGS(re) & PCRE_MODE32) real_pcre_size = sizeof(real_pcre32); #endif + new_info(re, NULL, PCRE_INFO_SIZE, &size); fprintf(outfile, "Memory allocation (code space): %d\n", - (int)(first_gotten_store - real_pcre_size - name_count * name_entry_size)); + (int)(size - real_pcre_size - name_count * name_entry_size)); } /* If -s or /S was present, study the regex to generate additional info to @@ -3964,7 +4041,7 @@ while (!done) { PCRE_STUDY(extra, re, study_options, &error); } - time_taken = clock() - start_time; + total_study_time = (time_taken = clock() - start_time); if (extra != NULL) { PCRE_FREE_STUDY(extra); @@ -4020,12 +4097,11 @@ while (!done) pcre_uint32 first_char, need_char; pcre_uint32 match_limit, recursion_limit; int count, backrefmax, first_char_set, need_char_set, okpartial, jchanged, - hascrorlf, maxlookbehind; + hascrorlf, maxlookbehind, match_empty; int nameentrysize, namecount; const pcre_uint8 *nametable; - if (new_info(re, NULL, PCRE_INFO_SIZE, &size) + - new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) + + if (new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) + new_info(re, NULL, PCRE_INFO_BACKREFMAX, &backrefmax) + new_info(re, NULL, PCRE_INFO_FIRSTCHARACTER, &first_char) + new_info(re, NULL, PCRE_INFO_FIRSTCHARACTERFLAGS, &first_char_set) + @@ -4037,14 +4113,11 @@ while (!done) new_info(re, NULL, PCRE_INFO_OKPARTIAL, &okpartial) + new_info(re, NULL, PCRE_INFO_JCHANGED, &jchanged) + new_info(re, NULL, PCRE_INFO_HASCRORLF, &hascrorlf) + + new_info(re, NULL, PCRE_INFO_MATCH_EMPTY, &match_empty) + new_info(re, NULL, PCRE_INFO_MAXLOOKBEHIND, &maxlookbehind) != 0) goto SKIP_DATA; - if (size != regex_gotten_store) fprintf(outfile, - "Size disagreement: pcre_fullinfo=%d call to malloc for %d\n", - (int)size, (int)regex_gotten_store); - fprintf(outfile, "Capturing subpattern count = %d\n", count); if (backrefmax > 0) @@ -4085,14 +4158,15 @@ while (!done) } } - if (!okpartial) fprintf(outfile, "Partial matching not supported\n"); - if (hascrorlf) fprintf(outfile, "Contains explicit CR or LF match\n"); + if (!okpartial) fprintf(outfile, "Partial matching not supported\n"); + if (hascrorlf) fprintf(outfile, "Contains explicit CR or LF match\n"); + if (match_empty) fprintf(outfile, "May match empty string\n"); all_options = REAL_PCRE_OPTIONS(re); if (do_flip) all_options = swap_uint32(all_options); if (get_options == 0) fprintf(outfile, "No options\n"); - else fprintf(outfile, "Options:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", + else fprintf(outfile, "Options:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", ((get_options & PCRE_ANCHORED) != 0)? " anchored" : "", ((get_options & PCRE_CASELESS) != 0)? " caseless" : "", ((get_options & PCRE_EXTENDED) != 0)? " extended" : "", @@ -4105,6 +4179,7 @@ while (!done) ((get_options & PCRE_EXTRA) != 0)? " extra" : "", ((get_options & PCRE_UNGREEDY) != 0)? " ungreedy" : "", ((get_options & PCRE_NO_AUTO_CAPTURE) != 0)? " no_auto_capture" : "", + ((get_options & PCRE_NO_AUTO_POSSESS) != 0)? " no_auto_possessify" : "", ((get_options & PCRE_UTF8) != 0)? " utf" : "", ((get_options & PCRE_UCP) != 0)? " ucp" : "", ((get_options & PCRE_NO_UTF8_CHECK) != 0)? " no_utf_check" : "", @@ -4498,6 +4573,23 @@ while (!done) c = c * 8 + *p++ - '0'; break; + case 'o': + if (*p == '{') + { + pcre_uint8 *pt = p; + c = 0; + for (pt++; isdigit(*pt) && *pt != '8' && *pt != '9'; pt++) + { + if (++i == 12) + fprintf(outfile, "** Too many octal digits in \\o{...} item; " + "using only the first twelve.\n"); + else c = c * 8 + *pt - '0'; + } + if (*pt == '}') p = pt + 1; + else fprintf(outfile, "** Missing } after \\o{ (assumed)\n"); + } + break; + case 'x': if (*p == '{') { @@ -4740,7 +4832,7 @@ while (!done) case '<': { - int x = check_newline(p, outfile); + int x = check_mc_option(p, outfile, TRUE, "escape sequence"); if (x == 0) goto NEXT_DATA; options |= x; while (*p++ != '>'); @@ -4982,7 +5074,7 @@ while (!done) PCRE_EXEC(count, re, extra, bptr, len, start_offset, (options | g_notempty), use_offsets, use_size_offsets); } - time_taken = clock() - start_time; + total_match_time += (time_taken = clock() - start_time); fprintf(outfile, "Execute time %.4f milliseconds\n", (((double)time_taken * 1000.0) / (double)timeitm) / (double)CLOCKS_PER_SEC); @@ -5492,6 +5584,23 @@ while (!done) if (infile == stdin) fprintf(outfile, "\n"); +if (showtotaltimes) + { + fprintf(outfile, "--------------------------------------\n"); + if (timeit > 0) + { + fprintf(outfile, "Total compile time %.4f milliseconds\n", + (((double)total_compile_time * 1000.0) / (double)timeit) / + (double)CLOCKS_PER_SEC); + fprintf(outfile, "Total study time %.4f milliseconds\n", + (((double)total_study_time * 1000.0) / (double)timeit) / + (double)CLOCKS_PER_SEC); + } + fprintf(outfile, "Total execute time %.4f milliseconds\n", + (((double)total_match_time * 1000.0) / (double)timeitm) / + (double)CLOCKS_PER_SEC); + } + EXIT: if (infile != NULL && infile != stdin) fclose(infile); diff --git a/pcre/testdata/grepoutput b/pcre/testdata/grepoutput index cf04091f4a2..9bf9d9d62e9 100644 --- a/pcre/testdata/grepoutput +++ b/pcre/testdata/grepoutput @@ -740,3 +740,6 @@ RC=0 [1;31m[00m [1;31m[00mtriple: t7_txt s1_tag s_txt p_tag p_txt o_tag o_txt RC=0 +---------------------------- Test 106 ----------------------------- +a +RC=0 diff --git a/pcre/testdata/saved16 b/pcre/testdata/saved16 Binary files differindex 583c4342862..f86326c9f87 100644 --- a/pcre/testdata/saved16 +++ b/pcre/testdata/saved16 diff --git a/pcre/testdata/saved16BE-1 b/pcre/testdata/saved16BE-1 Binary files differindex e2e807d4fde..e6edddc6e0b 100644 --- a/pcre/testdata/saved16BE-1 +++ b/pcre/testdata/saved16BE-1 diff --git a/pcre/testdata/saved16BE-2 b/pcre/testdata/saved16BE-2 Binary files differindex cc2718aa1ea..c91ce37bd4f 100644 --- a/pcre/testdata/saved16BE-2 +++ b/pcre/testdata/saved16BE-2 diff --git a/pcre/testdata/saved16LE-1 b/pcre/testdata/saved16LE-1 Binary files differindex b037d4903e1..5035ec07215 100644 --- a/pcre/testdata/saved16LE-1 +++ b/pcre/testdata/saved16LE-1 diff --git a/pcre/testdata/saved16LE-2 b/pcre/testdata/saved16LE-2 Binary files differindex d7034f757fe..656c058d260 100644 --- a/pcre/testdata/saved16LE-2 +++ b/pcre/testdata/saved16LE-2 diff --git a/pcre/testdata/saved32 b/pcre/testdata/saved32 Binary files differindex 5b6fe34c948..a4e27041ce1 100644 --- a/pcre/testdata/saved32 +++ b/pcre/testdata/saved32 diff --git a/pcre/testdata/saved32BE-1 b/pcre/testdata/saved32BE-1 Binary files differindex ebe62ca7c66..b4c2ffe42cc 100644 --- a/pcre/testdata/saved32BE-1 +++ b/pcre/testdata/saved32BE-1 diff --git a/pcre/testdata/saved32BE-2 b/pcre/testdata/saved32BE-2 Binary files differindex 8168343931c..79bb5e88055 100644 --- a/pcre/testdata/saved32BE-2 +++ b/pcre/testdata/saved32BE-2 diff --git a/pcre/testdata/saved32LE-1 b/pcre/testdata/saved32LE-1 Binary files differindex e008f3a5a7c..49392b89a10 100644 --- a/pcre/testdata/saved32LE-1 +++ b/pcre/testdata/saved32LE-1 diff --git a/pcre/testdata/saved32LE-2 b/pcre/testdata/saved32LE-2 Binary files differindex cf3bd731928..5f64af9b9d5 100644 --- a/pcre/testdata/saved32LE-2 +++ b/pcre/testdata/saved32LE-2 diff --git a/pcre/testdata/saved8 b/pcre/testdata/saved8 Binary files differindex 37d733eedf3..8cf0c1312de 100644 --- a/pcre/testdata/saved8 +++ b/pcre/testdata/saved8 diff --git a/pcre/testdata/testinput1 b/pcre/testdata/testinput1 index e3050ef0a99..7b36360d044 100644 --- a/pcre/testdata/testinput1 +++ b/pcre/testdata/testinput1 @@ -1,6 +1,8 @@ /-- This set of tests is for features that are compatible with all versions of - Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and - 16-bit PCRE libraries. --/ + Perl >= 5.10, in non-UTF-8 mode. It should run clean for the 8-bit, 16-bit, + and 32-bit PCRE libraries. --/ + +< forbid 89?=ABCDEFfGILMNPTUWXZ< /the quick brown fox/ the quick brown fox @@ -1483,14 +1485,19 @@ abc\100\x30 abc\100\060 abc\100\60 + +/^A\8B\9C$/ + A8B9C + *** Failers + A\08B\09C + +/^(A)(B)(C)(D)(E)(F)(G)(H)(I)\8\9$/ + ABCDEFGHIHI -/abc\81/ - abc\081 - abc\0\x38\x31 - -/abc\91/ - abc\091 - abc\0\x39\x31 +/^[A\8B\9C]+$/ + A8B9C + *** Failers + A8B9C\x00 /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/ abcdefghijkllS @@ -3654,13 +3661,6 @@ /a*/g abbab -/^[a-\d]/ - abcde - -things - 0digit - *** Failers - bcdef - /^[\d-a]/ abcde -things @@ -4221,9 +4221,6 @@ ab bc -/^(?=(a)){0}b(?1)/ - backgammon - /^(?=(?1))?[az]([abc])d/ abd zcdxx @@ -5608,4 +5605,65 @@ AbcdCBefgBhiBqz aaaa aaa +/(?(?=ab)ab)/+ + ca + cd + +/(?:(?<n>foo)|(?<n>bar))\k<n>/J + foofoo + barbar + +/(?<n>A)(?:(?<n>foo)|(?<n>bar))\k<n>/J + AfooA + AbarA + ** Failers + Afoofoo + Abarbar + +/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/ + 1 IN SOA non-sp1 non-sp2( + +/^ (?:(?<A>A)|(?'B'B)(?<A>A)) (?('A')x) (?(<B>)y)$/xJ + Ax + BAxy + +/^A\xZ/ + A\0Z + +/^A\o{123}B/ + A\123B + +/ ^ a + + b $ /x + aaaab + +/ ^ a + #comment + + b $ /x + aaaab + +/ ^ a + #comment + #comment + + b $ /x + aaaab + +/ ^ (?> a + ) b $ /x + aaaab + +/ ^ ( a + ) + + \w $ /x + aaaab + +/(?:a\Kb)*+/+ + ababc + +/(?>a\Kb)*/+ + ababc + +/(?:a\Kb)*/+ + ababc + +/(a\Kb)*+/+ + ababc + +/(a\Kb)*/+ + ababc + /-- End of testinput1 --/ diff --git a/pcre/testdata/testinput10 b/pcre/testdata/testinput10 index 7f522e6af8f..93ddb3a75b7 100644 --- a/pcre/testdata/testinput10 +++ b/pcre/testdata/testinput10 @@ -139,6 +139,12 @@ /^\p{Cf}/8 \x{601} + \x{180e} + \x{061c} + \x{2066} + \x{2067} + \x{2068} + \x{2069} ** Failers \x{09f} @@ -199,11 +205,12 @@ /^\p{Mn}/8 \x{300} + \x{1a1b} ** Failers X \x{903} -/^\p{Nd}+/8 +/^\p{Nd}+/8O 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a} \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa} \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970} @@ -243,6 +250,8 @@ ] } \x{f3b} + \x{2309} + \x{230b} ** Failers X \x{203f} @@ -250,7 +259,7 @@ [ { \x{f3c} - + /^\p{Pf}/8 \x{bb} \x{2019} @@ -277,6 +286,8 @@ [ { \x{f3c} + \x{2308} + \x{230a} ** Failers X ) @@ -326,7 +337,6 @@ \ \ \x{a0} \x{1680} - \x{180e} \x{2000} \x{2001} ** Failers @@ -423,23 +433,23 @@ ** Failers 1234 -/\D+/8 +/\D+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/\P{Nd}+/8 +/\P{Nd}+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/[\D]+/8 +/[\D]+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/[\P{Nd}]+/8 +/[\P{Nd}]+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/[\D\P{Nd}]+/8 +/[\D\P{Nd}]+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -886,19 +896,19 @@ ** Failers \x{0b} -/^>\p{Xsp}+/8 +/^>\p{Xsp}+/8O > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} -/^>\p{Xsp}*/8 +/^>\p{Xsp}*/8O > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} -/^>\p{Xsp}{2,9}/8 +/^>\p{Xsp}{2,9}/8O > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} -/^>[\p{Xsp}]/8 +/^>[\p{Xsp}]/8O >\x{2028}\x{0b} -/^>[\p{Xsp}]+/8 +/^>[\p{Xsp}]+/8O > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} /^>\p{Xps}/8 @@ -1398,4 +1408,12 @@ `abc \x{1234}abc +/^A\s+Z/8W + A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + +/^A[\s]+Z/8W + A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + /-- End of testinput10 --/ diff --git a/pcre/testdata/testinput14 b/pcre/testdata/testinput14 index e5e85207cce..325ed9e361f 100644 --- a/pcre/testdata/testinput14 +++ b/pcre/testdata/testinput14 @@ -1,6 +1,9 @@ -/-- This set of tests is run only with the 8-bit library. It starts with all - the tests of the POSIX interface, because that is supported only with the - 8-bit library. --/ +/-- This set of tests is run only with the 8-bit library. They do not require + UTF-8 or Unicode property support. The file starts with all the tests of + the POSIX interface, because that is supported only with the 8-bit library. + --/ + +< forbid 8W /abc/P abc @@ -85,9 +88,12 @@ a\nb ** Failers (too big char) A\x{123}B + A\o{443}B /\x{100}/I +/\o{400}/I + / (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* # optional leading comment @@ -294,8 +300,12 @@ not matter. --/ /\h/SI +/\H/SI + /\v/SI +/\V/SI + /\R/SI /[\h]/BZ @@ -326,4 +336,8 @@ not matter. --/ /[\u0100-\u0200]/<JS> +/[^\x00-a]{12,}[^b-\xff]*/BZ + +/[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/BZ + /-- End of testinput14 --/ diff --git a/pcre/testdata/testinput15 b/pcre/testdata/testinput15 index 9aa8f6836a7..83e26773471 100644 --- a/pcre/testdata/testinput15 +++ b/pcre/testdata/testinput15 @@ -1,5 +1,7 @@ -/-- This set of tests is for UTF-8 support, and is relevant only to the 8-bit - library. --/ +/-- This set of tests is for UTF-8 support but not Unicode property support, + and is relevant only to the 8-bit library. --/ + +< forbid W /X(\C{3})/8 X\x{1234} @@ -47,7 +49,7 @@ /ÃÃÃxxx/8 -/ÃÃÃxxx/8?DZSS +/ÃÃÃxxx/8?DZSSO /badutf/8 \xdf diff --git a/pcre/testdata/testinput17 b/pcre/testdata/testinput17 index ba80318857b..1d933c7942c 100644 --- a/pcre/testdata/testinput17 +++ b/pcre/testdata/testinput17 @@ -1,6 +1,8 @@ /-- This set of tests is for the 16- and 32-bit library's basic (non-UTF-16 or -32) features that are not compatible with the 8-bit library, or which give different output in 16- or 32-bit mode. --/ + +< forbid 8W /a\Cb/ aXb @@ -293,4 +295,13 @@ /^\x{ffff}{0,3}/i \x{ffff} +/[^\x00-a]{12,}[^b-\xff]*/BZ + +/[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/BZ + +/a*[b-\x{200}]?a#a*[b-\x{200}]?b#[a-f]*[g-\x{200}]*#[g-\x{200}]*[a-c]*#[g-\x{200}]*[a-h]*/BZ + +/^[\x{1234}\x{4321}]{2,4}?/ + \x{1234}\x{1234}\x{1234} + /-- End of testinput17 --/ diff --git a/pcre/testdata/testinput18 b/pcre/testdata/testinput18 index 42bad1fa418..abff34e73a5 100644 --- a/pcre/testdata/testinput18 +++ b/pcre/testdata/testinput18 @@ -1,5 +1,7 @@ -/-- This set of tests is for UTF-16 and UTF-32 support, and is relevant only to the - 16- and 32-bit library. --/ +/-- This set of tests is for UTF-16 and UTF-32 support, and is relevant only to + the 16- and 32-bit libraries. --/ + +< forbid W /ÃÃÃxxx/8?DZSS diff --git a/pcre/testdata/testinput2 b/pcre/testdata/testinput2 index 6c82fb56df6..00924ee98fa 100644 --- a/pcre/testdata/testinput2 +++ b/pcre/testdata/testinput2 @@ -7,6 +7,8 @@ NOTE: This is a non-UTF set of tests. When UTF support is needed, use test 5, and if Unicode Property Support is needed, use test 7. --/ + +< forbid 8W /(a)b|/I @@ -829,7 +831,13 @@ /x++/DZ -/x{1,3}+/DZ +/x{1,3}+/BZO + +/x{1,3}+/BZOi + +/[^x]{1,3}+/BZO + +/[^x]{1,3}+/BZOi /(x)*+/DZ @@ -1495,6 +1503,8 @@ a2b\CA ** Failers a1b\CZ\CA + +/(?|(?<a>)(?<b>)(?<a>)|(?<a>)(?<b>)(?<a>))/IJ /^(?P<A>a)(?P<A>b)/IJ ab\CA @@ -1935,10 +1945,7 @@ a random value. /Ix /(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x abcabc1Xabc2XabcXabcabc -/(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x - -/(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x - abcabc1Xabc2XabcXabcabc +/(?<A> (?'B' abc (?(R) (?(R&C)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x /^(?(DEFINE) abc | xyz ) /x @@ -2055,7 +2062,7 @@ a random value. /Ix /^(a)\g{3/ -/^(a)\g{4a}/ +/^(a)\g{aa}/ /^a.b/<lf> a\rb @@ -2510,7 +2517,10 @@ a random value. /Ix ** Failers ab -/a(?!)+b/ +/a(?!)b/BZ + +/(?!)?a/BZ + ab /a(*FAIL)+b/ @@ -2535,7 +2545,9 @@ a random value. /Ix abcxypqr\Y /(*NO_START_OPT)xyz/C - abcxyz + abcxyz + +/(*NO_AUTO_POSSESS)a+b/BZ /xyz/CY abcxyz @@ -3482,6 +3494,8 @@ with \Y. ---/ /a[B-\Nc]/ +/a[B\Nc]/ + /(a)(?2){0,1999}?(b)/ /(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/ @@ -3837,4 +3851,198 @@ backtracking verbs. --/ aaaaaaaaaaaaaz aaaaaaaaaaaaaz\Q10 +/-- This test causes a segfault with Perl 5.18.0 --/ + +/^(?=(a)){0}b(?1)/ + backgammon + +/(?|(?<n>f)|(?<n>b))/JI + +/(?<a>abc)(?<a>z)\k<a>()/JDZS + +/a*[bcd]/BZ + +/[bcd]*a/BZ + +/-- A complete set of tests for auto-possessification of character types --/ + +/\D+\D \D+\d \D+\S \D+\s \D+\W \D+\w \D+. \D+\C \D+\R \D+\H \D+\h \D+\V \D+\v \D+\Z \D+\z \D+$/BZx + +/\d+\D \d+\d \d+\S \d+\s \d+\W \d+\w \d+. \d+\C \d+\R \d+\H \d+\h \d+\V \d+\v \d+\Z \d+\z \d+$/BZx + +/\S+\D \S+\d \S+\S \S+\s \S+\W \S+\w \S+. \S+\C \S+\R \S+\H \S+\h \S+\V \S+\v \S+\Z \S+\z \S+$/BZx + +/\s+\D \s+\d \s+\S \s+\s \s+\W \s+\w \s+. \s+\C \s+\R \s+\H \s+\h \s+\V \s+\v \s+\Z \s+\z \s+$/BZx + +/\W+\D \W+\d \W+\S \W+\s \W+\W \W+\w \W+. \W+\C \W+\R \W+\H \W+\h \W+\V \W+\v \W+\Z \W+\z \W+$/BZx + +/\w+\D \w+\d \w+\S \w+\s \w+\W \w+\w \w+. \w+\C \w+\R \w+\H \w+\h \w+\V \w+\v \w+\Z \w+\z \w+$/BZx + +/\C+\D \C+\d \C+\S \C+\s \C+\W \C+\w \C+. \C+\C \C+\R \C+\H \C+\h \C+\V \C+\v \C+\Z \C+\z \C+$/BZx + +/\R+\D \R+\d \R+\S \R+\s \R+\W \R+\w \R+. \R+\C \R+\R \R+\H \R+\h \R+\V \R+\v \R+\Z \R+\z \R+$/BZx + +/\H+\D \H+\d \H+\S \H+\s \H+\W \H+\w \H+. \H+\C \H+\R \H+\H \H+\h \H+\V \H+\v \H+\Z \H+\z \H+$/BZx + +/\h+\D \h+\d \h+\S \h+\s \h+\W \h+\w \h+. \h+\C \h+\R \h+\H \h+\h \h+\V \h+\v \h+\Z \h+\z \h+$/BZx + +/\V+\D \V+\d \V+\S \V+\s \V+\W \V+\w \V+. \V+\C \V+\R \V+\H \V+\h \V+\V \V+\v \V+\Z \V+\z \V+$/BZx + +/\v+\D \v+\d \v+\S \v+\s \v+\W \v+\w \v+. \v+\C \v+\R \v+\H \v+\h \v+\V \v+\v \v+\Z \v+\z \v+$/BZx + +/ a+\D a+\d a+\S a+\s a+\W a+\w a+. a+\C a+\R a+\H a+\h a+\V a+\v a+\Z a+\z a+$/BZx + +/\n+\D \n+\d \n+\S \n+\s \n+\W \n+\w \n+. \n+\C \n+\R \n+\H \n+\h \n+\V \n+\v \n+\Z \n+\z \n+$/BZx + +/ .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\C .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/BZx + +/ .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\C .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/BZxs + +/\D+$ \d+$ \S+$ \s+$ \W+$ \w+$ \C+$ \R+$ \H+$ \h+$ \V+$ \v+$ a+$ \n+$ .+$ .+$/BZxm + +/(?=a+)a(a+)++a/BZ + +/a+(bb|cc)a+(?:bb|cc)a+(?>bb|cc)a+(?:bb|cc)+a+(aa)a+(?:bb|aa)/BZ + +/a+(bb|cc)?#a+(?:bb|cc)??#a+(?:bb|cc)?+#a+(?:bb|cc)*#a+(bb|cc)?a#a+(?:aa)?/BZ + +/a+(?:bb)?a#a+(?:|||)#a+(?:|b)a#a+(?:|||)?a/BZ + +/[ab]*/BZ + aaaa + +/[ab]*?/BZ + aaaa + +/[ab]?/BZ + aaaa + +/[ab]??/BZ + aaaa + +/[ab]+/BZ + aaaa + +/[ab]+?/BZ + aaaa + +/[ab]{2,3}/BZ + aaaa + +/[ab]{2,3}?/BZ + aaaa + +/[ab]{2,}/BZ + aaaa + +/[ab]{2,}?/BZ + aaaa + +/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/BZ + +/[a-d]{5,12}[e-z0-9]*#[^a-z]+[b-y]*a[2-7]?[^0-9a-z]+/BZ + +/[a-z]*\s#[ \t]?\S#[a-c]*\S#[C-G]+?\d#[4-8]*\D#[4-9,]*\D#[!$]{0,5}\w#[M-Xf-l]+\W#[a-c,]?\W/BZ + +/a+(aa|bb)*c#a*(bb|cc)*a#a?(bb|cc)*d#[a-f]*(g|hh)*f/BZ + +/[a-f]*(g|hh|i)*i#[a-x]{4,}(y{0,6})*y#[a-k]+(ll|mm)+n/BZ + +/[a-f]*(?>gg|hh)+#[a-f]*(?>gg|hh)?#[a-f]*(?>gg|hh)*a#[a-f]*(?>gg|hh)*h/BZ + +/[a-c]*d/DZS + +/[a-c]+d/DZS + +/[a-c]?d/DZS + +/[a-c]{4,6}d/DZS + +/[a-c]{0,6}d/DZS + +/-- End of special auto-possessive tests --/ + +/^A\o{1239}B/ + A\123B + +/^A\oB/ + +/^A\x{zz}B/ + +/^A\x{12Z/ + +/^A\x{/ + +/[ab]++/BZO + +/[^ab]*+/BZO + +/a{4}+/BZO + +/a{4}+/BZOi + +/[a-[:digit:]]+/ + +/[A-[:digit:]]+/ + +/[a-[.xxx.]]+/ + +/[a-[=xxx=]]+/ + +/[a-[!xxx!]]+/ + +/[A-[!xxx!]]+/ + A]]] + +/[a-\d]+/ + +/(?<0abc>xx)/ + +/(?&1abc)xx(?<1abc>y)/ + +/(?<ab-cd>xx)/ + +/(?'0abc'xx)/ + +/(?P<0abc>xx)/ + +/\k<5ghj>/ + +/\k'5ghj'/ + +/\k{2fgh}/ + +/(?P=8yuki)/ + +/\g{4df}/ + +/(?&1abc)xx(?<1abc>y)/ + +/(?P>1abc)xx(?<1abc>y)/ + +/\g'3gh'/ + +/\g<5fg>/ + +/(?(<4gh>)abc)/ + +/(?('4gh')abc)/ + +/(?(4gh)abc)/ + +/(?(R&6yh)abc)/ + +/-- Test the ugly "start or end of word" compatibility syntax --/ + +/[[:<:]]red[[:>:]]/BZ + little red riding hood + a /red/ thing + red is a colour + put it all on red + ** Failers + no reduction + Alfred Winifred + +/[a[:<:]] should give error/ + /-- End of testinput2 --/ diff --git a/pcre/testdata/testinput21 b/pcre/testdata/testinput21 index b285d637526..30895eef2d0 100644 --- a/pcre/testdata/testinput21 +++ b/pcre/testdata/testinput21 @@ -4,7 +4,11 @@ typical). The others require the link size to be 2. */x <!testsaved8 -%-- Generated from: ^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]|[^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ +%-- Generated from: + /^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]| + [^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ + /x + In 16-bit mode with options: S>testdata/saved16LE-1 FS>testdata/saved16BE-1 In 32-bit mode with options: S>testdata/saved32LE-1 diff --git a/pcre/testdata/testinput22 b/pcre/testdata/testinput22 index 58239f1f79c..ca408dbee97 100644 --- a/pcre/testdata/testinput22 +++ b/pcre/testdata/testinput22 @@ -1,10 +1,15 @@ /-- Tests for reloading pre-compile patterns with UTF-16 or UTF-32 support. */ -%-- Generated from: (?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,}[\x{f123}\x{10039}\x{20000}-\x{21234}]?|[A-Cx-z\x{100000}-\x{1000a7}\x{101234}])(?<cb2>[^az]) - In 16-bit mode with options: S8>testdata/saved16LE-1 - FS8>testdata/saved16BE-1 - In 32-bit mode with options: S8>testdata/saved32LE-1 - FS8testdata/saved32BE-1 +%-- Generated from: + /(?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,} + [\x{f123}\x{10039}\x{20000}-\x{21234}]?| + [A-Cx-z\x{100000}-\x{1000a7}\x{101234}]) + (?<cb2>[^az])/x + + In 16-bit mode with options: S8>testdata/saved16LE-2 + FS8>testdata/saved16BE-2 + In 32-bit mode with options: S8>testdata/saved32LE-2 + FS8>testdata/saved32BE-2 --%8x <!testsaved16LE-2 diff --git a/pcre/testdata/testinput23 b/pcre/testdata/testinput23 index 961ae35d445..0fdbae7c577 100644 --- a/pcre/testdata/testinput23 +++ b/pcre/testdata/testinput23 @@ -1,5 +1,7 @@ /-- Tests for the 16-bit library only */ +< forbid 8W + /-- Check maximum non-UTF character size --/ /\x{ffff}/ @@ -7,6 +9,8 @@ /\x{10000}/ +/\o{20000}/ + /-- Check character ranges --/ /[\H]/BZSI diff --git a/pcre/testdata/testinput24 b/pcre/testdata/testinput24 index 71a400ed138..23eb84e55d1 100644 --- a/pcre/testdata/testinput24 +++ b/pcre/testdata/testinput24 @@ -1,5 +1,7 @@ /-- Tests for the 16-bit library with UTF-16 support only */ +< forbid W + /bad/8 \x{d800} diff --git a/pcre/testdata/testinput25 b/pcre/testdata/testinput25 index 2d65fd7b03e..ce9d9e19a40 100644 --- a/pcre/testdata/testinput25 +++ b/pcre/testdata/testinput25 @@ -1,5 +1,7 @@ /-- Tests for the 32-bit library only */ +< forbid 8w + /-- Check maximum character size --/ /\x{110000}/ @@ -10,6 +12,16 @@ /\x{ffffffff}/ +/\x{100000000}/ + +/\o{17777777777}/ + +/\o{20000000000}/ + +/\o{37777777777}/ + +/\o{40000000000}/ + /\x{7fffffff}\x{7fffffff}/I /\x{80000000}\x{80000000}/I diff --git a/pcre/testdata/testinput26 b/pcre/testdata/testinput26 index 643a1d1cdbf..6b56ac1cc56 100644 --- a/pcre/testdata/testinput26 +++ b/pcre/testdata/testinput26 @@ -1,9 +1,13 @@ /-- Tests for the 32-bit library with UTF-32 support only */ +< forbid W + /-- Non-UTF characters --/ /\x{110000}/8 +/\o{4200000}/8 + /\C/8 \x{110000} diff --git a/pcre/testdata/testinput3 b/pcre/testdata/testinput3 index 6fea2f5b3bd..1d2e855386a 100644 --- a/pcre/testdata/testinput3 +++ b/pcre/testdata/testinput3 @@ -1,6 +1,8 @@ /-- This set of tests checks local-specific features, using the fr_FR locale. It is not Perl-compatible. There is different version called wintestinput3 f or use on Windows, where the locale is called "french". --/ + +< forbid 8W /^[\w]+/ *** Failers diff --git a/pcre/testdata/testinput4 b/pcre/testdata/testinput4 index b9f1a72e4f2..983f7a119b5 100644 --- a/pcre/testdata/testinput4 +++ b/pcre/testdata/testinput4 @@ -1,6 +1,8 @@ /-- This set of tests is for UTF support, excluding Unicode properties. It is compatible with all versions of Perl >= 5.10 and both the 8-bit and 16-bit PCRE libraries. --/ + +< forbid 9?=ABCDEFfGILMNPTUWXZ< /a.b/8 acb @@ -711,4 +713,7 @@ \x{100}\x{100}\x{100}\x{100} \x{100}\x{100}\x{100} +/^a+[a\x{200}]/8 + aa + /-- End of testinput4 --/ diff --git a/pcre/testdata/testinput5 b/pcre/testdata/testinput5 index 642749c315c..9e9a22a1a1f 100644 --- a/pcre/testdata/testinput5 +++ b/pcre/testdata/testinput5 @@ -1,21 +1,37 @@ /-- This set of tests checks the API, internals, and non-Perl stuff for UTF support, excluding Unicode properties. However, tests that give different results in 8-bit and 16-bit modes are excluded (see tests 16 and 17). --/ + +< forbid W /\x{110000}/8DZ +/\o{4200000}/8DZ + /\x{ffffffff}/8 +/\o{37777777777}/8 + /\x{100000000}/8 +/\o{77777777777}/8 + /\x{d800}/8 +/\o{154000}/8 + /\x{dfff}/8 +/\o{157777}/8 + /\x{d7ff}/8 +/\o{153777}/8 + /\x{e000}/8 +/\o{170000}/8 + /^\x{100}a\x{1234}/8 \x{100}a\x{1234}bcd @@ -769,4 +785,7 @@ /\ud800/<JS>8 +/^a+[a\x{200}]/8BZ + aa + /-- End of testinput5 --/ diff --git a/pcre/testdata/testinput6 b/pcre/testdata/testinput6 index adbf621a98e..1e450be04d3 100644 --- a/pcre/testdata/testinput6 +++ b/pcre/testdata/testinput6 @@ -1,5 +1,7 @@ /-- This set of tests is for Unicode property support. It is compatible with Perl >= 5.15. --/ + +< forbid 9?=ABCDEFfGILMNPTUXZ< /^\pC\pL\pM\pN\pP\pS\pZ</8 \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}< @@ -325,12 +327,6 @@ ** Failers abc -/\p{Lu}/8i - A - aZ - ** Failers - abc - /\p{Ll}/8 a Az @@ -425,6 +421,7 @@ /^[\p{Arabic}]/8 \x{06e9} \x{060b} + \x{061c} ** Failers X\x{06e9} @@ -882,6 +879,15 @@ \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X +/\X*Z/8Y + A\x{300} + +/\X*(.)/8Y + A\x{1111}\x{ae4c}\x{1169} + +/\X?abc/8Y +\xff\x7f\x00\x00\x03\x00\x41\xcc\x80\x41\x{300}\x61\x62\x63\x00\>06\? + /-- --/ /\x{1e9e}+/8i @@ -1319,9 +1325,163 @@ /^\p{Any}*\d{4}/8 1234 123 - + /^\X*\w{4}/8 1234 123 - + +/^A\s+Z/8W + A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + +/^A[\s]+Z/8W + A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + +/^[[:graph:]]+$/8W + Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + ** Failers + \x{09} + \x{0a} + \x{1D} + \x{20} + \x{85} + \x{a0} + \x{61c} + \x{1680} + \x{180e} + \x{2028} + \x{2029} + \x{202f} + \x{2065} + \x{2066} + \x{2067} + \x{2068} + \x{2069} + \x{3000} + \x{e0002} + \x{e001f} + \x{e0080} + +/^[[:print:]]+$/8W + Space: \x{a0} + \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} + \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} + \x{202f}\x{205f} + \x{3000} + Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{180e} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{202f} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + ** Failers + \x{09} + \x{1D} + \x{85} + \x{61c} + \x{2028} + \x{2029} + \x{2065} + \x{2066} + \x{2067} + \x{2068} + \x{2069} + \x{e0002} + \x{e001f} + \x{e0080} + +/^[[:punct:]]+$/8W + \$+<=>^`|~ + !\"#%&'()*,-./:;?@[\\]_{} + \x{a1}\x{a7} + \x{37e} + ** Failers + abcde + +/^[[:^graph:]]+$/8W + \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{61c}\x{1680}\x{180e} + \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069} + \x{3000}\x{e0002}\x{e001f}\x{e0080} + ** Failers + Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + +/^[[:^print:]]+$/8W + \x{09}\x{1D}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067} + \x{2068}\x{2069}\x{e0002}\x{e001f}\x{e0080} + ** Failers + Space: \x{a0} + \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} + \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} + \x{202f}\x{205f} + \x{3000} + Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{180e} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{202f} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + +/^[[:^punct:]]+$/8W + abcde + ** Failers + \$+<=>^`|~ + !\"#%&'()*,-./:;?@[\\]_{} + \x{a1}\x{a7} + \x{37e} + /-- End of testinput6 --/ diff --git a/pcre/testdata/testinput7 b/pcre/testdata/testinput7 index 24c00d278b4..9d145436350 100644 --- a/pcre/testdata/testinput7 +++ b/pcre/testdata/testinput7 @@ -100,11 +100,30 @@ /\p{Cc}{2}+/8BZ +/^\p{Cf}/8 + \x{180e} + \x{061c} + \x{2066} + \x{2067} + \x{2068} + \x{2069} + /^\p{Cs}/8 \?\x{dfff} ** Failers \x{09f} +/^\p{Mn}/8 + \x{1a1b} + +/^\p{Pe}/8 + \x{2309} + \x{230b} + +/^\p{Ps}/8 + \x{2308} + \x{230a} + /^\p{Sc}+/8 $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6} \x{9f2} @@ -116,15 +135,15 @@ \ \ \x{a0} \x{1680} - \x{180e} \x{2000} \x{2001} ** Failers \x{2028} \x{200d} -/-- These four are here rather than in test 6 because Perl has problems with - the negative versions of the properties. --/ +/-- These are here rather than in test 6 because Perl has problems with + the negative versions of the properties and behaves has changed how + it behaves for caseless matching. --/ /\p{^Lu}/8i 1234 @@ -149,6 +168,12 @@ a \x{1d00} +/\p{Lu}/8i + A + aZ + ** Failers + abc + /[\x{c0}\x{391}]/8i \x{c0} \x{e0} @@ -734,5 +759,74 @@ of case for anything other than the ASCII letters. --/ @abc `abc \x{1234}abc + +/-- Some auto-possessification tests --/ + +/\pN+\z/BZ + +/\PN+\z/BZ + +/\pN+/BZ + +/\PN+/BZ + +/\p{Any}+\p{Any} \p{Any}+\P{Any} \p{Any}+\p{L&} \p{Any}+\p{L} \p{Any}+\p{Lu} \p{Any}+\p{Han} \p{Any}+\p{Xan} \p{Any}+\p{Xsp} \p{Any}+\p{Xps} \p{Xwd}+\p{Any} \p{Any}+\p{Xuc}/BWZx + +/\p{L&}+\p{Any} \p{L&}+\p{L&} \P{L&}+\p{L&} \p{L&}+\p{L} \p{L&}+\p{Lu} \p{L&}+\p{Han} \p{L&}+\p{Xan} \p{L&}+\P{Xan} \p{L&}+\p{Xsp} \p{L&}+\p{Xps} \p{Xwd}+\p{L&} \p{L&}+\p{Xuc}/BWZx + +/\p{N}+\p{Any} \p{N}+\p{L&} \p{N}+\p{L} \p{N}+\P{L} \p{N}+\P{N} \p{N}+\p{Lu} \p{N}+\p{Han} \p{N}+\p{Xan} \p{N}+\p{Xsp} \p{N}+\p{Xps} \p{Xwd}+\p{N} \p{N}+\p{Xuc}/BWZx + +/\p{Lu}+\p{Any} \p{Lu}+\p{L&} \p{Lu}+\p{L} \p{Lu}+\p{Lu} \P{Lu}+\p{Lu} \p{Lu}+\p{Nd} \p{Lu}+\P{Nd} \p{Lu}+\p{Han} \p{Lu}+\p{Xan} \p{Lu}+\p{Xsp} \p{Lu}+\p{Xps} \p{Xwd}+\p{Lu} \p{Lu}+\p{Xuc}/BWZx + +/\p{Han}+\p{Lu} \p{Han}+\p{L&} \p{Han}+\p{L} \p{Han}+\p{Lu} \p{Han}+\p{Arabic} \p{Arabic}+\p{Arabic} \p{Han}+\p{Xan} \p{Han}+\p{Xsp} \p{Han}+\p{Xps} \p{Xwd}+\p{Han} \p{Han}+\p{Xuc}/BWZx + +/\p{Xan}+\p{Any} \p{Xan}+\p{L&} \P{Xan}+\p{L&} \p{Xan}+\p{L} \p{Xan}+\p{Lu} \p{Xan}+\p{Han} \p{Xan}+\p{Xan} \p{Xan}+\P{Xan} \p{Xan}+\p{Xsp} \p{Xan}+\p{Xps} \p{Xwd}+\p{Xan} \p{Xan}+\p{Xuc}/BWZx + +/\p{Xsp}+\p{Any} \p{Xsp}+\p{L&} \p{Xsp}+\p{L} \p{Xsp}+\p{Lu} \p{Xsp}+\p{Han} \p{Xsp}+\p{Xan} \p{Xsp}+\p{Xsp} \P{Xsp}+\p{Xsp} \p{Xsp}+\p{Xps} \p{Xwd}+\p{Xsp} \p{Xsp}+\p{Xuc}/BWZx + +/\p{Xwd}+\p{Any} \p{Xwd}+\p{L&} \p{Xwd}+\p{L} \p{Xwd}+\p{Lu} \p{Xwd}+\p{Han} \p{Xwd}+\p{Xan} \p{Xwd}+\p{Xsp} \p{Xwd}+\p{Xps} \p{Xwd}+\p{Xwd} \p{Xwd}+\P{Xwd} \p{Xwd}+\p{Xuc}/BWZx + +/\p{Xuc}+\p{Any} \p{Xuc}+\p{L&} \p{Xuc}+\p{L} \p{Xuc}+\p{Lu} \p{Xuc}+\p{Han} \p{Xuc}+\p{Xan} \p{Xuc}+\p{Xsp} \p{Xuc}+\p{Xps} \p{Xwd}+\p{Xuc} \p{Xuc}+\p{Xuc} \p{Xuc}+\P{Xuc}/BWZx + +/\p{N}+\p{Ll} \p{N}+\p{Nd} \p{N}+\P{Nd}/BWZx + +/\p{Xan}+\p{L} \p{Xan}+\p{N} \p{Xan}+\p{C} \p{Xan}+\P{L} \P{Xan}+\p{N} \p{Xan}+\P{C}/BWZx + +/\p{L}+\p{Xan} \p{N}+\p{Xan} \p{C}+\p{Xan} \P{L}+\p{Xan} \p{N}+\p{Xan} \P{C}+\p{Xan} \p{L}+\P{Xan}/BWZx + +/\p{Xan}+\p{Lu} \p{Xan}+\p{Nd} \p{Xan}+\p{Cc} \p{Xan}+\P{Ll} \P{Xan}+\p{No} \p{Xan}+\P{Cf}/BWZx + +/\p{Lu}+\p{Xan} \p{Nd}+\p{Xan} \p{Cs}+\p{Xan} \P{Lt}+\p{Xan} \p{Nl}+\p{Xan} \P{Cc}+\p{Xan} \p{Lt}+\P{Xan}/BWZx + +/\w+\p{P} \w+\p{Po} \w+\s \p{Xan}+\s \s+\p{Xan} \s+\w/BWZx + +/\w+\P{P} \W+\p{Po} \w+\S \P{Xan}+\s \s+\P{Xan} \s+\W/BWZx + +/\w+\p{Po} \w+\p{Pc} \W+\p{Po} \W+\p{Pc} \w+\P{Po} \w+\P{Pc}/BWZx + +/\p{Nl}+\p{Xan} \P{Nl}+\p{Xan} \p{Nl}+\P{Xan} \P{Nl}+\P{Xan}/BWZx + +/\p{Xan}+\p{Nl} \P{Xan}+\p{Nl} \p{Xan}+\P{Nl} \P{Xan}+\P{Nl}/BWZx + +/\p{Xan}+\p{Nd} \P{Xan}+\p{Nd} \p{Xan}+\P{Nd} \P{Xan}+\P{Nd}/BWZx + +/-- End auto-possessification tests --/ + +/\w+/8CWBZ + abcd + +/[\p{N}]?+/BZO + +/[\p{L}ab]{2,3}+/BZO + +/\D+\X \d+\X \S+\X \s+\X \W+\X \w+\X \C+\X \R+\X \H+\X \h+\X \V+\X \v+\X a+\X \n+\X .+\X/BZx + +/.+\X/BZxs + +/\X+$/BZxm + +/\X+\D \X+\d \X+\S \X+\s \X+\W \X+\w \X+. \X+\C \X+\R \X+\H \X+\h \X+\V \X+\v \X+\X \X+\Z \X+\z \X+$/BZx + +/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/8WBZ /-- End of testinput7 --/ diff --git a/pcre/testdata/testinput8 b/pcre/testdata/testinput8 index d91013bb2be..bb2747b120d 100644 --- a/pcre/testdata/testinput8 +++ b/pcre/testdata/testinput8 @@ -1,5 +1,8 @@ -/-- This set of tests check the DFA matching functionality of pcre_dfa_exec(). - The -dfa flag must be used with pcretest when running it. --/ +/-- This set of tests check the DFA matching functionality of pcre_dfa_exec(), + excluding UTF and Unicode property support. The -dfa flag must be used with + pcretest when running it. --/ + +< forbid 8W /abc/ abc @@ -16,7 +19,7 @@ ac ab -/a*/ +/a*/O a aaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -177,19 +180,19 @@ ayzq axyzq -/[^a]+/ +/[^a]+/O bac bcdefax *** Failers aaaaa -/[^a]*/ +/[^a]*/O bac bcdefax *** Failers aaaaa -/[^a]{3,5}/ +/[^a]{3,5}/O xyz awxyza abcdefa @@ -937,16 +940,16 @@ *** Failers the abc -/^[ab]{1,3}(ab*|b)/ +/^[ab]{1,3}(ab*|b)/O aabbbbb -/^[ab]{1,3}?(ab*|b)/ +/^[ab]{1,3}?(ab*|b)/O aabbbbb -/^[ab]{1,3}?(ab*?|b)/ +/^[ab]{1,3}?(ab*?|b)/O aabbbbb -/^[ab]{1,3}(ab*?|b)/ +/^[ab]{1,3}(ab*?|b)/O aabbbbb / (?: [\040\t] | \( @@ -1923,14 +1926,16 @@ abc\100\060 abc\100\60 -/abc\81/ - abc\081 - abc\0\x38\x31 - -/abc\91/ - abc\091 - abc\0\x39\x31 - +/^A\8B\9C$/ + A8B9C + *** Failers + A\08B\09C + +/^[A\8B\9C]+$/ + A8B9C + *** Failers + A8B9C\x00 + /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/ abcdefghijk\12S @@ -2049,13 +2054,13 @@ /foo(.*?)bar/ The food is under the bar in the barn. -/(.*)(\d*)/ +/(.*)(\d*)/O I have 2 numbers: 53147 /(.*)(\d+)/ I have 2 numbers: 53147 -/(.*?)(\d*)/ +/(.*?)(\d*)/O I have 2 numbers: 53147 /(.*?)(\d+)/ @@ -3825,13 +3830,6 @@ /a*/g abbab -/^[a-\d]/ - abcde - -things - 0digit - *** Failers - bcdef - /^[\d-a]/ abcde -things @@ -4699,7 +4697,7 @@ /(?(R)a*(?1)|((?R))b)/ aaaabcde -/(a+)/ +/(a+)/O \O6aaaa \O8aaaa @@ -4801,4 +4799,36 @@ /abcd/ abcd\O0 +/-- These tests show up auto-possessification --/ + +/[ab]*/ + aaaa + +/[ab]*?/ + aaaa + +/[ab]?/ + aaaa + +/[ab]??/ + aaaa + +/[ab]+/ + aaaa + +/[ab]+?/ + aaaa + +/[ab]{2,3}/ + aaaa + +/[ab]{2,3}?/ + aaaa + +/[ab]{2,}/ + aaaa + +/[ab]{2,}?/ + aaaa + /-- End of testinput8 --/ diff --git a/pcre/testdata/testinput9 b/pcre/testdata/testinput9 index 766c9c0fb6f..4575ffe3198 100644 --- a/pcre/testdata/testinput9 +++ b/pcre/testdata/testinput9 @@ -1,6 +1,8 @@ /-- This set of tests checks UTF-8 support with the DFA matching functionality - of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running - it. --/ + of pcre_dfa_exec(), excluding Unicode property support. The -dfa flag must + be used with pcretest when running it. --/ + +< forbid W /\x{100}ab/8 \x{100}ab @@ -239,16 +241,16 @@ /\x{100}{3,5}/8 abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX -/\x{100}{3,}/8 +/\x{100}{3,}/8O abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX /(?<=a\x{100}{2}b)X/8 Xyyya\x{100}\x{100}bXzzz -/\D*/8 +/\D*/8O aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/\D*/8 +/\D*/8O \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} /\D/8 @@ -584,16 +586,16 @@ a\n\n\n\rb a\r -/\h+\V?\v{3,4}/8 +/\h+\V?\v{3,4}/8O \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a -/\V?\v{3,4}/8 +/\V?\v{3,4}/8O \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a -/\h+\V?\v{3,4}/8 +/\h+\V?\v{3,4}/8O >\x09\x20\x{a0}X\x0a\x0a\x0a< -/\V?\v{3,4}/8 +/\V?\v{3,4}/8O >\x09\x20\x{a0}X\x0a\x0a\x0a< /\H\h\V\v/8 @@ -602,7 +604,7 @@ ** Failers \x{a0} X\x0a -/\H*\h+\V?\v{3,4}/8 +/\H*\h+\V?\v{3,4}/8O \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a \x09\x20\x{a0}\x0a\x0b\x0c @@ -615,7 +617,7 @@ ** Failers \x{2009} X\x0a -/\H*\h+\V?\v{3,4}/8 +/\H*\h+\V?\v{3,4}/8O \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a \x09\x20\x{202f}\x0a\x0b\x0c diff --git a/pcre/testdata/testoutput1 b/pcre/testdata/testoutput1 index 3ed635146a4..4dafc0496ab 100644 --- a/pcre/testdata/testoutput1 +++ b/pcre/testdata/testoutput1 @@ -1,6 +1,8 @@ /-- This set of tests is for features that are compatible with all versions of - Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and - 16-bit PCRE libraries. --/ + Perl >= 5.10, in non-UTF-8 mode. It should run clean for the 8-bit, 16-bit, + and 32-bit PCRE libraries. --/ + +< forbid 89?=ABCDEFfGILMNPTUWXZ< /the quick brown fox/ the quick brown fox @@ -2149,18 +2151,35 @@ No match abc\100\60 0: abc@0 1: abc - -/abc\81/ - abc\081 - 0: abc\x0081 - abc\0\x38\x31 - 0: abc\x0081 - -/abc\91/ - abc\091 - 0: abc\x0091 - abc\0\x39\x31 - 0: abc\x0091 + +/^A\8B\9C$/ + A8B9C + 0: A8B9C + *** Failers +No match + A\08B\09C +No match + +/^(A)(B)(C)(D)(E)(F)(G)(H)(I)\8\9$/ + ABCDEFGHIHI + 0: ABCDEFGHIHI + 1: A + 2: B + 3: C + 4: D + 5: E + 6: F + 7: G + 8: H + 9: I + +/^[A\8B\9C]+$/ + A8B9C + 0: A8B9C + *** Failers +No match + A8B9C\x00 +No match /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/ abcdefghijkllS @@ -5972,18 +5991,6 @@ No match 0: 0: -/^[a-\d]/ - abcde - 0: a - -things - 0: - - 0digit - 0: 0 - *** Failers -No match - bcdef -No match - /^[\d-a]/ abcde 0: a @@ -6006,15 +6013,15 @@ No match /[\s]+/ > \x09\x0a\x0c\x0d\x0b< - 0: \x09\x0a\x0c\x0d + 0: \x09\x0a\x0c\x0d\x0b /\s+/ > \x09\x0a\x0c\x0d\x0b< - 0: \x09\x0a\x0c\x0d + 0: \x09\x0a\x0c\x0d\x0b /ab/x ab -No match + 0: ab /(?!\A)x/m a\nxb\n @@ -6904,10 +6911,6 @@ No match bc 0: b -/^(?=(a)){0}b(?1)/ - backgammon - 0: ba - /^(?=(?1))?[az]([abc])d/ abd 0: abd @@ -9200,4 +9203,114 @@ No match aaa No match +/(?(?=ab)ab)/+ + ca + 0: + 0+ ca + cd + 0: + 0+ cd + +/(?:(?<n>foo)|(?<n>bar))\k<n>/J + foofoo + 0: foofoo + 1: foo + barbar + 0: barbar + 1: <unset> + 2: bar + +/(?<n>A)(?:(?<n>foo)|(?<n>bar))\k<n>/J + AfooA + 0: AfooA + 1: A + 2: foo + AbarA + 0: AbarA + 1: A + 2: <unset> + 3: bar + ** Failers +No match + Afoofoo +No match + Abarbar +No match + +/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/ + 1 IN SOA non-sp1 non-sp2( + 0: 1 IN SOA non-sp1 non-sp2( + 1: 1 + 2: non-sp1 + 3: non-sp2 + +/^ (?:(?<A>A)|(?'B'B)(?<A>A)) (?('A')x) (?(<B>)y)$/xJ + Ax + 0: Ax + 1: A + BAxy + 0: BAxy + 1: <unset> + 2: B + 3: A + +/^A\xZ/ + A\0Z + 0: A\x00Z + +/^A\o{123}B/ + A\123B + 0: ASB + +/ ^ a + + b $ /x + aaaab + 0: aaaab + +/ ^ a + #comment + + b $ /x + aaaab + 0: aaaab + +/ ^ a + #comment + #comment + + b $ /x + aaaab + 0: aaaab + +/ ^ (?> a + ) b $ /x + aaaab + 0: aaaab + +/ ^ ( a + ) + + \w $ /x + aaaab + 0: aaaab + 1: aaaa + +/(?:a\Kb)*+/+ + ababc + 0: b + 0+ c + +/(?>a\Kb)*/+ + ababc + 0: b + 0+ c + +/(?:a\Kb)*/+ + ababc + 0: b + 0+ c + +/(a\Kb)*+/+ + ababc + 0: b + 0+ c + 1: ab + +/(a\Kb)*/+ + ababc + 0: b + 0+ c + 1: ab + /-- End of testinput1 --/ diff --git a/pcre/testdata/testoutput10 b/pcre/testdata/testoutput10 index 0e04205bb88..b89169cdd3c 100644 --- a/pcre/testdata/testoutput10 +++ b/pcre/testdata/testoutput10 @@ -39,9 +39,6 @@ No match /^\pL+/8 abcd 0: abcd - 1: abc - 2: ab - 3: a a 0: a *** Failers @@ -50,45 +47,24 @@ No match /^\PL+/8 1234 0: 1234 - 1: 123 - 2: 12 - 3: 1 = 0: = *** Failers 0: *** - 1: *** - 2: ** - 3: * abcd No match /^\X+/8 abcdA\x{300}\x{301}\x{302} 0: abcdA\x{300}\x{301}\x{302} - 1: abcd - 2: abc - 3: ab - 4: a A\x{300}\x{301}\x{302} 0: A\x{300}\x{301}\x{302} A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302} 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302} - 1: A\x{300}\x{301}\x{302} a 0: a *** Failers 0: *** Failers - 1: *** Failer - 2: *** Faile - 3: *** Fail - 4: *** Fai - 5: *** Fa - 6: *** F - 7: *** - 8: *** - 9: ** -10: * \x{300}\x{301}\x{302} 0: \x{300}\x{301}\x{302} @@ -255,6 +231,18 @@ No match /^\p{Cf}/8 \x{601} 0: \x{601} + \x{180e} + 0: \x{180e} + \x{061c} + 0: \x{61c} + \x{2066} + 0: \x{2066} + \x{2067} + 0: \x{2067} + \x{2068} + 0: \x{2068} + \x{2069} + 0: \x{2069} ** Failers No match \x{09f} @@ -353,6 +341,8 @@ No match /^\p{Mn}/8 \x{300} 0: \x{300} + \x{1a1b} + 0: \x{1a1b} ** Failers No match X @@ -360,7 +350,7 @@ No match \x{903} No match -/^\p{Nd}+/8 +/^\p{Nd}+/8O 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a} 0: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669} 1: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668} @@ -466,6 +456,10 @@ No match 0: } \x{f3b} 0: \x{f3b} + \x{2309} + 0: \x{2309} + \x{230b} + 0: \x{230b} ** Failers No match X @@ -480,7 +474,7 @@ No match No match \x{f3c} No match - + /^\p{Pf}/8 \x{bb} 0: \x{bb} @@ -526,6 +520,10 @@ No match 0: { \x{f3c} 0: \x{f3c} + \x{2308} + 0: \x{2308} + \x{230a} + 0: \x{230a} ** Failers No match X @@ -542,10 +540,6 @@ No match /^\p{Sc}+/8 $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6} 0: $\x{a2}\x{a3}\x{a4}\x{a5} - 1: $\x{a2}\x{a3}\x{a4} - 2: $\x{a2}\x{a3} - 3: $\x{a2} - 4: $ \x{9f2} 0: \x{9f2} ** Failers @@ -568,11 +562,6 @@ No match /^\p{Sm}+/8 +<|~\x{ac}\x{2044} 0: +<|~\x{ac}\x{2044} - 1: +<|~\x{ac} - 2: +<|~ - 3: +<| - 4: +< - 5: + ** Failers No match X @@ -619,8 +608,6 @@ No match 0: \x{a0} \x{1680} 0: \x{1680} - \x{180e} - 0: \x{180e} \x{2000} 0: \x{2000} \x{2001} @@ -767,23 +754,10 @@ No match /[\p{Nd}+-]+/8 1234 0: 1234 - 1: 123 - 2: 12 - 3: 1 12-34 0: 12-34 - 1: 12-3 - 2: 12- - 3: 12 - 4: 1 12+\x{661}-34 0: 12+\x{661}-34 - 1: 12+\x{661}-3 - 2: 12+\x{661}- - 3: 12+\x{661} - 4: 12+ - 5: 12 - 6: 1 ** Failers No match abcd @@ -792,24 +766,12 @@ No match /[\P{Nd}]+/8 abcd 0: abcd - 1: abc - 2: ab - 3: a ** Failers 0: ** Failers - 1: ** Failer - 2: ** Faile - 3: ** Fail - 4: ** Fai - 5: ** Fa - 6: ** F - 7: ** - 8: ** - 9: * 1234 No match -/\D+/8 +/\D+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -837,7 +799,7 @@ Matched, but offsets vector is too small to show all matches 20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/\P{Nd}+/8 +/\P{Nd}+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -865,7 +827,7 @@ Matched, but offsets vector is too small to show all matches 20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/[\D]+/8 +/[\D]+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -893,7 +855,7 @@ Matched, but offsets vector is too small to show all matches 20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/[\P{Nd}]+/8 +/[\P{Nd}]+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -921,7 +883,7 @@ Matched, but offsets vector is too small to show all matches 20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/[\D\P{Nd}]+/8 +/[\D\P{Nd}]+/8O 11111111111111111111111111111111111111111111111111111111111111111111111 No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -1046,10 +1008,6 @@ No match /\x{391}+/8i \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391} 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391} - 1: \x{391}\x{3b1}\x{3b1}\x{3b1} - 2: \x{391}\x{3b1}\x{3b1} - 3: \x{391}\x{3b1} - 4: \x{391} /\x{391}{3,5}(.)/8i \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X @@ -1236,8 +1194,6 @@ No match /^\p{Han}+/8 \x{2e81}\x{3007}\x{2f804}\x{31a0} 0: \x{2e81}\x{3007}\x{2f804} - 1: \x{2e81}\x{3007} - 2: \x{2e81} ** Failers No match \x{2e7f} @@ -1248,15 +1204,6 @@ No match 0: \x{3105} ** Failers 0: ** Failers - 1: ** Failer - 2: ** Faile - 3: ** Fail - 4: ** Fai - 5: ** Fa - 6: ** F - 7: ** - 8: ** - 9: * \x{30ff} No match @@ -1469,12 +1416,8 @@ No match /^\p{Any}{3,5}/8 abcdefgh 0: abcde - 1: abcd - 2: abc \x{1234}\n\r\x{3456}xyz 0: \x{1234}\x{0a}\x{0d}\x{3456}x - 1: \x{1234}\x{0a}\x{0d}\x{3456} - 2: \x{1234}\x{0a}\x{0d} /^\P{Any}{3,5}?/8 ** Failers @@ -1639,14 +1582,10 @@ No match /\x{c0}+\x{116}+/8i \x{c0}\x{e0}\x{116}\x{117} 0: \x{c0}\x{e0}\x{116}\x{117} - 1: \x{c0}\x{e0}\x{116} /[\x{c0}\x{116}]+/8i \x{c0}\x{e0}\x{116}\x{117} 0: \x{c0}\x{e0}\x{116}\x{117} - 1: \x{c0}\x{e0}\x{116} - 2: \x{c0}\x{e0} - 3: \x{c0} /Check property support in non-UTF-8 mode/ @@ -1693,16 +1632,6 @@ No match /^\p{Xan}+/8 ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7} - 1: ABCD1234\x{6ca}\x{a6c} - 2: ABCD1234\x{6ca} - 3: ABCD1234 - 4: ABCD123 - 5: ABCD12 - 6: ABCD1 - 7: ABCD - 8: ABC - 9: AB -10: A ** Failers No match _ABC @@ -1711,28 +1640,10 @@ No match /^\p{Xan}*/8 ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7} - 1: ABCD1234\x{6ca}\x{a6c} - 2: ABCD1234\x{6ca} - 3: ABCD1234 - 4: ABCD123 - 5: ABCD12 - 6: ABCD1 - 7: ABCD - 8: ABC - 9: AB -10: A -11: /^\p{Xan}{2,9}/8 ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca} - 1: ABCD1234 - 2: ABCD123 - 3: ABCD12 - 4: ABCD1 - 5: ABCD - 6: ABC - 7: AB /^[\p{Xan}]/8 ABCD1234_ @@ -1753,16 +1664,6 @@ No match /^[\p{Xan}]+/8 ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7} - 1: ABCD1234\x{6ca}\x{a6c} - 2: ABCD1234\x{6ca} - 3: ABCD1234 - 4: ABCD123 - 5: ABCD12 - 6: ABCD1 - 7: ABCD - 8: ABC - 9: AB -10: A ** Failers No match _ABC @@ -1776,53 +1677,57 @@ No match \x{0b} No match -/^>\p{Xsp}+/8 +/^>\p{Xsp}+/8O > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} - 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} - 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} - 3: > \x{09}\x{0a}\x{0c}\x{0d} - 4: > \x{09}\x{0a}\x{0c} - 5: > \x{09}\x{0a} - 6: > \x{09} - 7: > - -/^>\p{Xsp}*/8 + 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} + 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} + 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} + 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} + 4: > \x{09}\x{0a}\x{0c}\x{0d} + 5: > \x{09}\x{0a}\x{0c} + 6: > \x{09}\x{0a} + 7: > \x{09} + 8: > + +/^>\p{Xsp}*/8O > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} - 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} - 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} - 3: > \x{09}\x{0a}\x{0c}\x{0d} - 4: > \x{09}\x{0a}\x{0c} - 5: > \x{09}\x{0a} - 6: > \x{09} - 7: > - 8: > + 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} + 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} + 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} + 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} + 4: > \x{09}\x{0a}\x{0c}\x{0d} + 5: > \x{09}\x{0a}\x{0c} + 6: > \x{09}\x{0a} + 7: > \x{09} + 8: > + 9: > -/^>\p{Xsp}{2,9}/8 +/^>\p{Xsp}{2,9}/8O > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} - 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} - 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} - 3: > \x{09}\x{0a}\x{0c}\x{0d} - 4: > \x{09}\x{0a}\x{0c} - 5: > \x{09}\x{0a} - 6: > \x{09} + 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} + 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} + 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} + 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} + 4: > \x{09}\x{0a}\x{0c}\x{0d} + 5: > \x{09}\x{0a}\x{0c} + 6: > \x{09}\x{0a} + 7: > \x{09} -/^>[\p{Xsp}]/8 +/^>[\p{Xsp}]/8O >\x{2028}\x{0b} 0: >\x{2028} -/^>[\p{Xsp}]+/8 +/^>[\p{Xsp}]+/8O > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} - 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} - 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} - 3: > \x{09}\x{0a}\x{0c}\x{0d} - 4: > \x{09}\x{0a}\x{0c} - 5: > \x{09}\x{0a} - 6: > \x{09} - 7: > + 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} + 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} + 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} + 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} + 4: > \x{09}\x{0a}\x{0c}\x{0d} + 5: > \x{09}\x{0a}\x{0c} + 6: > \x{09}\x{0a} + 7: > \x{09} + 8: > /^>\p{Xps}/8 >\x{1680}\x{2028}\x{0b} @@ -1837,14 +1742,6 @@ No match /^>\p{Xps}+/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} - 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} - 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} - 4: > \x{09}\x{0a}\x{0c}\x{0d} - 5: > \x{09}\x{0a}\x{0c} - 6: > \x{09}\x{0a} - 7: > \x{09} - 8: > /^>\p{Xps}+?/8 >\x{1680}\x{2028}\x{0b} @@ -1855,26 +1752,10 @@ No match /^>\p{Xps}*/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} - 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} - 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} - 4: > \x{09}\x{0a}\x{0c}\x{0d} - 5: > \x{09}\x{0a}\x{0c} - 6: > \x{09}\x{0a} - 7: > \x{09} - 8: > - 9: > /^>\p{Xps}{2,9}/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} - 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} - 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} - 4: > \x{09}\x{0a}\x{0c}\x{0d} - 5: > \x{09}\x{0a}\x{0c} - 6: > \x{09}\x{0a} - 7: > \x{09} /^>\p{Xps}{2,9}?/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} @@ -1894,14 +1775,6 @@ No match /^>[\p{Xps}]+/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} - 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680} - 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0} - 4: > \x{09}\x{0a}\x{0c}\x{0d} - 5: > \x{09}\x{0a}\x{0c} - 6: > \x{09}\x{0a} - 7: > \x{09} - 8: > /^\p{Xwd}/8 ABCD @@ -1924,42 +1797,14 @@ No match /^\p{Xwd}+/8 ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_ - 1: ABCD1234\x{6ca}\x{a6c}\x{10a7} - 2: ABCD1234\x{6ca}\x{a6c} - 3: ABCD1234\x{6ca} - 4: ABCD1234 - 5: ABCD123 - 6: ABCD12 - 7: ABCD1 - 8: ABCD - 9: ABC -10: AB -11: A /^\p{Xwd}*/8 ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_ - 1: ABCD1234\x{6ca}\x{a6c}\x{10a7} - 2: ABCD1234\x{6ca}\x{a6c} - 3: ABCD1234\x{6ca} - 4: ABCD1234 - 5: ABCD123 - 6: ABCD12 - 7: ABCD1 - 8: ABCD - 9: ABC -10: AB -11: A -12: /^\p{Xwd}{2,9}/8 A_12\x{6ca}\x{a6c}\x{10a7} 0: A_12\x{6ca}\x{a6c}\x{10a7} - 1: A_12\x{6ca}\x{a6c} - 2: A_12\x{6ca} - 3: A_12 - 4: A_1 - 5: A_ /^[\p{Xwd}]/8 ABCD1234_ @@ -1982,17 +1827,6 @@ No match /^[\p{Xwd}]+/8 ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_ - 1: ABCD1234\x{6ca}\x{a6c}\x{10a7} - 2: ABCD1234\x{6ca}\x{a6c} - 3: ABCD1234\x{6ca} - 4: ABCD1234 - 5: ABCD123 - 6: ABCD12 - 7: ABCD1 - 8: ABCD - 9: ABC -10: AB -11: A /-- Unicode properties for \b abd \B --/ @@ -2043,7 +1877,6 @@ No match /[^\x{100}]+/8i \x{100}\x{101}XX 0: XX - 1: X /^\X/8 A\P @@ -2090,7 +1923,6 @@ Partial match: A\x{300}\x{301}A\x{300}\x{301} /^\X+/8 AA\P 0: AA - 1: A AA\P\P Partial match: AA @@ -2271,435 +2103,299 @@ Partial match: AA /\x{1e9e}+/8i \x{1e9e}\x{00df} 0: \x{1e9e}\x{df} - 1: \x{1e9e} /[z\x{1e9e}]+/8i \x{1e9e}\x{00df} 0: \x{1e9e}\x{df} - 1: \x{1e9e} /\x{00df}+/8i \x{1e9e}\x{00df} 0: \x{1e9e}\x{df} - 1: \x{1e9e} /[z\x{00df}]+/8i \x{1e9e}\x{00df} 0: \x{1e9e}\x{df} - 1: \x{1e9e} /\x{1f88}+/8i \x{1f88}\x{1f80} 0: \x{1f88}\x{1f80} - 1: \x{1f88} /[z\x{1f88}]+/8i \x{1f88}\x{1f80} 0: \x{1f88}\x{1f80} - 1: \x{1f88} /-- Perl matches these --/ /\x{00b5}+/8i \x{00b5}\x{039c}\x{03bc} 0: \x{b5}\x{39c}\x{3bc} - 1: \x{b5}\x{39c} - 2: \x{b5} /\x{039c}+/8i \x{00b5}\x{039c}\x{03bc} 0: \x{b5}\x{39c}\x{3bc} - 1: \x{b5}\x{39c} - 2: \x{b5} /\x{03bc}+/8i \x{00b5}\x{039c}\x{03bc} 0: \x{b5}\x{39c}\x{3bc} - 1: \x{b5}\x{39c} - 2: \x{b5} /\x{00c5}+/8i \x{00c5}\x{00e5}\x{212b} 0: \x{c5}\x{e5}\x{212b} - 1: \x{c5}\x{e5} - 2: \x{c5} /\x{00e5}+/8i \x{00c5}\x{00e5}\x{212b} 0: \x{c5}\x{e5}\x{212b} - 1: \x{c5}\x{e5} - 2: \x{c5} /\x{212b}+/8i \x{00c5}\x{00e5}\x{212b} 0: \x{c5}\x{e5}\x{212b} - 1: \x{c5}\x{e5} - 2: \x{c5} /\x{01c4}+/8i \x{01c4}\x{01c5}\x{01c6} 0: \x{1c4}\x{1c5}\x{1c6} - 1: \x{1c4}\x{1c5} - 2: \x{1c4} /\x{01c5}+/8i \x{01c4}\x{01c5}\x{01c6} 0: \x{1c4}\x{1c5}\x{1c6} - 1: \x{1c4}\x{1c5} - 2: \x{1c4} /\x{01c6}+/8i \x{01c4}\x{01c5}\x{01c6} 0: \x{1c4}\x{1c5}\x{1c6} - 1: \x{1c4}\x{1c5} - 2: \x{1c4} /\x{01c7}+/8i \x{01c7}\x{01c8}\x{01c9} 0: \x{1c7}\x{1c8}\x{1c9} - 1: \x{1c7}\x{1c8} - 2: \x{1c7} /\x{01c8}+/8i \x{01c7}\x{01c8}\x{01c9} 0: \x{1c7}\x{1c8}\x{1c9} - 1: \x{1c7}\x{1c8} - 2: \x{1c7} /\x{01c9}+/8i \x{01c7}\x{01c8}\x{01c9} 0: \x{1c7}\x{1c8}\x{1c9} - 1: \x{1c7}\x{1c8} - 2: \x{1c7} /\x{01ca}+/8i \x{01ca}\x{01cb}\x{01cc} 0: \x{1ca}\x{1cb}\x{1cc} - 1: \x{1ca}\x{1cb} - 2: \x{1ca} /\x{01cb}+/8i \x{01ca}\x{01cb}\x{01cc} 0: \x{1ca}\x{1cb}\x{1cc} - 1: \x{1ca}\x{1cb} - 2: \x{1ca} /\x{01cc}+/8i \x{01ca}\x{01cb}\x{01cc} 0: \x{1ca}\x{1cb}\x{1cc} - 1: \x{1ca}\x{1cb} - 2: \x{1ca} /\x{01f1}+/8i \x{01f1}\x{01f2}\x{01f3} 0: \x{1f1}\x{1f2}\x{1f3} - 1: \x{1f1}\x{1f2} - 2: \x{1f1} /\x{01f2}+/8i \x{01f1}\x{01f2}\x{01f3} 0: \x{1f1}\x{1f2}\x{1f3} - 1: \x{1f1}\x{1f2} - 2: \x{1f1} /\x{01f3}+/8i \x{01f1}\x{01f2}\x{01f3} 0: \x{1f1}\x{1f2}\x{1f3} - 1: \x{1f1}\x{1f2} - 2: \x{1f1} /\x{0345}+/8i \x{0345}\x{0399}\x{03b9}\x{1fbe} 0: \x{345}\x{399}\x{3b9}\x{1fbe} - 1: \x{345}\x{399}\x{3b9} - 2: \x{345}\x{399} - 3: \x{345} /\x{0399}+/8i \x{0345}\x{0399}\x{03b9}\x{1fbe} 0: \x{345}\x{399}\x{3b9}\x{1fbe} - 1: \x{345}\x{399}\x{3b9} - 2: \x{345}\x{399} - 3: \x{345} /\x{03b9}+/8i \x{0345}\x{0399}\x{03b9}\x{1fbe} 0: \x{345}\x{399}\x{3b9}\x{1fbe} - 1: \x{345}\x{399}\x{3b9} - 2: \x{345}\x{399} - 3: \x{345} /\x{1fbe}+/8i \x{0345}\x{0399}\x{03b9}\x{1fbe} 0: \x{345}\x{399}\x{3b9}\x{1fbe} - 1: \x{345}\x{399}\x{3b9} - 2: \x{345}\x{399} - 3: \x{345} /\x{0392}+/8i \x{0392}\x{03b2}\x{03d0} 0: \x{392}\x{3b2}\x{3d0} - 1: \x{392}\x{3b2} - 2: \x{392} /\x{03b2}+/8i \x{0392}\x{03b2}\x{03d0} 0: \x{392}\x{3b2}\x{3d0} - 1: \x{392}\x{3b2} - 2: \x{392} /\x{03d0}+/8i \x{0392}\x{03b2}\x{03d0} 0: \x{392}\x{3b2}\x{3d0} - 1: \x{392}\x{3b2} - 2: \x{392} /\x{0395}+/8i \x{0395}\x{03b5}\x{03f5} 0: \x{395}\x{3b5}\x{3f5} - 1: \x{395}\x{3b5} - 2: \x{395} /\x{03b5}+/8i \x{0395}\x{03b5}\x{03f5} 0: \x{395}\x{3b5}\x{3f5} - 1: \x{395}\x{3b5} - 2: \x{395} /\x{03f5}+/8i \x{0395}\x{03b5}\x{03f5} 0: \x{395}\x{3b5}\x{3f5} - 1: \x{395}\x{3b5} - 2: \x{395} /\x{0398}+/8i \x{0398}\x{03b8}\x{03d1}\x{03f4} 0: \x{398}\x{3b8}\x{3d1}\x{3f4} - 1: \x{398}\x{3b8}\x{3d1} - 2: \x{398}\x{3b8} - 3: \x{398} /\x{03b8}+/8i \x{0398}\x{03b8}\x{03d1}\x{03f4} 0: \x{398}\x{3b8}\x{3d1}\x{3f4} - 1: \x{398}\x{3b8}\x{3d1} - 2: \x{398}\x{3b8} - 3: \x{398} /\x{03d1}+/8i \x{0398}\x{03b8}\x{03d1}\x{03f4} 0: \x{398}\x{3b8}\x{3d1}\x{3f4} - 1: \x{398}\x{3b8}\x{3d1} - 2: \x{398}\x{3b8} - 3: \x{398} /\x{03f4}+/8i \x{0398}\x{03b8}\x{03d1}\x{03f4} 0: \x{398}\x{3b8}\x{3d1}\x{3f4} - 1: \x{398}\x{3b8}\x{3d1} - 2: \x{398}\x{3b8} - 3: \x{398} /\x{039a}+/8i \x{039a}\x{03ba}\x{03f0} 0: \x{39a}\x{3ba}\x{3f0} - 1: \x{39a}\x{3ba} - 2: \x{39a} /\x{03ba}+/8i \x{039a}\x{03ba}\x{03f0} 0: \x{39a}\x{3ba}\x{3f0} - 1: \x{39a}\x{3ba} - 2: \x{39a} /\x{03f0}+/8i \x{039a}\x{03ba}\x{03f0} 0: \x{39a}\x{3ba}\x{3f0} - 1: \x{39a}\x{3ba} - 2: \x{39a} /\x{03a0}+/8i \x{03a0}\x{03c0}\x{03d6} 0: \x{3a0}\x{3c0}\x{3d6} - 1: \x{3a0}\x{3c0} - 2: \x{3a0} /\x{03c0}+/8i \x{03a0}\x{03c0}\x{03d6} 0: \x{3a0}\x{3c0}\x{3d6} - 1: \x{3a0}\x{3c0} - 2: \x{3a0} /\x{03d6}+/8i \x{03a0}\x{03c0}\x{03d6} 0: \x{3a0}\x{3c0}\x{3d6} - 1: \x{3a0}\x{3c0} - 2: \x{3a0} /\x{03a1}+/8i \x{03a1}\x{03c1}\x{03f1} 0: \x{3a1}\x{3c1}\x{3f1} - 1: \x{3a1}\x{3c1} - 2: \x{3a1} /\x{03c1}+/8i \x{03a1}\x{03c1}\x{03f1} 0: \x{3a1}\x{3c1}\x{3f1} - 1: \x{3a1}\x{3c1} - 2: \x{3a1} /\x{03f1}+/8i \x{03a1}\x{03c1}\x{03f1} 0: \x{3a1}\x{3c1}\x{3f1} - 1: \x{3a1}\x{3c1} - 2: \x{3a1} /\x{03a3}+/8i \x{03A3}\x{03C2}\x{03C3} 0: \x{3a3}\x{3c2}\x{3c3} - 1: \x{3a3}\x{3c2} - 2: \x{3a3} /\x{03c2}+/8i \x{03A3}\x{03C2}\x{03C3} 0: \x{3a3}\x{3c2}\x{3c3} - 1: \x{3a3}\x{3c2} - 2: \x{3a3} /\x{03c3}+/8i \x{03A3}\x{03C2}\x{03C3} 0: \x{3a3}\x{3c2}\x{3c3} - 1: \x{3a3}\x{3c2} - 2: \x{3a3} /\x{03a6}+/8i \x{03a6}\x{03c6}\x{03d5} 0: \x{3a6}\x{3c6}\x{3d5} - 1: \x{3a6}\x{3c6} - 2: \x{3a6} /\x{03c6}+/8i \x{03a6}\x{03c6}\x{03d5} 0: \x{3a6}\x{3c6}\x{3d5} - 1: \x{3a6}\x{3c6} - 2: \x{3a6} /\x{03d5}+/8i \x{03a6}\x{03c6}\x{03d5} 0: \x{3a6}\x{3c6}\x{3d5} - 1: \x{3a6}\x{3c6} - 2: \x{3a6} /\x{03c9}+/8i \x{03c9}\x{03a9}\x{2126} 0: \x{3c9}\x{3a9}\x{2126} - 1: \x{3c9}\x{3a9} - 2: \x{3c9} /\x{03a9}+/8i \x{03c9}\x{03a9}\x{2126} 0: \x{3c9}\x{3a9}\x{2126} - 1: \x{3c9}\x{3a9} - 2: \x{3c9} /\x{2126}+/8i \x{03c9}\x{03a9}\x{2126} 0: \x{3c9}\x{3a9}\x{2126} - 1: \x{3c9}\x{3a9} - 2: \x{3c9} /\x{1e60}+/8i \x{1e60}\x{1e61}\x{1e9b} 0: \x{1e60}\x{1e61}\x{1e9b} - 1: \x{1e60}\x{1e61} - 2: \x{1e60} /\x{1e61}+/8i \x{1e60}\x{1e61}\x{1e9b} 0: \x{1e60}\x{1e61}\x{1e9b} - 1: \x{1e60}\x{1e61} - 2: \x{1e60} /\x{1e9b}+/8i \x{1e60}\x{1e61}\x{1e9b} 0: \x{1e60}\x{1e61}\x{1e9b} - 1: \x{1e60}\x{1e61} - 2: \x{1e60} /\x{1e9e}+/8i \x{1e9e}\x{00df} 0: \x{1e9e}\x{df} - 1: \x{1e9e} /\x{00df}+/8i \x{1e9e}\x{00df} 0: \x{1e9e}\x{df} - 1: \x{1e9e} /\x{1f88}+/8i \x{1f88}\x{1f80} 0: \x{1f88}\x{1f80} - 1: \x{1f88} /\x{1f80}+/8i \x{1f88}\x{1f80} 0: \x{1f88}\x{1f80} - 1: \x{1f88} /\x{004b}+/8i \x{004b}\x{006b}\x{212a} 0: Kk\x{212a} - 1: Kk - 2: K /\x{006b}+/8i \x{004b}\x{006b}\x{212a} 0: Kk\x{212a} - 1: Kk - 2: K /\x{212a}+/8i \x{004b}\x{006b}\x{212a} 0: Kk\x{212a} - 1: Kk - 2: K /\x{0053}+/8i \x{0053}\x{0073}\x{017f} 0: Ss\x{17f} - 1: Ss - 2: S /\x{0073}+/8i \x{0053}\x{0073}\x{017f} 0: Ss\x{17f} - 1: Ss - 2: S /\x{017f}+/8i \x{0053}\x{0073}\x{017f} 0: Ss\x{17f} - 1: Ss - 2: S /ist/8i ikt @@ -2740,11 +2436,6 @@ No match /^\p{Xuc}+/8 $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000} - 1: $@`\x{a0}\x{1234} - 2: $@`\x{a0} - 3: $@` - 4: $@ - 5: $ ** Failers No match \x{9f} @@ -2782,8 +2473,6 @@ No match /^\p{Xuc}{3,5}/8 $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234} - 1: $@`\x{a0} - 2: $@` ** Failers No match \x{9f} @@ -2810,11 +2499,6 @@ No match /^[\p{Xuc}]+/8 $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000} - 1: $@`\x{a0}\x{1234} - 2: $@`\x{a0} - 3: $@` - 4: $@ - 5: $ ** Failers No match \x{9f} @@ -2848,4 +2532,16 @@ No match \x{1234}abc No match +/^A\s+Z/8W + A\x{2005}Z + 0: A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + 0: A\x{85}\x{180e}\x{2005}Z + +/^A[\s]+Z/8W + A\x{2005}Z + 0: A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + 0: A\x{85}\x{180e}\x{2005}Z + /-- End of testinput10 --/ diff --git a/pcre/testdata/testoutput11-16 b/pcre/testdata/testoutput11-16 index dff72b9477c..f1ad8887b4d 100644 --- a/pcre/testdata/testoutput11-16 +++ b/pcre/testdata/testoutput11-16 @@ -63,6 +63,7 @@ Memory allocation (code space): 10 4 End ------------------------------------------------------------------ Capturing subpattern count = 0 +May match empty string Options: extended No first char No need char @@ -99,15 +100,13 @@ Memory allocation (code space): 14 ------------------------------------------------------------------ /x{1,3}+/BM -Memory allocation (code space): 28 +Memory allocation (code space): 20 ------------------------------------------------------------------ - 0 11 Bra - 2 7 Once - 4 x - 6 x{0,2} - 9 7 Ket - 11 11 Ket - 13 End + 0 7 Bra + 2 x + 4 x{0,2}+ + 7 7 Ket + 9 End ------------------------------------------------------------------ /(x)*+/BM @@ -138,7 +137,7 @@ Memory allocation (code space): 142 39 [bc]+ 57 21 Ket 59 5 CBra 5 - 62 \w* + 62 \w*+ 64 5 Ket 66 63 Ket 68 68 Ket @@ -327,7 +326,7 @@ Memory allocation (code space): 16 ------------------------------------------------------------------ /\x{110000}/8BM -Failed: character value in \x{...} sequence is too large at offset 9 +Failed: character value in \x{} or \o{} is too large at offset 9 /[\x{ff}]/8BM Memory allocation (code space): 14 @@ -503,7 +502,7 @@ Memory allocation (code space): 24 Memory allocation (code space): 58 ------------------------------------------------------------------ 0 26 Bra - 2 [+\-\p{Nd}]+ + 2 [+\-\p{Nd}]++ 26 26 Ket 28 End ------------------------------------------------------------------ @@ -652,7 +651,7 @@ Memory allocation (code space): 14 /[[:^alpha:][:^cntrl:]]+/8WB ------------------------------------------------------------------ 0 26 Bra - 2 [ -~\x80-\xff\P{L}]+ + 2 [ -~\x80-\xff\P{L}]++ 26 26 Ket 28 End ------------------------------------------------------------------ @@ -660,7 +659,7 @@ Memory allocation (code space): 14 /[[:^cntrl:][:^alpha:]]+/8WB ------------------------------------------------------------------ 0 26 Bra - 2 [ -~\x80-\xff\P{L}]+ + 2 [ -~\x80-\xff\P{L}]++ 26 26 Ket 28 End ------------------------------------------------------------------ @@ -668,7 +667,7 @@ Memory allocation (code space): 14 /[[:alpha:]]+/8WB ------------------------------------------------------------------ 0 10 Bra - 2 [\p{L}]+ + 2 [\p{L}]++ 10 10 Ket 12 End ------------------------------------------------------------------ @@ -676,7 +675,7 @@ Memory allocation (code space): 14 /[[:^alpha:]\S]+/8WB ------------------------------------------------------------------ 0 13 Bra - 2 [\P{L}\P{Xsp}]+ + 2 [\P{L}\P{Xsp}]++ 13 13 Ket 15 End ------------------------------------------------------------------ diff --git a/pcre/testdata/testoutput11-32 b/pcre/testdata/testoutput11-32 index 8335fb82418..266e55d0672 100644 --- a/pcre/testdata/testoutput11-32 +++ b/pcre/testdata/testoutput11-32 @@ -63,6 +63,7 @@ Memory allocation (code space): 20 4 End ------------------------------------------------------------------ Capturing subpattern count = 0 +May match empty string Options: extended No first char No need char @@ -99,15 +100,13 @@ Memory allocation (code space): 28 ------------------------------------------------------------------ /x{1,3}+/BM -Memory allocation (code space): 56 +Memory allocation (code space): 40 ------------------------------------------------------------------ - 0 11 Bra - 2 7 Once - 4 x - 6 x{0,2} - 9 7 Ket - 11 11 Ket - 13 End + 0 7 Bra + 2 x + 4 x{0,2}+ + 7 7 Ket + 9 End ------------------------------------------------------------------ /(x)*+/BM @@ -138,7 +137,7 @@ Memory allocation (code space): 220 31 [bc]+ 41 13 Ket 43 5 CBra 5 - 46 \w* + 46 \w*+ 48 5 Ket 50 47 Ket 52 52 Ket @@ -327,7 +326,7 @@ Memory allocation (code space): 28 ------------------------------------------------------------------ /\x{110000}/8BM -Failed: character value in \x{...} sequence is too large at offset 9 +Failed: character value in \x{} or \o{} is too large at offset 9 /[\x{ff}]/8BM Memory allocation (code space): 28 @@ -503,7 +502,7 @@ Memory allocation (code space): 48 Memory allocation (code space): 84 ------------------------------------------------------------------ 0 18 Bra - 2 [+\-\p{Nd}]+ + 2 [+\-\p{Nd}]++ 18 18 Ket 20 End ------------------------------------------------------------------ @@ -652,7 +651,7 @@ Memory allocation (code space): 28 /[[:^alpha:][:^cntrl:]]+/8WB ------------------------------------------------------------------ 0 18 Bra - 2 [ -~\x80-\xff\P{L}]+ + 2 [ -~\x80-\xff\P{L}]++ 18 18 Ket 20 End ------------------------------------------------------------------ @@ -660,7 +659,7 @@ Memory allocation (code space): 28 /[[:^cntrl:][:^alpha:]]+/8WB ------------------------------------------------------------------ 0 18 Bra - 2 [ -~\x80-\xff\P{L}]+ + 2 [ -~\x80-\xff\P{L}]++ 18 18 Ket 20 End ------------------------------------------------------------------ @@ -668,7 +667,7 @@ Memory allocation (code space): 28 /[[:alpha:]]+/8WB ------------------------------------------------------------------ 0 10 Bra - 2 [\p{L}]+ + 2 [\p{L}]++ 10 10 Ket 12 End ------------------------------------------------------------------ @@ -676,7 +675,7 @@ Memory allocation (code space): 28 /[[:^alpha:]\S]+/8WB ------------------------------------------------------------------ 0 13 Bra - 2 [\P{L}\P{Xsp}]+ + 2 [\P{L}\P{Xsp}]++ 13 13 Ket 15 End ------------------------------------------------------------------ diff --git a/pcre/testdata/testoutput11-8 b/pcre/testdata/testoutput11-8 index c1c85f9a3b6..d4a21334e36 100644 --- a/pcre/testdata/testoutput11-8 +++ b/pcre/testdata/testoutput11-8 @@ -63,6 +63,7 @@ Memory allocation (code space): 7 6 End ------------------------------------------------------------------ Capturing subpattern count = 0 +May match empty string Options: extended No first char No need char @@ -99,15 +100,13 @@ Memory allocation (code space): 9 ------------------------------------------------------------------ /x{1,3}+/BM -Memory allocation (code space): 19 +Memory allocation (code space): 13 ------------------------------------------------------------------ - 0 15 Bra - 3 9 Once - 6 x - 8 x{0,2} - 12 9 Ket - 15 15 Ket - 18 End + 0 9 Bra + 3 x + 5 x{0,2}+ + 9 9 Ket + 12 End ------------------------------------------------------------------ /(x)*+/BM @@ -138,7 +137,7 @@ Memory allocation (code space): 120 66 [bc]+ 100 39 Ket 103 7 CBra 5 -108 \w* +108 \w*+ 110 7 Ket 113 109 Ket 116 116 Ket @@ -327,7 +326,7 @@ Memory allocation (code space): 12 ------------------------------------------------------------------ /\x{110000}/8BM -Failed: character value in \x{...} sequence is too large at offset 9 +Failed: character value in \x{} or \o{} is too large at offset 9 /[\x{ff}]/8BM Memory allocation (code space): 10 @@ -503,7 +502,7 @@ Memory allocation (code space): 15 Memory allocation (code space): 48 ------------------------------------------------------------------ 0 44 Bra - 3 [+\-\p{Nd}]+ + 3 [+\-\p{Nd}]++ 44 44 Ket 47 End ------------------------------------------------------------------ @@ -652,7 +651,7 @@ Memory allocation (code space): 10 /[[:^alpha:][:^cntrl:]]+/8WB ------------------------------------------------------------------ 0 44 Bra - 3 [ -~\x80-\xff\P{L}]+ + 3 [ -~\x80-\xff\P{L}]++ 44 44 Ket 47 End ------------------------------------------------------------------ @@ -660,7 +659,7 @@ Memory allocation (code space): 10 /[[:^cntrl:][:^alpha:]]+/8WB ------------------------------------------------------------------ 0 44 Bra - 3 [ -~\x80-\xff\P{L}]+ + 3 [ -~\x80-\xff\P{L}]++ 44 44 Ket 47 End ------------------------------------------------------------------ @@ -668,7 +667,7 @@ Memory allocation (code space): 10 /[[:alpha:]]+/8WB ------------------------------------------------------------------ 0 12 Bra - 3 [\p{L}]+ + 3 [\p{L}]++ 12 12 Ket 15 End ------------------------------------------------------------------ @@ -676,7 +675,7 @@ Memory allocation (code space): 10 /[[:^alpha:]\S]+/8WB ------------------------------------------------------------------ 0 15 Bra - 3 [\P{L}\P{Xsp}]+ + 3 [\P{L}\P{Xsp}]++ 15 15 Ket 18 End ------------------------------------------------------------------ diff --git a/pcre/testdata/testoutput12 b/pcre/testdata/testoutput12 index 6c986d1185d..a76e2aef880 100644 --- a/pcre/testdata/testoutput12 +++ b/pcre/testdata/testoutput12 @@ -13,16 +13,18 @@ JIT study was successful /(?(?C1)(?=a)a)/S+I Capturing subpattern count = 0 +May match empty string No options -First char = 'a' +No first char No need char Study returned NULL JIT study was not successful /(?(?C1)(?=a)a)/S!+I Capturing subpattern count = 0 +May match empty string No options -First char = 'a' +No first char No need char Subject length lower bound = -1 No set of starting bytes @@ -47,6 +49,7 @@ Study data loaded from testsavedregex /a*/SI Capturing subpattern count = 0 +May match empty string No options No first char No need char diff --git a/pcre/testdata/testoutput13 b/pcre/testdata/testoutput13 index e9cbbcf0a2b..9f73c5000f6 100644 --- a/pcre/testdata/testoutput13 +++ b/pcre/testdata/testoutput13 @@ -13,6 +13,7 @@ JIT support is not available in this version of PCRE /a*/SI Capturing subpattern count = 0 +May match empty string No options No first char No need char diff --git a/pcre/testdata/testoutput14 b/pcre/testdata/testoutput14 index 5f05d77d24e..52680a8f9cd 100644 --- a/pcre/testdata/testoutput14 +++ b/pcre/testdata/testoutput14 @@ -1,6 +1,9 @@ -/-- This set of tests is run only with the 8-bit library. It starts with all - the tests of the POSIX interface, because that is supported only with the - 8-bit library. --/ +/-- This set of tests is run only with the 8-bit library. They do not require + UTF-8 or Unicode property support. The file starts with all the tests of + the POSIX interface, because that is supported only with the 8-bit library. + --/ + +< forbid 8W /abc/P abc @@ -147,9 +150,16 @@ No match ** Character \x{123} is greater than 255 and UTF-8 mode is not enabled. ** Truncation will probably give the wrong result. No match + A\o{443}B +** Character \x{123} is greater than 255 and UTF-8 mode is not enabled. +** Truncation will probably give the wrong result. +No match /\x{100}/I -Failed: character value in \x{...} sequence is too large at offset 6 +Failed: character value in \x{} or \o{} is too large at offset 6 + +/\o{400}/I +Failed: character value in \x{} or \o{} is too large at offset 6 / (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* @@ -380,6 +390,14 @@ No need char Subject length lower bound = 1 Starting byte set: \x09 \x20 \xa0 +/\H/SI +Capturing subpattern count = 0 +No options +No first char +No need char +Subject length lower bound = 1 +No set of starting bytes + /\v/SI Capturing subpattern count = 0 No options @@ -388,6 +406,14 @@ No need char Subject length lower bound = 1 Starting byte set: \x0a \x0b \x0c \x0d \x85 +/\V/SI +Capturing subpattern count = 0 +No options +No first char +No need char +Subject length lower bound = 1 +No set of starting bytes + /\R/SI Capturing subpattern count = 0 No options @@ -409,7 +435,7 @@ Starting byte set: \x0a \x0b \x0c \x0d \x85 /[\h]+/BZ ------------------------------------------------------------------ Bra - [\x09 \xa0]+ + [\x09 \xa0]++ Ket End ------------------------------------------------------------------ @@ -473,4 +499,32 @@ Failed: character value in \u.... sequence is too large at offset 5 /[\u0100-\u0200]/<JS> Failed: character value in \u.... sequence is too large at offset 6 +/[^\x00-a]{12,}[^b-\xff]*/BZ +------------------------------------------------------------------ + Bra + [b-\xff] (neg){12,}+ + [\x00-a] (neg)*+ + Ket + End +------------------------------------------------------------------ + +/[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/BZ +------------------------------------------------------------------ + Bra + [\x00-\x08\x0e-\x1f!-\xff] (neg)*+ + \s* + + [0-9A-Z_a-z]++ + \W+ + + [\x00-/:-\xff] (neg)*+ + \d + 0 + [\x00-/:-@[-^`{-\xff] (neg){4,6}+ + \w* + A + Ket + End +------------------------------------------------------------------ + /-- End of testinput14 --/ diff --git a/pcre/testdata/testoutput15 b/pcre/testdata/testoutput15 index 1541637de8d..5792be72df7 100644 --- a/pcre/testdata/testoutput15 +++ b/pcre/testdata/testoutput15 @@ -1,5 +1,7 @@ -/-- This set of tests is for UTF-8 support, and is relevant only to the 8-bit - library. --/ +/-- This set of tests is for UTF-8 support but not Unicode property support, + and is relevant only to the 8-bit library. --/ + +< forbid W /X(\C{3})/8 X\x{1234} @@ -72,7 +74,7 @@ Failed: invalid UTF-8 string at offset 0 /ÃÃÃxxx/8 Failed: invalid UTF-8 string at offset 0 -/ÃÃÃxxx/8?DZSS +/ÃÃÃxxx/8?DZSSO ------------------------------------------------------------------ Bra \X{c0}\X{c0}\X{c0}xxx @@ -80,7 +82,7 @@ Failed: invalid UTF-8 string at offset 0 End ------------------------------------------------------------------ Capturing subpattern count = 0 -Options: utf no_utf_check +Options: no_auto_possessify utf no_utf_check First char = \x{c3} Need char = 'x' @@ -508,7 +510,7 @@ No match ------------------------------------------------------------------ Bra \x{100}{3} - \x{100}? + \x{100}?+ Ket End ------------------------------------------------------------------ @@ -525,7 +527,7 @@ No set of starting bytes ------------------------------------------------------------------ Bra CBra 1 - \x{100}+ + \x{100}++ Alt x Ket @@ -562,7 +564,7 @@ Starting byte set: a x \xc4 ------------------------------------------------------------------ Bra CBra 1 - \x{100}{0,2} + \x{100}{0,2}+ a Alt x @@ -582,7 +584,7 @@ Starting byte set: a x \xc4 Bra CBra 1 \x{100} - \x{100}{0,1} + \x{100}{0,1}+ a Alt x @@ -613,7 +615,7 @@ Need char = \x{80} ------------------------------------------------------------------ Bra a\x{100} - \x{101}* + \x{101}*+ Ket End ------------------------------------------------------------------ @@ -626,7 +628,7 @@ Need char = \x{80} ------------------------------------------------------------------ Bra a\x{100} - \x{101}+ + \x{101}++ Ket End ------------------------------------------------------------------ @@ -861,7 +863,7 @@ Options: utf No first char Need char = 'x' Subject length lower bound = 4 -Starting byte set: \x09 \x0a \x0c \x0d \x20 x +Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20 x /\sxxx\s/I8ST1 Capturing subpattern count = 0 diff --git a/pcre/testdata/testoutput17 b/pcre/testdata/testoutput17 index ef82dc9d0d8..9a469c51ae1 100644 --- a/pcre/testdata/testoutput17 +++ b/pcre/testdata/testoutput17 @@ -1,6 +1,8 @@ /-- This set of tests is for the 16- and 32-bit library's basic (non-UTF-16 or -32) features that are not compatible with the 8-bit library, or which give different output in 16- or 32-bit mode. --/ + +< forbid 8W /a\Cb/ aXb @@ -243,7 +245,7 @@ Starting byte set: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8 /[\h]+/BZ ------------------------------------------------------------------ Bra - [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]+ + [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]++ Ket End ------------------------------------------------------------------ @@ -281,7 +283,7 @@ Starting byte set: \x09 \x20 \xa0 \xff /[\h\x{dc00}]+/BZSI ------------------------------------------------------------------ Bra - [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{dc00}]+ + [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{dc00}]++ Ket End ------------------------------------------------------------------ @@ -337,7 +339,7 @@ Starting byte set: \x0a \x0b \x0c \x0d \x85 \xff /[\v\x{dc00}]+/BZSI ------------------------------------------------------------------ Bra - [\x0a-\x0d\x85\x{2028}-\x{2029}\x{dc00}]+ + [\x0a-\x0d\x85\x{2028}-\x{2029}\x{dc00}]++ Ket End ------------------------------------------------------------------ @@ -440,10 +442,8 @@ Need char = \x{dd00} /i [^\x{8000}]* /i [^\x{7fff}]{2} /i [^\x{7fff}]{0,7}? - Once /i [^\x{100}]{5} - /i [^\x{100}]? - Ket + /i [^\x{100}]?+ Ket End ------------------------------------------------------------------ @@ -502,4 +502,57 @@ MK: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789AB \x{ffff} 0: \x{ffff} +/[^\x00-a]{12,}[^b-\xff]*/BZ +------------------------------------------------------------------ + Bra + [b-\xff] (neg){12,} + [\x00-a] (neg)*+ + Ket + End +------------------------------------------------------------------ + +/[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/BZ +------------------------------------------------------------------ + Bra + [\x00-\x08\x0e-\x1f!-\xff] (neg)* + \s* + + [0-9A-Z_a-z]++ + \W+ + + [\x00-/:-\xff] (neg)*? + \d + 0 + [\x00-/:-@[-^`{-\xff] (neg){4,6}? + \w* + A + Ket + End +------------------------------------------------------------------ + +/a*[b-\x{200}]?a#a*[b-\x{200}]?b#[a-f]*[g-\x{200}]*#[g-\x{200}]*[a-c]*#[g-\x{200}]*[a-h]*/BZ +------------------------------------------------------------------ + Bra + a* + [b-\x{200}]?+ + a# + a*+ + [b-\x{200}]? + b# + [a-f]* + [g-\x{200}]*+ + # + [g-\x{200}]* + [a-c]*+ + # + [g-\x{200}]* + [a-h]*+ + Ket + End +------------------------------------------------------------------ + +/^[\x{1234}\x{4321}]{2,4}?/ + \x{1234}\x{1234}\x{1234} + 0: \x{1234}\x{1234} + /-- End of testinput17 --/ diff --git a/pcre/testdata/testoutput18-16 b/pcre/testdata/testoutput18-16 index 3414a661808..1ca9ee74018 100644 --- a/pcre/testdata/testoutput18-16 +++ b/pcre/testdata/testoutput18-16 @@ -1,5 +1,7 @@ -/-- This set of tests is for UTF-16 and UTF-32 support, and is relevant only to the - 16- and 32-bit library. --/ +/-- This set of tests is for UTF-16 and UTF-32 support, and is relevant only to + the 16- and 32-bit libraries. --/ + +< forbid W /ÃÃÃxxx/8?DZSS **Failed: invalid UTF-8 string cannot be converted to UTF-16 @@ -367,7 +369,7 @@ No match ------------------------------------------------------------------ Bra \x{100}{3} - \x{100}? + \x{100}?+ Ket End ------------------------------------------------------------------ @@ -384,7 +386,7 @@ No set of starting bytes ------------------------------------------------------------------ Bra CBra 1 - \x{100}+ + \x{100}++ Alt x Ket @@ -421,7 +423,7 @@ Starting byte set: a x \xff ------------------------------------------------------------------ Bra CBra 1 - \x{100}{0,2} + \x{100}{0,2}+ a Alt x @@ -441,7 +443,7 @@ Starting byte set: a x \xff Bra CBra 1 \x{100} - \x{100}{0,1} + \x{100}{0,1}+ a Alt x @@ -472,7 +474,7 @@ No need char ------------------------------------------------------------------ Bra a\x{100} - \x{101}* + \x{101}*+ Ket End ------------------------------------------------------------------ @@ -485,7 +487,7 @@ Need char = \x{100} ------------------------------------------------------------------ Bra a\x{100} - \x{101}+ + \x{101}++ Ket End ------------------------------------------------------------------ @@ -742,7 +744,7 @@ Options: utf No first char Need char = 'x' Subject length lower bound = 4 -Starting byte set: \x09 \x0a \x0c \x0d \x20 x +Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20 x /\sxxx\s/I8ST1 Capturing subpattern count = 0 diff --git a/pcre/testdata/testoutput18-32 b/pcre/testdata/testoutput18-32 index e917e3baec4..89be3a4b051 100644 --- a/pcre/testdata/testoutput18-32 +++ b/pcre/testdata/testoutput18-32 @@ -1,5 +1,7 @@ -/-- This set of tests is for UTF-16 and UTF-32 support, and is relevant only to the - 16- and 32-bit library. --/ +/-- This set of tests is for UTF-16 and UTF-32 support, and is relevant only to + the 16- and 32-bit libraries. --/ + +< forbid W /ÃÃÃxxx/8?DZSS **Failed: invalid UTF-8 string cannot be converted to UTF-32 @@ -365,7 +367,7 @@ No match ------------------------------------------------------------------ Bra \x{100}{3} - \x{100}? + \x{100}?+ Ket End ------------------------------------------------------------------ @@ -382,7 +384,7 @@ No set of starting bytes ------------------------------------------------------------------ Bra CBra 1 - \x{100}+ + \x{100}++ Alt x Ket @@ -419,7 +421,7 @@ Starting byte set: a x \xff ------------------------------------------------------------------ Bra CBra 1 - \x{100}{0,2} + \x{100}{0,2}+ a Alt x @@ -439,7 +441,7 @@ Starting byte set: a x \xff Bra CBra 1 \x{100} - \x{100}{0,1} + \x{100}{0,1}+ a Alt x @@ -470,7 +472,7 @@ No need char ------------------------------------------------------------------ Bra a\x{100} - \x{101}* + \x{101}*+ Ket End ------------------------------------------------------------------ @@ -483,7 +485,7 @@ Need char = \x{100} ------------------------------------------------------------------ Bra a\x{100} - \x{101}+ + \x{101}++ Ket End ------------------------------------------------------------------ @@ -739,7 +741,7 @@ Options: utf No first char Need char = 'x' Subject length lower bound = 4 -Starting byte set: \x09 \x0a \x0c \x0d \x20 x +Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20 x /\sxxx\s/I8ST1 Capturing subpattern count = 0 diff --git a/pcre/testdata/testoutput2 b/pcre/testdata/testoutput2 index fd958c2eb7e..844497abcdc 100644 --- a/pcre/testdata/testoutput2 +++ b/pcre/testdata/testoutput2 @@ -7,9 +7,12 @@ NOTE: This is a non-UTF set of tests. When UTF support is needed, use test 5, and if Unicode Property Support is needed, use test 7. --/ + +< forbid 8W /(a)b|/I Capturing subpattern count = 1 +May match empty string No options No first char No need char @@ -228,7 +231,7 @@ No options No first char No need char Subject length lower bound = 1 -Starting byte set: \x09 \x0a \x0c \x0d \x20 a b +Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20 a b /(ab\2)/ Failed: reference to non-existent subpattern at offset 6 @@ -498,6 +501,7 @@ No need char /(?s).*/I Capturing subpattern count = 0 +May match empty string Options: anchored dotall No first char No need char @@ -545,10 +549,10 @@ Failed: conditional group contains more than two branches at offset 13 Failed: conditional group contains more than two branches at offset 12 /(?(1a)/ -Failed: missing ) at offset 6 +Failed: malformed number or name after (?( at offset 4 /(?(1a))/ -Failed: reference to non-existent subpattern at offset 6 +Failed: malformed number or name after (?( at offset 4 /(?(?i))/ Failed: assertion expected after (?( at offset 3 @@ -762,6 +766,7 @@ No match /(?<=ab(?i)x|y|z)/I Capturing subpattern count = 0 Max lookbehind = 3 +May match empty string No options No first char No need char @@ -769,6 +774,7 @@ No need char /(?>.*)(?<=(abcd)|(xyz))/I Capturing subpattern count = 2 Max lookbehind = 4 +May match empty string No options No first char No need char @@ -1377,6 +1383,7 @@ Need char = 'c' /a*/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -1395,6 +1402,7 @@ Need char = 'a' /a{0,3}/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -1594,6 +1602,7 @@ Need char = 'e' /a?b?/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -1612,6 +1621,7 @@ No match /|-/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -2625,6 +2635,7 @@ Need char = '-' End ------------------------------------------------------------------ Capturing subpattern count = 0 +May match empty string Options: extended No first char No need char @@ -2644,7 +2655,7 @@ No need char /[\s]/DZ ------------------------------------------------------------------ Bra - [\x09\x0a\x0c\x0d ] + [\x09-\x0d ] Ket End ------------------------------------------------------------------ @@ -2656,7 +2667,7 @@ No need char /[\S]/DZ ------------------------------------------------------------------ Bra - [\x00-\x08\x0b\x0e-\x1f!-\xff] (neg) + [\x00-\x08\x0e-\x1f!-\xff] (neg) Ket End ------------------------------------------------------------------ @@ -2767,6 +2778,7 @@ Need char = '0' End ------------------------------------------------------------------ Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -2866,6 +2878,7 @@ No match End ------------------------------------------------------------------ Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -2882,20 +2895,41 @@ No options First char = 'x' No need char -/x{1,3}+/DZ +/x{1,3}+/BZO ------------------------------------------------------------------ Bra - Once x - x{0,2} + x{0,2}+ Ket + End +------------------------------------------------------------------ + +/x{1,3}+/BZOi +------------------------------------------------------------------ + Bra + /i x + /i x{0,2}+ + Ket + End +------------------------------------------------------------------ + +/[^x]{1,3}+/BZO +------------------------------------------------------------------ + Bra + [^x] + [^x]{0,2}+ + Ket + End +------------------------------------------------------------------ + +/[^x]{1,3}+/BZOi +------------------------------------------------------------------ + Bra + /i [^x] + /i [^x]{0,2}+ Ket End ------------------------------------------------------------------ -Capturing subpattern count = 0 -No options -First char = 'x' -No need char /(x)*+/DZ ------------------------------------------------------------------ @@ -2908,12 +2942,14 @@ No need char End ------------------------------------------------------------------ Capturing subpattern count = 1 +May match empty string No options No first char No need char /^(\w++|\s++)*$/I Capturing subpattern count = 1 +May match empty string Options: anchored No first char No need char @@ -3075,7 +3111,7 @@ Need char = 'b' [bc]+ Ket CBra 5 - \w* + \w*+ Ket Ket Ket @@ -3154,7 +3190,7 @@ Failed: missing terminating ] for character class at offset 10 /[\s]/IDZ ------------------------------------------------------------------ Bra - [\x09\x0a\x0c\x0d ] + [\x09-\x0d ] Ket End ------------------------------------------------------------------ @@ -3289,6 +3325,7 @@ Need char = 'b' /(?=a).*/I Capturing subpattern count = 0 +May match empty string No options First char = 'a' No need char @@ -3307,6 +3344,7 @@ Need char = 'z' (caseless) /(?=a)(?=b)/I Capturing subpattern count = 0 +May match empty string No options First char = 'a' No need char @@ -3373,6 +3411,7 @@ Need char = 'a' /(a)*/I Capturing subpattern count = 1 +May match empty string No options No first char No need char @@ -3601,6 +3640,7 @@ No match /(?C0)(abc(?C1))*/I Capturing subpattern count = 1 +May match empty string No options No first char No need char @@ -3634,6 +3674,7 @@ No need char /(\d{3}(?C))*/I Capturing subpattern count = 1 +May match empty string No options No first char No need char @@ -3770,20 +3811,6 @@ Need char = 'b' --->abbbbbccc 1 ^ ^ Callout data = 1 - 1 ^ ^ -Callout data = 1 - 1 ^ ^ -Callout data = 1 - 1 ^ ^ -Callout data = 1 - 1 ^ ^ -Callout data = 1 - 1 ^ ^ -Callout data = 1 - 1 ^ ^ -Callout data = 1 - 1 ^ ^ -Callout data = 1 No match /a(b+?)(c*?)(?C1)/I @@ -3880,6 +3907,7 @@ Failed: recursive call could loop indefinitely at offset 16 /^([^()]|\((?1)*\))*$/I Capturing subpattern count = 1 +May match empty string Options: anchored No first char No need char @@ -4159,6 +4187,7 @@ Named capturing subpatterns: one 1 three 3 two 2 +May match empty string Options: anchored caseless No first char No need char @@ -4258,6 +4287,7 @@ Need char = 'z' /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is Capturing subpattern count = 31 +May match empty string Options: anchored dotall No first char No need char @@ -4265,6 +4295,7 @@ No need char /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is Capturing subpattern count = 31 Max back reference = 31 +May match empty string Options: dotall No first char No need char @@ -4272,6 +4303,7 @@ No need char /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is Capturing subpattern count = 32 Max back reference = 32 +May match empty string Options: dotall No first char No need char @@ -4423,6 +4455,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: Tes 1 Test 2 +May match empty string No options No first char No need char @@ -4441,6 +4474,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: Tes 2 Test 1 +May match empty string No options No first char No need char @@ -4518,6 +4552,7 @@ Need char = ']' End ------------------------------------------------------------------ Capturing subpattern count = 2 +May match empty string No options No first char No need char @@ -4538,6 +4573,7 @@ No need char End ------------------------------------------------------------------ Capturing subpattern count = 2 +May match empty string No options No first char No need char @@ -4569,6 +4605,7 @@ No need char End ------------------------------------------------------------------ Capturing subpattern count = 2 +May match empty string No options No first char No need char @@ -4576,9 +4613,7 @@ No need char /[ab]{1}+/DZ ------------------------------------------------------------------ Bra - Once - [ab]{1,1} - Ket + [ab]{1,1}+ Ket End ------------------------------------------------------------------ @@ -5290,7 +5325,7 @@ No match Callout 255 0 21 CBra 1 Callout 255 1 9 - [ab]{1,4} + [ab]{1,4}+ Callout 255 10 1 c Callout 255 11 0 @@ -5303,7 +5338,7 @@ No match Ket CBra 1 Callout 255 1 9 - [ab]{1,4} + [ab]{1,4}+ Callout 255 10 1 c Callout 255 11 0 @@ -5316,7 +5351,7 @@ No match Ket CBra 1 Callout 255 1 9 - [ab]{1,4} + [ab]{1,4}+ Callout 255 10 1 c Callout 255 11 0 @@ -5329,7 +5364,7 @@ No match Ket CBra 1 Callout 255 1 9 - [ab]{1,4} + [ab]{1,4}+ Callout 255 10 1 c Callout 255 11 0 @@ -5343,7 +5378,7 @@ No match Braminzero CBra 1 Callout 255 1 9 - [ab]{1,4} + [ab]{1,4}+ Callout 255 10 1 c Callout 255 11 0 @@ -5397,6 +5432,7 @@ Need char = '3' /\b.*/I Capturing subpattern count = 0 Max lookbehind = 1 +May match empty string No options No first char No need char @@ -5406,6 +5442,7 @@ No need char /\b.*/Is Capturing subpattern count = 0 Max lookbehind = 1 +May match empty string Options: dotall No first char No need char @@ -5414,6 +5451,7 @@ No need char /(?!.bcd).*/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -6002,6 +6040,7 @@ Matched, but too many substrings /[^()]*(?:\((?R)\)[^()]*)*/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -6014,6 +6053,7 @@ No need char /[^()]*(?:\((?>(?R))\)[^()]*)*/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -6024,6 +6064,7 @@ No need char /[^()]*(?:\((?R)\))*[^()]*/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -6034,6 +6075,7 @@ No need char /(?:\((?R)\))*[^()]*/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -6046,6 +6088,7 @@ No need char /(?:\((?R)\))|[^()]*/I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -6095,6 +6138,17 @@ no parentheses with name "Z" 2: a1 copy substring Z failed -7 C a1 (2) A + +/(?|(?<a>)(?<b>)(?<a>)|(?<a>)(?<b>)(?<a>))/IJ +Capturing subpattern count = 3 +Named capturing subpatterns: + a 1 + a 3 + b 2 +May match empty string +Options: dupnames +No first char +No need char /^(?P<A>a)(?P<A>b)/IJ Capturing subpattern count = 2 @@ -6305,7 +6359,7 @@ Need char = 'X' 1: X /(?:(?(2y)a|b)(X))+/I -Failed: reference to non-existent subpattern at offset 9 +Failed: malformed number or name after (?( at offset 7 /(?:(?(ZA)a|b)(?P<ZZ>X))+/I Failed: reference to non-existent subpattern at offset 9 @@ -6377,9 +6431,9 @@ No options No first char Need char = ',' Subject length lower bound = 1 -Starting byte set: \x09 \x0a \x0c \x0d \x20 , +Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20 , \x0b,\x0b - 0: , + 0: \x0b,\x0b \x0c,\x0d 0: \x0c,\x0d @@ -6488,7 +6542,7 @@ No match No match /^abc/Im<bad> -Unknown newline type at: <bad> +Unknown modifier at: <bad> /abc/I @@ -6497,12 +6551,13 @@ No options First char = 'a' Need char = 'c' xyz\rabc\<bad> -Unknown newline type at: <bad> +Unknown escape sequence at: <bad> abc 0: abc /.*/I<lf> Capturing subpattern count = 0 +May match empty string Options: Forced newline sequence: LF First char at start or follows newline @@ -6544,6 +6599,7 @@ Need char = 'f' +((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I Capturing subpattern count = 1 +May match empty string No options No first char No need char @@ -7467,7 +7523,7 @@ Matched, but too many substrings /a*[^a]/BZ ------------------------------------------------------------------ Bra - a* + a*+ [^a] Ket End @@ -7609,7 +7665,7 @@ No match ------------------------------------------------------------------ Bra ^ - [a-z]+ + [a-z]++ Ket End ------------------------------------------------------------------ @@ -7650,7 +7706,7 @@ No match ^ CBra 1 Cond - 2 Cond nref + 2 Cond ref y Ket [()] @@ -7710,6 +7766,7 @@ Named capturing subpatterns: one 1 three 3 two 2 +May match empty string Options: anchored caseless No first char No need char @@ -7809,15 +7866,9 @@ Failed: reference to non-existent subpattern at offset 7 1: abcabc1Xabc2XabcX 2: abcabc1Xabc2XabcX -/(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x +/(?<A> (?'B' abc (?(R) (?(R&C)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x Failed: reference to non-existent subpattern at offset 29 -/(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x - abcabc1Xabc2XabcXabcabc - 0: abcabc1Xabc2XabcX - 1: abcabc1Xabc2XabcX - 2: abcabc1Xabc2XabcX - /^(?(DEFINE) abc | xyz ) /x Failed: DEFINE group contains more than one branch at offset 22 @@ -8041,7 +8092,7 @@ Failed: a numbered reference must not be zero at offset 8 /^(a)\g{3/ Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 8 -/^(a)\g{4a}/ +/^(a)\g{aa}/ Failed: reference to non-existent subpattern at offset 9 /^a.b/<lf> @@ -8546,7 +8597,7 @@ No match \d \v++ \w - \v+ + \v++ \S \v++ \V @@ -8644,27 +8695,18 @@ No match +6 ^ ^ (*FAIL) +6 ^ ^ (*FAIL) +6 ^ ^ (*FAIL) - +4 ^ ^ c+ - +2 ^ ^ b? - +4 ^ ^ c+ - +2 ^^ b? - +4 ^^ c+ +0 ^ a+ +2 ^ ^ b? +4 ^ ^ c+ +6 ^ ^ (*FAIL) +6 ^ ^ (*FAIL) +6 ^ ^ (*FAIL) - +4 ^ ^ c+ - +2 ^^ b? - +4 ^^ c+ +0 ^ a+ +2 ^^ b? +4 ^ ^ c+ +6 ^ ^ (*FAIL) +6 ^ ^ (*FAIL) +6 ^ ^ (*FAIL) - +4 ^^ c+ No match /a+b?(*PRUNE)c+(*FAIL)/C @@ -9233,8 +9275,28 @@ No match ab No match -/a(?!)+b/ -Failed: nothing to repeat at offset 5 +/a(?!)b/BZ +------------------------------------------------------------------ + Bra + a + *FAIL + b + Ket + End +------------------------------------------------------------------ + +/(?!)?a/BZ +------------------------------------------------------------------ + Bra + Brazero + Assert not + Ket + a + Ket + End +------------------------------------------------------------------ + ab + 0: a /a(*FAIL)+b/ Failed: nothing to repeat at offset 8 @@ -9249,6 +9311,7 @@ Starting byte set: x y z /(?(?=.*b)b|^)/CI Capturing subpattern count = 0 +May match empty string Options: No first char No need char @@ -9353,7 +9416,7 @@ No match No match /(*NO_START_OPT)xyz/C - abcxyz + abcxyz --->abcxyz +15 ^ x +15 ^ x @@ -9363,6 +9426,15 @@ No match +17 ^ ^ z +18 ^ ^ 0: xyz + +/(*NO_AUTO_POSSESS)a+b/BZ +------------------------------------------------------------------ + Bra + a+ + b + Ket + End +------------------------------------------------------------------ /xyz/CY abcxyz @@ -10160,7 +10232,6 @@ No set of starting bytes Capturing subpattern count = 1 Named capturing subpatterns: a 1 - a 1 No options No first char No need char @@ -10233,7 +10304,7 @@ No match Ket Ket Cond - 4 Cond nref + Cond ref <D>2 X Alt Y @@ -10279,7 +10350,7 @@ No match CBra 4 d Cond - Cond nrecurse 1 + Cond recurse <A>2 $ Alt Recurse @@ -11036,12 +11107,14 @@ No need char /(^ab|^)+/I Capturing subpattern count = 1 +May match empty string Options: anchored No first char No need char /(^ab|^)++/I Capturing subpattern count = 1 +May match empty string Options: anchored No first char No need char @@ -11060,12 +11133,14 @@ No need char /(?:^ab|^)+/I Capturing subpattern count = 0 +May match empty string Options: anchored No first char No need char /(?:^ab|^)++/I Capturing subpattern count = 0 +May match empty string Options: anchored No first char No need char @@ -11084,12 +11159,14 @@ Need char = 'b' /(.*ab|.*)+/I Capturing subpattern count = 1 +May match empty string No options First char at start or follows newline No need char /(.*ab|.*)++/I Capturing subpattern count = 1 +May match empty string No options First char at start or follows newline No need char @@ -11108,12 +11185,14 @@ Need char = 'b' /(?:.*ab|.*)+/I Capturing subpattern count = 0 +May match empty string No options First char at start or follows newline No need char /(?:.*ab|.*)++/I Capturing subpattern count = 0 +May match empty string No options First char at start or follows newline No need char @@ -11519,7 +11598,7 @@ Matched, but too many substrings Assert not a Ket - \w+ + \w++ Ket End ------------------------------------------------------------------ @@ -11645,6 +11724,7 @@ Starting byte set: < o t u /a(*SKIP)c|b(*ACCEPT)|/+S!I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -11715,11 +11795,11 @@ Minimum match() recursion limit = 45 Bra ^ Once_NC - a+ + a++ Ket Once CBra 1 - z+ + z++ Ket Ket \w @@ -11778,14 +11858,14 @@ No match /^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/ \Maabbccddee -Minimum match() limit = 12 -Minimum match() recursion limit = 3 +Minimum match() limit = 7 +Minimum match() recursion limit = 2 0: aabbccddee /^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/ \Maabbccddee -Minimum match() limit = 22 -Minimum match() recursion limit = 21 +Minimum match() limit = 17 +Minimum match() recursion limit = 16 0: aabbccddee 1: aa 2: bb @@ -11795,8 +11875,8 @@ Minimum match() recursion limit = 21 /^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/ \Maabbccddee -Minimum match() limit = 18 -Minimum match() recursion limit = 13 +Minimum match() limit = 13 +Minimum match() recursion limit = 10 0: aabbccddee 1: aa 2: cc @@ -11887,7 +11967,10 @@ No match Failed: \N is not supported in a class at offset 3 /a[B-\Nc]/ -Failed: \N is not supported in a class at offset 5 +Failed: invalid range in character class at offset 5 + +/a[B\Nc]/ +Failed: \N is not supported in a class at offset 4 /(a)(?2){0,1999}?(b)/ @@ -12293,6 +12376,7 @@ No need char /(?>.*?)(?<=(abcd)|(wxyz))/I Capturing subpattern count = 2 Max lookbehind = 4 +May match empty string No options No first char No need char @@ -12300,6 +12384,7 @@ No need char /(?>.*)(?<=(abcd)|(wxyz))/I Capturing subpattern count = 2 Max lookbehind = 4 +May match empty string No options No first char No need char @@ -12338,6 +12423,7 @@ Need char = 'c' /.?/S-I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -12345,6 +12431,7 @@ Study returned NULL /.?/S!I Capturing subpattern count = 0 +May match empty string No options No first char No need char @@ -12665,4 +12752,1377 @@ No match aaaaaaaaaaaaaz\Q10 Error -21 (recursion limit exceeded) +/-- This test causes a segfault with Perl 5.18.0 --/ + +/^(?=(a)){0}b(?1)/ + backgammon + 0: ba + +/(?|(?<n>f)|(?<n>b))/JI +Capturing subpattern count = 1 +Named capturing subpatterns: + n 1 +Options: dupnames +No first char +No need char + +/(?<a>abc)(?<a>z)\k<a>()/JDZS +------------------------------------------------------------------ + Bra + CBra 1 + abc + Ket + CBra 2 + z + Ket + \k<a>2 + CBra 3 + Ket + Ket + End +------------------------------------------------------------------ +Capturing subpattern count = 3 +Max back reference = 2 +Named capturing subpatterns: + a 1 + a 2 +Options: dupnames +First char = 'a' +Need char = 'z' +Subject length lower bound = 5 +No set of starting bytes + +/a*[bcd]/BZ +------------------------------------------------------------------ + Bra + a*+ + [b-d] + Ket + End +------------------------------------------------------------------ + +/[bcd]*a/BZ +------------------------------------------------------------------ + Bra + [b-d]*+ + a + Ket + End +------------------------------------------------------------------ + +/-- A complete set of tests for auto-possessification of character types --/ + +/\D+\D \D+\d \D+\S \D+\s \D+\W \D+\w \D+. \D+\C \D+\R \D+\H \D+\h \D+\V \D+\v \D+\Z \D+\z \D+$/BZx +------------------------------------------------------------------ + Bra + \D+ + \D + \D++ + \d + \D+ + \S + \D+ + \s + \D+ + \W + \D+ + \w + \D+ + Any + \D+ + AllAny + \D+ + \R + \D+ + \H + \D+ + \h + \D+ + \V + \D+ + \v + \D+ + \Z + \D++ + \z + \D+ + $ + Ket + End +------------------------------------------------------------------ + +/\d+\D \d+\d \d+\S \d+\s \d+\W \d+\w \d+. \d+\C \d+\R \d+\H \d+\h \d+\V \d+\v \d+\Z \d+\z \d+$/BZx +------------------------------------------------------------------ + Bra + \d++ + \D + \d+ + \d + \d+ + \S + \d++ + \s + \d++ + \W + \d+ + \w + \d+ + Any + \d+ + AllAny + \d++ + \R + \d+ + \H + \d++ + \h + \d+ + \V + \d++ + \v + \d++ + \Z + \d++ + \z + \d++ + $ + Ket + End +------------------------------------------------------------------ + +/\S+\D \S+\d \S+\S \S+\s \S+\W \S+\w \S+. \S+\C \S+\R \S+\H \S+\h \S+\V \S+\v \S+\Z \S+\z \S+$/BZx +------------------------------------------------------------------ + Bra + \S+ + \D + \S+ + \d + \S+ + \S + \S++ + \s + \S+ + \W + \S+ + \w + \S+ + Any + \S+ + AllAny + \S++ + \R + \S+ + \H + \S++ + \h + \S+ + \V + \S++ + \v + \S++ + \Z + \S++ + \z + \S++ + $ + Ket + End +------------------------------------------------------------------ + +/\s+\D \s+\d \s+\S \s+\s \s+\W \s+\w \s+. \s+\C \s+\R \s+\H \s+\h \s+\V \s+\v \s+\Z \s+\z \s+$/BZx +------------------------------------------------------------------ + Bra + \s+ + \D + \s++ + \d + \s++ + \S + \s+ + \s + \s+ + \W + \s++ + \w + \s+ + Any + \s+ + AllAny + \s+ + \R + \s+ + \H + \s+ + \h + \s+ + \V + \s+ + \v + \s+ + \Z + \s++ + \z + \s+ + $ + Ket + End +------------------------------------------------------------------ + +/\W+\D \W+\d \W+\S \W+\s \W+\W \W+\w \W+. \W+\C \W+\R \W+\H \W+\h \W+\V \W+\v \W+\Z \W+\z \W+$/BZx +------------------------------------------------------------------ + Bra + \W+ + \D + \W++ + \d + \W+ + \S + \W+ + \s + \W+ + \W + \W++ + \w + \W+ + Any + \W+ + AllAny + \W+ + \R + \W+ + \H + \W+ + \h + \W+ + \V + \W+ + \v + \W+ + \Z + \W++ + \z + \W+ + $ + Ket + End +------------------------------------------------------------------ + +/\w+\D \w+\d \w+\S \w+\s \w+\W \w+\w \w+. \w+\C \w+\R \w+\H \w+\h \w+\V \w+\v \w+\Z \w+\z \w+$/BZx +------------------------------------------------------------------ + Bra + \w+ + \D + \w+ + \d + \w+ + \S + \w++ + \s + \w++ + \W + \w+ + \w + \w+ + Any + \w+ + AllAny + \w++ + \R + \w+ + \H + \w++ + \h + \w+ + \V + \w++ + \v + \w++ + \Z + \w++ + \z + \w++ + $ + Ket + End +------------------------------------------------------------------ + +/\C+\D \C+\d \C+\S \C+\s \C+\W \C+\w \C+. \C+\C \C+\R \C+\H \C+\h \C+\V \C+\v \C+\Z \C+\z \C+$/BZx +------------------------------------------------------------------ + Bra + AllAny+ + \D + AllAny+ + \d + AllAny+ + \S + AllAny+ + \s + AllAny+ + \W + AllAny+ + \w + AllAny+ + Any + AllAny+ + AllAny + AllAny+ + \R + AllAny+ + \H + AllAny+ + \h + AllAny+ + \V + AllAny+ + \v + AllAny+ + \Z + AllAny++ + \z + AllAny+ + $ + Ket + End +------------------------------------------------------------------ + +/\R+\D \R+\d \R+\S \R+\s \R+\W \R+\w \R+. \R+\C \R+\R \R+\H \R+\h \R+\V \R+\v \R+\Z \R+\z \R+$/BZx +------------------------------------------------------------------ + Bra + \R+ + \D + \R++ + \d + \R+ + \S + \R++ + \s + \R+ + \W + \R++ + \w + \R++ + Any + \R+ + AllAny + \R+ + \R + \R+ + \H + \R++ + \h + \R+ + \V + \R+ + \v + \R+ + \Z + \R++ + \z + \R+ + $ + Ket + End +------------------------------------------------------------------ + +/\H+\D \H+\d \H+\S \H+\s \H+\W \H+\w \H+. \H+\C \H+\R \H+\H \H+\h \H+\V \H+\v \H+\Z \H+\z \H+$/BZx +------------------------------------------------------------------ + Bra + \H+ + \D + \H+ + \d + \H+ + \S + \H+ + \s + \H+ + \W + \H+ + \w + \H+ + Any + \H+ + AllAny + \H+ + \R + \H+ + \H + \H++ + \h + \H+ + \V + \H+ + \v + \H+ + \Z + \H++ + \z + \H+ + $ + Ket + End +------------------------------------------------------------------ + +/\h+\D \h+\d \h+\S \h+\s \h+\W \h+\w \h+. \h+\C \h+\R \h+\H \h+\h \h+\V \h+\v \h+\Z \h+\z \h+$/BZx +------------------------------------------------------------------ + Bra + \h+ + \D + \h++ + \d + \h++ + \S + \h+ + \s + \h+ + \W + \h++ + \w + \h+ + Any + \h+ + AllAny + \h++ + \R + \h++ + \H + \h+ + \h + \h+ + \V + \h++ + \v + \h+ + \Z + \h++ + \z + \h+ + $ + Ket + End +------------------------------------------------------------------ + +/\V+\D \V+\d \V+\S \V+\s \V+\W \V+\w \V+. \V+\C \V+\R \V+\H \V+\h \V+\V \V+\v \V+\Z \V+\z \V+$/BZx +------------------------------------------------------------------ + Bra + \V+ + \D + \V+ + \d + \V+ + \S + \V+ + \s + \V+ + \W + \V+ + \w + \V+ + Any + \V+ + AllAny + \V++ + \R + \V+ + \H + \V+ + \h + \V+ + \V + \V++ + \v + \V+ + \Z + \V++ + \z + \V+ + $ + Ket + End +------------------------------------------------------------------ + +/\v+\D \v+\d \v+\S \v+\s \v+\W \v+\w \v+. \v+\C \v+\R \v+\H \v+\h \v+\V \v+\v \v+\Z \v+\z \v+$/BZx +------------------------------------------------------------------ + Bra + \v+ + \D + \v++ + \d + \v++ + \S + \v+ + \s + \v+ + \W + \v++ + \w + \v+ + Any + \v+ + AllAny + \v+ + \R + \v+ + \H + \v++ + \h + \v++ + \V + \v+ + \v + \v+ + \Z + \v++ + \z + \v+ + $ + Ket + End +------------------------------------------------------------------ + +/ a+\D a+\d a+\S a+\s a+\W a+\w a+. a+\C a+\R a+\H a+\h a+\V a+\v a+\Z a+\z a+$/BZx +------------------------------------------------------------------ + Bra + a+ + \D + a++ + \d + a+ + \S + a++ + \s + a++ + \W + a+ + \w + a+ + Any + a+ + AllAny + a++ + \R + a+ + \H + a++ + \h + a+ + \V + a++ + \v + a++ + \Z + a++ + \z + a++ + $ + Ket + End +------------------------------------------------------------------ + +/\n+\D \n+\d \n+\S \n+\s \n+\W \n+\w \n+. \n+\C \n+\R \n+\H \n+\h \n+\V \n+\v \n+\Z \n+\z \n+$/BZx +------------------------------------------------------------------ + Bra + \x0a+ + \D + \x0a++ + \d + \x0a++ + \S + \x0a+ + \s + \x0a+ + \W + \x0a++ + \w + \x0a+ + Any + \x0a+ + AllAny + \x0a+ + \R + \x0a+ + \H + \x0a++ + \h + \x0a++ + \V + \x0a+ + \v + \x0a+ + \Z + \x0a++ + \z + \x0a+ + $ + Ket + End +------------------------------------------------------------------ + +/ .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\C .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/BZx +------------------------------------------------------------------ + Bra + Any+ + \D + Any+ + \d + Any+ + \S + Any+ + \s + Any+ + \W + Any+ + \w + Any+ + Any + Any+ + AllAny + Any++ + \R + Any+ + \H + Any+ + \h + Any+ + \V + Any+ + \v + Any+ + \Z + Any++ + \z + Any+ + $ + Ket + End +------------------------------------------------------------------ + +/ .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\C .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/BZxs +------------------------------------------------------------------ + Bra + AllAny+ + \D + AllAny+ + \d + AllAny+ + \S + AllAny+ + \s + AllAny+ + \W + AllAny+ + \w + AllAny+ + AllAny + AllAny+ + AllAny + AllAny+ + \R + AllAny+ + \H + AllAny+ + \h + AllAny+ + \V + AllAny+ + \v + AllAny+ + \Z + AllAny++ + \z + AllAny+ + $ + Ket + End +------------------------------------------------------------------ + +/\D+$ \d+$ \S+$ \s+$ \W+$ \w+$ \C+$ \R+$ \H+$ \h+$ \V+$ \v+$ a+$ \n+$ .+$ .+$/BZxm +------------------------------------------------------------------ + Bra + \D+ + /m $ + \d++ + /m $ + \S++ + /m $ + \s+ + /m $ + \W+ + /m $ + \w++ + /m $ + AllAny+ + /m $ + \R+ + /m $ + \H+ + /m $ + \h+ + /m $ + \V+ + /m $ + \v+ + /m $ + a+ + /m $ + \x0a+ + /m $ + Any+ + /m $ + Any+ + /m $ + Ket + End +------------------------------------------------------------------ + +/(?=a+)a(a+)++a/BZ +------------------------------------------------------------------ + Bra + Assert + a++ + Ket + a + CBraPos 1 + a++ + KetRpos + a + Ket + End +------------------------------------------------------------------ + +/a+(bb|cc)a+(?:bb|cc)a+(?>bb|cc)a+(?:bb|cc)+a+(aa)a+(?:bb|aa)/BZ +------------------------------------------------------------------ + Bra + a++ + CBra 1 + bb + Alt + cc + Ket + a++ + Bra + bb + Alt + cc + Ket + a++ + Once_NC + bb + Alt + cc + Ket + a++ + Bra + bb + Alt + cc + KetRmax + a+ + CBra 2 + aa + Ket + a+ + Bra + bb + Alt + aa + Ket + Ket + End +------------------------------------------------------------------ + +/a+(bb|cc)?#a+(?:bb|cc)??#a+(?:bb|cc)?+#a+(?:bb|cc)*#a+(bb|cc)?a#a+(?:aa)?/BZ +------------------------------------------------------------------ + Bra + a++ + Brazero + CBra 1 + bb + Alt + cc + Ket + # + a++ + Braminzero + Bra + bb + Alt + cc + Ket + # + a++ + Once + Brazero + Bra + bb + Alt + cc + Ket + Ket + # + a++ + Brazero + Bra + bb + Alt + cc + KetRmax + # + a+ + Brazero + CBra 2 + bb + Alt + cc + Ket + a# + a+ + Brazero + Bra + aa + Ket + Ket + End +------------------------------------------------------------------ + +/a+(?:bb)?a#a+(?:|||)#a+(?:|b)a#a+(?:|||)?a/BZ +------------------------------------------------------------------ + Bra + a+ + Brazero + Bra + bb + Ket + a# + a++ + Bra + Alt + Alt + Alt + Ket + # + a+ + Bra + Alt + b + Ket + a# + a+ + Brazero + Bra + Alt + Alt + Alt + Ket + a + Ket + End +------------------------------------------------------------------ + +/[ab]*/BZ +------------------------------------------------------------------ + Bra + [ab]*+ + Ket + End +------------------------------------------------------------------ + aaaa + 0: aaaa + +/[ab]*?/BZ +------------------------------------------------------------------ + Bra + [ab]*? + Ket + End +------------------------------------------------------------------ + aaaa + 0: + +/[ab]?/BZ +------------------------------------------------------------------ + Bra + [ab]?+ + Ket + End +------------------------------------------------------------------ + aaaa + 0: a + +/[ab]??/BZ +------------------------------------------------------------------ + Bra + [ab]?? + Ket + End +------------------------------------------------------------------ + aaaa + 0: + +/[ab]+/BZ +------------------------------------------------------------------ + Bra + [ab]++ + Ket + End +------------------------------------------------------------------ + aaaa + 0: aaaa + +/[ab]+?/BZ +------------------------------------------------------------------ + Bra + [ab]+? + Ket + End +------------------------------------------------------------------ + aaaa + 0: a + +/[ab]{2,3}/BZ +------------------------------------------------------------------ + Bra + [ab]{2,3}+ + Ket + End +------------------------------------------------------------------ + aaaa + 0: aaa + +/[ab]{2,3}?/BZ +------------------------------------------------------------------ + Bra + [ab]{2,3}? + Ket + End +------------------------------------------------------------------ + aaaa + 0: aa + +/[ab]{2,}/BZ +------------------------------------------------------------------ + Bra + [ab]{2,}+ + Ket + End +------------------------------------------------------------------ + aaaa + 0: aaaa + +/[ab]{2,}?/BZ +------------------------------------------------------------------ + Bra + [ab]{2,}? + Ket + End +------------------------------------------------------------------ + aaaa + 0: aa + +/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/BZ +------------------------------------------------------------------ + Bra + \d++ + \s{0,5}+ + = + \s*+ + \S? + = + \w{0,4}+ + \W*+ + Ket + End +------------------------------------------------------------------ + +/[a-d]{5,12}[e-z0-9]*#[^a-z]+[b-y]*a[2-7]?[^0-9a-z]+/BZ +------------------------------------------------------------------ + Bra + [a-d]{5,12}+ + [0-9e-z]*+ + # + [\x00-`{-\xff] (neg)++ + [b-y]*+ + a + [2-7]?+ + [\x00-/:-`{-\xff] (neg)++ + Ket + End +------------------------------------------------------------------ + +/[a-z]*\s#[ \t]?\S#[a-c]*\S#[C-G]+?\d#[4-8]*\D#[4-9,]*\D#[!$]{0,5}\w#[M-Xf-l]+\W#[a-c,]?\W/BZ +------------------------------------------------------------------ + Bra + [a-z]*+ + \s + # + [\x09 ]?+ + \S + # + [a-c]* + \S + # + [C-G]++ + \d + # + [4-8]*+ + \D + # + [,4-9]* + \D + # + [!$]{0,5}+ + \w + # + [M-Xf-l]++ + \W + # + [,a-c]? + \W + Ket + End +------------------------------------------------------------------ + +/a+(aa|bb)*c#a*(bb|cc)*a#a?(bb|cc)*d#[a-f]*(g|hh)*f/BZ +------------------------------------------------------------------ + Bra + a+ + Brazero + CBra 1 + aa + Alt + bb + KetRmax + c# + a* + Brazero + CBra 2 + bb + Alt + cc + KetRmax + a# + a?+ + Brazero + CBra 3 + bb + Alt + cc + KetRmax + d# + [a-f]* + Brazero + CBra 4 + g + Alt + hh + KetRmax + f + Ket + End +------------------------------------------------------------------ + +/[a-f]*(g|hh|i)*i#[a-x]{4,}(y{0,6})*y#[a-k]+(ll|mm)+n/BZ +------------------------------------------------------------------ + Bra + [a-f]*+ + Brazero + CBra 1 + g + Alt + hh + Alt + i + KetRmax + i# + [a-x]{4,} + Brazero + SCBra 2 + y{0,6} + KetRmax + y# + [a-k]++ + CBra 3 + ll + Alt + mm + KetRmax + n + Ket + End +------------------------------------------------------------------ + +/[a-f]*(?>gg|hh)+#[a-f]*(?>gg|hh)?#[a-f]*(?>gg|hh)*a#[a-f]*(?>gg|hh)*h/BZ +------------------------------------------------------------------ + Bra + [a-f]*+ + Once_NC + gg + Alt + hh + KetRmax + # + [a-f]*+ + Brazero + Once_NC + gg + Alt + hh + Ket + # + [a-f]* + Brazero + Once_NC + gg + Alt + hh + KetRmax + a# + [a-f]*+ + Brazero + Once_NC + gg + Alt + hh + KetRmax + h + Ket + End +------------------------------------------------------------------ + +/[a-c]*d/DZS +------------------------------------------------------------------ + Bra + [a-c]*+ + d + Ket + End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +No first char +Need char = 'd' +Subject length lower bound = 1 +Starting byte set: a b c d + +/[a-c]+d/DZS +------------------------------------------------------------------ + Bra + [a-c]++ + d + Ket + End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +No first char +Need char = 'd' +Subject length lower bound = 2 +Starting byte set: a b c + +/[a-c]?d/DZS +------------------------------------------------------------------ + Bra + [a-c]?+ + d + Ket + End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +No first char +Need char = 'd' +Subject length lower bound = 1 +Starting byte set: a b c d + +/[a-c]{4,6}d/DZS +------------------------------------------------------------------ + Bra + [a-c]{4,6}+ + d + Ket + End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +No first char +Need char = 'd' +Subject length lower bound = 5 +Starting byte set: a b c + +/[a-c]{0,6}d/DZS +------------------------------------------------------------------ + Bra + [a-c]{0,6}+ + d + Ket + End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +No first char +Need char = 'd' +Subject length lower bound = 1 +Starting byte set: a b c d + +/-- End of special auto-possessive tests --/ + +/^A\o{1239}B/ +Failed: non-octal character in \o{} (closing brace missing?) at offset 8 + +/^A\oB/ +Failed: missing opening brace after \o at offset 3 + +/^A\x{zz}B/ +Failed: non-hex character in \x{} (closing brace missing?) at offset 5 + +/^A\x{12Z/ +Failed: non-hex character in \x{} (closing brace missing?) at offset 7 + +/^A\x{/ +Failed: non-hex character in \x{} (closing brace missing?) at offset 5 + +/[ab]++/BZO +------------------------------------------------------------------ + Bra + [ab]++ + Ket + End +------------------------------------------------------------------ + +/[^ab]*+/BZO +------------------------------------------------------------------ + Bra + [\x00-`c-\xff] (neg)*+ + Ket + End +------------------------------------------------------------------ + +/a{4}+/BZO +------------------------------------------------------------------ + Bra + a{4} + Ket + End +------------------------------------------------------------------ + +/a{4}+/BZOi +------------------------------------------------------------------ + Bra + /i a{4} + Ket + End +------------------------------------------------------------------ + +/[a-[:digit:]]+/ +Failed: invalid range in character class at offset 3 + +/[A-[:digit:]]+/ +Failed: invalid range in character class at offset 3 + +/[a-[.xxx.]]+/ +Failed: invalid range in character class at offset 3 + +/[a-[=xxx=]]+/ +Failed: invalid range in character class at offset 3 + +/[a-[!xxx!]]+/ +Failed: range out of order in character class at offset 3 + +/[A-[!xxx!]]+/ + A]]] + 0: A]]] + +/[a-\d]+/ +Failed: invalid range in character class at offset 4 + +/(?<0abc>xx)/ +Failed: group name must start with a non-digit at offset 3 + +/(?&1abc)xx(?<1abc>y)/ +Failed: group name must start with a non-digit at offset 3 + +/(?<ab-cd>xx)/ +Failed: syntax error in subpattern name (missing terminator) at offset 5 + +/(?'0abc'xx)/ +Failed: group name must start with a non-digit at offset 3 + +/(?P<0abc>xx)/ +Failed: group name must start with a non-digit at offset 4 + +/\k<5ghj>/ +Failed: group name must start with a non-digit at offset 3 + +/\k'5ghj'/ +Failed: group name must start with a non-digit at offset 3 + +/\k{2fgh}/ +Failed: group name must start with a non-digit at offset 3 + +/(?P=8yuki)/ +Failed: group name must start with a non-digit at offset 4 + +/\g{4df}/ +Failed: group name must start with a non-digit at offset 3 + +/(?&1abc)xx(?<1abc>y)/ +Failed: group name must start with a non-digit at offset 3 + +/(?P>1abc)xx(?<1abc>y)/ +Failed: group name must start with a non-digit at offset 4 + +/\g'3gh'/ +Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 7 + +/\g<5fg>/ +Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 7 + +/(?(<4gh>)abc)/ +Failed: group name must start with a non-digit at offset 4 + +/(?('4gh')abc)/ +Failed: group name must start with a non-digit at offset 4 + +/(?(4gh)abc)/ +Failed: malformed number or name after (?( at offset 4 + +/(?(R&6yh)abc)/ +Failed: group name must start with a non-digit at offset 5 + +/-- Test the ugly "start or end of word" compatibility syntax --/ + +/[[:<:]]red[[:>:]]/BZ +------------------------------------------------------------------ + Bra + \b + Assert + \w + Ket + red + \b + AssertB + Reverse + \w + Ket + Ket + End +------------------------------------------------------------------ + little red riding hood + 0: red + a /red/ thing + 0: red + red is a colour + 0: red + put it all on red + 0: red + ** Failers +No match + no reduction +No match + Alfred Winifred +No match + +/[a[:<:]] should give error/ +Failed: unknown POSIX class name at offset 4 + /-- End of testinput2 --/ diff --git a/pcre/testdata/testoutput20 b/pcre/testdata/testoutput20 index 7753be2db6a..c1b20ee804a 100644 --- a/pcre/testdata/testoutput20 +++ b/pcre/testdata/testoutput20 @@ -8,12 +8,10 @@ /^\x{ffff}?/i \x{ffff} 0: \x{ffff} - 1: /^\x{ffff}*/i \x{ffff} 0: \x{ffff} - 1: /^\x{ffff}{3}/i \x{ffff}\x{ffff}\x{ffff} @@ -22,6 +20,5 @@ /^\x{ffff}{0,3}/i \x{ffff} 0: \x{ffff} - 1: /-- End of testinput20 --/ diff --git a/pcre/testdata/testoutput21-16 b/pcre/testdata/testoutput21-16 index e831888a9e4..0e21350f891 100644 --- a/pcre/testdata/testoutput21-16 +++ b/pcre/testdata/testoutput21-16 @@ -8,7 +8,11 @@ No study data Error -28 from pcre16_fullinfo(0) Running in 16-bit mode but pattern was compiled in 8-bit mode -%-- Generated from: ^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]|[^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ +%-- Generated from: + /^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]| + [^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ + /x + In 16-bit mode with options: S>testdata/saved16LE-1 FS>testdata/saved16BE-1 In 32-bit mode with options: S>testdata/saved32LE-1 @@ -42,7 +46,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: name 1 other 2 -Options: anchored +Options: anchored extended No first char No need char Subject length lower bound = 6 @@ -75,7 +79,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: name 1 other 2 -Options: anchored +Options: anchored extended No first char No need char Subject length lower bound = 6 diff --git a/pcre/testdata/testoutput21-32 b/pcre/testdata/testoutput21-32 index c6e8f6ca0ca..183487aca13 100644 --- a/pcre/testdata/testoutput21-32 +++ b/pcre/testdata/testoutput21-32 @@ -8,7 +8,11 @@ No study data Error -28 from pcre32_fullinfo(0) Running in 32-bit mode but pattern was compiled in 8-bit mode -%-- Generated from: ^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]|[^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ +%-- Generated from: + /^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]| + [^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ + /x + In 16-bit mode with options: S>testdata/saved16LE-1 FS>testdata/saved16BE-1 In 32-bit mode with options: S>testdata/saved32LE-1 @@ -54,7 +58,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: name 1 other 2 -Options: anchored +Options: anchored extended No first char No need char Subject length lower bound = 6 @@ -87,7 +91,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: name 1 other 2 -Options: anchored +Options: anchored extended No first char No need char Subject length lower bound = 6 diff --git a/pcre/testdata/testoutput22-16 b/pcre/testdata/testoutput22-16 index b2c673d43a0..f896b13e18a 100644 --- a/pcre/testdata/testoutput22-16 +++ b/pcre/testdata/testoutput22-16 @@ -1,10 +1,15 @@ /-- Tests for reloading pre-compile patterns with UTF-16 or UTF-32 support. */ -%-- Generated from: (?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,}[\x{f123}\x{10039}\x{20000}-\x{21234}]?|[A-Cx-z\x{100000}-\x{1000a7}\x{101234}])(?<cb2>[^az]) - In 16-bit mode with options: S8>testdata/saved16LE-1 - FS8>testdata/saved16BE-1 - In 32-bit mode with options: S8>testdata/saved32LE-1 - FS8testdata/saved32BE-1 +%-- Generated from: + /(?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,} + [\x{f123}\x{10039}\x{20000}-\x{21234}]?| + [A-Cx-z\x{100000}-\x{1000a7}\x{101234}]) + (?<cb2>[^az])/x + + In 16-bit mode with options: S8>testdata/saved16LE-2 + FS8>testdata/saved16BE-2 + In 32-bit mode with options: S8>testdata/saved32LE-2 + FS8>testdata/saved32BE-2 --%8x <!testsaved16LE-2 @@ -28,7 +33,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: cb2 2 cbra1 1 -Options: utf +Options: extended utf No first char No need char Subject length lower bound = 2 @@ -55,7 +60,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: cb2 2 cbra1 1 -Options: utf +Options: extended utf No first char No need char Subject length lower bound = 2 diff --git a/pcre/testdata/testoutput22-32 b/pcre/testdata/testoutput22-32 index 5a1d0dac3ec..783926b8210 100644 --- a/pcre/testdata/testoutput22-32 +++ b/pcre/testdata/testoutput22-32 @@ -1,10 +1,15 @@ /-- Tests for reloading pre-compile patterns with UTF-16 or UTF-32 support. */ -%-- Generated from: (?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,}[\x{f123}\x{10039}\x{20000}-\x{21234}]?|[A-Cx-z\x{100000}-\x{1000a7}\x{101234}])(?<cb2>[^az]) - In 16-bit mode with options: S8>testdata/saved16LE-1 - FS8>testdata/saved16BE-1 - In 32-bit mode with options: S8>testdata/saved32LE-1 - FS8testdata/saved32BE-1 +%-- Generated from: + /(?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,} + [\x{f123}\x{10039}\x{20000}-\x{21234}]?| + [A-Cx-z\x{100000}-\x{1000a7}\x{101234}]) + (?<cb2>[^az])/x + + In 16-bit mode with options: S8>testdata/saved16LE-2 + FS8>testdata/saved16BE-2 + In 32-bit mode with options: S8>testdata/saved32LE-2 + FS8>testdata/saved32BE-2 --%8x <!testsaved16LE-2 @@ -40,7 +45,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: cb2 2 cbra1 1 -Options: utf +Options: extended utf No first char No need char Subject length lower bound = 2 @@ -67,7 +72,7 @@ Capturing subpattern count = 2 Named capturing subpatterns: cb2 2 cbra1 1 -Options: utf +Options: extended utf No first char No need char Subject length lower bound = 2 diff --git a/pcre/testdata/testoutput23 b/pcre/testdata/testoutput23 index 7b3634ca8a9..6f5384c34e8 100644 --- a/pcre/testdata/testoutput23 +++ b/pcre/testdata/testoutput23 @@ -1,5 +1,7 @@ /-- Tests for the 16-bit library only */ +< forbid 8W + /-- Check maximum non-UTF character size --/ /\x{ffff}/ @@ -7,7 +9,9 @@ 0: \x{ffff} /\x{10000}/ -Failed: character value in \x{...} sequence is too large at offset 8 +Failed: character value in \x{} or \o{} is too large at offset 8 + +/\o{20000}/ /-- Check character ranges --/ diff --git a/pcre/testdata/testoutput24 b/pcre/testdata/testoutput24 index 3f8cabe84c8..0714a0fe156 100644 --- a/pcre/testdata/testoutput24 +++ b/pcre/testdata/testoutput24 @@ -1,5 +1,7 @@ /-- Tests for the 16-bit library with UTF-16 support only */ +< forbid W + /bad/8 \x{d800} Error -10 (bad UTF-16 string) offset=0 reason=1 diff --git a/pcre/testdata/testoutput25 b/pcre/testdata/testoutput25 index 2a4066dfc48..7ad3378368f 100644 --- a/pcre/testdata/testoutput25 +++ b/pcre/testdata/testoutput25 @@ -1,5 +1,7 @@ /-- Tests for the 32-bit library only */ +< forbid 8w + /-- Check maximum character size --/ /\x{110000}/ @@ -10,6 +12,18 @@ /\x{ffffffff}/ +/\x{100000000}/ +Failed: character value in \x{} or \o{} is too large at offset 12 + +/\o{17777777777}/ + +/\o{20000000000}/ + +/\o{37777777777}/ + +/\o{40000000000}/ +Failed: character value in \x{} or \o{} is too large at offset 14 + /\x{7fffffff}\x{7fffffff}/I Capturing subpattern count = 0 No options diff --git a/pcre/testdata/testoutput26 b/pcre/testdata/testoutput26 index 0e6d0559fab..28f8d42a5ed 100644 --- a/pcre/testdata/testoutput26 +++ b/pcre/testdata/testoutput26 @@ -1,9 +1,14 @@ /-- Tests for the 32-bit library with UTF-32 support only */ +< forbid W + /-- Non-UTF characters --/ /\x{110000}/8 -Failed: character value in \x{...} sequence is too large at offset 9 +Failed: character value in \x{} or \o{} is too large at offset 9 + +/\o{4200000}/8 +Failed: character value in \x{} or \o{} is too large at offset 10 /\C/8 \x{110000} diff --git a/pcre/testdata/testoutput3 b/pcre/testdata/testoutput3 index 7b0a3e926e1..12ffc9911b6 100644 --- a/pcre/testdata/testoutput3 +++ b/pcre/testdata/testoutput3 @@ -1,6 +1,8 @@ /-- This set of tests checks local-specific features, using the fr_FR locale. It is not Perl-compatible. There is different version called wintestinput3 f or use on Windows, where the locale is called "french". --/ + +< forbid 8W /^[\w]+/ *** Failers diff --git a/pcre/testdata/testoutput4 b/pcre/testdata/testoutput4 index 6694111fb55..0dbec4eccab 100644 --- a/pcre/testdata/testoutput4 +++ b/pcre/testdata/testoutput4 @@ -1,6 +1,8 @@ /-- This set of tests is for UTF support, excluding Unicode properties. It is compatible with all versions of Perl >= 5.10 and both the 8-bit and 16-bit PCRE libraries. --/ + +< forbid 9?=ABCDEFfGILMNPTUWXZ< /a.b/8 acb @@ -1257,4 +1259,8 @@ No match \x{100}\x{100}\x{100} No match +/^a+[a\x{200}]/8 + aa + 0: aa + /-- End of testinput4 --/ diff --git a/pcre/testdata/testoutput5 b/pcre/testdata/testoutput5 index d583119dd9b..3fa581052e6 100644 --- a/pcre/testdata/testoutput5 +++ b/pcre/testdata/testoutput5 @@ -1,26 +1,47 @@ /-- This set of tests checks the API, internals, and non-Perl stuff for UTF support, excluding Unicode properties. However, tests that give different results in 8-bit and 16-bit modes are excluded (see tests 16 and 17). --/ + +< forbid W /\x{110000}/8DZ -Failed: character value in \x{...} sequence is too large at offset 9 +Failed: character value in \x{} or \o{} is too large at offset 9 + +/\o{4200000}/8DZ +Failed: character value in \x{} or \o{} is too large at offset 10 /\x{ffffffff}/8 -Failed: character value in \x{...} sequence is too large at offset 11 +Failed: character value in \x{} or \o{} is too large at offset 11 + +/\o{37777777777}/8 +Failed: character value in \x{} or \o{} is too large at offset 14 /\x{100000000}/8 -Failed: character value in \x{...} sequence is too large at offset 12 +Failed: character value in \x{} or \o{} is too large at offset 12 + +/\o{77777777777}/8 +Failed: character value in \x{} or \o{} is too large at offset 14 /\x{d800}/8 Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7 +/\o{154000}/8 +Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 9 + /\x{dfff}/8 Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7 +/\o{157777}/8 +Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 9 + /\x{d7ff}/8 +/\o{153777}/8 + /\x{e000}/8 +/\o{170000}/8 + /^\x{100}a\x{1234}/8 \x{100}a\x{1234}bcd 0: \x{100}a\x{1234} @@ -146,11 +167,12 @@ No match /\x{100}*/8DZ ------------------------------------------------------------------ Bra - \x{100}* + \x{100}*+ Ket End ------------------------------------------------------------------ Capturing subpattern count = 0 +May match empty string Options: utf No first char No need char @@ -159,7 +181,7 @@ No need char ------------------------------------------------------------------ Bra a - \x{100}* + \x{100}*+ Ket End ------------------------------------------------------------------ @@ -172,7 +194,7 @@ No need char ------------------------------------------------------------------ Bra ab - \x{100}* + \x{100}*+ Ket End ------------------------------------------------------------------ @@ -373,6 +395,7 @@ Need char = 'z' End ------------------------------------------------------------------ Capturing subpattern count = 2 +May match empty string Options: utf No first char No need char @@ -404,6 +427,7 @@ No need char End ------------------------------------------------------------------ Capturing subpattern count = 2 +May match empty string Options: utf No first char No need char @@ -424,6 +448,7 @@ No need char End ------------------------------------------------------------------ Capturing subpattern count = 2 +May match empty string Options: utf No first char No need char @@ -455,6 +480,7 @@ No need char End ------------------------------------------------------------------ Capturing subpattern count = 2 +May match empty string Options: utf No first char No need char @@ -768,7 +794,7 @@ No match /[\h]{3,}/8BZ ------------------------------------------------------------------ Bra - [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]{3,} + [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]{3,}+ Ket End ------------------------------------------------------------------ @@ -1572,7 +1598,7 @@ Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7 /[\h\x{e000}]+/8BZ ------------------------------------------------------------------ Bra - [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{e000}]+ + [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{e000}]++ Ket End ------------------------------------------------------------------ @@ -1594,7 +1620,7 @@ Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7 /[\H\x{d7ff}]+/8BZ ------------------------------------------------------------------ Bra - [\x00-\x08\x0a-\x1f!-\x9f\x{a1}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}\x{d7ff}]+ + [\x00-\x08\x0a-\x1f!-\x9f\x{a1}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}\x{d7ff}]++ Ket End ------------------------------------------------------------------ @@ -1616,7 +1642,7 @@ Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7 /[\v\x{e000}]+/8BZ ------------------------------------------------------------------ Bra - [\x0a-\x0d\x85\x{2028}-\x{2029}\x{e000}]+ + [\x0a-\x0d\x85\x{2028}-\x{2029}\x{e000}]++ Ket End ------------------------------------------------------------------ @@ -1634,7 +1660,7 @@ Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7 /[\V\x{d7ff}]+/8BZ ------------------------------------------------------------------ Bra - [\x00-\x09\x0e-\x84\x{86}-\x{2027}\x{202a}-\x{10ffff}\x{d7ff}]+ + [\x00-\x09\x0e-\x84\x{86}-\x{2027}\x{202a}-\x{10ffff}\x{d7ff}]++ Ket End ------------------------------------------------------------------ @@ -1808,10 +1834,8 @@ Partial match: \x{0d}\x{0d} /i [^\x{8000}]* /i [^\x{7fff}]{2} /i [^\x{7fff}]{0,7}? - Once /i [^\x{fffff}]{5} - /i [^\x{fffff}]? - Ket + /i [^\x{fffff}]?+ Ket End ------------------------------------------------------------------ @@ -1846,4 +1870,16 @@ No match /\ud800/<JS>8 Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 5 +/^a+[a\x{200}]/8BZ +------------------------------------------------------------------ + Bra + ^ + a+ + [a\x{200}] + Ket + End +------------------------------------------------------------------ + aa + 0: aa + /-- End of testinput5 --/ diff --git a/pcre/testdata/testoutput6 b/pcre/testdata/testoutput6 index b1d45799261..6c42fce1a5b 100644 --- a/pcre/testdata/testoutput6 +++ b/pcre/testdata/testoutput6 @@ -1,5 +1,7 @@ /-- This set of tests is for Unicode property support. It is compatible with Perl >= 5.15. --/ + +< forbid 9?=ABCDEFfGILMNPTUXZ< /^\pC\pL\pM\pN\pP\pS\pZ</8 \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}< @@ -543,16 +545,6 @@ No match abc No match -/\p{Lu}/8i - A - 0: A - aZ - 0: Z - ** Failers - 0: F - abc -No match - /\p{Ll}/8 a 0: a @@ -727,6 +719,8 @@ No match 0: \x{6e9} \x{060b} 0: \x{60b} + \x{061c} + 0: \x{61c} ** Failers No match X\x{06e9} @@ -1310,7 +1304,7 @@ No match /^>\s+/8W >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b} - 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09} + 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}\x{0b} /^>\pZ+/8W >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b} @@ -1338,15 +1332,15 @@ No match /^[[:graph:]]*/8W A\x{a1}\x{a0} - 0: A + 0: A\x{a1} /^[[:print:]]*/8W A z\x{a0}\x{a1} - 0: A z + 0: A z\x{a0}\x{a1} /^[[:punct:]]*/8W .+\x{a1}\x{a0} - 0: .+ + 0: .+\x{a1} /\p{Zs}*?\R/ ** Failers @@ -1548,6 +1542,19 @@ No match 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X 0+ +/\X*Z/8Y + A\x{300} +No match + +/\X*(.)/8Y + A\x{1111}\x{ae4c}\x{1169} + 0: A\x{1111} + 1: \x{1111} + +/\X?abc/8Y +\xff\x7f\x00\x00\x03\x00\x41\xcc\x80\x41\x{300}\x61\x62\x63\x00\>06\? + 0: A\x{300}abc + /-- --/ /\x{1e9e}+/8i @@ -2139,11 +2146,303 @@ No match 0: 1234 123 No match - + /^\X*\w{4}/8 1234 0: 1234 123 No match - + +/^A\s+Z/8W + A\x{2005}Z + 0: A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + 0: A\x{85}\x{180e}\x{2005}Z + +/^A[\s]+Z/8W + A\x{2005}Z + 0: A\x{2005}Z + A\x{85}\x{180e}\x{2005}Z + 0: A\x{85}\x{180e}\x{2005}Z + +/^[[:graph:]]+$/8W + Letter:ABC + 0: Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + 0: Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + 0: Number:9\x{660} + Punctuation:\x{66a},; + 0: Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + 0: Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + 0: Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + 0: \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + 0: \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + 0: \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + 0: \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + 0: \x{feff} + \x{fff9}\x{fffa}\x{fffb} + 0: \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + 0: \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + 0: \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + 0: \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + 0: \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + ** Failers +No match + \x{09} +No match + \x{0a} +No match + \x{1D} +No match + \x{20} +No match + \x{85} +No match + \x{a0} +No match + \x{61c} +No match + \x{1680} +No match + \x{180e} +No match + \x{2028} +No match + \x{2029} +No match + \x{202f} +No match + \x{2065} +No match + \x{2066} +No match + \x{2067} +No match + \x{2068} +No match + \x{2069} +No match + \x{3000} +No match + \x{e0002} +No match + \x{e001f} +No match + \x{e0080} +No match + +/^[[:print:]]+$/8W + Space: \x{a0} + 0: Space: \x{a0} + \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} + 0: \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} + \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} + 0: \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} + \x{202f}\x{205f} + 0: \x{202f}\x{205f} + \x{3000} + 0: \x{3000} + Letter:ABC + 0: Letter:ABC + Mark:\x{300}\x{1d172}\x{1d17b} + 0: Mark:\x{300}\x{1d172}\x{1d17b} + Number:9\x{660} + 0: Number:9\x{660} + Punctuation:\x{66a},; + 0: Punctuation:\x{66a},; + Symbol:\x{6de}<>\x{fffc} + 0: Symbol:\x{6de}<>\x{fffc} + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + 0: Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} + \x{180e} + 0: \x{180e} + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + 0: \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + 0: \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} + \x{202f} + 0: \x{202f} + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + 0: \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + 0: \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} + \x{feff} + 0: \x{feff} + \x{fff9}\x{fffa}\x{fffb} + 0: \x{fff9}\x{fffa}\x{fffb} + \x{110bd} + 0: \x{110bd} + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + 0: \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} + \x{e0001} + 0: \x{e0001} + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + 0: \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} + ** Failers + 0: ** Failers + \x{09} +No match + \x{1D} +No match + \x{85} +No match + \x{61c} +No match + \x{2028} +No match + \x{2029} +No match + \x{2065} +No match + \x{2066} +No match + \x{2067} +No match + \x{2068} +No match + \x{2069} +No match + \x{e0002} +No match + \x{e001f} +No match + \x{e0080} +No match + +/^[[:punct:]]+$/8W + \$+<=>^`|~ + 0: $+<=>^`|~ + !\"#%&'()*,-./:;?@[\\]_{} + 0: !"#%&'()*,-./:;?@[\]_{} + \x{a1}\x{a7} + 0: \x{a1}\x{a7} + \x{37e} + 0: \x{37e} + ** Failers +No match + abcde +No match + +/^[[:^graph:]]+$/8W + \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{61c}\x{1680}\x{180e} + 0: \x{09}\x{0a}\x{1d} \x{85}\x{a0}\x{61c}\x{1680}\x{180e} + \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069} + 0: \x{2028}\x{2029}\x{202f}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069} + \x{3000}\x{e0002}\x{e001f}\x{e0080} + 0: \x{3000}\x{e0002}\x{e001f}\x{e0080} + ** Failers +No match + Letter:ABC +No match + Mark:\x{300}\x{1d172}\x{1d17b} +No match + Number:9\x{660} +No match + Punctuation:\x{66a},; +No match + Symbol:\x{6de}<>\x{fffc} +No match + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} +No match + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} +No match + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} +No match + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} +No match + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} +No match + \x{feff} +No match + \x{fff9}\x{fffa}\x{fffb} +No match + \x{110bd} +No match + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} +No match + \x{e0001} +No match + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} +No match + +/^[[:^print:]]+$/8W + \x{09}\x{1D}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067} + 0: \x{09}\x{1d}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067} + \x{2068}\x{2069}\x{e0002}\x{e001f}\x{e0080} + 0: \x{2068}\x{2069}\x{e0002}\x{e001f}\x{e0080} + ** Failers +No match + Space: \x{a0} +No match + \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005} +No match + \x{2006}\x{2007}\x{2008}\x{2009}\x{200a} +No match + \x{202f}\x{205f} +No match + \x{3000} +No match + Letter:ABC +No match + Mark:\x{300}\x{1d172}\x{1d17b} +No match + Number:9\x{660} +No match + Punctuation:\x{66a},; +No match + Symbol:\x{6de}<>\x{fffc} +No match + Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f} +No match + \x{180e} +No match + \x{200b}\x{200c}\x{200d}\x{200e}\x{200f} +No match + \x{202a}\x{202b}\x{202c}\x{202d}\x{202e} +No match + \x{202f} +No match + \x{2060}\x{2061}\x{2062}\x{2063}\x{2064} +No match + \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f} +No match + \x{feff} +No match + \x{fff9}\x{fffa}\x{fffb} +No match + \x{110bd} +No match + \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a} +No match + \x{e0001} +No match + \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f} +No match + +/^[[:^punct:]]+$/8W + abcde + 0: abcde + ** Failers +No match + \$+<=>^`|~ +No match + !\"#%&'()*,-./:;?@[\\]_{} +No match + \x{a1}\x{a7} +No match + \x{37e} +No match + /-- End of testinput6 --/ diff --git a/pcre/testdata/testoutput7 b/pcre/testdata/testoutput7 index ddd96fc2edc..45ac72fd8d4 100644 --- a/pcre/testdata/testoutput7 +++ b/pcre/testdata/testoutput7 @@ -78,7 +78,7 @@ No need char /[\p{Nd}+-]+/8DZ ------------------------------------------------------------------ Bra - [+\-\p{Nd}]+ + [+\-\p{Nd}]++ Ket End ------------------------------------------------------------------ @@ -270,6 +270,20 @@ No need char End ------------------------------------------------------------------ +/^\p{Cf}/8 + \x{180e} + 0: \x{180e} + \x{061c} + 0: \x{61c} + \x{2066} + 0: \x{2066} + \x{2067} + 0: \x{2067} + \x{2068} + 0: \x{2068} + \x{2069} + 0: \x{2069} + /^\p{Cs}/8 \?\x{dfff} 0: \x{dfff} @@ -278,6 +292,22 @@ No match \x{09f} No match +/^\p{Mn}/8 + \x{1a1b} + 0: \x{1a1b} + +/^\p{Pe}/8 + \x{2309} + 0: \x{2309} + \x{230b} + 0: \x{230b} + +/^\p{Ps}/8 + \x{2308} + 0: \x{2308} + \x{230a} + 0: \x{230a} + /^\p{Sc}+/8 $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6} 0: $\x{a2}\x{a3}\x{a4}\x{a5} @@ -297,8 +327,6 @@ No match 0: \x{a0} \x{1680} 0: \x{1680} - \x{180e} - 0: \x{180e} \x{2000} 0: \x{2000} \x{2001} @@ -310,8 +338,9 @@ No match \x{200d} No match -/-- These four are here rather than in test 6 because Perl has problems with - the negative versions of the properties. --/ +/-- These are here rather than in test 6 because Perl has problems with + the negative versions of the properties and behaves has changed how + it behaves for caseless matching. --/ /\p{^Lu}/8i 1234 @@ -351,6 +380,16 @@ No match \x{1d00} No match +/\p{Lu}/8i + A + 0: A + aZ + 0: Z + ** Failers + 0: F + abc +No match + /[\x{c0}\x{391}]/8i \x{c0} 0: \x{c0} @@ -501,7 +540,7 @@ No match /^>\p{Xsp}+/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} + 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} /^>\p{Xsp}+?/8 >\x{1680}\x{2028}\x{0b} @@ -509,11 +548,11 @@ No match /^>\p{Xsp}*/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} + 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} /^>\p{Xsp}{2,9}/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} + 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} /^>\p{Xsp}{2,9}?/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} @@ -525,7 +564,7 @@ No match /^>[\p{Xsp}]+/8 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028} + 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} /^>\p{Xps}/8 >\x{1680}\x{2028}\x{0b} @@ -820,7 +859,7 @@ No match /[[:graph:]]/WBZ ------------------------------------------------------------------ Bra - [!-~] + [[:graph:]] Ket End ------------------------------------------------------------------ @@ -828,7 +867,7 @@ No match /[[:print:]]/WBZ ------------------------------------------------------------------ Bra - [ -~] + [[:print:]] Ket End ------------------------------------------------------------------ @@ -836,7 +875,7 @@ No match /[[:punct:]]/WBZ ------------------------------------------------------------------ Bra - [!-/:-@[-`{-~] + [[:punct:]] Ket End ------------------------------------------------------------------ @@ -910,7 +949,7 @@ No match /[[:^alpha:][:^cntrl:]]+/8WBZ ------------------------------------------------------------------ Bra - [ -~\x80-\xff\P{L}]+ + [ -~\x80-\xff\P{L}]++ Ket End ------------------------------------------------------------------ @@ -922,7 +961,7 @@ No match /[[:^cntrl:][:^alpha:]]+/8WBZ ------------------------------------------------------------------ Bra - [ -~\x80-\xff\P{L}]+ + [ -~\x80-\xff\P{L}]++ Ket End ------------------------------------------------------------------ @@ -934,7 +973,7 @@ No match /[[:alpha:]]+/8WBZ ------------------------------------------------------------------ Bra - [\p{L}]+ + [\p{L}]++ Ket End ------------------------------------------------------------------ @@ -944,7 +983,7 @@ No match /[[:^alpha:]\S]+/8WBZ ------------------------------------------------------------------ Bra - [\P{L}\P{Xsp}]+ + [\P{L}\P{Xsp}]++ Ket End ------------------------------------------------------------------ @@ -956,7 +995,7 @@ No match /[^\d]+/8WBZ ------------------------------------------------------------------ Bra - [^\p{Nd}]+ + [^\p{Nd}]++ Ket End ------------------------------------------------------------------ @@ -1070,8 +1109,8 @@ No match prop Nd B+ prop N *+ - B+ - prop Nd * + B++ + prop Nd *+ Ket End ------------------------------------------------------------------ @@ -1347,7 +1386,7 @@ Need char = 'B' (caseless) /[\x{3a3}]+/8iBZ ------------------------------------------------------------------ Bra - clist 03a3 03c2 03c3 + + clist 03a3 03c2 03c3 ++ Ket End ------------------------------------------------------------------ @@ -1355,7 +1394,7 @@ Need char = 'B' (caseless) /[^\x{3a3}]+/8iBZ ------------------------------------------------------------------ Bra - not clist 03a3 03c2 03c3 + + not clist 03a3 03c2 03c3 ++ Ket End ------------------------------------------------------------------ @@ -1577,5 +1616,651 @@ No match No match \x{1234}abc No match + +/-- Some auto-possessification tests --/ + +/\pN+\z/BZ +------------------------------------------------------------------ + Bra + prop N ++ + \z + Ket + End +------------------------------------------------------------------ + +/\PN+\z/BZ +------------------------------------------------------------------ + Bra + notprop N ++ + \z + Ket + End +------------------------------------------------------------------ + +/\pN+/BZ +------------------------------------------------------------------ + Bra + prop N ++ + Ket + End +------------------------------------------------------------------ + +/\PN+/BZ +------------------------------------------------------------------ + Bra + notprop N ++ + Ket + End +------------------------------------------------------------------ + +/\p{Any}+\p{Any} \p{Any}+\P{Any} \p{Any}+\p{L&} \p{Any}+\p{L} \p{Any}+\p{Lu} \p{Any}+\p{Han} \p{Any}+\p{Xan} \p{Any}+\p{Xsp} \p{Any}+\p{Xps} \p{Xwd}+\p{Any} \p{Any}+\p{Xuc}/BWZx +------------------------------------------------------------------ + Bra + prop Any + + prop Any + prop Any + + notprop Any + prop Any + + prop L& + prop Any + + prop L + prop Any + + prop Lu + prop Any + + prop Han + prop Any + + prop Xan + prop Any + + prop Xsp + prop Any + + prop Xps + prop Xwd + + prop Any + prop Any + + prop Xuc + Ket + End +------------------------------------------------------------------ + +/\p{L&}+\p{Any} \p{L&}+\p{L&} \P{L&}+\p{L&} \p{L&}+\p{L} \p{L&}+\p{Lu} \p{L&}+\p{Han} \p{L&}+\p{Xan} \p{L&}+\P{Xan} \p{L&}+\p{Xsp} \p{L&}+\p{Xps} \p{Xwd}+\p{L&} \p{L&}+\p{Xuc}/BWZx +------------------------------------------------------------------ + Bra + prop L& + + prop Any + prop L& + + prop L& + notprop L& ++ + prop L& + prop L& + + prop L + prop L& + + prop Lu + prop L& + + prop Han + prop L& + + prop Xan + prop L& ++ + notprop Xan + prop L& ++ + prop Xsp + prop L& ++ + prop Xps + prop Xwd + + prop L& + prop L& + + prop Xuc + Ket + End +------------------------------------------------------------------ + +/\p{N}+\p{Any} \p{N}+\p{L&} \p{N}+\p{L} \p{N}+\P{L} \p{N}+\P{N} \p{N}+\p{Lu} \p{N}+\p{Han} \p{N}+\p{Xan} \p{N}+\p{Xsp} \p{N}+\p{Xps} \p{Xwd}+\p{N} \p{N}+\p{Xuc}/BWZx +------------------------------------------------------------------ + Bra + prop N + + prop Any + prop N + + prop L& + prop N ++ + prop L + prop N + + notprop L + prop N ++ + notprop N + prop N ++ + prop Lu + prop N + + prop Han + prop N + + prop Xan + prop N ++ + prop Xsp + prop N ++ + prop Xps + prop Xwd + + prop N + prop N + + prop Xuc + Ket + End +------------------------------------------------------------------ + +/\p{Lu}+\p{Any} \p{Lu}+\p{L&} \p{Lu}+\p{L} \p{Lu}+\p{Lu} \P{Lu}+\p{Lu} \p{Lu}+\p{Nd} \p{Lu}+\P{Nd} \p{Lu}+\p{Han} \p{Lu}+\p{Xan} \p{Lu}+\p{Xsp} \p{Lu}+\p{Xps} \p{Xwd}+\p{Lu} \p{Lu}+\p{Xuc}/BWZx +------------------------------------------------------------------ + Bra + prop Lu + + prop Any + prop Lu + + prop L& + prop Lu + + prop L + prop Lu + + prop Lu + notprop Lu ++ + prop Lu + prop Lu ++ + prop Nd + prop Lu + + notprop Nd + prop Lu + + prop Han + prop Lu + + prop Xan + prop Lu ++ + prop Xsp + prop Lu ++ + prop Xps + prop Xwd + + prop Lu + prop Lu + + prop Xuc + Ket + End +------------------------------------------------------------------ + +/\p{Han}+\p{Lu} \p{Han}+\p{L&} \p{Han}+\p{L} \p{Han}+\p{Lu} \p{Han}+\p{Arabic} \p{Arabic}+\p{Arabic} \p{Han}+\p{Xan} \p{Han}+\p{Xsp} \p{Han}+\p{Xps} \p{Xwd}+\p{Han} \p{Han}+\p{Xuc}/BWZx +------------------------------------------------------------------ + Bra + prop Han + + prop Lu + prop Han + + prop L& + prop Han + + prop L + prop Han + + prop Lu + prop Han ++ + prop Arabic + prop Arabic + + prop Arabic + prop Han + + prop Xan + prop Han + + prop Xsp + prop Han + + prop Xps + prop Xwd + + prop Han + prop Han + + prop Xuc + Ket + End +------------------------------------------------------------------ + +/\p{Xan}+\p{Any} \p{Xan}+\p{L&} \P{Xan}+\p{L&} \p{Xan}+\p{L} \p{Xan}+\p{Lu} \p{Xan}+\p{Han} \p{Xan}+\p{Xan} \p{Xan}+\P{Xan} \p{Xan}+\p{Xsp} \p{Xan}+\p{Xps} \p{Xwd}+\p{Xan} \p{Xan}+\p{Xuc}/BWZx +------------------------------------------------------------------ + Bra + prop Xan + + prop Any + prop Xan + + prop L& + notprop Xan ++ + prop L& + prop Xan + + prop L + prop Xan + + prop Lu + prop Xan + + prop Han + prop Xan + + prop Xan + prop Xan ++ + notprop Xan + prop Xan ++ + prop Xsp + prop Xan ++ + prop Xps + prop Xwd + + prop Xan + prop Xan + + prop Xuc + Ket + End +------------------------------------------------------------------ + +/\p{Xsp}+\p{Any} \p{Xsp}+\p{L&} \p{Xsp}+\p{L} \p{Xsp}+\p{Lu} \p{Xsp}+\p{Han} \p{Xsp}+\p{Xan} \p{Xsp}+\p{Xsp} \P{Xsp}+\p{Xsp} \p{Xsp}+\p{Xps} \p{Xwd}+\p{Xsp} \p{Xsp}+\p{Xuc}/BWZx +------------------------------------------------------------------ + Bra + prop Xsp + + prop Any + prop Xsp ++ + prop L& + prop Xsp ++ + prop L + prop Xsp ++ + prop Lu + prop Xsp + + prop Han + prop Xsp ++ + prop Xan + prop Xsp + + prop Xsp + notprop Xsp ++ + prop Xsp + prop Xsp + + prop Xps + prop Xwd ++ + prop Xsp + prop Xsp + + prop Xuc + Ket + End +------------------------------------------------------------------ + +/\p{Xwd}+\p{Any} \p{Xwd}+\p{L&} \p{Xwd}+\p{L} \p{Xwd}+\p{Lu} \p{Xwd}+\p{Han} \p{Xwd}+\p{Xan} \p{Xwd}+\p{Xsp} \p{Xwd}+\p{Xps} \p{Xwd}+\p{Xwd} \p{Xwd}+\P{Xwd} \p{Xwd}+\p{Xuc}/BWZx +------------------------------------------------------------------ + Bra + prop Xwd + + prop Any + prop Xwd + + prop L& + prop Xwd + + prop L + prop Xwd + + prop Lu + prop Xwd + + prop Han + prop Xwd + + prop Xan + prop Xwd ++ + prop Xsp + prop Xwd ++ + prop Xps + prop Xwd + + prop Xwd + prop Xwd ++ + notprop Xwd + prop Xwd + + prop Xuc + Ket + End +------------------------------------------------------------------ + +/\p{Xuc}+\p{Any} \p{Xuc}+\p{L&} \p{Xuc}+\p{L} \p{Xuc}+\p{Lu} \p{Xuc}+\p{Han} \p{Xuc}+\p{Xan} \p{Xuc}+\p{Xsp} \p{Xuc}+\p{Xps} \p{Xwd}+\p{Xuc} \p{Xuc}+\p{Xuc} \p{Xuc}+\P{Xuc}/BWZx +------------------------------------------------------------------ + Bra + prop Xuc + + prop Any + prop Xuc + + prop L& + prop Xuc + + prop L + prop Xuc + + prop Lu + prop Xuc + + prop Han + prop Xuc + + prop Xan + prop Xuc + + prop Xsp + prop Xuc + + prop Xps + prop Xwd + + prop Xuc + prop Xuc + + prop Xuc + prop Xuc ++ + notprop Xuc + Ket + End +------------------------------------------------------------------ + +/\p{N}+\p{Ll} \p{N}+\p{Nd} \p{N}+\P{Nd}/BWZx +------------------------------------------------------------------ + Bra + prop N ++ + prop Ll + prop N + + prop Nd + prop N + + notprop Nd + Ket + End +------------------------------------------------------------------ + +/\p{Xan}+\p{L} \p{Xan}+\p{N} \p{Xan}+\p{C} \p{Xan}+\P{L} \P{Xan}+\p{N} \p{Xan}+\P{C}/BWZx +------------------------------------------------------------------ + Bra + prop Xan + + prop L + prop Xan + + prop N + prop Xan ++ + prop C + prop Xan + + notprop L + notprop Xan ++ + prop N + prop Xan + + notprop C + Ket + End +------------------------------------------------------------------ + +/\p{L}+\p{Xan} \p{N}+\p{Xan} \p{C}+\p{Xan} \P{L}+\p{Xan} \p{N}+\p{Xan} \P{C}+\p{Xan} \p{L}+\P{Xan}/BWZx +------------------------------------------------------------------ + Bra + prop L + + prop Xan + prop N + + prop Xan + prop C ++ + prop Xan + notprop L + + prop Xan + prop N + + prop Xan + notprop C + + prop Xan + prop L ++ + notprop Xan + Ket + End +------------------------------------------------------------------ + +/\p{Xan}+\p{Lu} \p{Xan}+\p{Nd} \p{Xan}+\p{Cc} \p{Xan}+\P{Ll} \P{Xan}+\p{No} \p{Xan}+\P{Cf}/BWZx +------------------------------------------------------------------ + Bra + prop Xan + + prop Lu + prop Xan + + prop Nd + prop Xan ++ + prop Cc + prop Xan + + notprop Ll + notprop Xan ++ + prop No + prop Xan + + notprop Cf + Ket + End +------------------------------------------------------------------ + +/\p{Lu}+\p{Xan} \p{Nd}+\p{Xan} \p{Cs}+\p{Xan} \P{Lt}+\p{Xan} \p{Nl}+\p{Xan} \P{Cc}+\p{Xan} \p{Lt}+\P{Xan}/BWZx +------------------------------------------------------------------ + Bra + prop Lu + + prop Xan + prop Nd + + prop Xan + prop Cs ++ + prop Xan + notprop Lt + + prop Xan + prop Nl + + prop Xan + notprop Cc + + prop Xan + prop Lt ++ + notprop Xan + Ket + End +------------------------------------------------------------------ + +/\w+\p{P} \w+\p{Po} \w+\s \p{Xan}+\s \s+\p{Xan} \s+\w/BWZx +------------------------------------------------------------------ + Bra + prop Xwd + + prop P + prop Xwd + + prop Po + prop Xwd ++ + prop Xsp + prop Xan ++ + prop Xsp + prop Xsp ++ + prop Xan + prop Xsp ++ + prop Xwd + Ket + End +------------------------------------------------------------------ + +/\w+\P{P} \W+\p{Po} \w+\S \P{Xan}+\s \s+\P{Xan} \s+\W/BWZx +------------------------------------------------------------------ + Bra + prop Xwd + + notprop P + notprop Xwd + + prop Po + prop Xwd + + notprop Xsp + notprop Xan + + prop Xsp + prop Xsp + + notprop Xan + prop Xsp + + notprop Xwd + Ket + End +------------------------------------------------------------------ + +/\w+\p{Po} \w+\p{Pc} \W+\p{Po} \W+\p{Pc} \w+\P{Po} \w+\P{Pc}/BWZx +------------------------------------------------------------------ + Bra + prop Xwd + + prop Po + prop Xwd ++ + prop Pc + notprop Xwd + + prop Po + notprop Xwd + + prop Pc + prop Xwd + + notprop Po + prop Xwd + + notprop Pc + Ket + End +------------------------------------------------------------------ + +/\p{Nl}+\p{Xan} \P{Nl}+\p{Xan} \p{Nl}+\P{Xan} \P{Nl}+\P{Xan}/BWZx +------------------------------------------------------------------ + Bra + prop Nl + + prop Xan + notprop Nl + + prop Xan + prop Nl ++ + notprop Xan + notprop Nl + + notprop Xan + Ket + End +------------------------------------------------------------------ + +/\p{Xan}+\p{Nl} \P{Xan}+\p{Nl} \p{Xan}+\P{Nl} \P{Xan}+\P{Nl}/BWZx +------------------------------------------------------------------ + Bra + prop Xan + + prop Nl + notprop Xan ++ + prop Nl + prop Xan + + notprop Nl + notprop Xan + + notprop Nl + Ket + End +------------------------------------------------------------------ + +/\p{Xan}+\p{Nd} \P{Xan}+\p{Nd} \p{Xan}+\P{Nd} \P{Xan}+\P{Nd}/BWZx +------------------------------------------------------------------ + Bra + prop Xan + + prop Nd + notprop Xan ++ + prop Nd + prop Xan + + notprop Nd + notprop Xan + + notprop Nd + Ket + End +------------------------------------------------------------------ + +/-- End auto-possessification tests --/ + +/\w+/8CWBZ +------------------------------------------------------------------ + Bra + Callout 255 0 3 + prop Xwd ++ + Callout 255 3 0 + Ket + End +------------------------------------------------------------------ + abcd +--->abcd + +0 ^ \w+ + +3 ^ ^ + 0: abcd + +/[\p{N}]?+/BZO +------------------------------------------------------------------ + Bra + [\p{N}]?+ + Ket + End +------------------------------------------------------------------ + +/[\p{L}ab]{2,3}+/BZO +------------------------------------------------------------------ + Bra + [ab\p{L}]{2,3}+ + Ket + End +------------------------------------------------------------------ + +/\D+\X \d+\X \S+\X \s+\X \W+\X \w+\X \C+\X \R+\X \H+\X \h+\X \V+\X \v+\X a+\X \n+\X .+\X/BZx +------------------------------------------------------------------ + Bra + \D+ + extuni + \d+ + extuni + \S+ + extuni + \s+ + extuni + \W+ + extuni + \w+ + extuni + AllAny+ + extuni + \R+ + extuni + \H+ + extuni + \h+ + extuni + \V+ + extuni + \v+ + extuni + a+ + extuni + \x0a+ + extuni + Any+ + extuni + Ket + End +------------------------------------------------------------------ + +/.+\X/BZxs +------------------------------------------------------------------ + Bra + AllAny+ + extuni + Ket + End +------------------------------------------------------------------ + +/\X+$/BZxm +------------------------------------------------------------------ + Bra + extuni+ + /m $ + Ket + End +------------------------------------------------------------------ + +/\X+\D \X+\d \X+\S \X+\s \X+\W \X+\w \X+. \X+\C \X+\R \X+\H \X+\h \X+\V \X+\v \X+\X \X+\Z \X+\z \X+$/BZx +------------------------------------------------------------------ + Bra + extuni+ + \D + extuni+ + \d + extuni+ + \S + extuni+ + \s + extuni+ + \W + extuni+ + \w + extuni+ + Any + extuni+ + AllAny + extuni+ + \R + extuni+ + \H + extuni+ + \h + extuni+ + \V + extuni+ + \v + extuni+ + extuni + extuni+ + \Z + extuni++ + \z + extuni+ + $ + Ket + End +------------------------------------------------------------------ + +/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/8WBZ +------------------------------------------------------------------ + Bra + prop Nd ++ + prop Xsp {0,5}+ + = + prop Xsp *+ + notprop Xsp ? + = + prop Xwd {0,4}+ + notprop Xwd *+ + Ket + End +------------------------------------------------------------------ /-- End of testinput7 --/ diff --git a/pcre/testdata/testoutput8 b/pcre/testdata/testoutput8 index 75affbe2d4c..bb68d3e6452 100644 --- a/pcre/testdata/testoutput8 +++ b/pcre/testdata/testoutput8 @@ -1,5 +1,8 @@ -/-- This set of tests check the DFA matching functionality of pcre_dfa_exec(). - The -dfa flag must be used with pcretest when running it. --/ +/-- This set of tests check the DFA matching functionality of pcre_dfa_exec(), + excluding UTF and Unicode property support. The -dfa flag must be used with + pcretest when running it. --/ + +< forbid 8W /abc/ abc @@ -25,7 +28,7 @@ No match ab No match -/a*/ +/a*/O a 0: a 1: @@ -341,7 +344,7 @@ No match axyzq No match -/[^a]+/ +/[^a]+/O bac 0: b bcdefax @@ -359,7 +362,7 @@ No match aaaaa No match -/[^a]*/ +/[^a]*/O bac 0: b 1: @@ -380,7 +383,7 @@ No match aaaaa 0: -/[^a]{3,5}/ +/[^a]{3,5}/O xyz 0: xyz awxyza @@ -408,29 +411,18 @@ No match /\d*/ 1234b567 0: 1234 - 1: 123 - 2: 12 - 3: 1 - 4: xyz 0: /\D*/ a1234b567 0: a - 1: xyz 0: xyz - 1: xy - 2: x - 3: /\d+/ ab1234c56 0: 1234 - 1: 123 - 2: 12 - 3: 1 *** Failers No match xyz @@ -439,19 +431,8 @@ No match /\D+/ ab123c56 0: ab - 1: a *** Failers 0: *** Failers - 1: *** Failer - 2: *** Faile - 3: *** Fail - 4: *** Fai - 5: *** Fa - 6: *** F - 7: *** - 8: *** - 9: ** -10: * 789 No match @@ -478,9 +459,6 @@ No match /a+/ aaaa 0: aaaa - 1: aaa - 2: aa - 3: a /^.*xyz/ xyz @@ -886,9 +864,6 @@ No match 0: aaabcd 0: aaa - 1: aa - 2: a - 3: xyz 0: xyz 1: @@ -1577,18 +1552,6 @@ No match /^[.^$|()*+?{,}]+/ .^\$(*+)|{?,?} 0: .^$(*+)|{?,?} - 1: .^$(*+)|{?,? - 2: .^$(*+)|{?, - 3: .^$(*+)|{? - 4: .^$(*+)|{ - 5: .^$(*+)| - 6: .^$(*+) - 7: .^$(*+ - 8: .^$(* - 9: .^$( -10: .^$ -11: .^ -12: . /^a*\w/ z @@ -1744,38 +1707,16 @@ No match /foo(?!bar)(.*)/ foobar is foolish see? 0: foolish see? - 1: foolish see - 2: foolish se - 3: foolish s - 4: foolish - 5: foolish - 6: foolis - 7: fooli - 8: fool - 9: foo /(?:(?!foo)...|^.{0,2})bar(.*)/ foobar crowbar etc 0: rowbar etc - 1: rowbar et - 2: rowbar e - 3: rowbar - 4: rowbar barrel 0: barrel - 1: barre - 2: barr - 3: bar 2barrel 0: 2barrel - 1: 2barre - 2: 2barr - 3: 2bar A barrel 0: A barrel - 1: A barre - 2: A barr - 3: A bar /^(\D*)(?=\d)(?!123)/ abc456 @@ -1820,7 +1761,7 @@ No match the abc No match -/^[ab]{1,3}(ab*|b)/ +/^[ab]{1,3}(ab*|b)/O aabbbbb 0: aabbbbb 1: aabbbb @@ -1829,7 +1770,7 @@ No match 4: aab 5: aa -/^[ab]{1,3}?(ab*|b)/ +/^[ab]{1,3}?(ab*|b)/O aabbbbb 0: aabbbbb 1: aabbbb @@ -1838,7 +1779,7 @@ No match 4: aab 5: aa -/^[ab]{1,3}?(ab*?|b)/ +/^[ab]{1,3}?(ab*?|b)/O aabbbbb 0: aabbbbb 1: aabbbb @@ -1847,7 +1788,7 @@ No match 4: aab 5: aa -/^[ab]{1,3}(ab*?|b)/ +/^[ab]{1,3}(ab*?|b)/O aabbbbb 0: aabbbbb 1: aabbbb @@ -2705,10 +2646,6 @@ No match /\0*/ \0\0\0\0 0: \x00\x00\x00\x00 - 1: \x00\x00\x00 - 2: \x00\x00 - 3: \x00 - 4: /A\x0{2,3}Z/ The A\x0\x0Z @@ -2760,56 +2697,14 @@ No match /([^.]*)\.([^:]*):[T ]+(.*)/ track1.title:TBlah blah blah 0: track1.title:TBlah blah blah - 1: track1.title:TBlah blah bla - 2: track1.title:TBlah blah bl - 3: track1.title:TBlah blah b - 4: track1.title:TBlah blah - 5: track1.title:TBlah blah - 6: track1.title:TBlah bla - 7: track1.title:TBlah bl - 8: track1.title:TBlah b - 9: track1.title:TBlah -10: track1.title:TBlah -11: track1.title:TBla -12: track1.title:TBl -13: track1.title:TB -14: track1.title:T /([^.]*)\.([^:]*):[T ]+(.*)/i track1.title:TBlah blah blah 0: track1.title:TBlah blah blah - 1: track1.title:TBlah blah bla - 2: track1.title:TBlah blah bl - 3: track1.title:TBlah blah b - 4: track1.title:TBlah blah - 5: track1.title:TBlah blah - 6: track1.title:TBlah bla - 7: track1.title:TBlah bl - 8: track1.title:TBlah b - 9: track1.title:TBlah -10: track1.title:TBlah -11: track1.title:TBla -12: track1.title:TBl -13: track1.title:TB -14: track1.title:T /([^.]*)\.([^:]*):[t ]+(.*)/i track1.title:TBlah blah blah 0: track1.title:TBlah blah blah - 1: track1.title:TBlah blah bla - 2: track1.title:TBlah blah bl - 3: track1.title:TBlah blah b - 4: track1.title:TBlah blah - 5: track1.title:TBlah blah - 6: track1.title:TBlah bla - 7: track1.title:TBlah bl - 8: track1.title:TBlah b - 9: track1.title:TBlah -10: track1.title:TBlah -11: track1.title:TBla -12: track1.title:TBl -13: track1.title:TB -14: track1.title:T /^[W-c]+$/ WXY_^abc @@ -2882,13 +2777,10 @@ No match 0: b c::b 0: :: - 1: : /[-az]+/ az- 0: az- - 1: az - 2: a *** Failers 0: a b @@ -2897,8 +2789,6 @@ No match /[az-]+/ za- 0: za- - 1: za - 2: z *** Failers 0: a b @@ -2907,8 +2797,6 @@ No match /[a\-z]+/ a-z 0: a-z - 1: a- - 2: a *** Failers 0: a b @@ -2917,20 +2805,10 @@ No match /[a-z]+/ abcdxyz 0: abcdxyz - 1: abcdxy - 2: abcdx - 3: abcd - 4: abc - 5: ab - 6: a /[\d-]+/ 12-34 0: 12-34 - 1: 12-3 - 2: 12- - 3: 12 - 4: 1 *** Failers No match aaa @@ -2939,11 +2817,6 @@ No match /[\d-z]+/ 12-34z 0: 12-34z - 1: 12-34 - 2: 12-3 - 3: 12- - 4: 12 - 5: 1 *** Failers No match aaa @@ -3027,18 +2900,22 @@ No match abc\100\60 0: abc@0 -/abc\81/ - abc\081 - 0: abc\x0081 - abc\0\x38\x31 - 0: abc\x0081 - -/abc\91/ - abc\091 - 0: abc\x0091 - abc\0\x39\x31 - 0: abc\x0091 - +/^A\8B\9C$/ + A8B9C + 0: A8B9C + *** Failers +No match + A\08B\09C +No match + +/^[A\8B\9C]+$/ + A8B9C + 0: A8B9C + *** Failers +No match + A8B9C\x00 +No match + /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/ abcdefghijk\12S 0: abcdefghijk\x0aS @@ -3077,16 +2954,13 @@ No match 1: baNOTccc 2: baNOTcc 3: baNOTc - 4: baNOT baNOTcccd 0: baNOTccc 1: baNOTcc 2: baNOTc - 3: baNOT baNOTccd 0: baNOTcc 1: baNOTc - 2: baNOT bacccd 0: baccc *** Failers @@ -3096,7 +2970,6 @@ No match 3: *** Fail 4: *** Fai 5: *** Fa - 6: *** F anything No match b\bc @@ -3115,23 +2988,14 @@ No match /[^a]+/ AAAaAbc 0: AAA - 1: AA - 2: A /[^a]+/i AAAaAbc 0: bc - 1: b /[^a]+/ bbb\nccc 0: bbb\x0accc - 1: bbb\x0acc - 2: bbb\x0ac - 3: bbb\x0a - 4: bbb - 5: bb - 6: b /[^k]$/ abc @@ -3208,20 +3072,8 @@ No match /(\.\d\d[1-9]?)\d+/ 1.230003938 0: .230003938 - 1: .23000393 - 2: .2300039 - 3: .230003 - 4: .23000 - 5: .2300 - 6: .230 1.875000282 0: .875000282 - 1: .87500028 - 2: .8750002 - 3: .875000 - 4: .87500 - 5: .8750 - 6: .875 1.235 0: .235 @@ -3243,10 +3095,6 @@ No match /\b(foo)\s+(\w+)/i Food is on the foo table 0: foo table - 1: foo tabl - 2: foo tab - 3: foo ta - 4: foo t /foo(.*)bar/ The food is under the bar in the barn. @@ -3258,7 +3106,7 @@ No match 0: food is under the bar in the bar 1: food is under the bar -/(.*)(\d*)/ +/(.*)(\d*)/O I have 2 numbers: 53147 Matched, but offsets vector is too small to show all matches 0: I have 2 numbers: 53147 @@ -3287,13 +3135,9 @@ Matched, but offsets vector is too small to show all matches /(.*)(\d+)/ I have 2 numbers: 53147 0: I have 2 numbers: 53147 - 1: I have 2 numbers: 5314 - 2: I have 2 numbers: 531 - 3: I have 2 numbers: 53 - 4: I have 2 numbers: 5 - 5: I have 2 + 1: I have 2 -/(.*?)(\d*)/ +/(.*?)(\d*)/O I have 2 numbers: 53147 Matched, but offsets vector is too small to show all matches 0: I have 2 numbers: 53147 @@ -3322,11 +3166,7 @@ Matched, but offsets vector is too small to show all matches /(.*?)(\d+)/ I have 2 numbers: 53147 0: I have 2 numbers: 53147 - 1: I have 2 numbers: 5314 - 2: I have 2 numbers: 531 - 3: I have 2 numbers: 53 - 4: I have 2 numbers: 5 - 5: I have 2 + 1: I have 2 /(.*)(\d+)$/ I have 2 numbers: 53147 @@ -3738,13 +3578,8 @@ No match 0: a ab 0: ab - 1: a abbbb 0: abbbb - 1: abbb - 2: abb - 3: ab - 4: a *** Failers 0: a bbbbb @@ -3930,19 +3765,8 @@ No match /(?>(\.\d\d[1-9]?))\d+/ 1.230003938 0: .230003938 - 1: .23000393 - 2: .2300039 - 3: .230003 - 4: .23000 - 5: .2300 - 6: .230 1.875000282 0: .875000282 - 1: .87500028 - 2: .8750002 - 3: .875000 - 4: .87500 - 5: .8750 *** Failers No match 1.235 @@ -4561,7 +4385,6 @@ No match /.{3,4}/ abbbbc 0: abbb - 1: abb /ab{0,}bc/ abbbbc @@ -4929,9 +4752,6 @@ No match /[^ab]*/ cde 0: cde - 1: cd - 2: c - 3: /abc/ *** Failers @@ -4966,7 +4786,6 @@ No match /ab*/ xabyabbbz 0: ab - 1: a xayabbbz 0: a @@ -4995,8 +4814,7 @@ No match /a([bc]*)c*/ abc 0: abc - 1: ab - 2: a + 1: a /a([bc]*)(c*d)/ abcd @@ -5033,10 +4851,6 @@ No match /[a-zA-Z_][a-zA-Z0-9_]*/ alpha 0: alpha - 1: alph - 2: alp - 3: al - 4: a /^a(bc+|b[eh])g|.h$/ abh @@ -5079,8 +4893,6 @@ No match /(.*)c(.*)/ abcde 0: abcde - 1: abcd - 2: abc /\((.*), (.*)\)/ (a, b) @@ -5395,9 +5207,6 @@ No match /[^ab]*/i CDE 0: CDE - 1: CD - 2: C - 3: /abc/i @@ -5427,7 +5236,6 @@ No match /ab*/i XABYABBBZ 0: AB - 1: A XAYABBBZ 0: A @@ -5458,8 +5266,7 @@ No match /a([bc]*)c*/i ABC 0: ABC - 1: AB - 2: A + 1: A /a([bc]*)(c*d)/i ABCD @@ -5490,10 +5297,6 @@ No match /[a-zA-Z_][a-zA-Z0-9_]*/i ALPHA 0: ALPHA - 1: ALPH - 2: ALP - 3: AL - 4: A /^a(bc+|b[eh])g|.h$/i ABH @@ -5546,8 +5349,6 @@ No match /(.*)c(.*)/i ABCDE 0: ABCDE - 1: ABCD - 2: ABC /\((.*), (.*)\)/i (A, B) @@ -6052,17 +5853,14 @@ No match /([[:]+)/ a:[b]: 0: :[ - 1: : /([[=]+)/ a=[b]= 0: =[ - 1: = /([[.]+)/ a.[b]. 0: .[ - 1: . /((?>a+)b)/ aaab @@ -6196,26 +5994,12 @@ No match /a*/g abbab 0: a - 1: 0: 0: 0: a - 1: 0: 0: -/^[a-\d]/ - abcde - 0: a - -things - 0: - - 0digit - 0: 0 - *** Failers -No match - bcdef -No match - /^[\d-a]/ abcde 0: a @@ -6231,36 +6015,22 @@ No match /[[:space:]]+/ > \x09\x0a\x0c\x0d\x0b< 0: \x09\x0a\x0c\x0d\x0b - 1: \x09\x0a\x0c\x0d - 2: \x09\x0a\x0c - 3: \x09\x0a - 4: \x09 - 5: /[[:blank:]]+/ > \x09\x0a\x0c\x0d\x0b< 0: \x09 - 1: /[\s]+/ > \x09\x0a\x0c\x0d\x0b< - 0: \x09\x0a\x0c\x0d - 1: \x09\x0a\x0c - 2: \x09\x0a - 3: \x09 - 4: + 0: \x09\x0a\x0c\x0d\x0b /\s+/ > \x09\x0a\x0c\x0d\x0b< - 0: \x09\x0a\x0c\x0d - 1: \x09\x0a\x0c - 2: \x09\x0a - 3: \x09 - 4: + 0: \x09\x0a\x0c\x0d\x0b /ab/x ab -No match + 0: ab /(?!\A)x/m a\nxb\n @@ -6563,8 +6333,6 @@ Partial match: 123 /Content-Type\x3A[^\r\n]{6,}/ Content-Type:xxxxxyyy 0: Content-Type:xxxxxyyy - 1: Content-Type:xxxxxyy - 2: Content-Type:xxxxxy /Content-Type\x3A[^\r\n]{6,}z/ Content-Type:xxxxxyyyz @@ -6661,66 +6429,22 @@ No match /.*/<lf> abc\ndef 0: abc - 1: ab - 2: a - 3: abc\rdef 0: abc\x0ddef - 1: abc\x0dde - 2: abc\x0dd - 3: abc\x0d - 4: abc - 5: ab - 6: a - 7: abc\r\ndef 0: abc\x0d - 1: abc - 2: ab - 3: a - 4: \<cr>abc\ndef 0: abc\x0adef - 1: abc\x0ade - 2: abc\x0ad - 3: abc\x0a - 4: abc - 5: ab - 6: a - 7: \<cr>abc\rdef 0: abc - 1: ab - 2: a - 3: \<cr>abc\r\ndef 0: abc - 1: ab - 2: a - 3: \<crlf>abc\ndef 0: abc\x0adef - 1: abc\x0ade - 2: abc\x0ad - 3: abc\x0a - 4: abc - 5: ab - 6: a - 7: \<crlf>abc\rdef 0: abc\x0ddef - 1: abc\x0dde - 2: abc\x0dd - 3: abc\x0d - 4: abc - 5: ab - 6: a - 7: \<crlf>abc\r\ndef 0: abc - 1: ab - 2: a - 3: /\w+(.)(.)?def/s abc\ndef @@ -7033,10 +6757,8 @@ No match /\H*\h+\V?\v{3,4}/ \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a 0: \x09 \xa0X\x0a\x0b\x0c\x0d - 1: \x09 \xa0X\x0a\x0b\x0c \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a 0: \x09 \xa0\x0a\x0b\x0c\x0d - 1: \x09 \xa0\x0a\x0b\x0c \x09\x20\xa0\x0a\x0b\x0c 0: \x09 \xa0\x0a\x0b\x0c ** Failers @@ -7047,7 +6769,6 @@ No match /\H{3,4}/ XY ABCDE 0: ABCD - 1: ABC XY PQR ST 0: PQR @@ -7531,15 +7252,11 @@ No match xxxxabcd\P 0: abcd 0+ - 1: abc xxxxabcd\P\P Partial match: abcd dddxxx\R 0: ddd 0+ xxx - 1: dd - 2: d - 3: xxxxabcd\P\P Partial match: abcd xxx\R @@ -7549,27 +7266,22 @@ Partial match: abcd /abcd*/i xxxxabcd\P 0: abcd - 1: abc xxxxabcd\P\P Partial match: abcd XXXXABCD\P 0: ABCD - 1: ABC XXXXABCD\P\P Partial match: ABCD /abc\d*/ xxxxabc1\P 0: abc1 - 1: abc xxxxabc1\P\P Partial match: abc1 /abc[de]*/ xxxxabcde\P 0: abcde - 1: abcd - 2: abc xxxxabcde\P\P Partial match: abcde @@ -7684,11 +7396,8 @@ Partial match: abc /.+/ abc\>0 0: abc - 1: ab - 2: a abc\>1 0: bc - 1: b abc\>2 0: c abc\>3 @@ -7811,10 +7520,6 @@ No match /^(?!a){0}\w+/ aaaaa 0: aaaaa - 1: aaaa - 2: aaa - 3: aa - 4: a /(?<=(abc))?xyz/ abcxyz @@ -7846,7 +7551,7 @@ Error -17 (backreference condition or recursion test not supported for DFA match aaaabcde Error -26 (nested recursion at the same subject position) -/(a+)/ +/(a+)/O \O6aaaa Matched, but offsets vector is too small to show all matches 0: aaaa @@ -7971,7 +7676,6 @@ Partial match: \x0d Partial match: \x0d\x0d \r\r\r\P 0: \x0d\x0d\x0d - 1: \x0d\x0d \r\r\r\P\P Partial match: \x0d\x0d\x0d @@ -8020,4 +7724,57 @@ Error -30 (invalid data in workspace for DFA restart) abcd\O0 Matched, but offsets vector is too small to show all matches +/-- These tests show up auto-possessification --/ + +/[ab]*/ + aaaa + 0: aaaa + +/[ab]*?/ + aaaa + 0: aaaa + 1: aaa + 2: aa + 3: a + 4: + +/[ab]?/ + aaaa + 0: a + +/[ab]??/ + aaaa + 0: a + 1: + +/[ab]+/ + aaaa + 0: aaaa + +/[ab]+?/ + aaaa + 0: aaaa + 1: aaa + 2: aa + 3: a + +/[ab]{2,3}/ + aaaa + 0: aaa + +/[ab]{2,3}?/ + aaaa + 0: aaa + 1: aa + +/[ab]{2,}/ + aaaa + 0: aaaa + +/[ab]{2,}?/ + aaaa + 0: aaaa + 1: aaa + 2: aa + /-- End of testinput8 --/ diff --git a/pcre/testdata/testoutput9 b/pcre/testdata/testoutput9 index 0bb101ad614..efbbf180106 100644 --- a/pcre/testdata/testoutput9 +++ b/pcre/testdata/testoutput9 @@ -1,6 +1,8 @@ /-- This set of tests checks UTF-8 support with the DFA matching functionality - of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running - it. --/ + of pcre_dfa_exec(), excluding Unicode property support. The -dfa flag must + be used with pcretest when running it. --/ + +< forbid W /\x{100}ab/8 \x{100}ab @@ -313,13 +315,9 @@ No match /[^a]+/8g bcd 0: bcd - 1: bc - 2: b \x{100}aY\x{256}Z 0: \x{100} 0: Y\x{256}Z - 1: Y\x{256} - 2: Y /^[^a]{2}/8 \x{100}bc @@ -328,8 +326,6 @@ No match /^[^a]{2,}/8 \x{100}bcAa 0: \x{100}bcA - 1: \x{100}bc - 2: \x{100}b /^[^a]{2,}?/8 \x{100}bca @@ -339,13 +335,9 @@ No match /[^a]+/8ig bcd 0: bcd - 1: bc - 2: b \x{100}aY\x{256}Z 0: \x{100} 0: Y\x{256}Z - 1: Y\x{256} - 2: Y /^[^a]{2}/8i \x{100}bc @@ -354,7 +346,6 @@ No match /^[^a]{2,}/8i \x{100}bcAa 0: \x{100}bc - 1: \x{100}b /^[^a]{2,}?/8i \x{100}bca @@ -370,28 +361,18 @@ No match 0: \x{100}\x{100} 0: \x{100} - 1: /\x{100}{0,3}/8 \x{100}\x{100} 0: \x{100}\x{100} - 1: \x{100} - 2: \x{100}\x{100}\x{100}\x{100} 0: \x{100}\x{100}\x{100} - 1: \x{100}\x{100} - 2: \x{100} - 3: /\x{100}*/8 abce 0: \x{100}\x{100}\x{100}\x{100} 0: \x{100}\x{100}\x{100}\x{100} - 1: \x{100}\x{100}\x{100} - 2: \x{100}\x{100} - 3: \x{100} - 4: /\x{100}{1,1}/8 abcd\x{100}\x{100}\x{100}\x{100} @@ -400,15 +381,10 @@ No match /\x{100}{1,3}/8 abcd\x{100}\x{100}\x{100}\x{100} 0: \x{100}\x{100}\x{100} - 1: \x{100}\x{100} - 2: \x{100} /\x{100}+/8 abcd\x{100}\x{100}\x{100}\x{100} 0: \x{100}\x{100}\x{100}\x{100} - 1: \x{100}\x{100}\x{100} - 2: \x{100}\x{100} - 3: \x{100} /\x{100}{3}/8 abcd\x{100}\x{100}\x{100}XX @@ -417,10 +393,8 @@ No match /\x{100}{3,5}/8 abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX 0: \x{100}\x{100}\x{100}\x{100}\x{100} - 1: \x{100}\x{100}\x{100}\x{100} - 2: \x{100}\x{100}\x{100} -/\x{100}{3,}/8 +/\x{100}{3,}/8O abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100} @@ -432,7 +406,7 @@ No match Xyyya\x{100}\x{100}bXzzz 0: X -/\D*/8 +/\D*/8O aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Matched, but offsets vector is too small to show all matches 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -458,7 +432,7 @@ Matched, but offsets vector is too small to show all matches 20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -/\D*/8 +/\D*/8O \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} Matched, but offsets vector is too small to show all matches 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} @@ -507,33 +481,18 @@ Matched, but offsets vector is too small to show all matches /\D+/8 12abcd34 0: abcd - 1: abc - 2: ab - 3: a *** Failers 0: *** Failers - 1: *** Failer - 2: *** Faile - 3: *** Fail - 4: *** Fai - 5: *** Fa - 6: *** F - 7: *** - 8: *** - 9: ** -10: * 1234 No match /\D{2,3}/8 12abcd34 0: abc - 1: ab 12ab34 0: ab *** Failers 0: *** - 1: ** 1234 No match 12a34 @@ -556,7 +515,6 @@ No match /\d+/8 12abcd34 0: 12 - 1: 1 *** Failers No match @@ -565,7 +523,6 @@ No match 0: 12 1234abcd 0: 123 - 1: 12 *** Failers No match 1.4 @@ -585,30 +542,18 @@ No match /\S+/8 12abcd34 0: 12abcd34 - 1: 12abcd3 - 2: 12abcd - 3: 12abc - 4: 12ab - 5: 12a - 6: 12 - 7: 1 *** Failers 0: *** - 1: ** - 2: * \ \ No match /\S{2,3}/8 12abcd34 0: 12a - 1: 12 1234abcd 0: 123 - 1: 12 *** Failers 0: *** - 1: ** \ \ No match @@ -654,15 +599,8 @@ No match /\w+/8 12 34 0: 12 - 1: 1 *** Failers 0: Failers - 1: Failer - 2: Faile - 3: Fail - 4: Fai - 5: Fa - 6: F +++=*! No match @@ -671,10 +609,8 @@ No match 0: ab abcd ce 0: abc - 1: ab *** Failers 0: Fai - 1: Fa a.b.c No match @@ -693,26 +629,18 @@ No match /\W+/8 12====34 0: ==== - 1: === - 2: == - 3: = *** Failers 0: *** - 1: *** - 2: ** - 3: * abcd No match /\W{2,3}/8 ab====cd 0: === - 1: == ab==cd 0: == *** Failers 0: *** - 1: ** a.b.c No match @@ -825,8 +753,6 @@ No match 0: \x{200} ab\x{200}\x{100}\x{200}\x{100}cd 0: \x{200}\x{100}\x{200} - 1: \x{200}\x{100} - 2: \x{200} *** Failers No match @@ -849,8 +775,6 @@ No match 0: \x{200} ab\x{200}\x{100}\x{200}\x{100}cd 0: \x{200}\x{100}\x{200} - 1: \x{200}\x{100} - 2: \x{200} *** Failers No match @@ -1126,21 +1050,21 @@ No match a\r No match -/\h+\V?\v{3,4}/8 +/\h+\V?\v{3,4}/8O \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d} 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c} -/\V?\v{3,4}/8 +/\V?\v{3,4}/8O \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a 0: X\x{0a}\x{0b}\x{0c}\x{0d} 1: X\x{0a}\x{0b}\x{0c} -/\h+\V?\v{3,4}/8 +/\h+\V?\v{3,4}/8O >\x09\x20\x{a0}X\x0a\x0a\x0a< 0: \x{09} \x{a0}X\x{0a}\x{0a}\x{0a} -/\V?\v{3,4}/8 +/\V?\v{3,4}/8O >\x09\x20\x{a0}X\x0a\x0a\x0a< 0: X\x{0a}\x{0a}\x{0a} @@ -1154,7 +1078,7 @@ No match \x{a0} X\x0a No match -/\H*\h+\V?\v{3,4}/8 +/\H*\h+\V?\v{3,4}/8O \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d} 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c} @@ -1178,7 +1102,7 @@ No match \x{2009} X\x0a No match -/\H*\h+\V?\v{3,4}/8 +/\H*\h+\V?\v{3,4}/8O \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d} 1: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c} @@ -1279,34 +1203,28 @@ No match /abcd*/8 xxxxabcd\P 0: abcd - 1: abc xxxxabcd\P\P Partial match: abcd /abcd*/i8 xxxxabcd\P 0: abcd - 1: abc xxxxabcd\P\P Partial match: abcd XXXXABCD\P 0: ABCD - 1: ABC XXXXABCD\P\P Partial match: ABCD /abc\d*/8 xxxxabc1\P 0: abc1 - 1: abc xxxxabc1\P\P Partial match: abc1 /abc[de]*/8 xxxxabcde\P 0: abcde - 1: abcd - 2: abc xxxxabcde\P\P Partial match: abcde @@ -1340,7 +1258,6 @@ Partial match: \x{0d} Partial match: \x{0d}\x{0d} \r\r\r\P 0: \x{0d}\x{0d}\x{0d} - 1: \x{0d}\x{0d} \r\r\r\P\P Partial match: \x{0d}\x{0d}\x{0d} @@ -1366,6 +1283,5 @@ Partial match: \x{0d}\x{0d}\x{0d} /[^\x{100}]+/8 \x{100}\x{101}X 0: \x{101}X - 1: \x{101} /-- End of testinput9 --/ diff --git a/pcre/ucp.h b/pcre/ucp.h index 21039106e58..d8b34bfcc5b 100644 --- a/pcre/ucp.h +++ b/pcre/ucp.h @@ -11,7 +11,10 @@ should always be at the end of each enum, for backwards compatibility. IMPORTANT: Note also that the specific numeric values of the enums have to be the same as the values that are generated by the maint/MultiStage2.py script, -where the equivalent property descriptive names are listed in vectors. */ +where the equivalent property descriptive names are listed in vectors. + +ALSO: The specific values of the first two enums are assumed for the table +called catposstab in pcre_compile.c. */ /* These are the general character categories. */ diff --git a/plugin/daemon_example/daemon_example.cc b/plugin/daemon_example/daemon_example.cc index 7d047b2eaf7..ffa9789a0e9 100644 --- a/plugin/daemon_example/daemon_example.cc +++ b/plugin/daemon_example/daemon_example.cc @@ -162,6 +162,7 @@ static int daemon_example_plugin_deinit(void *p __attribute__ ((unused))) struct tm tm_tmp; pthread_cancel(con->heartbeat_thread); + pthread_join(con->heartbeat_thread, NULL); localtime_r(&result, &tm_tmp); my_snprintf(buffer, sizeof(buffer), diff --git a/plugin/feedback/CMakeLists.txt b/plugin/feedback/CMakeLists.txt index 919324fb63b..9807eadbe34 100644 --- a/plugin/feedback/CMakeLists.txt +++ b/plugin/feedback/CMakeLists.txt @@ -1,6 +1,5 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql - ${CMAKE_BINARY_DIR}/pcre - ${CMAKE_SOURCE_DIR}/pcre + ${PCRE_INCLUDES} ${SSL_INCLUDE_DIRS}) SET(FEEDBACK_SOURCES feedback.cc sender_thread.cc diff --git a/plugin/handler_socket/libhsclient/auto_file.hpp b/plugin/handler_socket/libhsclient/auto_file.hpp index 841351e54cd..03c357f4d4e 100644 --- a/plugin/handler_socket/libhsclient/auto_file.hpp +++ b/plugin/handler_socket/libhsclient/auto_file.hpp @@ -9,6 +9,11 @@ #ifndef DENA_AUTO_FILE_HPP #define DENA_AUTO_FILE_HPP +/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */ +#if defined(_AIX) && defined(_LARGE_FILE_API) +#undef _LARGE_FILE_API +#endif + #include <unistd.h> #include <sys/types.h> #include <dirent.h> diff --git a/plugin/metadata_lock_info/metadata_lock_info.cc b/plugin/metadata_lock_info/metadata_lock_info.cc index 0ddde226553..f5d892d4a07 100644 --- a/plugin/metadata_lock_info/metadata_lock_info.cc +++ b/plugin/metadata_lock_info/metadata_lock_info.cc @@ -37,6 +37,7 @@ static const LEX_STRING metadata_lock_info_lock_mode[] = { { C_STRING_WITH_LEN("MDL_SHARED_HIGH_PRIO") }, { C_STRING_WITH_LEN("MDL_SHARED_READ") }, { C_STRING_WITH_LEN("MDL_SHARED_WRITE") }, + { C_STRING_WITH_LEN("MDL_SHARED_UPGRADABLE") }, { C_STRING_WITH_LEN("MDL_SHARED_NO_WRITE") }, { C_STRING_WITH_LEN("MDL_SHARED_NO_READ_WRITE") }, { C_STRING_WITH_LEN("MDL_EXCLUSIVE") }, diff --git a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result index 9e3779e0336..e1d690b566c 100644 --- a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result +++ b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result @@ -5,7 +5,7 @@ GET_LOCK('LOCK1',0) 1 SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info; lock_mode lock_duration lock_type table_schema table_name -MDL_SHARED_NO_READ_WRITE MDL_EXPLICIT User lock LOCK1 +MDL_SHARED_NO_WRITE MDL_EXPLICIT User lock LOCK1 SELECT RELEASE_LOCK('LOCK1'); RELEASE_LOCK('LOCK1') 1 diff --git a/plugin/qc_info/CMakeLists.txt b/plugin/qc_info/CMakeLists.txt index ca59130b072..d10f4547227 100644 --- a/plugin/qc_info/CMakeLists.txt +++ b/plugin/qc_info/CMakeLists.txt @@ -1,6 +1,5 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql - ${CMAKE_BINARY_DIR}/pcre - ${CMAKE_SOURCE_DIR}/pcre + ${PCRE_INCLUDES} ${CMAKE_SOURCE_DIR}/extra/yassl/include) MYSQL_ADD_PLUGIN(QUERY_CACHE_INFO qc_info.cc) diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc index 0c84519fac0..bb9eb96f6d7 100644 --- a/plugin/semisync/semisync_master.cc +++ b/plugin/semisync/semisync_master.cc @@ -479,13 +479,17 @@ void ReplSemiSyncMaster::remove_slave() lock(); rpl_semi_sync_master_clients--; - /* If user has chosen not to wait if no semi-sync slave available - and the last semi-sync slave exits, turn off semi-sync on master - immediately. - */ - if (!rpl_semi_sync_master_wait_no_slave && - rpl_semi_sync_master_clients == 0) - switch_off(); + /* Only switch off if semi-sync is enabled and is on */ + if (getMasterEnabled() && is_on()) + { + /* If user has chosen not to wait if no semi-sync slave available + and the last semi-sync slave exits, turn off semi-sync on master + immediately. + */ + if (!rpl_semi_sync_master_wait_no_slave && + rpl_semi_sync_master_clients == 0) + switch_off(); + } unlock(); } @@ -884,10 +888,7 @@ int ReplSemiSyncMaster::updateSyncHeader(unsigned char *packet, * target, do not request replies from the slave. */ if (!getMasterEnabled() || !is_semi_sync_slave()) - { - sync = false; return 0; - } function_enter(kWho); @@ -895,15 +896,12 @@ int ReplSemiSyncMaster::updateSyncHeader(unsigned char *packet, /* This is the real check inside the mutex. */ if (!getMasterEnabled()) - { - sync = false; - goto l_end; - } + goto l_end; // sync= false at this point in time if (is_on()) { /* semi-sync is ON */ - sync = false; /* No sync unless a transaction is involved. */ + /* sync= false; No sync unless a transaction is involved. */ if (reply_file_name_inited_) { diff --git a/plugin/win_auth_client/CMakeLists.txt b/plugin/win_auth_client/CMakeLists.txt index a24f6b267f6..a017410252d 100644 --- a/plugin/win_auth_client/CMakeLists.txt +++ b/plugin/win_auth_client/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2013, 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 @@ -31,4 +31,8 @@ IF(WIN32) LINK_LIBRARIES Secur32 MODULE_ONLY COMPONENT SharedLibraries) + #INSTALL_DEBUG_SYMBOLS(auth_win_client) + #IF(MSVC) + # INSTALL_DEBUG_TARGET(auth_win_client DESTINATION ${INSTALL_LIBDIR}/debug) + #ENDIF() ENDIF(WIN32) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 20a9bd46696..af11b759f4e 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2013, 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 @@ -172,6 +172,10 @@ ENDIF() CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysqlbug.sh ${CMAKE_CURRENT_BINARY_DIR}/mysqlbug ESCAPE_QUOTES @ONLY) + EXECUTE_PROCESS( + COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/mysqlbug + ) + INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/mysqlbug DESTINATION ${INSTALL_BINDIR} COMPONENT Server @@ -205,6 +209,10 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY) SET(DEST ${INSTALL_SCRIPTDIR}) SET(EXT) + EXECUTE_PROCESS( + COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db + ) + INSTALL_SCRIPT( "${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db" DESTINATION ${DEST} @@ -212,7 +220,6 @@ INSTALL_SCRIPT( ) ENDIF() - SET(prefix "${CMAKE_INSTALL_PREFIX}") SET(sysconfdir ${prefix}) SET(bindir ${prefix}/${INSTALL_BINDIR}) diff --git a/scripts/mysql_config.pl.in b/scripts/mysql_config.pl.in index acf33699b05..b39bf146f58 100644 --- a/scripts/mysql_config.pl.in +++ b/scripts/mysql_config.pl.in @@ -258,7 +258,7 @@ Options: --version [$version] --libmysqld-libs [$embedded_libs] EOF - exit 1; + exit 0; } @ARGV or usage(); diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index 38cd2b6b910..81b2e96fbd9 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -176,7 +176,7 @@ Options: pkglibdir [$pkglibdir] plugindir [$plugindir] EOF - exit 1 + exit 0 } if test $# -le 0; then usage; fi diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in index 1bc2603a718..e63e8646d07 100644 --- a/scripts/mysql_install_db.pl.in +++ b/scripts/mysql_install_db.pl.in @@ -1,7 +1,7 @@ #!/usr/bin/perl # -*- cperl -*- # -# Copyright (c) 2007, 2011, Oracle and/or its affiliates. +# Copyright (c) 2007, 2013, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -535,7 +535,7 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") ) " cd mysql-test ; perl mysql-test-run.pl"); } report($opt, - "Please report any problems with the " . '@scriptdir@' . "/mysqlbug script!", + "Please report any problems at http://bugs.mysql.com/", "", "The latest information about MySQL is available on the web at", "", @@ -568,8 +568,9 @@ else "Please consult the MySQL manual section: 'Problems running mysql_install_db',", "and the manual section that describes problems on your OS.", "Another information source is the MySQL email archive.", - "Please check all of the above before mailing us!", - "And if you do mail us, you MUST use the " . '@scriptdir@' . "/mysqlbug script!") + "", + "Please check all of the above before submitting a bug report", + "at http://bugs.mysql.com/") } ############################################################################## diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 1870dc8b32f..c24aacaf883 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2000, 2011, Oracle and/or its affiliates. -# Copyright (c) 2009, 2011,2013 Monty Program Ab +# Copyright (c) 2000, 2013, Oracle and/or its affiliates. +# Copyright (c) 2009, 2013, Monty Program Ab # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -90,7 +90,7 @@ link_to_help() { echo echo "The latest information about mysql_install_db is available at" - echo "http://kb.askmonty.org/v/installing-system-tables-mysql_install_db." + echo "https://mariadb.com/kb/en/installing-system-tables-mysql_install_db" } parse_arg() @@ -267,7 +267,7 @@ then bindir="$basedir/client" extra_bindir="$basedir/extra" mysqld="$basedir/sql/mysqld" - langdir="$srcdir/sql/share/english" + langdir="$basedir/sql/share/english" pkgdatadir="$srcdir/scripts" scriptdir="$srcdir/scripts" elif test -n "$basedir" @@ -435,7 +435,7 @@ else echo "The problem could be conflicting information in an external" echo "my.cnf files. You can ignore these by doing:" echo - echo " shell> /scripts/mysql_install_db --defaults-file=~/.my.cnf" + echo " shell> $scriptdir/scripts/mysql_install_db --defaults-file=~/.my.cnf" echo echo "You can also try to start the mysqld daemon with:" echo @@ -453,8 +453,9 @@ else echo "MariaDB is hosted on launchpad; You can find the latest source and" echo "email lists at http://launchpad.net/maria" echo - echo "Please check all of the above before mailing us! And remember, if" - echo "you do mail us, you should use the $scriptdir/mysqlbug script!" + echo "Please check all of the above before submitting a bug report" + echo "at http://mariadb.org/jira" + echo exit 1 fi @@ -491,7 +492,7 @@ then echo "databases and anonymous user created by default. This is" echo "strongly recommended for production servers." echo - echo "See the MariaDB Knowledgebase at http://kb.askmonty.org or the" + echo "See the MariaDB Knowledgebase at http://mariadb.com/kb or the" echo "MySQL manual for more instructions." if test "$in_rpm" -eq 0 @@ -505,15 +506,15 @@ then fi echo - echo "Please report any problems with the '$scriptdir/mysqlbug' script!" + echo "Please report any problems at http://mariadb.org/jira" echo echo "The latest information about MariaDB is available at http://mariadb.org/." echo "You can find additional information about the MySQL part at:" echo "http://dev.mysql.com" echo "Support MariaDB development by buying support/new features from" - echo "Monty Program Ab. You can contact us about this at sales@montyprogram.com". + echo "SkySQL Ab. You can contact us about this at sales@skysql.com". echo "Alternatively consider joining our community based development effort:" - echo "http://kb.askmonty.org/en/contributing-to-the-mariadb-project/" + echo "http://mariadb.com/kb/en/contributing-to-the-mariadb-project/" echo fi diff --git a/scripts/mysql_secure_installation.pl.in b/scripts/mysql_secure_installation.pl.in index 188a6bd7104..188a6bd7104 100755..100644 --- a/scripts/mysql_secure_installation.pl.in +++ b/scripts/mysql_secure_installation.pl.in diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql index 79eeee2ac2c..34742aa6dfb 100644 --- a/scripts/mysql_system_tables.sql +++ b/scripts/mysql_system_tables.sql @@ -1,6 +1,5 @@ --- Copyright (c) 2007, 2011, Oracle and/or its affiliates. --- Copyright (c) 2007, 2008 MySQL AB, 2009 Sun Microsystems, Inc. --- Copyright (c) 2008-2013 Monty Program Ab & SkySQL Ab +-- Copyright (c) 2007, 2013, Oracle and/or its affiliates. +-- Copyright (c) 2008, 2014, Monty Program Ab & SkySQL Ab -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql index beb99af8e90..38e6a547c1d 100644 --- a/scripts/mysql_system_tables_data.sql +++ b/scripts/mysql_system_tables_data.sql @@ -24,8 +24,7 @@ -- Get the hostname, if the hostname has any wildcard character like "_" or "%" -- add escape character in front of wildcard character to convert "_" or "%" to -- a plain character -SET @get_hostname= @@hostname; -SELECT REPLACE((SELECT REPLACE(@get_hostname,'_','\_')),'%','\%') INTO @current_hostname; +SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname; -- Fill "db" table with default grants for anyone to @@ -41,16 +40,16 @@ DROP TABLE tmp_db; -- from local machine if "user" table didn't exist before CREATE TEMPORARY TABLE tmp_user LIKE user; INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N', 'N'); -REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N' FROM dual WHERE LOWER( @current_hostname) != 'localhost'; +REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N' FROM dual WHERE @current_hostname != 'localhost'; REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N'); REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N'); INSERT INTO tmp_user (host,user) VALUES ('localhost',''); -INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost'; +INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; DROP TABLE tmp_user; CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv; INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now()); -REPLACE INTO tmp_proxies_priv SELECT @current_hostname, 'root', '', '', TRUE, '', now() FROM DUAL WHERE LOWER (@current_hostname) != 'localhost'; +REPLACE INTO tmp_proxies_priv SELECT @current_hostname, 'root', '', '', TRUE, '', now() FROM DUAL WHERE @current_hostname != 'localhost'; INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0; DROP TABLE tmp_proxies_priv; diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index f444df60a83..45c862e1420 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -1,5 +1,5 @@ --- Copyright (C) 2003, 2011 Oracle and/or its affiliates. --- Copyright (C) 2010-2013 Monty Program Ab & SkySQL Ab +-- Copyright (C) 2003, 2013 Oracle and/or its affiliates. +-- Copyright (C) 2010, 2014 SkySQL Ab. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -645,6 +645,9 @@ INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now( INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0; DROP TABLE tmp_proxies_priv; +# Convering the host name to lower case for existing users +UPDATE user SET host=LOWER( host ) WHERE LOWER( host ) <> host; + # MDEV-4332 longer user names alter table user modify User char(80) binary not null default ''; alter table db modify User char(80) binary not null default ''; diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh index 43844e5ec68..1d01c84735a 100644 --- a/scripts/mysqlaccess.sh +++ b/scripts/mysqlaccess.sh @@ -1,7 +1,6 @@ #!/usr/bin/perl -# Copyright (c) 2000, 2007 MySQL AB, 2009 Sun Microsystems, Inc. -# Use is subject to license terms. +# Copyright (c) 2000, 2013, 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 Library General Public @@ -2423,7 +2422,7 @@ sub Print_Header { sub Print_Footer { if ($MySQLaccess::CMD) { #command-line mode print "\n" - ."BUGs can be reported trough https://mariadb.atlassian.net/browse/MDEV\n"; + ."BUGs can be reported at https://mariadb.atlassian.net/browse/MDEV\n"; } if ($MySQLaccess::CGI) { #CGI-BIN mode if ($MySQLaccess::Param{'brief'}) { @@ -2431,7 +2430,7 @@ sub Print_Footer { } print "<HR>\n" ."<ADDRESS>\n" - ."BUGs can be reported through <a href=\"https://mariadb.atlassian.net/browse/MDEV\">MariaDB JIRA</a><BR>\n" + ."BUGs can be reported at <a href=\"https://mariadb.atlassian.net/browse/MDEV\">MariaDB JIRA</a><BR>\n" # ."Don't forget to mention the version $VERSION!<BR>\n" ."</ADDRESS>\n" ."</BODY>\n" diff --git a/scripts/mytop.sh b/scripts/mytop.sh index 480805e90b1..480805e90b1 100755..100644 --- a/scripts/mytop.sh +++ b/scripts/mytop.sh diff --git a/sql-bench/innotest1.sh b/sql-bench/innotest1.sh index 1c5450a1d9e..9e1ed32c273 100644 --- a/sql-bench/innotest1.sh +++ b/sql-bench/innotest1.sh @@ -1,142 +1,142 @@ -#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/InnoDB combined database
-# (c) 2002 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl +############################################################################ +# Stress test for MySQL/InnoDB combined database +# (c) 2002 Innobase Oy & MySQL AB +# +############################################################################ + use Cwd; -use DBI;
-use Benchmark;
-
-$opt_loop_count = 100000;
-
+use DBI; +use Benchmark; + +$opt_loop_count = 100000; + $pwd = cwd(); $pwd = "." if ($pwd eq ''); -require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest1: MySQL/InnoDB stress test in Perl\n";
-print "-------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest1, innotest1a, and innotest1b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on table innotest1 in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest1 > out1\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kh";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 20); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-$dbh->do("set autocommit = 0");
-
-$n = 0;
-
-for ($i = 0; $i < 1; $i++) {
-
- print "Dropping table innotest1\n";
-
- $dbh->do("drop table innotest1");
-
- print "Creating table innotest1\n";
-
- $dbh->do(
- "create table innotest1 (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), E TIMESTAMP, F TIMESTAMP, G DATETIME, PRIMARY KEY (A, D), INDEX
-(B, C), INDEX (C), INDEX (D), INDEX(E), INDEX(G)) TYPE = INNODB")
- || die $dbh->errstr;
-
- for ($j = 2; $j < $opt_loop_count - 10; $j = $j + 2) {
-
- if ($j % 10 == 0) {
- $dbh->do(
- "insert into innotest1 (D, B, C, F, G) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."', NULL, NULL)");
- } else {
- $dbh->do(
- "insert into innotest1 (D, B, C, F, G) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."', NOW(), NOW())");
- }
-
- $dbh->do("update innotest1 set B = '".$rnd_str[$j + 7]."' where A = ".$random[$j + 5]);
-
- $dbh->do("update innotest1 SET D = D + 1 where A =".($j / 2 - 500));
-
- $dbh->do("update innotest1 set B = '".$rnd_str[$j + 1]."' where A =".($j / 2 - 505));
-
- $dbh->do("delete from innotest1 where A = ".$random[$random[$j]]);
-
- fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7));
-
- if (0 == ($j % 10)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 97)) {
- fetch_all_rows($dbh, "select c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'");
- fetch_all_rows($dbh, "select b, e, f, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
- fetch_all_rows($dbh, "select b, c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'");
- fetch_all_rows($dbh, "select b, c, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
- fetch_all_rows($dbh, "select a, b, c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'");
- fetch_all_rows($dbh, "select a, b, c, e, f, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
- fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- fetch_all_rows($dbh, "select d, b, c, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
-
- $dbh->do("rollback");
- }
-
- for ($k = 1; $k < 10; $k++) {
-
- $n += fetch_all_rows($dbh,
-"SELECT a, d from innotest1 where a = ".(($k * 1764767) % $j));
-
- $n += fetch_all_rows($dbh,
-"SELECT * from innotest1 where a = ".(($k * 187567) % $j));
-
- }
-
- if (0 == ($j % 1000)) {
- print "round $j, $n rows fetched\n";
- }
-
- if (0 == ($j % 20000)) {
- print "Checking table innotest1...\n";
- $dbh->do("check table innotest1");
- print "Table checked.\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; + +print "Innotest1: MySQL/InnoDB stress test in Perl\n"; +print "-------------------------------------------\n"; +print "This is a randomized stress test for concurrent inserts,\n"; +print "updates, deletes, commits and rollbacks. The test will generate\n"; +print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n"; +print "\n"; +print "You should run innotest1, innotest1a, and innotest1b concurrently.\n"; +print "The thing to watch is that the server does not crash or does not\n"; +print "print to the .err log anything. Currently, due to a buglet in MySQL,\n"; +print "warnings about MySQL lock reservations can appear in the .err log.\n"; +print "The test will run very long, even several hours. You can kill\n"; +print "the perl processes running this test at any time and do CHECK\n"; +print "TABLE on table innotest1 in the 'test' database.\n"; +print "\n"; +print "Some of these stress tests will print a lot of SQL errors\n"; +print "to the standard output. That is not to be worried about.\n"; +print "You can direct the output to a file like this:\n"; +print "perl innotest1 > out1\n\n"; + +print "Generating random keys\n"; +$random[$opt_loop_count] = 0; +$rnd_str[$opt_loop_count] = "a"; + +for ($i = 0; $i < $opt_loop_count; $i++) { + + $random[$i] = ($i * 63857) % $opt_loop_count; + + if (0 == ($random[$i] % 3)) { + $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd"; + } else { if (1 == ($random[$i] % 3)) { + $rnd_str[$i] = "khd"; + } else { if (2 == ($random[$i] % 3)) { + $rnd_str[$i] = "kh"; + }}} + + for ($j = 0; $j < (($i * 764877) % 20); $j++) { + $rnd_str[$i] = $rnd_str[$i]."k"; + } +} + +#### +#### Connect +#### + +$dbh = $server->connect() +|| die $dbh->errstr; + +$dbh->do("set autocommit = 0"); + +$n = 0; + +for ($i = 0; $i < 1; $i++) { + + print "Dropping table innotest1\n"; + + $dbh->do("drop table innotest1"); + + print "Creating table innotest1\n"; + + $dbh->do( + "create table innotest1 (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), E TIMESTAMP, F TIMESTAMP, G DATETIME, PRIMARY KEY (A, D), INDEX +(B, C), INDEX (C), INDEX (D), INDEX(E), INDEX(G)) TYPE = INNODB") + || die $dbh->errstr; + + for ($j = 2; $j < $opt_loop_count - 10; $j = $j + 2) { + + if ($j % 10 == 0) { + $dbh->do( + "insert into innotest1 (D, B, C, F, G) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."', NULL, NULL)"); + } else { + $dbh->do( + "insert into innotest1 (D, B, C, F, G) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."', NOW(), NOW())"); + } + + $dbh->do("update innotest1 set B = '".$rnd_str[$j + 7]."' where A = ".$random[$j + 5]); + + $dbh->do("update innotest1 SET D = D + 1 where A =".($j / 2 - 500)); + + $dbh->do("update innotest1 set B = '".$rnd_str[$j + 1]."' where A =".($j / 2 - 505)); + + $dbh->do("delete from innotest1 where A = ".$random[$random[$j]]); + + fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7)); + + if (0 == ($j % 10)) { + $dbh->do("commit"); + } + + if (0 == ($j % 97)) { + fetch_all_rows($dbh, "select c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'"); + fetch_all_rows($dbh, "select b, e, f, g from innotest1 where b = '".$rnd_str[$j - 677]."'"); + fetch_all_rows($dbh, "select b, c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'"); + fetch_all_rows($dbh, "select b, c, g from innotest1 where b = '".$rnd_str[$j - 677]."'"); + fetch_all_rows($dbh, "select a, b, c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'"); + fetch_all_rows($dbh, "select a, b, c, e, f, g from innotest1 where b = '".$rnd_str[$j - 677]."'"); + fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'"); + fetch_all_rows($dbh, "select d, b, c, g from innotest1 where b = '".$rnd_str[$j - 677]."'"); + + $dbh->do("rollback"); + } + + for ($k = 1; $k < 10; $k++) { + + $n += fetch_all_rows($dbh, +"SELECT a, d from innotest1 where a = ".(($k * 1764767) % $j)); + + $n += fetch_all_rows($dbh, +"SELECT * from innotest1 where a = ".(($k * 187567) % $j)); + + } + + if (0 == ($j % 1000)) { + print "round $j, $n rows fetched\n"; + } + + if (0 == ($j % 20000)) { + print "Checking table innotest1...\n"; + $dbh->do("check table innotest1"); + print "Table checked.\n"; + } + } + + $dbh->do("commit"); +} + +$dbh->disconnect; # close connection diff --git a/sql-bench/innotest1a.sh b/sql-bench/innotest1a.sh index 876100e5de4..1e428e33dcf 100644 --- a/sql-bench/innotest1a.sh +++ b/sql-bench/innotest1a.sh @@ -1,108 +1,108 @@ -#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/InnoDB combined database
-# (c) 2002 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl +############################################################################ +# Stress test for MySQL/InnoDB combined database +# (c) 2002 Innobase Oy & MySQL AB +# +############################################################################ + use Cwd; -use DBI;
-use Benchmark;
-
-$opt_loop_count = 200000;
-
+use DBI; +use Benchmark; + +$opt_loop_count = 200000; + $pwd = cwd(); $pwd = "." if ($pwd eq ''); -require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest1a: MySQL/InnoDB stress test in Perl\n";
-print "-------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest1, innotest1a, and innotest1b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on table innotest1 in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest1 > out1\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kh";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 20); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 1; $i++) {
- print "loop $i\n";
-
- for ($j = 1; $j < $opt_loop_count - 10; $j = $j + 2) {
- $dbh->do(
- "insert into innotest1 (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')");
- $dbh->do("update innotest1 set B = '".$rnd_str[$j + 2]."' where A = ".$random[$j + 5]);
- $dbh->do("update innotest1 SET D = D + 1 where A =".(($j - 1) / 2 - 777));
- $dbh->do("update innotest1 set B = '".$rnd_str[$j + 8]."' where A =".(($j - 1) / 2 - 770));
- $dbh->do("delete from innotest1 where A = ".$random[$random[$j]]);
-
- fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7));
-
- if (0 == ($j % 37)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 533)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 537)) {
- print fetch_all_rows($dbh, "select c from innotest1 where c = '".$rnd_str[$j - 67]."'");
- print fetch_all_rows($dbh, "select b from innotest1 where b = '".$rnd_str[$j - 688]."'");
- print fetch_all_rows($dbh, "select b, c from innotest1 where c = '".$rnd_str[$j - 67]."'");
- print fetch_all_rows($dbh, "select b, c from innotest1 where b = '".$rnd_str[$j - 622]."'");
- print fetch_all_rows($dbh, "select a, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- print fetch_all_rows($dbh, "select a, b, c from innotest1 where b = '".$rnd_str[$j - 644]."'");
- print fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- print fetch_all_rows($dbh, "select d, b, c from innotest1 where b = '".$rnd_str[$j - 677]."'");
- print "\n";
- }
-
- if (0 == (($j - 1) % 1000)) {
- print "round $j\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; + +print "Innotest1a: MySQL/InnoDB stress test in Perl\n"; +print "-------------------------------------------\n"; +print "This is a randomized stress test for concurrent inserts,\n"; +print "updates, deletes, commits and rollbacks. The test will generate\n"; +print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n"; +print "\n"; +print "You should run innotest1, innotest1a, and innotest1b concurrently.\n"; +print "The thing to watch is that the server does not crash or does not\n"; +print "print to the .err log anything. Currently, due to a buglet in MySQL,\n"; +print "warnings about MySQL lock reservations can appear in the .err log.\n"; +print "The test will run very long, even several hours. You can kill\n"; +print "the perl processes running this test at any time and do CHECK\n"; +print "TABLE on table innotest1 in the 'test' database.\n"; +print "\n"; +print "Some of these stress tests will print a lot of SQL errors\n"; +print "to the standard output. That is not to be worried about.\n"; +print "You can direct the output to a file like this:\n"; +print "perl innotest1 > out1\n\n"; + +print "Generating random keys\n"; +$random[$opt_loop_count] = 0; +$rnd_str[$opt_loop_count] = "a"; + +for ($i = 0; $i < $opt_loop_count; $i++) { + + $random[$i] = ($i * 63857) % $opt_loop_count; + + if (0 == ($random[$i] % 3)) { + $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd"; + } else { if (1 == ($random[$i] % 3)) { + $rnd_str[$i] = "khd"; + } else { if (2 == ($random[$i] % 3)) { + $rnd_str[$i] = "kh"; + }}} + + for ($j = 0; $j < (($i * 764877) % 20); $j++) { + $rnd_str[$i] = $rnd_str[$i]."k"; + } +} + +#### +#### Connect +#### + +$dbh = $server->connect() +|| die $dbh->errstr; + + +$dbh->do("set autocommit = 0"); + +for ($i = 0; $i < 1; $i++) { + print "loop $i\n"; + + for ($j = 1; $j < $opt_loop_count - 10; $j = $j + 2) { + $dbh->do( + "insert into innotest1 (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')"); + $dbh->do("update innotest1 set B = '".$rnd_str[$j + 2]."' where A = ".$random[$j + 5]); + $dbh->do("update innotest1 SET D = D + 1 where A =".(($j - 1) / 2 - 777)); + $dbh->do("update innotest1 set B = '".$rnd_str[$j + 8]."' where A =".(($j - 1) / 2 - 770)); + $dbh->do("delete from innotest1 where A = ".$random[$random[$j]]); + + fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7)); + + if (0 == ($j % 37)) { + $dbh->do("commit"); + } + + if (0 == ($j % 533)) { + $dbh->do("rollback"); + } + + if (0 == ($j % 537)) { + print fetch_all_rows($dbh, "select c from innotest1 where c = '".$rnd_str[$j - 67]."'"); + print fetch_all_rows($dbh, "select b from innotest1 where b = '".$rnd_str[$j - 688]."'"); + print fetch_all_rows($dbh, "select b, c from innotest1 where c = '".$rnd_str[$j - 67]."'"); + print fetch_all_rows($dbh, "select b, c from innotest1 where b = '".$rnd_str[$j - 622]."'"); + print fetch_all_rows($dbh, "select a, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'"); + print fetch_all_rows($dbh, "select a, b, c from innotest1 where b = '".$rnd_str[$j - 644]."'"); + print fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'"); + print fetch_all_rows($dbh, "select d, b, c from innotest1 where b = '".$rnd_str[$j - 677]."'"); + print "\n"; + } + + if (0 == (($j - 1) % 1000)) { + print "round $j\n"; + } + } + + $dbh->do("commit"); +} + +$dbh->disconnect; # close connection diff --git a/sql-bench/innotest1b.sh b/sql-bench/innotest1b.sh index 3f6c9f5bd5f..524a6e0e145 100644 --- a/sql-bench/innotest1b.sh +++ b/sql-bench/innotest1b.sh @@ -1,101 +1,101 @@ -#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/InnoDB combined database
-# (c) 2002 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl +############################################################################ +# Stress test for MySQL/InnoDB combined database +# (c) 2002 Innobase Oy & MySQL AB +# +############################################################################ + use Cwd; -use DBI;
-use Benchmark;
-
-$opt_loop_count = 200000;
-
+use DBI; +use Benchmark; + +$opt_loop_count = 200000; + $pwd = cwd(); $pwd = "." if ($pwd eq ''); -require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest1b: MySQL/InnoDB stress test in Perl\n";
-print "-------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest1, innotest1a, and innotest1b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on table innotest1 in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest1 > out1\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kh";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 20); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 5; $i++) {
- print "loop $i\n";
-
- for ($j = 1; $j < $opt_loop_count - 10; $j = $j + 2) {
-
- fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7));
-
- if (0 == ($j % 37)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 533)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 537)) {
- print fetch_all_rows($dbh, "select c from innotest1 where c = '".$rnd_str[$j - 67]."'");
- print fetch_all_rows($dbh, "select b from innotest1 where b = '".$rnd_str[$j - 688]."'");
- print fetch_all_rows($dbh, "select b, c from innotest1 where c = '".$rnd_str[$j - 67]."'");
- print fetch_all_rows($dbh, "select b, c from innotest1 where b = '".$rnd_str[$j - 622]."'");
- print fetch_all_rows($dbh, "select a, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- print fetch_all_rows($dbh, "select a, b, c from innotest1 where b = '".$rnd_str[$j - 644]."'");
- print fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- print fetch_all_rows($dbh, "select d, b, c from innotest1 where b = '".$rnd_str[$j - 677]."'");
- print "\n";
- }
-
- if (0 == (($j - 1) % 1000)) {
- print "round $j\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; + +print "Innotest1b: MySQL/InnoDB stress test in Perl\n"; +print "-------------------------------------------\n"; +print "This is a randomized stress test for concurrent inserts,\n"; +print "updates, deletes, commits and rollbacks. The test will generate\n"; +print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n"; +print "\n"; +print "You should run innotest1, innotest1a, and innotest1b concurrently.\n"; +print "The thing to watch is that the server does not crash or does not\n"; +print "print to the .err log anything. Currently, due to a buglet in MySQL,\n"; +print "warnings about MySQL lock reservations can appear in the .err log.\n"; +print "The test will run very long, even several hours. You can kill\n"; +print "the perl processes running this test at any time and do CHECK\n"; +print "TABLE on table innotest1 in the 'test' database.\n"; +print "\n"; +print "Some of these stress tests will print a lot of SQL errors\n"; +print "to the standard output. That is not to be worried about.\n"; +print "You can direct the output to a file like this:\n"; +print "perl innotest1 > out1\n\n"; + +print "Generating random keys\n"; +$random[$opt_loop_count] = 0; +$rnd_str[$opt_loop_count] = "a"; + +for ($i = 0; $i < $opt_loop_count; $i++) { + + $random[$i] = ($i * 63857) % $opt_loop_count; + + if (0 == ($random[$i] % 3)) { + $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd"; + } else { if (1 == ($random[$i] % 3)) { + $rnd_str[$i] = "khd"; + } else { if (2 == ($random[$i] % 3)) { + $rnd_str[$i] = "kh"; + }}} + + for ($j = 0; $j < (($i * 764877) % 20); $j++) { + $rnd_str[$i] = $rnd_str[$i]."k"; + } +} + +#### +#### Connect +#### + +$dbh = $server->connect() +|| die $dbh->errstr; + +$dbh->do("set autocommit = 0"); + +for ($i = 0; $i < 5; $i++) { + print "loop $i\n"; + + for ($j = 1; $j < $opt_loop_count - 10; $j = $j + 2) { + + fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7)); + + if (0 == ($j % 37)) { + $dbh->do("commit"); + } + + if (0 == ($j % 533)) { + $dbh->do("rollback"); + } + + if (0 == ($j % 537)) { + print fetch_all_rows($dbh, "select c from innotest1 where c = '".$rnd_str[$j - 67]."'"); + print fetch_all_rows($dbh, "select b from innotest1 where b = '".$rnd_str[$j - 688]."'"); + print fetch_all_rows($dbh, "select b, c from innotest1 where c = '".$rnd_str[$j - 67]."'"); + print fetch_all_rows($dbh, "select b, c from innotest1 where b = '".$rnd_str[$j - 622]."'"); + print fetch_all_rows($dbh, "select a, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'"); + print fetch_all_rows($dbh, "select a, b, c from innotest1 where b = '".$rnd_str[$j - 644]."'"); + print fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'"); + print fetch_all_rows($dbh, "select d, b, c from innotest1 where b = '".$rnd_str[$j - 677]."'"); + print "\n"; + } + + if (0 == (($j - 1) % 1000)) { + print "round $j\n"; + } + } + + $dbh->do("commit"); +} + +$dbh->disconnect; # close connection diff --git a/sql-bench/innotest2.sh b/sql-bench/innotest2.sh index cfeb0527970..fa0fd418968 100644 --- a/sql-bench/innotest2.sh +++ b/sql-bench/innotest2.sh @@ -1,150 +1,150 @@ -#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/InnoDB combined database
-# (c) 2002 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl +############################################################################ +# Stress test for MySQL/InnoDB combined database +# (c) 2002 Innobase Oy & MySQL AB +# +############################################################################ + use Cwd; -use DBI;
-use Benchmark;
-
-$opt_loop_count = 100000;
-
+use DBI; +use Benchmark; + +$opt_loop_count = 100000; + $pwd = cwd(); $pwd = "." if ($pwd eq ''); -require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest2: MySQL/InnoDB stress test in Perl for FOREIGN keys\n";
-print "------------------------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks with foreign keys with\n";
-print "the ON DELETE ... clause. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest2, innotest2a, and innotest2b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest2 > out2\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khD";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kHd";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 10); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 1; $i++) {
- print "loop $i\n";
-
- print "dropping table innotest2a\n";
- $dbh->do("drop table innotest2a");
-
- print "dropping table innotest2b\n";
- $dbh->do("drop table innotest2b");
-
- print "dropping table innotest2c\n";
- $dbh->do("drop table innotest2c");
-
- print "dropping table innotest2d\n";
- $dbh->do("drop table innotest2d");
-
- print "creating table innotest2b\n";
- $dbh->do(
- "create table innotest2b (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C)) TYPE = INNODB")
- || die $dbh->errstr;
-
- print "creating table innotest2a\n";
-
- $dbh->do(
- "create table innotest2a (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (A, D) REFERENCES innotest2b (A, D) ON DELETE CASCADE) TYPE = INNODB")
- || die $dbh->errstr;
-
- print "creating table innotest2c\n";
-
- $dbh->do(
- "create table innotest2c (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (A, D) REFERENCES innotest2a (A, D) ON DELETE CASCADE, FOREIGN KEY (B, C) REFERENCES innotest2a (B, C) ON DELETE CASCADE) TYPE = INNODB")
- || die $dbh->errstr;
-
- print "creating table innotest2d\n";
-
- $dbh->do(
- "create table innotest2d (A INT AUTO_INCREMENT, D INT, B VARCHAR(200), C VARCHAR(175), UNIQUE KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (C) REFERENCES innotest2c (C) ON DELETE SET NULL, FOREIGN KEY (B, C) REFERENCES innotest2c (B, C) ON DELETE SET NULL) TYPE = INNODB")
- || die $dbh->errstr;
- print "created\n";
-
- for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 2) {
- $dbh->do(
- "insert into innotest2b (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2a (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2c (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2d (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do("delete from innotest2b where A = ".$random[$random[$j]])
- || print $dbh->errstr;
-
- if (0 == ($j % 10)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 39)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 1000)) {
- print "round $j\n";
- }
- if (0 == ($j % 20000)) {
- print "Checking tables...\n";
- $dbh->do("check table innotest2a");
- $dbh->do("check table innotest2b");
- $dbh->do("check table innotest2c");
- $dbh->do("check table innotest2d");
- print "Tables checked.\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; + +print "Innotest2: MySQL/InnoDB stress test in Perl for FOREIGN keys\n"; +print "------------------------------------------------------------\n"; +print "This is a randomized stress test for concurrent inserts,\n"; +print "updates, deletes, commits and rollbacks with foreign keys with\n"; +print "the ON DELETE ... clause. The test will generate\n"; +print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n"; +print "\n"; +print "You should run innotest2, innotest2a, and innotest2b concurrently.\n"; +print "The thing to watch is that the server does not crash or does not\n"; +print "print to the .err log anything. Currently, due to a buglet in MySQL,\n"; +print "warnings about MySQL lock reservations can appear in the .err log.\n"; +print "The test will run very long, even several hours. You can kill\n"; +print "the perl processes running this test at any time and do CHECK\n"; +print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n"; +print "\n"; +print "Some of these stress tests will print a lot of SQL errors\n"; +print "to the standard output. That is not to be worried about.\n"; +print "You can direct the output to a file like this:\n"; +print "perl innotest2 > out2\n\n"; + +print "Generating random keys\n"; +$random[$opt_loop_count] = 0; +$rnd_str[$opt_loop_count] = "a"; + +for ($i = 0; $i < $opt_loop_count; $i++) { + + $random[$i] = ($i * 63857) % $opt_loop_count; + + if (0 == ($random[$i] % 3)) { + $rnd_str[$i] = "khD"; + } else { if (1 == ($random[$i] % 3)) { + $rnd_str[$i] = "khd"; + } else { if (2 == ($random[$i] % 3)) { + $rnd_str[$i] = "kHd"; + }}} + + for ($j = 0; $j < (($i * 764877) % 10); $j++) { + $rnd_str[$i] = $rnd_str[$i]."k"; + } +} + +#### +#### Connect +#### + +$dbh = $server->connect() +|| die $dbh->errstr; + +$dbh->do("set autocommit = 0"); + +for ($i = 0; $i < 1; $i++) { + print "loop $i\n"; + + print "dropping table innotest2a\n"; + $dbh->do("drop table innotest2a"); + + print "dropping table innotest2b\n"; + $dbh->do("drop table innotest2b"); + + print "dropping table innotest2c\n"; + $dbh->do("drop table innotest2c"); + + print "dropping table innotest2d\n"; + $dbh->do("drop table innotest2d"); + + print "creating table innotest2b\n"; + $dbh->do( + "create table innotest2b (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C)) TYPE = INNODB") + || die $dbh->errstr; + + print "creating table innotest2a\n"; + + $dbh->do( + "create table innotest2a (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (A, D) REFERENCES innotest2b (A, D) ON DELETE CASCADE) TYPE = INNODB") + || die $dbh->errstr; + + print "creating table innotest2c\n"; + + $dbh->do( + "create table innotest2c (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (A, D) REFERENCES innotest2a (A, D) ON DELETE CASCADE, FOREIGN KEY (B, C) REFERENCES innotest2a (B, C) ON DELETE CASCADE) TYPE = INNODB") + || die $dbh->errstr; + + print "creating table innotest2d\n"; + + $dbh->do( + "create table innotest2d (A INT AUTO_INCREMENT, D INT, B VARCHAR(200), C VARCHAR(175), UNIQUE KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (C) REFERENCES innotest2c (C) ON DELETE SET NULL, FOREIGN KEY (B, C) REFERENCES innotest2c (B, C) ON DELETE SET NULL) TYPE = INNODB") + || die $dbh->errstr; + print "created\n"; + + for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 2) { + $dbh->do( + "insert into innotest2b (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')") + || print $dbh->errstr; + + $dbh->do( + "insert into innotest2a (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')") + || print $dbh->errstr; + + $dbh->do( + "insert into innotest2c (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')") + || print $dbh->errstr; + + $dbh->do( + "insert into innotest2d (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')") + || print $dbh->errstr; + + $dbh->do("delete from innotest2b where A = ".$random[$random[$j]]) + || print $dbh->errstr; + + if (0 == ($j % 10)) { + $dbh->do("commit"); + } + + if (0 == ($j % 39)) { + $dbh->do("rollback"); + } + + if (0 == ($j % 1000)) { + print "round $j\n"; + } + if (0 == ($j % 20000)) { + print "Checking tables...\n"; + $dbh->do("check table innotest2a"); + $dbh->do("check table innotest2b"); + $dbh->do("check table innotest2c"); + $dbh->do("check table innotest2d"); + print "Tables checked.\n"; + } + } + + $dbh->do("commit"); +} + +$dbh->disconnect; # close connection diff --git a/sql-bench/innotest2a.sh b/sql-bench/innotest2a.sh index f77ed3ddadd..4a6e4b20a9a 100644 --- a/sql-bench/innotest2a.sh +++ b/sql-bench/innotest2a.sh @@ -1,94 +1,94 @@ -#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/Innobase combined database
-# (c) 2000 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl +############################################################################ +# Stress test for MySQL/Innobase combined database +# (c) 2000 Innobase Oy & MySQL AB +# +############################################################################ + use Cwd; -use DBI;
-use Benchmark;
-
-$opt_loop_count = 100000;
-
+use DBI; +use Benchmark; + +$opt_loop_count = 100000; + $pwd = cwd(); $pwd = "." if ($pwd eq ''); -require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest2a: MySQL/InnoDB stress test in Perl for FOREIGN keys\n";
-print "------------------------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks with foreign keys with\n";
-print "the ON DELETE ... clause. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest2, innotest2a, and innotest2b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest2 > out2\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khD";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kHd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 20); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 5; $i++) {
- print "loop $i\n";
-
- for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 1) {
-
- $dbh->do("update innotest2a set B = '".$rnd_str[$j + 1]."' where A = ".$random[$j + 5])
- || print $dbh->errstr;
-
- $dbh->do("delete from innotest2a where A = ".$random[$random[$j]])
- || print $dbh->errstr;
-
- if (0 == ($j % 10)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 39)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 1000)) {
- print "round $j\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; + +print "Innotest2a: MySQL/InnoDB stress test in Perl for FOREIGN keys\n"; +print "------------------------------------------------------------\n"; +print "This is a randomized stress test for concurrent inserts,\n"; +print "updates, deletes, commits and rollbacks with foreign keys with\n"; +print "the ON DELETE ... clause. The test will generate\n"; +print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n"; +print "\n"; +print "You should run innotest2, innotest2a, and innotest2b concurrently.\n"; +print "The thing to watch is that the server does not crash or does not\n"; +print "print to the .err log anything. Currently, due to a buglet in MySQL,\n"; +print "warnings about MySQL lock reservations can appear in the .err log.\n"; +print "The test will run very long, even several hours. You can kill\n"; +print "the perl processes running this test at any time and do CHECK\n"; +print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n"; +print "\n"; +print "Some of these stress tests will print a lot of SQL errors\n"; +print "to the standard output. That is not to be worried about.\n"; +print "You can direct the output to a file like this:\n"; +print "perl innotest2 > out2\n\n"; + +print "Generating random keys\n"; +$random[$opt_loop_count] = 0; +$rnd_str[$opt_loop_count] = "a"; + +for ($i = 0; $i < $opt_loop_count; $i++) { + + $random[$i] = ($i * 63857) % $opt_loop_count; + + if (0 == ($random[$i] % 3)) { + $rnd_str[$i] = "khD"; + } else { if (1 == ($random[$i] % 3)) { + $rnd_str[$i] = "kHd"; + } else { if (2 == ($random[$i] % 3)) { + $rnd_str[$i] = "khd"; + }}} + + for ($j = 0; $j < (($i * 764877) % 20); $j++) { + $rnd_str[$i] = $rnd_str[$i]."k"; + } +} + +#### +#### Connect +#### + +$dbh = $server->connect() +|| die $dbh->errstr; + +$dbh->do("set autocommit = 0"); + +for ($i = 0; $i < 5; $i++) { + print "loop $i\n"; + + for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 1) { + + $dbh->do("update innotest2a set B = '".$rnd_str[$j + 1]."' where A = ".$random[$j + 5]) + || print $dbh->errstr; + + $dbh->do("delete from innotest2a where A = ".$random[$random[$j]]) + || print $dbh->errstr; + + if (0 == ($j % 10)) { + $dbh->do("commit"); + } + + if (0 == ($j % 39)) { + $dbh->do("rollback"); + } + + if (0 == ($j % 1000)) { + print "round $j\n"; + } + } + + $dbh->do("commit"); +} + +$dbh->disconnect; # close connection diff --git a/sql-bench/innotest2b.sh b/sql-bench/innotest2b.sh index 72a71d06c73..b94325ff39e 100644 --- a/sql-bench/innotest2b.sh +++ b/sql-bench/innotest2b.sh @@ -1,104 +1,104 @@ -#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/Innobase combined database
-# (c) 2000 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl +############################################################################ +# Stress test for MySQL/Innobase combined database +# (c) 2000 Innobase Oy & MySQL AB +# +############################################################################ + use Cwd; -use DBI;
-use Benchmark;
-
-$opt_loop_count = 100000;
-
+use DBI; +use Benchmark; + +$opt_loop_count = 100000; + $pwd = cwd(); $pwd = "." if ($pwd eq ''); -require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest2b: MySQL/InnoDB stress test in Perl for FOREIGN keys\n";
-print "------------------------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks with foreign keys with\n";
-print "the ON DELETE ... clause. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest2, innotest2a, and innotest2b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest2 > out2\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 98641) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khD";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kHd";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 10); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect();
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 1; $i++) {
- print "loop $i\n";
-
- for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 2) {
- $dbh->do(
- "insert into innotest2b (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2a (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2c (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do("delete from innotest2b where A = ".$random[$random[$j]])
- || print $dbh->errstr;
-
- $dbh->do("update innotest2b set A = A + 1 where A = ".$random[$j])
- || print $dbh->errstr;
-
- if (0 == ($j % 10)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 39)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 1000)) {
- print "round $j\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; + +print "Innotest2b: MySQL/InnoDB stress test in Perl for FOREIGN keys\n"; +print "------------------------------------------------------------\n"; +print "This is a randomized stress test for concurrent inserts,\n"; +print "updates, deletes, commits and rollbacks with foreign keys with\n"; +print "the ON DELETE ... clause. The test will generate\n"; +print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n"; +print "\n"; +print "You should run innotest2, innotest2a, and innotest2b concurrently.\n"; +print "The thing to watch is that the server does not crash or does not\n"; +print "print to the .err log anything. Currently, due to a buglet in MySQL,\n"; +print "warnings about MySQL lock reservations can appear in the .err log.\n"; +print "The test will run very long, even several hours. You can kill\n"; +print "the perl processes running this test at any time and do CHECK\n"; +print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n"; +print "\n"; +print "Some of these stress tests will print a lot of SQL errors\n"; +print "to the standard output. That is not to be worried about.\n"; +print "You can direct the output to a file like this:\n"; +print "perl innotest2 > out2\n\n"; + +print "Generating random keys\n"; +$random[$opt_loop_count] = 0; +$rnd_str[$opt_loop_count] = "a"; + +for ($i = 0; $i < $opt_loop_count; $i++) { + + $random[$i] = ($i * 98641) % $opt_loop_count; + + if (0 == ($random[$i] % 3)) { + $rnd_str[$i] = "khD"; + } else { if (1 == ($random[$i] % 3)) { + $rnd_str[$i] = "khd"; + } else { if (2 == ($random[$i] % 3)) { + $rnd_str[$i] = "kHd"; + }}} + + for ($j = 0; $j < (($i * 764877) % 10); $j++) { + $rnd_str[$i] = $rnd_str[$i]."k"; + } +} + +#### +#### Connect +#### + +$dbh = $server->connect(); + +$dbh->do("set autocommit = 0"); + +for ($i = 0; $i < 1; $i++) { + print "loop $i\n"; + + for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 2) { + $dbh->do( + "insert into innotest2b (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')") + || print $dbh->errstr; + + $dbh->do( + "insert into innotest2a (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')") + || print $dbh->errstr; + + $dbh->do( + "insert into innotest2c (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')") + || print $dbh->errstr; + + $dbh->do("delete from innotest2b where A = ".$random[$random[$j]]) + || print $dbh->errstr; + + $dbh->do("update innotest2b set A = A + 1 where A = ".$random[$j]) + || print $dbh->errstr; + + if (0 == ($j % 10)) { + $dbh->do("commit"); + } + + if (0 == ($j % 39)) { + $dbh->do("rollback"); + } + + if (0 == ($j % 1000)) { + print "round $j\n"; + } + } + + $dbh->do("commit"); +} + +$dbh->disconnect; # close connection diff --git a/sql-bench/limits/access_odbc.cfg b/sql-bench/limits/access_odbc.cfg index cc2e05c0154..8fd07fc71d7 100644 --- a/sql-bench/limits/access_odbc.cfg +++ b/sql-bench/limits/access_odbc.cfg @@ -1,448 +1,448 @@ -#This file is automaticly generated by crash-me 1.37
-
-NEG=yes # update of column= -column
-alter_add_col=yes # Alter table add column
-alter_add_multi_col=without add # Alter table add many columns
-alter_alter_col=no # Alter table alter column
-alter_change_col=no # Alter table change column
-alter_drop_col=yes # Alter table drop column
-alter_modify_col=no # Alter table modify column
-alter_rename_table=no # Alter table rename table
-atomic_updates=no # atomic updates
-binary_items=yes # binary items (0x41)
-case_insensitive_strings=yes # case insensitive compare
-char_is_space_filled=no # char are space filled
-column_alias=yes # Column alias
-columns_in_group_by=11 # number of columns in group by
-columns_in_order_by=11 # number of columns in order by
-comment_#=no # # as comment
-comment_--=no # -- as comment
-comment_/**/=no # /* */ as comment
-comment_//=no # // as comment
-compute=no # Compute
-connections=64 # Simultaneous connections
-constraint_check=no # CHECK constraint
-constraint_null=yes # NULL constraint (SyBase style)
-crash_me_safe=no # crash me safe
-crash_me_version=1.37 # crash me version
-create_default=no # default value for column
-create_default_func=no # default value function for column
-create_if_not_exists=no # create table if not exists
-create_index=yes # create index
-create_table_select=no # create table from select
-cross_join=no # cross join (same as from a,b)
-date_as_string=error # String functions on date columns
-date_with_YY=yes # Supports YY-MM-DD 2000 compilant dates
-date_zero=no # Supports 0000-00-00 dates
-double_quotes=yes # Double '' as ' in strings
-drop_if_exists=no # drop table if exists
-drop_index=with 'ON' # drop index
-end_colon=yes # allows end ';'
-except=no # except
-except_all=no # except all
-float_int_expr=yes # mixing of integer and float in expression
-foreign_key_syntax=no # foreign key syntax
-full_outer_join=no # full outer join
-func_extra_!=no # Function NOT as '!' in SELECT
-func_extra_%=no # Function MOD as %
-func_extra_&=error # Function & (bitwise and)
-func_extra_&&=no # Function AND as '&&'
-func_extra_<>=yes # Function <> in SELECT
-func_extra_==yes # Function =
-func_extra_add_months=no # Function ADD_MONTHS
-func_extra_and_or=yes # Function AND and OR in SELECT
-func_extra_atn2=no # Function ATN2
-func_extra_auto_num2string=no # Function automatic num->string convert
-func_extra_auto_string2num=yes # Function automatic string->num convert
-func_extra_between=yes # Function BETWEEN in SELECT
-func_extra_binary_shifts=no # Function << and >> (bitwise shifts)
-func_extra_bit_count=no # Function BIT_COUNT
-func_extra_ceil=no # Function CEIL
-func_extra_charindex=no # Function CHARINDEX
-func_extra_chr=yes # Function CHR
-func_extra_coalesce=no # Function COALESCE
-func_extra_concat_as_+=yes # Function concatenation with +
-func_extra_concat_list=no # Function CONCAT(list)
-func_extra_convert=no # Function CONVERT
-func_extra_cosh=no # Function COSH
-func_extra_date_format=no # Function DATE_FORMAT
-func_extra_dateadd=no # Function DATEADD
-func_extra_datediff=no # Function DATEDIFF
-func_extra_datename=no # Function DATENAME
-func_extra_datepart=no # Function DATEPART
-func_extra_elt=no # Function ELT
-func_extra_encrypt=no # Function ENCRYPT
-func_extra_field=no # Function FIELD
-func_extra_format=error # Function FORMAT
-func_extra_from_days=no # Function FROM_DAYS
-func_extra_from_unixtime=no # Function FROM_UNIXTIME
-func_extra_getdate=no # Function GETDATE
-func_extra_greatest=no # Function GREATEST
-func_extra_if=no # Function IF
-func_extra_in_num=yes # Function IN on numbers in SELECT
-func_extra_in_str=yes # Function IN on strings in SELECT
-func_extra_initcap=no # Function INITCAP
-func_extra_instr=yes # Function LOCATE as INSTR
-func_extra_instr_oracle=no # Function INSTR (Oracle syntax)
-func_extra_instrb=no # Function INSTRB
-func_extra_interval=no # Function INTERVAL
-func_extra_last_day=no # Function LAST_DAY
-func_extra_last_insert_id=no # Function LAST_INSERT_ID
-func_extra_least=no # Function LEAST
-func_extra_lengthb=no # Function LENGTHB
-func_extra_like=yes # Function LIKE in SELECT
-func_extra_like_escape=no # Function LIKE ESCAPE in SELECT
-func_extra_ln=no # Function LN
-func_extra_log(m_n)=no # Function LOG(m,n)
-func_extra_logn=no # Function LOGN
-func_extra_lpad=no # Function LPAD
-func_extra_mdy=no # Function MDY
-func_extra_mid=yes # Function SUBSTRING as MID
-func_extra_months_between=no # Function MONTHS_BETWEEN
-func_extra_not=yes # Function NOT in SELECT
-func_extra_not_between=yes # Function NOT BETWEEN in SELECT
-func_extra_not_like=yes # Function NOT LIKE in SELECT
-func_extra_odbc_convert=no # Function ODBC CONVERT
-func_extra_password=no # Function PASSWORD
-func_extra_patindex=no # Function PATINDEX
-func_extra_period_add=no # Function PERIOD_ADD
-func_extra_period_diff=no # Function PERIOD_DIFF
-func_extra_pow=no # Function POW
-func_extra_range=no # Function RANGE
-func_extra_regexp=no # Function REGEXP in SELECT
-func_extra_replicate=no # Function REPLICATE
-func_extra_reverse=no # Function REVERSE
-func_extra_root=no # Function ROOT
-func_extra_round1=yes # Function ROUND(1 arg)
-func_extra_rpad=no # Function RPAD
-func_extra_sec_to_time=no # Function SEC_TO_TIME
-func_extra_sinh=no # Function SINH
-func_extra_str=no # Function STR
-func_extra_strcmp=no # Function STRCMP
-func_extra_stuff=no # Function STUFF
-func_extra_substrb=no # Function SUBSTRB
-func_extra_substring_index=no # Function SUBSTRING_INDEX
-func_extra_sysdate=no # Function SYSDATE
-func_extra_tanh=no # Function TANH
-func_extra_time_to_sec=no # Function TIME_TO_SEC
-func_extra_to_days=no # Function TO_DAYS
-func_extra_translate=no # Function TRANSLATE
-func_extra_trim_many_char=no # Function TRIM; Many char extension
-func_extra_trim_substring=no # Function TRIM; Substring extension
-func_extra_trunc=no # Function TRUNC
-func_extra_uid=no # Function UID
-func_extra_unix_timestamp=no # Function UNIX_TIMESTAMP
-func_extra_userenv=no # Function USERENV
-func_extra_version=no # Function VERSION
-func_extra_weekday=error # Function WEEKDAY
-func_extra_|=no # Function | (bitwise or)
-func_extra_||=no # Function OR as '||'
-func_odbc_abs=yes # Function ABS
-func_odbc_acos=no # Function ACOS
-func_odbc_ascii=no # Function ASCII
-func_odbc_asin=no # Function ASIN
-func_odbc_atan=no # Function ATAN
-func_odbc_atan2=no # Function ATAN2
-func_odbc_ceiling=no # Function CEILING
-func_odbc_char=no # Function CHAR
-func_odbc_concat=no # Function CONCAT(2 arg)
-func_odbc_cos=yes # Function COS
-func_odbc_cot=no # Function COT
-func_odbc_curdate=no # Function CURDATE
-func_odbc_curtime=no # Function CURTIME
-func_odbc_database=no # Function DATABASE
-func_odbc_dayname=no # Function DAYNAME
-func_odbc_dayofmonth=no # Function DAYOFMONTH
-func_odbc_dayofweek=no # Function DAYOFWEEK
-func_odbc_dayofyear=no # Function DAYOFYEAR
-func_odbc_degrees=no # Function DEGREES
-func_odbc_difference=no # Function DIFFERENCE()
-func_odbc_exp=yes # Function EXP
-func_odbc_extract=no # Function EXTRACT
-func_odbc_floor=no # Function FLOOR
-func_odbc_fn_left=yes # Function ODBC syntax LEFT & RIGHT
-func_odbc_hour=yes # Function HOUR
-func_odbc_hour_time=no # Function ANSI HOUR
-func_odbc_ifnull=no # Function IFNULL
-func_odbc_insert=no # Function INSERT
-func_odbc_lcase=yes # Function LCASE
-func_odbc_left=yes # Function LEFT
-func_odbc_length=no # Function REAL LENGTH
-func_odbc_length_without_space=no # Function ODBC LENGTH
-func_odbc_locate_2=no # Function LOCATE(2 arg)
-func_odbc_locate_3=no # Function LOCATE(3 arg)
-func_odbc_log=yes # Function LOG
-func_odbc_log10=no # Function LOG10
-func_odbc_ltrim=yes # Function LTRIM
-func_odbc_minute=yes # Function MINUTE
-func_odbc_mod=no # Function MOD
-func_odbc_month=yes # Function MONTH
-func_odbc_monthname=no # Function MONTHNAME
-func_odbc_now=yes # Function NOW
-func_odbc_pi=no # Function PI
-func_odbc_power=no # Function POWER
-func_odbc_quarter=no # Function QUARTER
-func_odbc_radians=no # Function RADIANS
-func_odbc_rand=no # Function RAND
-func_odbc_repeat=no # Function REPEAT
-func_odbc_replace=no # Function REPLACE
-func_odbc_right=yes # Function RIGHT
-func_odbc_round=yes # Function ROUND(2 arg)
-func_odbc_rtrim=yes # Function RTRIM
-func_odbc_second=yes # Function SECOND
-func_odbc_sign=no # Function SIGN
-func_odbc_sin=yes # Function SIN
-func_odbc_soundex=no # Function SOUNDEX
-func_odbc_space=yes # Function SPACE
-func_odbc_sqrt=no # Function SQRT
-func_odbc_substring=no # Function ODBC SUBSTRING
-func_odbc_tan=yes # Function TAN
-func_odbc_timestampadd=no # Function TIMESTAMPADD
-func_odbc_timestampdiff=no # Function TIMESTAMPDIFF
-func_odbc_truncate=no # Function TRUNCATE
-func_odbc_ucase=yes # Function UCASE
-func_odbc_user()=no # Function USER()
-func_odbc_week=no # Function WEEK
-func_odbc_year=yes # Function YEAR
-func_sql_+=yes # Function +, -, * and /
-func_sql_bit_length=no # Function BIT_LENGTH
-func_sql_case=no # Function CASE
-func_sql_cast=no # Function CAST
-func_sql_char_length=no # Function CHAR_LENGTH
-func_sql_char_length(constant)=no # Function CHAR_LENGTH(constant)
-func_sql_character_length=no # Function CHARACTER_LENGTH
-func_sql_concat_as_||=no # Function concatenation with ||
-func_sql_current_date=no # Function CURRENT_DATE
-func_sql_current_time=no # Function CURRENT_TIME
-func_sql_current_timestamp=no # Function CURRENT_TIMESTAMP
-func_sql_current_user=no # Function CURRENT_USER
-func_sql_lower=no # Function LOWER
-func_sql_octet_length=no # Function OCTET_LENGTH
-func_sql_position=no # Function POSITION
-func_sql_session_user=no # Function SESSION_USER
-func_sql_substring=no # Function ANSI SQL SUBSTRING
-func_sql_system_user=no # Function SYSTEM_USER
-func_sql_trim=no # Function TRIM
-func_sql_upper=no # Function UPPER
-func_sql_user=no # Function USER
-func_where_between=yes # Function BETWEEN
-func_where_eq_all=yes # Function = ALL
-func_where_eq_any=yes # Function = ANY
-func_where_eq_some=yes # Function = SOME
-func_where_exists=yes # Function EXISTS
-func_where_in_num=yes # Function IN on numbers
-func_where_like=yes # Function LIKE
-func_where_like_escape=no # Function LIKE ESCAPE
-func_where_match=no # Function MATCH
-func_where_match_unique=no # Function MATCH UNIQUE
-func_where_matches=no # Function MATCHES
-func_where_not_between=yes # Function NOT BETWEEN
-func_where_not_exists=yes # Function NOT EXISTS
-func_where_not_like=yes # Function NOT LIKE
-func_where_not_unique=no # Function NOT UNIQUE
-func_where_unique=no # Function UNIQUE
-functions=yes # Functions
-group_by=yes # Group by
-group_by_alias=no # Group by alias
-group_by_null=yes # group on column with null values
-group_by_position=no # Group by position
-group_distinct_functions=no # Group functions with distinct
-group_func_extra_bit_and=no # Group function BIT_AND
-group_func_extra_bit_or=no # Group function BIT_OR
-group_func_extra_count_distinct_list=no # Group function COUNT(DISTINCT expr,expr,...)
-group_func_extra_std=no # Group function STD
-group_func_extra_stddev=no # Group function STDDEV
-group_func_extra_variance=no # Group function VARIANCE
-group_func_sql_avg=yes # Group function AVG
-group_func_sql_count_*=yes # Group function COUNT (*)
-group_func_sql_count_column=yes # Group function COUNT column name
-group_func_sql_count_distinct=no # Group function COUNT(DISTINCT expr)
-group_func_sql_max=yes # Group function MAX on numbers
-group_func_sql_max_str=yes # Group function MAX on strings
-group_func_sql_min=yes # Group function MIN on numbers
-group_func_sql_min_str=yes # Group function MIN on strings
-group_func_sql_sum=yes # Group function SUM
-group_functions=yes # Group functions
-having=yes # Having
-having_with_alias=no # Having on alias
-having_with_group=yes # Having with group function
-ignore_end_space=yes # ignore end space in compare
-index_in_create=no # index in create table
-index_namespace=yes # different namespace for index
-index_parts=no # index on column part (extension)
-insert_empty_string=yes # insert empty string
-insert_select=no # insert INTO ... SELECT ...
-insert_with_set=no # INSERT with set syntax
-intersect=no # intersect
-intersect_all=no # intersect all
-join_tables=32 # tables in join
-left_outer_join=yes # left outer join
-left_outer_join_using=no # left outer join using
-like_with_column=yes # column LIKE column
-like_with_number=yes # LIKE on numbers
-lock_tables=no # lock table
-logical_value=-1 # Value of logical operation (1=1)
-max_big_expressions=1 # big expressions
-max_char_size=255 # max char() size
-max_column_name=59 # column name length
-max_columns=255 # Columns in table
-max_conditions=97 # OR and AND in WHERE
-max_expressions=+10000 # simple expressions
-max_index=32 # max index
-max_index_length=2026 # index length
-max_index_name=64 # index name length
-max_index_part_length=255 # max index part length
-max_index_parts=10 # index parts
-max_index_varchar_part_length=85 # index varchar part length
-max_row_length=2025 # max table row length (without blobs)
-max_row_length_with_null=2025 # table row length with nulls (without blobs)
-max_select_alias_name=64 # select alias name length
-max_stack_expression=14 # stacked expressions
-max_table_alias_name=253 # table alias name length
-max_table_name=64 # table name length
-max_text_size=17 # max text or blob size
-max_unique_index=32 # unique indexes
-max_varchar_size=85 # max varchar() size
-minus=no # minus
-minus_neg=yes # Calculate 1--1
-multi_drop=yes # many tables to drop table
-multi_strings=no # Multiple line strings
-multi_table_delete=yes # DELETE FROM table1,table2...
-multi_table_update=yes # Update with many tables
+#This file is automaticly generated by crash-me 1.37 + +NEG=yes # update of column= -column +alter_add_col=yes # Alter table add column +alter_add_multi_col=without add # Alter table add many columns +alter_alter_col=no # Alter table alter column +alter_change_col=no # Alter table change column +alter_drop_col=yes # Alter table drop column +alter_modify_col=no # Alter table modify column +alter_rename_table=no # Alter table rename table +atomic_updates=no # atomic updates +binary_items=yes # binary items (0x41) +case_insensitive_strings=yes # case insensitive compare +char_is_space_filled=no # char are space filled +column_alias=yes # Column alias +columns_in_group_by=11 # number of columns in group by +columns_in_order_by=11 # number of columns in order by +comment_#=no # # as comment +comment_--=no # -- as comment +comment_/**/=no # /* */ as comment +comment_//=no # // as comment +compute=no # Compute +connections=64 # Simultaneous connections +constraint_check=no # CHECK constraint +constraint_null=yes # NULL constraint (SyBase style) +crash_me_safe=no # crash me safe +crash_me_version=1.37 # crash me version +create_default=no # default value for column +create_default_func=no # default value function for column +create_if_not_exists=no # create table if not exists +create_index=yes # create index +create_table_select=no # create table from select +cross_join=no # cross join (same as from a,b) +date_as_string=error # String functions on date columns +date_with_YY=yes # Supports YY-MM-DD 2000 compilant dates +date_zero=no # Supports 0000-00-00 dates +double_quotes=yes # Double '' as ' in strings +drop_if_exists=no # drop table if exists +drop_index=with 'ON' # drop index +end_colon=yes # allows end ';' +except=no # except +except_all=no # except all +float_int_expr=yes # mixing of integer and float in expression +foreign_key_syntax=no # foreign key syntax +full_outer_join=no # full outer join +func_extra_!=no # Function NOT as '!' in SELECT +func_extra_%=no # Function MOD as % +func_extra_&=error # Function & (bitwise and) +func_extra_&&=no # Function AND as '&&' +func_extra_<>=yes # Function <> in SELECT +func_extra_==yes # Function = +func_extra_add_months=no # Function ADD_MONTHS +func_extra_and_or=yes # Function AND and OR in SELECT +func_extra_atn2=no # Function ATN2 +func_extra_auto_num2string=no # Function automatic num->string convert +func_extra_auto_string2num=yes # Function automatic string->num convert +func_extra_between=yes # Function BETWEEN in SELECT +func_extra_binary_shifts=no # Function << and >> (bitwise shifts) +func_extra_bit_count=no # Function BIT_COUNT +func_extra_ceil=no # Function CEIL +func_extra_charindex=no # Function CHARINDEX +func_extra_chr=yes # Function CHR +func_extra_coalesce=no # Function COALESCE +func_extra_concat_as_+=yes # Function concatenation with + +func_extra_concat_list=no # Function CONCAT(list) +func_extra_convert=no # Function CONVERT +func_extra_cosh=no # Function COSH +func_extra_date_format=no # Function DATE_FORMAT +func_extra_dateadd=no # Function DATEADD +func_extra_datediff=no # Function DATEDIFF +func_extra_datename=no # Function DATENAME +func_extra_datepart=no # Function DATEPART +func_extra_elt=no # Function ELT +func_extra_encrypt=no # Function ENCRYPT +func_extra_field=no # Function FIELD +func_extra_format=error # Function FORMAT +func_extra_from_days=no # Function FROM_DAYS +func_extra_from_unixtime=no # Function FROM_UNIXTIME +func_extra_getdate=no # Function GETDATE +func_extra_greatest=no # Function GREATEST +func_extra_if=no # Function IF +func_extra_in_num=yes # Function IN on numbers in SELECT +func_extra_in_str=yes # Function IN on strings in SELECT +func_extra_initcap=no # Function INITCAP +func_extra_instr=yes # Function LOCATE as INSTR +func_extra_instr_oracle=no # Function INSTR (Oracle syntax) +func_extra_instrb=no # Function INSTRB +func_extra_interval=no # Function INTERVAL +func_extra_last_day=no # Function LAST_DAY +func_extra_last_insert_id=no # Function LAST_INSERT_ID +func_extra_least=no # Function LEAST +func_extra_lengthb=no # Function LENGTHB +func_extra_like=yes # Function LIKE in SELECT +func_extra_like_escape=no # Function LIKE ESCAPE in SELECT +func_extra_ln=no # Function LN +func_extra_log(m_n)=no # Function LOG(m,n) +func_extra_logn=no # Function LOGN +func_extra_lpad=no # Function LPAD +func_extra_mdy=no # Function MDY +func_extra_mid=yes # Function SUBSTRING as MID +func_extra_months_between=no # Function MONTHS_BETWEEN +func_extra_not=yes # Function NOT in SELECT +func_extra_not_between=yes # Function NOT BETWEEN in SELECT +func_extra_not_like=yes # Function NOT LIKE in SELECT +func_extra_odbc_convert=no # Function ODBC CONVERT +func_extra_password=no # Function PASSWORD +func_extra_patindex=no # Function PATINDEX +func_extra_period_add=no # Function PERIOD_ADD +func_extra_period_diff=no # Function PERIOD_DIFF +func_extra_pow=no # Function POW +func_extra_range=no # Function RANGE +func_extra_regexp=no # Function REGEXP in SELECT +func_extra_replicate=no # Function REPLICATE +func_extra_reverse=no # Function REVERSE +func_extra_root=no # Function ROOT +func_extra_round1=yes # Function ROUND(1 arg) +func_extra_rpad=no # Function RPAD +func_extra_sec_to_time=no # Function SEC_TO_TIME +func_extra_sinh=no # Function SINH +func_extra_str=no # Function STR +func_extra_strcmp=no # Function STRCMP +func_extra_stuff=no # Function STUFF +func_extra_substrb=no # Function SUBSTRB +func_extra_substring_index=no # Function SUBSTRING_INDEX +func_extra_sysdate=no # Function SYSDATE +func_extra_tanh=no # Function TANH +func_extra_time_to_sec=no # Function TIME_TO_SEC +func_extra_to_days=no # Function TO_DAYS +func_extra_translate=no # Function TRANSLATE +func_extra_trim_many_char=no # Function TRIM; Many char extension +func_extra_trim_substring=no # Function TRIM; Substring extension +func_extra_trunc=no # Function TRUNC +func_extra_uid=no # Function UID +func_extra_unix_timestamp=no # Function UNIX_TIMESTAMP +func_extra_userenv=no # Function USERENV +func_extra_version=no # Function VERSION +func_extra_weekday=error # Function WEEKDAY +func_extra_|=no # Function | (bitwise or) +func_extra_||=no # Function OR as '||' +func_odbc_abs=yes # Function ABS +func_odbc_acos=no # Function ACOS +func_odbc_ascii=no # Function ASCII +func_odbc_asin=no # Function ASIN +func_odbc_atan=no # Function ATAN +func_odbc_atan2=no # Function ATAN2 +func_odbc_ceiling=no # Function CEILING +func_odbc_char=no # Function CHAR +func_odbc_concat=no # Function CONCAT(2 arg) +func_odbc_cos=yes # Function COS +func_odbc_cot=no # Function COT +func_odbc_curdate=no # Function CURDATE +func_odbc_curtime=no # Function CURTIME +func_odbc_database=no # Function DATABASE +func_odbc_dayname=no # Function DAYNAME +func_odbc_dayofmonth=no # Function DAYOFMONTH +func_odbc_dayofweek=no # Function DAYOFWEEK +func_odbc_dayofyear=no # Function DAYOFYEAR +func_odbc_degrees=no # Function DEGREES +func_odbc_difference=no # Function DIFFERENCE() +func_odbc_exp=yes # Function EXP +func_odbc_extract=no # Function EXTRACT +func_odbc_floor=no # Function FLOOR +func_odbc_fn_left=yes # Function ODBC syntax LEFT & RIGHT +func_odbc_hour=yes # Function HOUR +func_odbc_hour_time=no # Function ANSI HOUR +func_odbc_ifnull=no # Function IFNULL +func_odbc_insert=no # Function INSERT +func_odbc_lcase=yes # Function LCASE +func_odbc_left=yes # Function LEFT +func_odbc_length=no # Function REAL LENGTH +func_odbc_length_without_space=no # Function ODBC LENGTH +func_odbc_locate_2=no # Function LOCATE(2 arg) +func_odbc_locate_3=no # Function LOCATE(3 arg) +func_odbc_log=yes # Function LOG +func_odbc_log10=no # Function LOG10 +func_odbc_ltrim=yes # Function LTRIM +func_odbc_minute=yes # Function MINUTE +func_odbc_mod=no # Function MOD +func_odbc_month=yes # Function MONTH +func_odbc_monthname=no # Function MONTHNAME +func_odbc_now=yes # Function NOW +func_odbc_pi=no # Function PI +func_odbc_power=no # Function POWER +func_odbc_quarter=no # Function QUARTER +func_odbc_radians=no # Function RADIANS +func_odbc_rand=no # Function RAND +func_odbc_repeat=no # Function REPEAT +func_odbc_replace=no # Function REPLACE +func_odbc_right=yes # Function RIGHT +func_odbc_round=yes # Function ROUND(2 arg) +func_odbc_rtrim=yes # Function RTRIM +func_odbc_second=yes # Function SECOND +func_odbc_sign=no # Function SIGN +func_odbc_sin=yes # Function SIN +func_odbc_soundex=no # Function SOUNDEX +func_odbc_space=yes # Function SPACE +func_odbc_sqrt=no # Function SQRT +func_odbc_substring=no # Function ODBC SUBSTRING +func_odbc_tan=yes # Function TAN +func_odbc_timestampadd=no # Function TIMESTAMPADD +func_odbc_timestampdiff=no # Function TIMESTAMPDIFF +func_odbc_truncate=no # Function TRUNCATE +func_odbc_ucase=yes # Function UCASE +func_odbc_user()=no # Function USER() +func_odbc_week=no # Function WEEK +func_odbc_year=yes # Function YEAR +func_sql_+=yes # Function +, -, * and / +func_sql_bit_length=no # Function BIT_LENGTH +func_sql_case=no # Function CASE +func_sql_cast=no # Function CAST +func_sql_char_length=no # Function CHAR_LENGTH +func_sql_char_length(constant)=no # Function CHAR_LENGTH(constant) +func_sql_character_length=no # Function CHARACTER_LENGTH +func_sql_concat_as_||=no # Function concatenation with || +func_sql_current_date=no # Function CURRENT_DATE +func_sql_current_time=no # Function CURRENT_TIME +func_sql_current_timestamp=no # Function CURRENT_TIMESTAMP +func_sql_current_user=no # Function CURRENT_USER +func_sql_lower=no # Function LOWER +func_sql_octet_length=no # Function OCTET_LENGTH +func_sql_position=no # Function POSITION +func_sql_session_user=no # Function SESSION_USER +func_sql_substring=no # Function ANSI SQL SUBSTRING +func_sql_system_user=no # Function SYSTEM_USER +func_sql_trim=no # Function TRIM +func_sql_upper=no # Function UPPER +func_sql_user=no # Function USER +func_where_between=yes # Function BETWEEN +func_where_eq_all=yes # Function = ALL +func_where_eq_any=yes # Function = ANY +func_where_eq_some=yes # Function = SOME +func_where_exists=yes # Function EXISTS +func_where_in_num=yes # Function IN on numbers +func_where_like=yes # Function LIKE +func_where_like_escape=no # Function LIKE ESCAPE +func_where_match=no # Function MATCH +func_where_match_unique=no # Function MATCH UNIQUE +func_where_matches=no # Function MATCHES +func_where_not_between=yes # Function NOT BETWEEN +func_where_not_exists=yes # Function NOT EXISTS +func_where_not_like=yes # Function NOT LIKE +func_where_not_unique=no # Function NOT UNIQUE +func_where_unique=no # Function UNIQUE +functions=yes # Functions +group_by=yes # Group by +group_by_alias=no # Group by alias +group_by_null=yes # group on column with null values +group_by_position=no # Group by position +group_distinct_functions=no # Group functions with distinct +group_func_extra_bit_and=no # Group function BIT_AND +group_func_extra_bit_or=no # Group function BIT_OR +group_func_extra_count_distinct_list=no # Group function COUNT(DISTINCT expr,expr,...) +group_func_extra_std=no # Group function STD +group_func_extra_stddev=no # Group function STDDEV +group_func_extra_variance=no # Group function VARIANCE +group_func_sql_avg=yes # Group function AVG +group_func_sql_count_*=yes # Group function COUNT (*) +group_func_sql_count_column=yes # Group function COUNT column name +group_func_sql_count_distinct=no # Group function COUNT(DISTINCT expr) +group_func_sql_max=yes # Group function MAX on numbers +group_func_sql_max_str=yes # Group function MAX on strings +group_func_sql_min=yes # Group function MIN on numbers +group_func_sql_min_str=yes # Group function MIN on strings +group_func_sql_sum=yes # Group function SUM +group_functions=yes # Group functions +having=yes # Having +having_with_alias=no # Having on alias +having_with_group=yes # Having with group function +ignore_end_space=yes # ignore end space in compare +index_in_create=no # index in create table +index_namespace=yes # different namespace for index +index_parts=no # index on column part (extension) +insert_empty_string=yes # insert empty string +insert_select=no # insert INTO ... SELECT ... +insert_with_set=no # INSERT with set syntax +intersect=no # intersect +intersect_all=no # intersect all +join_tables=32 # tables in join +left_outer_join=yes # left outer join +left_outer_join_using=no # left outer join using +like_with_column=yes # column LIKE column +like_with_number=yes # LIKE on numbers +lock_tables=no # lock table +logical_value=-1 # Value of logical operation (1=1) +max_big_expressions=1 # big expressions +max_char_size=255 # max char() size +max_column_name=59 # column name length +max_columns=255 # Columns in table +max_conditions=97 # OR and AND in WHERE +max_expressions=+10000 # simple expressions +max_index=32 # max index +max_index_length=2026 # index length +max_index_name=64 # index name length +max_index_part_length=255 # max index part length +max_index_parts=10 # index parts +max_index_varchar_part_length=85 # index varchar part length +max_row_length=2025 # max table row length (without blobs) +max_row_length_with_null=2025 # table row length with nulls (without blobs) +max_select_alias_name=64 # select alias name length +max_stack_expression=14 # stacked expressions +max_table_alias_name=253 # table alias name length +max_table_name=64 # table name length +max_text_size=17 # max text or blob size +max_unique_index=32 # unique indexes +max_varchar_size=85 # max varchar() size +minus=no # minus +minus_neg=yes # Calculate 1--1 +multi_drop=yes # many tables to drop table +multi_strings=no # Multiple line strings +multi_table_delete=yes # DELETE FROM table1,table2... +multi_table_update=yes # Update with many tables insert_multi_value=no # Value lists in INSERT -natural_join=no # natural join
-natural_left_outer_join=no # natural left outer join
-no_primary_key=yes # Tables without primary key
-null_in_index=yes # null in index
-null_in_unique=yes # null in unique
-odbc_left_outer_join=yes # left outer join odbc style
-operating_system=Windows 98 [Version 4.10.1998] # crash-me tested on
-order_by=yes # Order by
-order_by_alias=no # Order by alias
-order_by_function=yes # Order by function
-order_by_position=yes # Order by position
-order_by_remember_desc=no # Order by DESC is remembered
-primary_key_in_create=yes # primary key in create table
-query_size=16777216 # query size
-quote_ident_with_"=yes # " as identifier quote (ANSI SQL)
-quote_ident_with_[=yes # [] as identifier quote
-quote_ident_with_`=yes # ` as identifier quote
-quote_with_"=no # Allows ' and " as string markers
-recursive_subqueries=49 # recursive subqueries
-remember_end_space=no # Remembers end space in char()
-remember_end_space_varchar=yes # Remembers end space in varchar()
-right_outer_join=yes # right outer join
-rowid=no # Type for row id
-select_constants=yes # Select constants
-select_limit=no # SELECT with LIMIT
-select_limit2=no # SELECT with LIMIT #,#
-select_string_size=516076 # constant string size in SELECT
-select_table_update=no # Update with sub select
-select_without_from=yes # SELECT without FROM
-server_version=Access 2000 # server version
-simple_joins=yes # ANSI SQL simple joins
-subqueries=yes # subqueries
-table_alias=yes # Table alias
-table_name_case=yes # case independent table names
-table_wildcard=yes # Select table_name.*
-tempoary_table=no # temporary tables
-transactions=yes # transactions
-type_extra_abstime=no # Type abstime
-type_extra_bfile=no # Type bfile
-type_extra_blob=no # Type blob
-type_extra_bool=no # Type bool
-type_extra_box=no # Type box
-type_extra_byte=yes # Type byte
-type_extra_char(1_arg)_binary=no # Type char(1 arg) binary
-type_extra_circle=no # Type circle
-type_extra_clob=no # Type clob
-type_extra_datetime=yes # Type datetime
-type_extra_double=yes # Type double
-type_extra_enum(1_arg)=no # Type enum(1 arg)
-type_extra_float(2_arg)=no # Type float(2 arg)
-type_extra_float4=yes # Type float4
-type_extra_float8=yes # Type float8
-type_extra_image=yes # Type image
-type_extra_int(1_arg)_zerofill=no # Type int(1 arg) zerofill
-type_extra_int1=no # Type int1
-type_extra_int2=no # Type int2
-type_extra_int3=no # Type int3
-type_extra_int4=no # Type int4
-type_extra_int8=no # Type int8
-type_extra_int_auto_increment=no # Type int not null auto_increment
-type_extra_int_unsigned=no # Type int unsigned
-type_extra_interval=no # Type interval
-type_extra_line=no # Type line
-type_extra_long=yes # Type long
-type_extra_long_raw=no # Type long raw
-type_extra_long_varbinary=no # Type long varbinary
-type_extra_long_varchar(1_arg)=no # Type long varchar(1 arg)
-type_extra_lseg=no # Type lseg
-type_extra_mediumint=no # Type mediumint
-type_extra_mediumtext=no # Type mediumtext
-type_extra_middleint=no # Type middleint
-type_extra_mlslabel=no # Type mlslabel
-type_extra_money=yes # Type money
-type_extra_nclob=no # Type nclob
-type_extra_number=yes # Type number
-type_extra_number(1_arg)=no # Type number(1 arg)
-type_extra_number(2_arg)=no # Type number(2 arg)
-type_extra_nvarchar2(1_arg)=no # Type nvarchar2(1 arg)
-type_extra_path=no # Type path
-type_extra_point=no # Type point
-type_extra_polygon=no # Type polygon
-type_extra_raw(1_arg)=no # Type raw(1 arg)
-type_extra_reltime=no # Type reltime
-type_extra_rowid=no # Type rowid
-type_extra_serial=no # Type serial
-type_extra_set(1_arg)=no # Type set(1 arg)
-type_extra_smalldatetime=no # Type smalldatetime
-type_extra_smallfloat=no # Type smallfloat
-type_extra_smallmoney=no # Type smallmoney
-type_extra_text=yes # Type text
-type_extra_text(1_arg)=yes # Type text(1 arg)
-type_extra_timespan=no # Type timespan
-type_extra_uint=no # Type uint
-type_extra_varchar2(1_arg)=no # Type varchar2(1 arg)
-type_extra_year=no # Type year
-type_odbc_bigint=no # Type bigint
-type_odbc_binary(1_arg)=yes # Type binary(1 arg)
-type_odbc_datetime=yes # Type datetime
-type_odbc_tinyint=no # Type tinyint
-type_odbc_varbinary(1_arg)=yes # Type varbinary(1 arg)
-type_sql_bit=yes # Type bit
-type_sql_bit(1_arg)=no # Type bit(1 arg)
-type_sql_bit_varying(1_arg)=no # Type bit varying(1 arg)
-type_sql_char(1_arg)=yes # Type char(1 arg)
-type_sql_char_varying(1_arg)=no # Type char varying(1 arg)
-type_sql_character(1_arg)=no # Type character(1 arg)
-type_sql_character_varying(1_arg)=no # Type character varying(1 arg)
-type_sql_date=yes # Type date
-type_sql_dec(2_arg)=no # Type dec(2 arg)
-type_sql_decimal(2_arg)=no # Type decimal(2 arg)
-type_sql_double_precision=no # Type double precision
-type_sql_float=yes # Type float
-type_sql_float(1_arg)=no # Type float(1 arg)
-type_sql_int=yes # Type int
-type_sql_integer=yes # Type integer
-type_sql_interval_day_to_second=no # Type interval day to second
-type_sql_interval_year=no # Type interval year
-type_sql_interval_year_to_month=no # Type interval year to month
-type_sql_national_char_varying(1_arg)=no # Type national char varying(1 arg)
-type_sql_national_character(1_arg)=no # Type national character(1 arg)
-type_sql_national_character_varying(1_arg)=no # Type national character varying(1 arg)
-type_sql_nchar(1_arg)=no # Type nchar(1 arg)
-type_sql_nchar_varying(1_arg)=no # Type nchar varying(1 arg)
-type_sql_numeric(2_arg)=no # Type numeric(2 arg)
-type_sql_real=yes # Type real
-type_sql_smallint=yes # Type smallint
-type_sql_time=yes # Type time
-type_sql_timestamp=yes # Type timestamp
-type_sql_timestamp_with_time_zone=no # Type timestamp with time zone
-type_sql_varchar(1_arg)=yes # Type varchar(1 arg)
-union=yes # union
-union_all=yes # union all
-unique_in_create=yes # unique in create table
-unique_null_in_create=yes # unique null in create
-views=no # views
-where_string_size=258035 # constant string size in where
+natural_join=no # natural join +natural_left_outer_join=no # natural left outer join +no_primary_key=yes # Tables without primary key +null_in_index=yes # null in index +null_in_unique=yes # null in unique +odbc_left_outer_join=yes # left outer join odbc style +operating_system=Windows 98 [Version 4.10.1998] # crash-me tested on +order_by=yes # Order by +order_by_alias=no # Order by alias +order_by_function=yes # Order by function +order_by_position=yes # Order by position +order_by_remember_desc=no # Order by DESC is remembered +primary_key_in_create=yes # primary key in create table +query_size=16777216 # query size +quote_ident_with_"=yes # " as identifier quote (ANSI SQL) +quote_ident_with_[=yes # [] as identifier quote +quote_ident_with_`=yes # ` as identifier quote +quote_with_"=no # Allows ' and " as string markers +recursive_subqueries=49 # recursive subqueries +remember_end_space=no # Remembers end space in char() +remember_end_space_varchar=yes # Remembers end space in varchar() +right_outer_join=yes # right outer join +rowid=no # Type for row id +select_constants=yes # Select constants +select_limit=no # SELECT with LIMIT +select_limit2=no # SELECT with LIMIT #,# +select_string_size=516076 # constant string size in SELECT +select_table_update=no # Update with sub select +select_without_from=yes # SELECT without FROM +server_version=Access 2000 # server version +simple_joins=yes # ANSI SQL simple joins +subqueries=yes # subqueries +table_alias=yes # Table alias +table_name_case=yes # case independent table names +table_wildcard=yes # Select table_name.* +tempoary_table=no # temporary tables +transactions=yes # transactions +type_extra_abstime=no # Type abstime +type_extra_bfile=no # Type bfile +type_extra_blob=no # Type blob +type_extra_bool=no # Type bool +type_extra_box=no # Type box +type_extra_byte=yes # Type byte +type_extra_char(1_arg)_binary=no # Type char(1 arg) binary +type_extra_circle=no # Type circle +type_extra_clob=no # Type clob +type_extra_datetime=yes # Type datetime +type_extra_double=yes # Type double +type_extra_enum(1_arg)=no # Type enum(1 arg) +type_extra_float(2_arg)=no # Type float(2 arg) +type_extra_float4=yes # Type float4 +type_extra_float8=yes # Type float8 +type_extra_image=yes # Type image +type_extra_int(1_arg)_zerofill=no # Type int(1 arg) zerofill +type_extra_int1=no # Type int1 +type_extra_int2=no # Type int2 +type_extra_int3=no # Type int3 +type_extra_int4=no # Type int4 +type_extra_int8=no # Type int8 +type_extra_int_auto_increment=no # Type int not null auto_increment +type_extra_int_unsigned=no # Type int unsigned +type_extra_interval=no # Type interval +type_extra_line=no # Type line +type_extra_long=yes # Type long +type_extra_long_raw=no # Type long raw +type_extra_long_varbinary=no # Type long varbinary +type_extra_long_varchar(1_arg)=no # Type long varchar(1 arg) +type_extra_lseg=no # Type lseg +type_extra_mediumint=no # Type mediumint +type_extra_mediumtext=no # Type mediumtext +type_extra_middleint=no # Type middleint +type_extra_mlslabel=no # Type mlslabel +type_extra_money=yes # Type money +type_extra_nclob=no # Type nclob +type_extra_number=yes # Type number +type_extra_number(1_arg)=no # Type number(1 arg) +type_extra_number(2_arg)=no # Type number(2 arg) +type_extra_nvarchar2(1_arg)=no # Type nvarchar2(1 arg) +type_extra_path=no # Type path +type_extra_point=no # Type point +type_extra_polygon=no # Type polygon +type_extra_raw(1_arg)=no # Type raw(1 arg) +type_extra_reltime=no # Type reltime +type_extra_rowid=no # Type rowid +type_extra_serial=no # Type serial +type_extra_set(1_arg)=no # Type set(1 arg) +type_extra_smalldatetime=no # Type smalldatetime +type_extra_smallfloat=no # Type smallfloat +type_extra_smallmoney=no # Type smallmoney +type_extra_text=yes # Type text +type_extra_text(1_arg)=yes # Type text(1 arg) +type_extra_timespan=no # Type timespan +type_extra_uint=no # Type uint +type_extra_varchar2(1_arg)=no # Type varchar2(1 arg) +type_extra_year=no # Type year +type_odbc_bigint=no # Type bigint +type_odbc_binary(1_arg)=yes # Type binary(1 arg) +type_odbc_datetime=yes # Type datetime +type_odbc_tinyint=no # Type tinyint +type_odbc_varbinary(1_arg)=yes # Type varbinary(1 arg) +type_sql_bit=yes # Type bit +type_sql_bit(1_arg)=no # Type bit(1 arg) +type_sql_bit_varying(1_arg)=no # Type bit varying(1 arg) +type_sql_char(1_arg)=yes # Type char(1 arg) +type_sql_char_varying(1_arg)=no # Type char varying(1 arg) +type_sql_character(1_arg)=no # Type character(1 arg) +type_sql_character_varying(1_arg)=no # Type character varying(1 arg) +type_sql_date=yes # Type date +type_sql_dec(2_arg)=no # Type dec(2 arg) +type_sql_decimal(2_arg)=no # Type decimal(2 arg) +type_sql_double_precision=no # Type double precision +type_sql_float=yes # Type float +type_sql_float(1_arg)=no # Type float(1 arg) +type_sql_int=yes # Type int +type_sql_integer=yes # Type integer +type_sql_interval_day_to_second=no # Type interval day to second +type_sql_interval_year=no # Type interval year +type_sql_interval_year_to_month=no # Type interval year to month +type_sql_national_char_varying(1_arg)=no # Type national char varying(1 arg) +type_sql_national_character(1_arg)=no # Type national character(1 arg) +type_sql_national_character_varying(1_arg)=no # Type national character varying(1 arg) +type_sql_nchar(1_arg)=no # Type nchar(1 arg) +type_sql_nchar_varying(1_arg)=no # Type nchar varying(1 arg) +type_sql_numeric(2_arg)=no # Type numeric(2 arg) +type_sql_real=yes # Type real +type_sql_smallint=yes # Type smallint +type_sql_time=yes # Type time +type_sql_timestamp=yes # Type timestamp +type_sql_timestamp_with_time_zone=no # Type timestamp with time zone +type_sql_varchar(1_arg)=yes # Type varchar(1 arg) +union=yes # union +union_all=yes # union all +unique_in_create=yes # unique in create table +unique_null_in_create=yes # unique null in create +views=no # views +where_string_size=258035 # constant string size in where diff --git a/sql-common/client.c b/sql-common/client.c index fa2d9acfd03..a1ea9ed44e5 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1426,7 +1426,7 @@ void mysql_read_default_options(struct st_mysql_options *options, options->secure_auth= TRUE; break; case OPT_report_data_truncation: - options->report_data_truncation= opt_arg ? test(atoi(opt_arg)) : 1; + options->report_data_truncation= opt_arg ? MY_TEST(atoi(opt_arg)) : 1; break; case OPT_plugin_dir: { @@ -4392,7 +4392,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) mysql->options.protocol=MYSQL_PROTOCOL_PIPE; /* Force named pipe */ break; case MYSQL_OPT_LOCAL_INFILE: /* Allow LOAD DATA LOCAL ?*/ - if (!arg || test(*(uint*) arg)) + if (!arg || MY_TEST(*(uint*) arg)) mysql->options.client_flag|= CLIENT_LOCAL_FILES; else mysql->options.client_flag&= ~CLIENT_LOCAL_FILES; @@ -4439,7 +4439,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) mysql->options.secure_auth= *(my_bool *) arg; break; case MYSQL_REPORT_DATA_TRUNCATION: - mysql->options.report_data_truncation= test(*(my_bool *) arg); + mysql->options.report_data_truncation= MY_TEST(*(my_bool*) arg); break; case MYSQL_OPT_RECONNECT: mysql->reconnect= *(my_bool *) arg; diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 429506f4034..0942544d0be 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -81,6 +81,8 @@ uint calc_days_in_year(uint year) my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, ulonglong flags, int *was_cut) { + if (ltime->time_type == MYSQL_TIMESTAMP_TIME) + return FALSE; if (not_zero_date) { if (((flags & TIME_NO_ZERO_IN_DATE) && @@ -917,7 +919,8 @@ my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone, uint *error_code) #endif tmp= (time_t) (((calc_daynr((uint) t->year, (uint) t->month, (uint) t->day) - - (long) days_at_timestart)*86400L + (long) t->hour*3600L + + (long) days_at_timestart) * SECONDS_IN_24H + + (long) t->hour*3600L + (long) (t->minute*60 + t->second)) + (time_t) my_time_zone - 3600); @@ -976,7 +979,7 @@ my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone, uint *error_code) /* shift back, if we were dealing with boundary dates */ - tmp+= shift*86400L; + tmp+= shift * SECONDS_IN_24H; /* This is possible for dates, which slightly exceed boundaries. diff --git a/sql-common/mysql_async.c b/sql-common/mysql_async.c index 8f3a91e26fa..ef01f292180 100644 --- a/sql-common/mysql_async.c +++ b/sql-common/mysql_async.c @@ -121,6 +121,12 @@ my_connect_async(struct mysql_async_context *b, my_socket fd, IF_WIN(WSAGetLastError() != WSAEWOULDBLOCK, \ (errno != EAGAIN && errno != EINTR)) +#ifdef _AIX +#ifndef MSG_DONTWAIT +#define MSG_DONTWAIT 0 +#endif +#endif + ssize_t my_recv_async(struct mysql_async_context *b, int fd, unsigned char *buf, size_t size, int timeout) diff --git a/sql-common/pack.c b/sql-common/pack.c index f0932e49617..4bb4a0b7a4e 100644 --- a/sql-common/pack.c +++ b/sql-common/pack.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000-2003, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 697a4e0824f..75652c06649 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2011, Oracle and/or its affiliates. +# Copyright (c) 2006, 2013, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,8 +20,7 @@ ENDIF() INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql -${CMAKE_BINARY_DIR}/pcre -${CMAKE_SOURCE_DIR}/pcre +${PCRE_INCLUDES} ${ZLIB_INCLUDE_DIR} ${SSL_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/sql diff --git a/sql/custom_conf.h b/sql/custom_conf.h index afef0219857..62fdb619c27 100644 --- a/sql/custom_conf.h +++ b/sql/custom_conf.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2006 MySQL AB + Use is subject to license terms 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 diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index 34658ab51ac..b20269b8304 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -474,7 +474,7 @@ Event_db_repository::index_read_for_db_for_i_s(THD *thd, TABLE *schema_table, end: event_table->file->ha_index_end(); - DBUG_RETURN(test(ret)); + DBUG_RETURN(MY_TEST(ret)); } @@ -746,7 +746,7 @@ end: thd->mdl_context.rollback_to_savepoint(mdl_savepoint); thd->variables.sql_mode= saved_mode; - DBUG_RETURN(test(ret)); + DBUG_RETURN(MY_TEST(ret)); } @@ -861,7 +861,7 @@ end: thd->mdl_context.rollback_to_savepoint(mdl_savepoint); thd->variables.sql_mode= saved_mode; - DBUG_RETURN(test(ret)); + DBUG_RETURN(MY_TEST(ret)); } @@ -921,7 +921,7 @@ end: close_thread_tables(thd); thd->mdl_context.rollback_to_savepoint(mdl_savepoint); - DBUG_RETURN(test(ret)); + DBUG_RETURN(MY_TEST(ret)); } @@ -1159,7 +1159,7 @@ end: thd->restore_stmt_binlog_format(save_binlog_format); - DBUG_RETURN(test(ret)); + DBUG_RETURN(MY_TEST(ret)); } @@ -1237,7 +1237,7 @@ Event_db_repository::check_system_tables(THD *thd) close_mysql_tables(thd); } - DBUG_RETURN(test(ret)); + DBUG_RETURN(MY_TEST(ret)); } /** diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index 92093e34b81..6091977cc8d 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/event_scheduler.h b/sql/event_scheduler.h index 4f6b9349162..6ec7dccefb9 100644 --- a/sql/event_scheduler.h +++ b/sql/event_scheduler.h @@ -1,6 +1,6 @@ #ifndef _EVENT_SCHEDULER_H_ #define _EVENT_SCHEDULER_H_ -/* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2013, 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 diff --git a/sql/events.cc b/sql/events.cc index 082bd2ec485..1e4b56c08e0 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2011, Oracle and/or its affiliates. + Copyright (c) 2005, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/events.h b/sql/events.h index a6480e7241d..646fd257d52 100644 --- a/sql/events.h +++ b/sql/events.h @@ -1,6 +1,6 @@ #ifndef _EVENT_H_ #define _EVENT_H_ -/* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2013, 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 diff --git a/sql/field.cc b/sql/field.cc index 755d2f8b625..922c9aba6c5 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1774,7 +1774,7 @@ int Field_num::store_decimal(const my_decimal *val) ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED; int err= 0; longlong i= convert_decimal2longlong(val, unsigned_flag, &err); - return test(err | store(i, unsigned_flag)); + return MY_TEST(err | store(i, unsigned_flag)); } @@ -1926,7 +1926,7 @@ int Field::store_time_dec(MYSQL_TIME *ltime, uint dec) bool Field::optimize_range(uint idx, uint part) { - return test(table->file->index_flags(idx, part, 1) & HA_READ_RANGE); + return MY_TEST(table->file->index_flags(idx, part, 1) & HA_READ_RANGE); } @@ -4636,14 +4636,24 @@ int Field_timestamp::store_TIME_with_warning(THD *thd, MYSQL_TIME *l_time, } +static bool +copy_or_convert_to_datetime(THD *thd, const MYSQL_TIME *from, MYSQL_TIME *to) +{ + if (from->time_type == MYSQL_TIMESTAMP_TIME) + return time_to_datetime(thd, from, to); + *to= *from; + return false; +} + + int Field_timestamp::store_time_dec(MYSQL_TIME *ltime, uint dec) { int unused; - MYSQL_TIME l_time= *ltime; ErrConvTime str(ltime); THD *thd= get_thd(); - - bool valid= !check_date(&l_time, pack_time(&l_time) != 0, + MYSQL_TIME l_time; + bool valid= !copy_or_convert_to_datetime(thd, ltime, &l_time) && + !check_date(&l_time, pack_time(&l_time) != 0, (thd->variables.sql_mode & MODE_NO_ZERO_DATE) | MODE_NO_ZERO_IN_DATE, &unused); @@ -5201,15 +5211,28 @@ int Field_temporal_with_date::store(longlong nr, bool unsigned_val) int Field_temporal_with_date::store_time_dec(MYSQL_TIME *ltime, uint dec) { - int error = 0, have_smth_to_conv= 1; - MYSQL_TIME l_time= *ltime; + int error= 0, have_smth_to_conv= 1; ErrConvTime str(ltime); + MYSQL_TIME l_time; + + if (copy_or_convert_to_datetime(get_thd(), ltime, &l_time)) + { + /* + Set have_smth_to_conv and error in a way to have + store_TIME_with_warning do bzero(). + */ + have_smth_to_conv= false; + error= MYSQL_TIME_WARN_OUT_OF_RANGE; + goto store; + } + /* We don't perform range checking here since values stored in TIME structure always fit into DATETIME range. */ have_smth_to_conv= !check_date(&l_time, pack_time(&l_time) != 0, sql_mode_for_dates(current_thd), &error); +store: return store_TIME_with_warning(&l_time, &str, error, have_smth_to_conv); } @@ -8487,7 +8510,7 @@ int Field_bit::store_decimal(const my_decimal *val) { int err= 0; longlong i= convert_decimal2longlong(val, 1, &err); - return test(err | store(i, TRUE)); + return MY_TEST(err | store(i, TRUE)); } @@ -8776,7 +8799,7 @@ Field_bit::unpack(uchar *to, const uchar *from, const uchar *from_end, if (param_data == 0 || ((from_bit_len == bit_len) && (from_len == bytes_in_rec))) { - if (from + bytes_in_rec + test(bit_len) > from_end) + if (from + bytes_in_rec + MY_TEST(bit_len) > from_end) return 0; // Error in data if (bit_len > 0) @@ -8931,7 +8954,7 @@ void Create_field::create_length_to_internal_length(void) { pack_length= length / 8; /* We need one extra byte to store the bits we save among the null bits */ - key_length= pack_length + test(length & 7); + key_length= pack_length + MY_TEST(length & 7); } break; case MYSQL_TYPE_NEWDECIMAL: diff --git a/sql/field.h b/sql/field.h index 72be8e3519a..cbd9175f26c 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1,7 +1,7 @@ #ifndef FIELD_INCLUDED #define FIELD_INCLUDED -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 2008, 2011, Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2008, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ enum Derivation #define MY_REPERTOIRE_NUMERIC MY_REPERTOIRE_ASCII /* The length of the header part for each virtual column in the .frm file */ -#define FRM_VCOL_HEADER_SIZE(b) (3 + test(b)) +#define FRM_VCOL_HEADER_SIZE(b) (3 + MY_TEST(b)) class Count_distinct_field; @@ -75,6 +75,8 @@ struct ha_field_option_struct; struct st_cache_field; int field_conv(Field *to,Field *from); +int field_conv_incompatible(Field *to,Field *from); +bool memcpy_field_possible(Field *to, Field *from); int truncate_double(double *nr, uint field_length, uint dec, bool unsigned_flag, double max_value); longlong double_to_longlong(double nr, bool unsigned_flag, bool *error); @@ -616,7 +618,7 @@ public: null_ptr[row_offset]. */ return (table->null_row ? TRUE : - null_ptr ? test(null_ptr[row_offset] & null_bit) : 0); + null_ptr ? MY_TEST(null_ptr[row_offset] & null_bit) : 0); } inline bool is_real_null(my_ptrdiff_t row_offset= 0) const { return null_ptr ? (null_ptr[row_offset] & null_bit ? 1 : 0) : 0; } @@ -624,8 +626,7 @@ public: { if (!null_ptr) return 0; - return test(record[(uint) (null_ptr -table->record[0])] & - null_bit); + return MY_TEST(record[(uint) (null_ptr - table->record[0])] & null_bit); } inline void set_null(my_ptrdiff_t row_offset= 0) { if (null_ptr) null_ptr[row_offset]|= null_bit; } @@ -1054,7 +1055,7 @@ public: my_decimal *val_decimal(my_decimal *); virtual bool str_needs_quotes() { return TRUE; } uint is_equal(Create_field *new_field); - bool eq_cmp_as_binary() { return test(flags & BINARY_FLAG); } + bool eq_cmp_as_binary() { return MY_TEST(flags & BINARY_FLAG); } virtual uint length_size() { return 0; } double pos_in_interval(Field *min, Field *max) { @@ -1654,7 +1655,7 @@ public: const char *field_name_arg, TABLE_SHARE *share, uint dec_arg) : Field_timestamp(ptr_arg, - MAX_DATETIME_WIDTH + dec_arg + test(dec_arg), null_ptr_arg, + MAX_DATETIME_WIDTH + dec_arg + MY_TEST(dec_arg), null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg, share), dec(dec_arg) { @@ -1865,8 +1866,8 @@ public: Field_time_with_dec(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, uint dec_arg) - :Field_time(ptr_arg, MIN_TIME_WIDTH + dec_arg + test(dec_arg), null_ptr_arg, - null_bit_arg, unireg_check_arg, field_name_arg), + :Field_time(ptr_arg, MIN_TIME_WIDTH + dec_arg + MY_TEST(dec_arg), + null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg), dec(dec_arg) { DBUG_ASSERT(dec <= TIME_SECOND_PART_DIGITS); @@ -2022,7 +2023,7 @@ public: Field_datetime_with_dec(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, uint dec_arg) - :Field_datetime(ptr_arg, MAX_DATETIME_WIDTH + dec_arg + test(dec_arg), + :Field_datetime(ptr_arg, MAX_DATETIME_WIDTH + dec_arg + MY_TEST(dec_arg), null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg), dec(dec_arg) { @@ -2401,18 +2402,6 @@ public: { store_length(ptr, packlength, number); } - - /** - Return the packed length plus the length of the data. - - This is used to determine the size of the data plus the - packed length portion in the row data. - - @returns The length in the row plus the size of the data. - */ - uint32 get_packed_size(const uchar *ptr_arg) - {return packlength + get_length(ptr_arg, packlength);} - inline uint32 get_length(uint row_offset= 0) { return get_length(ptr+row_offset, this->packlength); } uint32 get_length(const uchar *ptr, uint packlength); @@ -2464,7 +2453,7 @@ public: uint max_packed_col_length(uint max_length); void free() { value.free(); } inline void clear_temporary() { bzero((uchar*) &value,sizeof(value)); } - friend int field_conv(Field *to,Field *from); + friend int field_conv_incompatible(Field *to,Field *from); uint size_of() const { return sizeof(*this); } bool has_charset(void) const { return charset() == &my_charset_bin ? FALSE : TRUE; } @@ -2649,9 +2638,9 @@ public: { DBUG_ASSERT(ptr == a || ptr == b); if (ptr == a) - return Field_bit::key_cmp(b, bytes_in_rec+test(bit_len)); + return Field_bit::key_cmp(b, bytes_in_rec + MY_TEST(bit_len)); else - return Field_bit::key_cmp(a, bytes_in_rec+test(bit_len)) * -1; + return Field_bit::key_cmp(a, bytes_in_rec + MY_TEST(bit_len)) * -1; } int cmp_binary_offset(uint row_offset) { return cmp_offset(row_offset); } diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 71ab4265ee3..f13694e2a13 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -399,7 +399,7 @@ static void do_field_int(Copy_field *copy) { longlong value= copy->from_field->val_int(); copy->to_field->store(value, - test(copy->from_field->flags & UNSIGNED_FLAG)); + MY_TEST(copy->from_field->flags & UNSIGNED_FLAG)); } static void do_field_real(Copy_field *copy) @@ -823,40 +823,76 @@ Copy_field::get_copy_func(Field *to,Field *from) return do_field_eq; } +/** + Check if it is possible just copy value of the fields + + @param to The field to copy to + @param from The field to copy from + + @retval TRUE - it is possible to just copy value of 'from' to 'to'. + @retval FALSE - conversion is needed +*/ + +bool memcpy_field_possible(Field *to,Field *from) +{ + const enum_field_types to_real_type= to->real_type(); + const enum_field_types from_real_type= from->real_type(); + const enum_field_types to_type= from->type(); + return (to_real_type == from_real_type && + !(to->flags & BLOB_FLAG && to->table->copy_blobs) && + to->pack_length() == from->pack_length() && + !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) && + to->decimals() == from->decimals() && + to_real_type != MYSQL_TYPE_ENUM && + to_real_type != MYSQL_TYPE_SET && + to_real_type != MYSQL_TYPE_BIT && + (to_real_type != MYSQL_TYPE_NEWDECIMAL || + to->field_length == from->field_length) && + from->charset() == to->charset() && + (!sql_mode_for_dates(to->table->in_use) || + (to_type != MYSQL_TYPE_DATE && + to_type != MYSQL_TYPE_DATETIME)) && + (from_real_type != MYSQL_TYPE_VARCHAR || + ((Field_varstring*)from)->length_bytes == + ((Field_varstring*)to)->length_bytes)); +} + /** Simple quick field convert that is called on insert. */ int field_conv(Field *to,Field *from) { - if (to->real_type() == from->real_type() && - !(to->flags & BLOB_FLAG && to->table->copy_blobs)) - { - if (to->pack_length() == from->pack_length() && - !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) && - to->decimals() == from->decimals() && - to->real_type() != MYSQL_TYPE_ENUM && - to->real_type() != MYSQL_TYPE_SET && - to->real_type() != MYSQL_TYPE_BIT && - (to->real_type() != MYSQL_TYPE_NEWDECIMAL || - to->field_length == from->field_length) && - from->charset() == to->charset() && - (!sql_mode_for_dates(to->table->in_use) || - (to->type() != MYSQL_TYPE_DATE && - to->type() != MYSQL_TYPE_DATETIME)) && - (from->real_type() != MYSQL_TYPE_VARCHAR || - ((Field_varstring*)from)->length_bytes == - ((Field_varstring*)to)->length_bytes)) - { // Identical fields - /* - This may happen if one does 'UPDATE ... SET x=x' - The test is here mostly for valgrind, but can also be relevant - if memcpy() is implemented with prefetch-write - */ - if (to->ptr != from->ptr) - memcpy(to->ptr,from->ptr,to->pack_length()); - return 0; - } + if (memcpy_field_possible(to, from)) + { // Identical fields + /* + This may happen if one does 'UPDATE ... SET x=x' + The test is here mostly for valgrind, but can also be relevant + if memcpy() is implemented with prefetch-write + */ + if (to->ptr != from->ptr) + memcpy(to->ptr, from->ptr, to->pack_length()); + return 0; } + return field_conv_incompatible(to, from); +} + + +/** + Copy value of the field with conversion. + + @note Impossibility of simple copy should be checked before this call. + + @param to The field to copy to + @param from The field to copy from + + @retval TRUE ERROR + @retval FALSE OK +*/ + +int field_conv_incompatible(Field *to, Field *from) +{ + const enum_field_types to_real_type= to->real_type(); + const enum_field_types from_real_type= from->real_type(); if (to->flags & BLOB_FLAG) { // Be sure the value is stored Field_blob *blob=(Field_blob*) to; @@ -867,21 +903,22 @@ int field_conv(Field *to,Field *from) */ if (to->table->copy_blobs || (!blob->value.is_alloced() && - from->real_type() != MYSQL_TYPE_STRING && - from->real_type() != MYSQL_TYPE_VARCHAR)) + from_real_type != MYSQL_TYPE_STRING && + from_real_type != MYSQL_TYPE_VARCHAR)) blob->value.copy(); return blob->store(blob->value.ptr(),blob->value.length(),from->charset()); } - if (from->real_type() == MYSQL_TYPE_ENUM && - to->real_type() == MYSQL_TYPE_ENUM && + if (from_real_type == MYSQL_TYPE_ENUM && + to_real_type == MYSQL_TYPE_ENUM && from->val_int() == 0) { ((Field_enum *)(to))->store_type(0); return 0; } - if (from->result_type() == REAL_RESULT) + Item_result from_result_type= from->result_type(); + if (from_result_type == REAL_RESULT) return to->store(from->val_real()); - if (from->result_type() == DECIMAL_RESULT) + if (from_result_type == DECIMAL_RESULT) { my_decimal buff; return to->store_decimal(from->val_decimal(&buff)); @@ -894,10 +931,10 @@ int field_conv(Field *to,Field *from) else return to->store_time_dec(<ime, from->decimals()); } - if ((from->result_type() == STRING_RESULT && + if ((from_result_type == STRING_RESULT && (to->result_type() == STRING_RESULT || - (from->real_type() != MYSQL_TYPE_ENUM && - from->real_type() != MYSQL_TYPE_SET))) || + (from_real_type != MYSQL_TYPE_ENUM && + from_real_type != MYSQL_TYPE_SET))) || to->type() == MYSQL_TYPE_DECIMAL) { char buff[MAX_FIELD_WIDTH]; @@ -911,5 +948,5 @@ int field_conv(Field *to,Field *from) */ return to->store(result.c_ptr_quick(),result.length(),from->charset()); } - return to->store(from->val_int(), test(from->flags & UNSIGNED_FLAG)); + return to->store(from->val_int(), MY_TEST(from->flags & UNSIGNED_FLAG)); } diff --git a/sql/filesort.cc b/sql/filesort.cc index 2b0a91bf5d0..12b9bb5aadc 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -39,6 +39,7 @@ #include "sql_select.h" #include "log_slow.h" #include "debug_sync.h" +#include "sql_base.h" /// How to write record_ref. #define WRITE_REF(file,from) \ @@ -187,6 +188,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, my_b_clear(&buffpek_pointers); buffpek=0; error= 1; + *found_rows= HA_POS_ERROR; param.init_for_filesort(sortlength(thd, sortorder, s_length, &multi_byte_charset), @@ -386,6 +388,14 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, { int kill_errno= thd->killed_errno(); DBUG_ASSERT(thd->is_error() || kill_errno || thd->killed == ABORT_QUERY); + + /* + We replace the table->sort at the end. + Hence calling free_io_cache to make sure table->sort.io_cache + used for QUICK_INDEX_MERGE_SELECT is free. + */ + free_io_cache(table); + my_printf_error(ER_FILSORT_ABORT, "%s: %s", MYF(0), @@ -411,6 +421,9 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, DBUG_POP(); /* Ok to DBUG */ #endif + /* table->sort.io_cache should be free by this time */ + DBUG_ASSERT(NULL == table->sort.io_cache); + // Assign the copy back! table->sort= table_sort; @@ -469,6 +482,84 @@ static uchar *read_buffpek_from_file(IO_CACHE *buffpek_pointers, uint count, } #ifndef DBUG_OFF + +/* Buffer where record is returned */ +char dbug_print_row_buff[512]; + +/* Temporary buffer for printing a column */ +char dbug_print_row_buff_tmp[512]; + +/* + Print table's current row into a buffer and return a pointer to it. + + This is intended to be used from gdb: + + (gdb) p dbug_print_table_row(table) + $33 = "SUBQUERY2_t1(col_int_key,col_varchar_nokey)=(7,c)" + (gdb) + + Only columns in table->read_set are printed +*/ + +const char* dbug_print_table_row(TABLE *table) +{ + Field **pfield; + String tmp(dbug_print_row_buff_tmp, + sizeof(dbug_print_row_buff_tmp),&my_charset_bin); + + String output(dbug_print_row_buff, sizeof(dbug_print_row_buff), + &my_charset_bin); + + output.length(0); + output.append(table->alias); + output.append("("); + bool first= true; + + for (pfield= table->field; *pfield ; pfield++) + { + if (table->read_set && !bitmap_is_set(table->read_set, (*pfield)->field_index)) + continue; + + if (first) + first= false; + else + output.append(","); + + output.append((*pfield)->field_name? (*pfield)->field_name: "NULL"); + } + + output.append(")=("); + + first= true; + for (pfield= table->field; *pfield ; pfield++) + { + Field *field= *pfield; + + if (table->read_set && !bitmap_is_set(table->read_set, (*pfield)->field_index)) + continue; + + if (first) + first= false; + else + output.append(","); + + if (field->is_null()) + output.append("NULL"); + else + { + if (field->type() == MYSQL_TYPE_BIT) + (void) field->val_int_as_str(&tmp, 1); + else + field->val_str(&tmp); + output.append(tmp.ptr(), tmp.length()); + } + } + output.append(")"); + + return output.c_ptr_safe(); +} + + /* Print a text, SQL-like record representation into dbug trace. @@ -517,6 +608,7 @@ static void dbug_print_record(TABLE *table, bool print_rowid) fprintf(DBUG_FILE, "\n"); DBUG_UNLOCK_FILE; } + #endif @@ -595,7 +687,7 @@ static ha_rows find_all_keys(Sort_param *param, SQL_SELECT *select, ref_pos= ref_buff; quick_select=select && select->quick; record=0; - *found_rows= 0; + *found_rows= pq ? 0 : HA_POS_ERROR; // don't count unless pq is used flag= ((file->ha_table_flags() & HA_REC_NOT_IN_SEQ) || quick_select); if (flag) ref_pos= &file->ref[0]; @@ -640,6 +732,7 @@ static ha_rows find_all_keys(Sort_param *param, SQL_SELECT *select, DBUG_RETURN(HA_POS_ERROR); } + DEBUG_SYNC(thd, "after_index_merge_phase1"); for (;;) { if (quick_select) @@ -714,9 +807,14 @@ static ha_rows find_all_keys(Sort_param *param, SQL_SELECT *select, if (write_record) { - ++(*found_rows); if (pq) { + /* + only count rows when pq is used - otherwise there might be + other filters *after* the filesort, we don't know the final row + count here + */ + (*found_rows)++; pq->push(ref_pos); idx= pq->num_elements(); } @@ -732,12 +830,17 @@ static ha_rows find_all_keys(Sort_param *param, SQL_SELECT *select, make_sortkey(param, fs_info->get_record_buffer(idx++), ref_pos); } } - else - file->unlock_row(); /* It does not make sense to read more keys in case of a fatal error */ if (thd->is_error()) break; + + /* + We need to this after checking the error as the transaction may have + rolled back in case of a deadlock + */ + if (!write_record) + file->unlock_row(); } if (!quick_select) { @@ -880,13 +983,11 @@ static void make_sortkey(register Sort_param *param, { const CHARSET_INFO *cs=item->collation.collation; char fill_char= ((cs->state & MY_CS_BINSORT) ? (char) 0 : ' '); - int diff; - uint sort_field_length; if (maybe_null) *to++=1; - /* All item->str() to use some extra byte for end null.. */ - String tmp((char*) to,sort_field->length+4,cs); + char *tmp_buffer= param->tmp_buffer ? param->tmp_buffer : (char*)to; + String tmp(tmp_buffer, param->sort_length, cs); String *res= item->str_result(&tmp); if (!res) { @@ -909,39 +1010,36 @@ static void make_sortkey(register Sort_param *param, break; } length= res->length(); - sort_field_length= sort_field->length - sort_field->suffix_length; - diff=(int) (sort_field_length - length); - if (diff < 0) - { - diff=0; - length= sort_field_length; - } - if (sort_field->suffix_length) - { - /* Store length last in result_string */ - store_length(to + sort_field_length, length, - sort_field->suffix_length); - } if (sort_field->need_strxnfrm) { - char *from=(char*) res->ptr(); uint tmp_length __attribute__((unused)); - if ((uchar*) from == to) - { - set_if_smaller(length,sort_field->length); - memcpy(param->tmp_buffer,from,length); - from=param->tmp_buffer; - } tmp_length= cs->coll->strnxfrm(cs, to, sort_field->length, item->max_char_length() * cs->strxfrm_multiply, - (uchar*) from, length, + (uchar*) res->ptr(), length, MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN); DBUG_ASSERT(tmp_length == sort_field->length); } else { + uint diff; + uint sort_field_length= sort_field->length - + sort_field->suffix_length; + if (sort_field_length < length) + { + diff= 0; + length= sort_field_length; + } + else + diff= sort_field_length - length; + if (sort_field->suffix_length) + { + /* Store length last in result_string */ + store_length(to + sort_field_length, length, + sort_field->suffix_length); + } + /* apply cs->sort_order for case-insensitive comparison if needed */ my_strnxfrm(cs,(uchar*)to,length,(const uchar*)res->ptr(),length); cs->cset->fill(cs, (char *)to+length,diff,fill_char); } diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index fc53183ca7a..531211eb175 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -446,7 +446,7 @@ int ndbcluster_binlog_init_share(NDB_SHARE *share, TABLE *_table) alloc_root(mem_root, no_nodes * sizeof(MY_BITMAP)); for (i= 0; i < no_nodes; i++) { - bitmap_init(&share->subscriber_bitmap[i], + my_bitmap_init(&share->subscriber_bitmap[i], (Uint32*)alloc_root(mem_root, max_ndb_nodes/8), max_ndb_nodes, FALSE); bitmap_clear_all(&share->subscriber_bitmap[i]); @@ -1119,7 +1119,7 @@ ndbcluster_update_slock(THD *thd, MY_BITMAP slock; uint32 bitbuf[SCHEMA_SLOCK_SIZE/4]; - bitmap_init(&slock, bitbuf, sizeof(bitbuf)*8, false); + my_bitmap_init(&slock, bitbuf, sizeof(bitbuf)*8, false); if (ndbtab == 0) { @@ -1370,7 +1370,7 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share, { int i, updated= 0; int no_storage_nodes= g_ndb_cluster_connection->no_db_nodes(); - bitmap_init(&schema_subscribers, bitbuf, sizeof(bitbuf)*8, FALSE); + my_bitmap_init(&schema_subscribers, bitbuf, sizeof(bitbuf)*8, FALSE); bitmap_set_all(&schema_subscribers); /* begin protect ndb_schema_share */ @@ -1908,7 +1908,7 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb, Cluster_schema *schema= (Cluster_schema *) sql_alloc(sizeof(Cluster_schema)); MY_BITMAP slock; - bitmap_init(&slock, schema->slock, 8*SCHEMA_SLOCK_SIZE, FALSE); + my_bitmap_init(&slock, schema->slock, 8*SCHEMA_SLOCK_SIZE, FALSE); uint node_id= g_ndb_cluster_connection->node_id(); { ndbcluster_get_schema(tmp_share, schema); @@ -3353,7 +3353,7 @@ ndb_binlog_thread_handle_data_event(Ndb *ndb, NdbEventOperation *pOp, MY_BITMAP b; /* Potential buffer for the bitmap */ uint32 bitbuf[128 / (sizeof(uint32) * 8)]; - bitmap_init(&b, n_fields <= sizeof(bitbuf) * 8 ? bitbuf : NULL, + my_bitmap_init(&b, n_fields <= sizeof(bitbuf) * 8 ? bitbuf : NULL, n_fields, FALSE); bitmap_set_all(&b); @@ -3573,7 +3573,7 @@ static NDB_SCHEMA_OBJECT *ndb_get_schema_object(const char *key, break; } mysql_mutex_init(key_ndb_schema_object_mutex, &ndb_schema_object->mutex, MY_MUTEX_INIT_FAST); - bitmap_init(&ndb_schema_object->slock_bitmap, ndb_schema_object->slock, + my_bitmap_init(&ndb_schema_object->slock_bitmap, ndb_schema_object->slock, sizeof(ndb_schema_object->slock)*8, FALSE); bitmap_clear_all(&ndb_schema_object->slock_bitmap); break; diff --git a/sql/ha_ndbcluster_cond.cc b/sql/ha_ndbcluster_cond.cc index 22a7dbe55f7..fd80304d400 100644 --- a/sql/ha_ndbcluster_cond.cc +++ b/sql/ha_ndbcluster_cond.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000, 2011, 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 diff --git a/sql/ha_ndbcluster_cond.h b/sql/ha_ndbcluster_cond.h index 27675588ed7..952b705bfc2 100644 --- a/sql/ha_ndbcluster_cond.h +++ b/sql/ha_ndbcluster_cond.h @@ -1,7 +1,7 @@ #ifndef HA_NDBCLUSTER_COND_INCLUDED #define HA_NDBCLUSTER_COND_INCLUDED -/* Copyright (C) 2000-2007 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 @@ -350,18 +350,18 @@ class Ndb_cond_traverse_context : public Sql_alloc skip(0), collation(NULL), rewrite_stack(NULL) { // Allocate type checking bitmaps - bitmap_init(&expect_mask, 0, 512, FALSE); - bitmap_init(&expect_field_type_mask, 0, 512, FALSE); - bitmap_init(&expect_field_result_mask, 0, 512, FALSE); + my_bitmap_init(&expect_mask, 0, 512, FALSE); + my_bitmap_init(&expect_field_type_mask, 0, 512, FALSE); + my_bitmap_init(&expect_field_result_mask, 0, 512, FALSE); if (stack) cond_ptr= stack->ndb_cond; }; ~Ndb_cond_traverse_context() { - bitmap_free(&expect_mask); - bitmap_free(&expect_field_type_mask); - bitmap_free(&expect_field_result_mask); + my_bitmap_free(&expect_mask); + my_bitmap_free(&expect_field_type_mask); + my_bitmap_free(&expect_field_result_mask); if (rewrite_stack) delete rewrite_stack; } void expect(Item::Type type) diff --git a/sql/ha_ndbcluster_tables.h b/sql/ha_ndbcluster_tables.h index 6ed46123738..4d97ca2c254 100644 --- a/sql/ha_ndbcluster_tables.h +++ b/sql/ha_ndbcluster_tables.h @@ -1,7 +1,8 @@ #ifndef HA_NDBCLUSTER_TABLES_INCLUDED #define HA_NDBCLUSTER_TABLES_INCLUDED -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000-2003, 2006, 2007 MySQL AB, 2009 Sun Microsystems, Inc. + Use is subject to license terms 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 diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 603e0bf59dc..6f8d4b4af14 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -89,12 +89,13 @@ static handler *partition_create_handler(handlerton *hton, static uint partition_flags(); static uint alter_table_flags(uint flags); +extern "C" int cmp_key_then_part_id(void *key_p, uchar *ref1, uchar *ref2); + /* If frm_error() is called then we will use this to to find out what file extensions exist for the storage engine. This is also used by the default rename_table and delete_table method in handler.cc. */ - static const char *ha_partition_ext[]= { ha_par_ext, NullS @@ -1488,7 +1489,8 @@ bool ha_partition::is_crashed() const int ha_partition::prepare_new_partition(TABLE *tbl, HA_CREATE_INFO *create_info, handler *file, const char *part_name, - partition_element *p_elem) + partition_element *p_elem, + uint disable_non_uniq_indexes) { int error; DBUG_ENTER("prepare_new_partition"); @@ -1531,6 +1533,7 @@ int ha_partition::prepare_new_partition(TABLE *tbl, m_open_test_lock | HA_OPEN_NO_PSI_CALL))) goto error_open; DBUG_PRINT("info", ("partition %s opened", part_name)); + /* Note: if you plan to add another call that may return failure, better to do it before external_lock() as cleanup_new_partition() @@ -1541,6 +1544,9 @@ int ha_partition::prepare_new_partition(TABLE *tbl, goto error_external_lock; DBUG_PRINT("info", ("partition %s external locked", part_name)); + if (disable_non_uniq_indexes) + file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE); + DBUG_RETURN(0); error_external_lock: (void) file->ha_close(); @@ -1836,6 +1842,14 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, on them to prepare them for copy phase and also for later close calls */ + + /* + Before creating new partitions check whether indexes are disabled + in the partitions. + */ + + uint disable_non_uniq_indexes = indexes_are_disabled(); + i= 0; part_count= 0; part_it.rewind(); @@ -1870,11 +1884,13 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, if ((error= prepare_new_partition(table, create_info, new_file_array[part], (const char *)part_name_buff, - sub_elem))) + sub_elem, + disable_non_uniq_indexes))) { cleanup_new_partition(part_count); DBUG_RETURN(error); } + m_added_file[part_count++]= new_file_array[part]; } while (++j < num_subparts); } @@ -1887,11 +1903,13 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, if ((error= prepare_new_partition(table, create_info, new_file_array[i], (const char *)part_name_buff, - part_elem))) + part_elem, + disable_non_uniq_indexes))) { cleanup_new_partition(part_count); DBUG_RETURN(error); } + m_added_file[part_count++]= new_file_array[i]; } } @@ -3301,10 +3319,10 @@ err: void ha_partition::free_partition_bitmaps() { /* Initialize the bitmap we use to minimize ha_start_bulk_insert calls */ - bitmap_free(&m_bulk_insert_started); - bitmap_free(&m_locked_partitions); - bitmap_free(&m_partitions_to_reset); - bitmap_free(&m_key_not_found_partitions); + my_bitmap_free(&m_bulk_insert_started); + my_bitmap_free(&m_locked_partitions); + my_bitmap_free(&m_partitions_to_reset); + my_bitmap_free(&m_key_not_found_partitions); } @@ -3316,14 +3334,14 @@ bool ha_partition::init_partition_bitmaps() { DBUG_ENTER("ha_partition::init_partition_bitmaps"); /* Initialize the bitmap we use to minimize ha_start_bulk_insert calls */ - if (bitmap_init(&m_bulk_insert_started, NULL, m_tot_parts + 1, FALSE)) + if (my_bitmap_init(&m_bulk_insert_started, NULL, m_tot_parts + 1, FALSE)) DBUG_RETURN(true); bitmap_clear_all(&m_bulk_insert_started); /* Initialize the bitmap we use to keep track of locked partitions */ - if (bitmap_init(&m_locked_partitions, NULL, m_tot_parts, FALSE)) + if (my_bitmap_init(&m_locked_partitions, NULL, m_tot_parts, FALSE)) { - bitmap_free(&m_bulk_insert_started); + my_bitmap_free(&m_bulk_insert_started); DBUG_RETURN(true); } bitmap_clear_all(&m_locked_partitions); @@ -3332,10 +3350,10 @@ bool ha_partition::init_partition_bitmaps() Initialize the bitmap we use to keep track of partitions which may have something to reset in ha_reset(). */ - if (bitmap_init(&m_partitions_to_reset, NULL, m_tot_parts, FALSE)) + if (my_bitmap_init(&m_partitions_to_reset, NULL, m_tot_parts, FALSE)) { - bitmap_free(&m_bulk_insert_started); - bitmap_free(&m_locked_partitions); + my_bitmap_free(&m_bulk_insert_started); + my_bitmap_free(&m_locked_partitions); DBUG_RETURN(true); } bitmap_clear_all(&m_partitions_to_reset); @@ -3344,11 +3362,11 @@ bool ha_partition::init_partition_bitmaps() Initialize the bitmap we use to keep track of partitions which returned HA_ERR_KEY_NOT_FOUND from index_read_map. */ - if (bitmap_init(&m_key_not_found_partitions, NULL, m_tot_parts, FALSE)) + if (my_bitmap_init(&m_key_not_found_partitions, NULL, m_tot_parts, FALSE)) { - bitmap_free(&m_bulk_insert_started); - bitmap_free(&m_locked_partitions); - bitmap_free(&m_partitions_to_reset); + my_bitmap_free(&m_bulk_insert_started); + my_bitmap_free(&m_locked_partitions); + my_bitmap_free(&m_partitions_to_reset); DBUG_RETURN(true); } bitmap_clear_all(&m_key_not_found_partitions); @@ -3404,7 +3422,7 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked) m_mode= mode; m_open_test_lock= test_if_locked; m_part_field_array= m_part_info->full_part_field_array; - if (get_from_handler_file(name, &table->mem_root, test(m_is_clone_of))) + if (get_from_handler_file(name, &table->mem_root, MY_TEST(m_is_clone_of))) DBUG_RETURN(error); name_buffer_ptr= m_name_buffer_ptr; if (populate_partition_name_hash()) @@ -5102,8 +5120,8 @@ bool ha_partition::init_record_priority_queue() } m_start_key.key= (const uchar*)ptr; /* Initialize priority queue, initialized to reading forward. */ - if (init_queue(&m_queue, used_parts, (uint) PARTITION_BYTES_IN_POS, - 0, key_rec_cmp, (void*)m_curr_key_info, 0, 0)) + if (init_queue(&m_queue, used_parts, 0, + 0, cmp_key_then_part_id, (void*)m_curr_key_info, 0, 0)) { my_free(m_ordered_rec_buffer); m_ordered_rec_buffer= NULL; @@ -5313,6 +5331,52 @@ int ha_partition::index_read_map(uchar *buf, const uchar *key, } +/* + @brief + Provide ordering by (key_value, partition_id). + + @detail + Ordering by partition id is required so that key scans on key=const + return rows in rowid order (this is required for some variants of + index_merge to work). + + In ha_partition, rowid is a (partition_id, underlying_table_rowid). + handle_ordered_index_scan must return rows ordered by (key, rowid). + + If two rows have the same key value and come from different partitions, + it is sufficient to return them in the order of their partition_id. +*/ + +extern "C" int cmp_key_then_part_id(void *key_p, uchar *ref1, uchar *ref2) +{ + my_ptrdiff_t diff1, diff2; + int res; + + if ((res= key_rec_cmp(key_p, ref1 + PARTITION_BYTES_IN_POS, + ref2 + PARTITION_BYTES_IN_POS))) + { + return res; + } + + /* The following was taken from ha_partition::cmp_ref */ + diff1= ref2[1] - ref1[1]; + diff2= ref2[0] - ref1[0]; + if (!diff1 && !diff2) + return 0; + + if (diff1 > 0) + return(-1); + + if (diff1 < 0) + return(+1); + + if (diff2 > 0) + return(-1); + + return(+1); +} + + /** Common routine for a number of index_read variants @@ -5677,7 +5741,7 @@ int ha_partition::read_range_first(const key_range *start_key, m_start_key.key= NULL; m_index_scan_type= partition_read_range; - error= common_index_read(m_rec0, test(start_key)); + error= common_index_read(m_rec0, MY_TEST(start_key)); DBUG_RETURN(error); } @@ -6134,7 +6198,7 @@ void ha_partition::return_top_record(uchar *buf) int ha_partition::handle_ordered_index_scan_key_not_found() { int error; - uint i; + uint i, old_elements= m_queue.elements; uchar *part_buf= m_ordered_rec_buffer; uchar *curr_rec_buf= NULL; DBUG_ENTER("ha_partition::handle_ordered_index_scan_key_not_found"); @@ -6168,9 +6232,12 @@ int ha_partition::handle_ordered_index_scan_key_not_found() bitmap_clear_all(&m_key_not_found_partitions); m_key_not_found= false; - /* Update m_top_entry, which may have changed. */ - uchar *key_buffer= queue_top(&m_queue); - m_top_entry= uint2korr(key_buffer); + if (m_queue.elements > old_elements) + { + /* Update m_top_entry, which may have changed. */ + uchar *key_buffer= queue_top(&m_queue); + m_top_entry= uint2korr(key_buffer); + } DBUG_RETURN(0); } @@ -7672,8 +7739,8 @@ uint32 ha_partition::calculate_key_hash_value(Field **field_array) ulong nr1= 1; ulong nr2= 4; bool use_51_hash; - use_51_hash= test((*field_array)->table->part_info->key_algorithm == - partition_info::KEY_ALGORITHM_51); + use_51_hash= MY_TEST((*field_array)->table->part_info->key_algorithm == + partition_info::KEY_ALGORITHM_51); do { @@ -7870,7 +7937,10 @@ void ha_partition::print_error(int error, myf errflag) if ((error == HA_ERR_NO_PARTITION_FOUND) && ! (thd->lex->alter_info.flags & Alter_info::ALTER_TRUNCATE_PARTITION)) - m_part_info->print_no_partition_found(table); + { + m_part_info->print_no_partition_found(table, errflag); + DBUG_VOID_RETURN; + } else if (error == HA_ERR_ROW_IN_WRONG_PARTITION) { /* Should only happen on DELETE or UPDATE! */ @@ -8428,6 +8498,16 @@ uint ha_partition::min_record_length(uint options) const If they belong to different partitions we decide that they are not the same record. Otherwise we use the particular handler to decide if they are the same. Sort in partition id order if not equal. + + MariaDB note: + Please don't merge the code from MySQL that does this: + + We get two references and need to check if those records are the same. + If they belong to different partitions we decide that they are not + the same record. Otherwise we use the particular handler to decide if + they are the same. Sort in partition id order if not equal. + + It is incorrect, MariaDB has an alternative fix. */ int ha_partition::cmp_ref(const uchar *ref1, const uchar *ref2) diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 7407388b7b2..05c2bc7072f 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -343,7 +343,8 @@ private: void cleanup_new_partition(uint part_count); int prepare_new_partition(TABLE *table, HA_CREATE_INFO *create_info, handler *file, const char *part_name, - partition_element *p_elem); + partition_element *p_elem, + uint disable_non_uniq_indexes); /* delete_table and rename_table uses very similar logic which is packed into this routine. diff --git a/sql/handler.cc b/sql/handler.cc index 4c797259e2c..40d53170557 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -389,12 +389,13 @@ static int ha_finish_errors(void) static volatile int32 need_full_discover_for_existence= 0; static volatile int32 engines_with_discover_table_names= 0; +static volatile int32 engines_with_discover= 0; static int full_discover_for_existence(handlerton *, const char *, const char *) -{ return 1; } +{ return 0; } static int ext_based_existence(handlerton *, const char *, const char *) -{ return 1; } +{ return 0; } static int hton_ext_based_table_discovery(handlerton *hton, LEX_STRING *db, MY_DIR *dir, handlerton::discovered_list *result) @@ -414,6 +415,9 @@ static void update_discovery_counters(handlerton *hton, int val) if (hton->discover_table_names) my_atomic_add32(&engines_with_discover_table_names, val); + + if (hton->discover_table) + my_atomic_add32(&engines_with_discover, val); } int ha_finalize_handlerton(st_plugin_int *plugin) @@ -1254,7 +1258,8 @@ int ha_commit_trans(THD *thd, bool all) the changes are not durable as they might be rolled back if the enclosing 'all' transaction is rolled back. */ - bool is_real_trans= all || thd->transaction.all.ha_list == 0; + bool is_real_trans= ((all || thd->transaction.all.ha_list == 0) && + !(thd->variables.option_bits & OPTION_GTID_BEGIN)); Ha_trx_info *ha_info= trans->ha_list; bool need_prepare_ordered, need_commit_ordered; my_xid xid; @@ -1269,7 +1274,7 @@ int ha_commit_trans(THD *thd, bool all) ER(ER_WARNING_NOT_COMPLETE_ROLLBACK));); DBUG_PRINT("info", - ("all: %d thd->in_sub_stmt: %d ha_info: %p is_real_trans: %d", + ("all: %d thd->in_sub_stmt: %d ha_info: %p is_real_trans: %d", all, thd->in_sub_stmt, ha_info, is_real_trans)); /* We must not commit the normal transaction if a statement @@ -1311,7 +1316,10 @@ int ha_commit_trans(THD *thd, bool all) Free resources and perform other cleanup even for 'empty' transactions. */ if (is_real_trans) - thd->transaction.cleanup(); + { + thd->transaction.cleanup(); + thd->wakeup_subsequent_commits(error); + } DBUG_RETURN(0); } @@ -1350,6 +1358,7 @@ int ha_commit_trans(THD *thd, bool all) thd->variables.lock_wait_timeout)) { ha_rollback_trans(thd, all); + thd->wakeup_subsequent_commits(1); DBUG_RETURN(1); } @@ -1461,6 +1470,7 @@ done: err: error= 1; /* Transaction was rolled back */ ha_rollback_trans(thd, all); + thd->wakeup_subsequent_commits(error); end: if (rw_trans && mdl_request.ticket) @@ -1503,11 +1513,16 @@ int ha_commit_one_phase(THD *thd, bool all) ha_commit_one_phase() can be called with an empty transaction.all.ha_list, see why in trans_register_ha()). */ - bool is_real_trans=all || thd->transaction.all.ha_list == 0; + bool is_real_trans= ((all || thd->transaction.all.ha_list == 0) && + !(thd->variables.option_bits & OPTION_GTID_BEGIN)); int res; DBUG_ENTER("ha_commit_one_phase"); - if (is_real_trans && (res= thd->wait_for_prior_commit())) - DBUG_RETURN(res); + if (is_real_trans) + { + DEBUG_SYNC(thd, "ha_commit_one_phase"); + if ((res= thd->wait_for_prior_commit())) + DBUG_RETURN(res); + } res= commit_one_phase_2(thd, all, trans, is_real_trans); DBUG_RETURN(res); } @@ -1519,7 +1534,8 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans) int error= 0; Ha_trx_info *ha_info= trans->ha_list, *ha_info_next; DBUG_ENTER("commit_one_phase_2"); - + if (is_real_trans) + DEBUG_SYNC(thd, "commit_one_phase_2"); if (ha_info) { for (; ha_info; ha_info= ha_info_next) @@ -1632,10 +1648,7 @@ int ha_rollback_trans(THD *thd, bool all) /* Always cleanup. Even if nht==0. There may be savepoints. */ if (is_real_trans) - { - thd->wakeup_subsequent_commits(error); thd->transaction.cleanup(); - } if (all) thd->transaction_rollback_request= FALSE; @@ -2498,7 +2511,7 @@ int handler::ha_open(TABLE *table_arg, const char *name, int mode, cached_table_flags= table_flags(); } reset_statistics(); - internal_tmp_table= test(test_if_locked & HA_OPEN_INTERNAL_TABLE); + internal_tmp_table= MY_TEST(test_if_locked & HA_OPEN_INTERNAL_TABLE); DBUG_RETURN(error); } @@ -3537,7 +3550,7 @@ void handler::print_error(int error, myf errflag) } } else - my_error(ER_GET_ERRNO, errflag, error, table_type()); + my_error(ER_GET_ERRNO, errflag, error, table_type()); DBUG_VOID_RETURN; } } @@ -4153,6 +4166,7 @@ handler::check_if_supported_inplace_alter(TABLE *altered_table, Alter_inplace_info::ALTER_COLUMN_EQUAL_PACK_LENGTH | Alter_inplace_info::ALTER_COLUMN_NAME | Alter_inplace_info::ALTER_COLUMN_DEFAULT | + Alter_inplace_info::ALTER_COLUMN_OPTION | Alter_inplace_info::CHANGE_CREATE_OPTION | Alter_inplace_info::ALTER_RENAME; @@ -4641,14 +4655,16 @@ int ha_create_table(THD *thd, const char *path, error= table.file->ha_create(name, &table, create_info); - (void) closefrm(&table, 0); - if (error) { - my_error(ER_CANT_CREATE_TABLE, MYF(0), db, table_name, error); + if (!thd->is_error()) + my_error(ER_CANT_CREATE_TABLE, MYF(0), db, table_name, error); + table.file->print_error(error, MYF(ME_JUST_WARNING)); PSI_CALL_drop_table_share(temp_table, share.db.str, share.db.length, share.table_name.str, share.table_name.length); } + + (void) closefrm(&table, 0); err: free_table_share(&share); @@ -4819,7 +4835,9 @@ int ha_discover_table(THD *thd, TABLE_SHARE *share) DBUG_ASSERT(share->error == OPEN_FRM_OPEN_ERROR); // share is not OK yet - if (share->db_plugin) + if (!engines_with_discover) + found= FALSE; + else if (share->db_plugin) found= discover_handlerton(thd, share->db_plugin, share); else found= plugin_foreach(thd, discover_handlerton, @@ -4843,6 +4861,7 @@ struct st_discover_existence_args size_t path_len; const char *db, *table_name; handlerton *hton; + bool frm_exists; }; static my_bool discover_existence(THD *thd, plugin_ref plugin, @@ -4851,7 +4870,7 @@ static my_bool discover_existence(THD *thd, plugin_ref plugin, st_discover_existence_args *args= (st_discover_existence_args*)arg; handlerton *ht= plugin_hton(plugin); if (ht->state != SHOW_OPTION_YES || !ht->discover_table_existence) - return FALSE; + return args->frm_exists; args->hton= ht; @@ -4906,40 +4925,36 @@ private: If the 'hton' is not NULL, it's set to the handlerton of the storage engine of this table, or to view_pseudo_hton if the frm belongs to a view. + This function takes discovery correctly into account. If frm is found, + it discovers the table to make sure it really exists in the engine. + If no frm is found it discovers the table, in case it still exists in + the engine. + + While it tries to cut corners (don't open .frm if no discovering engine is + enabled, no full discovery if all discovering engines support + discover_table_existence, etc), it still *may* be quite expensive + and must be used sparingly. @retval true Table exists (even if the error occurred, like bad frm) @retval false Table does not exist (one can do CREATE TABLE table_name) + + @note if frm exists and the table in engine doesn't, *hton will be set, + but the return value will be false. + + @note if frm file exists, but the table cannot be opened (engine not + loaded, frm is invalid), the return value will be true, but + *hton will be NULL. */ bool ha_table_exists(THD *thd, const char *db, const char *table_name, handlerton **hton) { + handlerton *dummy; DBUG_ENTER("ha_table_exists"); if (hton) *hton= 0; - - if (need_full_discover_for_existence) - { - TABLE_LIST table; - uint flags = GTS_TABLE | GTS_VIEW; - - if (!hton) - flags|= GTS_NOLOCK; - - Table_exists_error_handler no_such_table_handler; - thd->push_internal_handler(&no_such_table_handler); - TABLE_SHARE *share= tdc_acquire_share(thd, db, table_name, flags); - thd->pop_internal_handler(); - - if (hton && share) - { - *hton= share->db_type(); - tdc_release_share(share); - } - - // the table doesn't exist if we've caught ER_NO_SUCH_TABLE and nothing else - DBUG_RETURN(!no_such_table_handler.safely_trapped_errors()); - } + else if (engines_with_discover) + hton= &dummy; TABLE_SHARE *share= tdc_lock_share(db, table_name); if (share) @@ -4953,22 +4968,29 @@ bool ha_table_exists(THD *thd, const char *db, const char *table_name, char path[FN_REFLEN + 1]; size_t path_len = build_table_filename(path, sizeof(path) - 1, db, table_name, "", 0); + st_discover_existence_args args= {path, path_len, db, table_name, 0, true}; if (file_ext_exists(path, path_len, reg_ext)) { + bool exists= true; if (hton) { enum legacy_db_type db_type; if (dd_frm_type(thd, path, &db_type) != FRMTYPE_VIEW) - *hton= ha_resolve_by_legacy_type(thd, db_type); + { + handlerton *ht= ha_resolve_by_legacy_type(thd, db_type); + if ((*hton= ht)) + // verify that the table really exists + exists= discover_existence(thd, + plugin_int_to_ref(hton2plugin[ht->slot]), &args); + } else *hton= view_pseudo_hton; } - DBUG_RETURN(TRUE); + DBUG_RETURN(exists); } - st_discover_existence_args args= {path, path_len, db, table_name, 0}; - + args.frm_exists= false; if (plugin_foreach(thd, discover_existence, MYSQL_STORAGE_ENGINE_PLUGIN, &args)) { @@ -4977,6 +4999,30 @@ bool ha_table_exists(THD *thd, const char *db, const char *table_name, DBUG_RETURN(TRUE); } + + if (need_full_discover_for_existence) + { + TABLE_LIST table; + uint flags = GTS_TABLE | GTS_VIEW; + + if (!hton) + flags|= GTS_NOLOCK; + + Table_exists_error_handler no_such_table_handler; + thd->push_internal_handler(&no_such_table_handler); + TABLE_SHARE *share= tdc_acquire_share(thd, db, table_name, flags); + thd->pop_internal_handler(); + + if (hton && share) + { + *hton= share->db_type(); + tdc_release_share(share); + } + + // the table doesn't exist if we've caught ER_NO_SUCH_TABLE and nothing else + DBUG_RETURN(!no_such_table_handler.safely_trapped_errors()); + } + DBUG_RETURN(FALSE); } @@ -5606,8 +5652,10 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat) "", 0, "DISABLED", 8) ? 1 : 0; } else + { result= db_type->show_status && db_type->show_status(db_type, thd, stat_print, stat) ? 1 : 0; + } } /* @@ -5767,7 +5815,7 @@ static int binlog_log_row(TABLE* table, the first row handled in this statement. In that case, we need to write table maps for all locked tables to the binary log. */ - if (likely(!(error= bitmap_init(&cols, + if (likely(!(error= my_bitmap_init(&cols, use_bitbuf ? bitbuf : NULL, (n_fields + 7) & ~7UL, FALSE)))) @@ -5789,7 +5837,7 @@ static int binlog_log_row(TABLE* table, before_record, after_record); } if (!use_bitbuf) - bitmap_free(&cols); + my_bitmap_free(&cols); } } return error ? HA_ERR_RBR_LOGGING_FAILED : 0; diff --git a/sql/handler.h b/sql/handler.h index eadee821303..e9491cbf88a 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -32,6 +32,7 @@ #include "sql_cache.h" #include "structs.h" /* SHOW_COMP_OPTION */ #include "sql_array.h" /* Dynamic_array<> */ +#include "mdl.h" #include <my_compare.h> #include <ft_global.h> @@ -248,6 +249,15 @@ enum enum_alter_inplace_result { #define HA_CAN_FULLTEXT_EXT (1LL << 44) /* + Storage engine supports table export using the + FLUSH TABLE <table_list> FOR EXPORT statement + (meaning, after this statement one can copy table files out of the + datadir and later "import" (somehow) in another MariaDB instance) + */ +#define HA_CAN_EXPORT (1LL << 45) + + +/* Set of all binlog flags. Currently only contain the capabilities flags. */ @@ -378,6 +388,7 @@ enum enum_alter_inplace_result { #define HA_LEX_CREATE_IF_NOT_EXISTS 2 #define HA_LEX_CREATE_TABLE_LIKE 4 #define HA_CREATE_TMP_ALTER 8 +#define HA_LEX_CREATE_REPLACE 16 #define HA_MAX_REC_LENGTH 65535 /* Table caching type */ @@ -1581,9 +1592,15 @@ struct HA_CREATE_INFO ulong avg_row_length; ulong used_fields; ulong key_block_size; - uint stats_sample_pages; /* number of pages to sample during - stats estimation, if used, otherwise 0. */ - enum_stats_auto_recalc stats_auto_recalc; + /* + number of pages to sample during + stats estimation, if used, otherwise 0. + */ + uint stats_sample_pages; + uint null_bits; /* NULL bits at start of record */ + uint options; /* OR of HA_CREATE_ options */ + uint merge_insert_method; + uint extra_size; /* length of extra data segment */ SQL_I_List<TABLE_LIST> merge_list; handlerton *db_type; /** @@ -1596,21 +1613,23 @@ struct HA_CREATE_INFO If nothing speficied inherits the value of the original table (if present). */ enum row_type row_type; - uint null_bits; /* NULL bits at start of record */ - uint options; /* OR of HA_CREATE_ options */ - uint merge_insert_method; - uint extra_size; /* length of extra data segment */ enum ha_choice transactional; - bool varchar; ///< 1 if table has a VARCHAR enum ha_storage_media storage_media; ///< DEFAULT, DISK or MEMORY enum ha_choice page_checksum; ///< If we have page_checksums engine_option_value *option_list; ///< list of table create options + enum_stats_auto_recalc stats_auto_recalc; + bool varchar; ///< 1 if table has a VARCHAR /* the following three are only for ALTER TABLE, check_if_incompatible_data() */ ha_table_option_struct *option_struct; ///< structure with parsed table options ha_field_option_struct **fields_option_struct; ///< array of field option structures ha_index_option_struct **indexes_option_struct; ///< array of index option structures + /* The following is used to remember the old state for CREATE OR REPLACE */ + TABLE *table; + TABLE_LIST *pos_in_locked_tables; + MDL_ticket *mdl_ticket; + bool tmp_table() { return options & HA_LEX_CREATE_TMP_TABLE; } }; @@ -1729,8 +1748,11 @@ public: // Table is renamed static const HA_ALTER_FLAGS ALTER_RENAME = 1L << 18; - // Change the storage type of column - static const HA_ALTER_FLAGS ALTER_COLUMN_STORAGE_TYPE = 1L << 19; + // column's engine options changed, something in field->option_struct + static const HA_ALTER_FLAGS ALTER_COLUMN_OPTION = 1L << 19; + + // MySQL alias for the same thing: + static const HA_ALTER_FLAGS ALTER_COLUMN_STORAGE_TYPE = 1L << 19; // Change the column format of column static const HA_ALTER_FLAGS ALTER_COLUMN_COLUMN_FORMAT = 1L << 20; @@ -1759,7 +1781,7 @@ public: // Partition operation with ALL keyword static const HA_ALTER_FLAGS ALTER_ALL_PARTITION = 1L << 28; - // Partition operation with ALL keyword + // Virtual columns changed static const HA_ALTER_FLAGS ALTER_COLUMN_VCOL = 1L << 29; /** @@ -3932,7 +3954,7 @@ static inline const char *ha_resolve_storage_engine_name(const handlerton *db_ty static inline bool ha_check_storage_engine_flag(const handlerton *db_type, uint32 flag) { - return db_type == NULL ? FALSE : test(db_type->flags & flag); + return db_type == NULL ? FALSE : MY_TEST(db_type->flags & flag); } static inline bool ha_storage_engine_is_enabled(const handlerton *db_type) diff --git a/sql/hostname.cc b/sql/hostname.cc index 1200dd2c185..8a4df816057 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2011, Monty Program Ab +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2011, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -149,7 +149,7 @@ bool hostname_cache_init() Host_entry tmp; uint key_offset= (uint) ((char*) (&tmp.ip_key) - (char*) &tmp); - if (!(hostname_cache= new hash_filo(HOST_CACHE_SIZE, + if (!(hostname_cache= new hash_filo(host_cache_size, key_offset, HOST_ENTRY_KEY_SIZE, NULL, (my_hash_free_key) free, &my_charset_bin))) diff --git a/sql/item.cc b/sql/item.cc index 5bc9d5816eb..0fbd58567ef 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -234,6 +234,36 @@ bool Item::val_bool() } +/** + Get date/time/datetime. + Optionally extend TIME result to DATETIME. +*/ +bool Item::get_date_with_conversion(MYSQL_TIME *ltime, ulonglong fuzzydate) +{ + /* + Some TIME type items return error when trying to do get_date() + without TIME_TIME_ONLY set (e.g. Item_field for Field_time). + In the SQL standard time->datetime conversion mode we add TIME_TIME_ONLY. + In the legacy time->datetime conversion mode we do not add TIME_TIME_ONLY + and leave it to get_date() to check date. + */ + ulonglong time_flag= (field_type() == MYSQL_TYPE_TIME && + !(current_thd->variables.old_behavior & OLD_MODE_ZERO_DATE_TIME_CAST)) ? + TIME_TIME_ONLY : 0; + if (get_date(ltime, fuzzydate | time_flag)) + return true; + if (ltime->time_type == MYSQL_TIMESTAMP_TIME && + !(fuzzydate & TIME_TIME_ONLY)) + { + MYSQL_TIME tmp; + if (time_to_datetime_with_warn(current_thd, ltime, &tmp, fuzzydate)) + return null_value= true; + *ltime= tmp; + } + return false; +} + + /* For the items which don't have its own fast val_str_ascii() implementation we provide a generic slower version, @@ -852,7 +882,7 @@ void Item_ident::cleanup() table_name= orig_table_name; field_name= orig_field_name; /* Store if this Item was depended */ - can_be_depended= test(depended_from); + can_be_depended= MY_TEST(depended_from); DBUG_VOID_RETURN; } @@ -1681,17 +1711,28 @@ bool Item_name_const::is_null() Item_name_const::Item_name_const(Item *name_arg, Item *val): value_item(val), name_item(name_arg) { - if (!(valid_args= name_item->basic_const_item() && - (value_item->basic_const_item() || - ((value_item->type() == FUNC_ITEM) && - ((((Item_func *) value_item)->functype() == - Item_func::COLLATE_FUNC) || - ((((Item_func *) value_item)->functype() == - Item_func::NEG_FUNC) && - (((Item_func *) value_item)->key_item()->type() != - FUNC_ITEM))))))) - my_error(ER_WRONG_ARGUMENTS, MYF(0), "NAME_CONST"); Item::maybe_null= TRUE; + valid_args= true; + if (!name_item->basic_const_item()) + goto err; + + if (value_item->basic_const_item()) + return; // ok + + if (value_item->type() == FUNC_ITEM) + { + Item_func *value_func= (Item_func *) value_item; + if (value_func->functype() != Item_func::COLLATE_FUNC && + value_func->functype() != Item_func::NEG_FUNC) + goto err; + + if (value_func->key_item()->basic_const_item()) + return; // ok + } + +err: + valid_args= false; + my_error(ER_WRONG_ARGUMENTS, MYF(0), "NAME_CONST"); } @@ -2428,7 +2469,7 @@ void Item_field::set_field(Field *field_par) field_name= field_par->field_name; db_name= field_par->table->s->db.str; alias_name_used= field_par->table->alias_name_used; - unsigned_flag=test(field_par->flags & UNSIGNED_FLAG); + unsigned_flag= MY_TEST(field_par->flags & UNSIGNED_FLAG); collation.set(field_par->charset(), field_par->derivation(), field_par->repertoire()); fix_char_length(field_par->char_length()); @@ -4698,6 +4739,12 @@ bool is_outer_table(TABLE_LIST *table, SELECT_LEX *select) /** Resolve the name of an outer select column reference. + @param[in] thd current thread + @param[in,out] from_field found field reference or (Field*)not_found_field + @param[in,out] reference view column if this item was resolved to a + view column + + @description The method resolves the column reference represented by 'this' as a column present in outer selects that contain current select. @@ -4707,10 +4754,16 @@ bool is_outer_table(TABLE_LIST *table, SELECT_LEX *select) current select as dependent. The found reference of field should be provided in 'from_field'. - @param[in] thd current thread - @param[in,out] from_field found field reference or (Field*)not_found_field - @param[in,out] reference view column if this item was resolved to a - view column + The cache is critical for prepared statements of type: + + SELECT a FROM (SELECT a FROM test.t1) AS s1 NATURAL JOIN t2 AS s2; + + This is internally converted to a join similar to + + SELECT a FROM t1 AS s1,t2 AS s2 WHERE t2.a=t1.a; + + Without the cache, we would on re-prepare not know if 'a' did match + s1.a or s2.a. @note This is the inner loop of Item_field::fix_fields: @@ -4740,7 +4793,12 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) enum_parsing_place place= NO_MATTER; bool field_found= (*from_field != not_found_field); bool upward_lookup= FALSE; + TABLE_LIST *table_list; + /* Calulate the TABLE_LIST for the table */ + table_list= (cached_table ? cached_table : + field_found && (*from_field) != view_ref_found ? + (*from_field)->table->pos_in_table_list : 0); /* If there are outer contexts (outer selects, but current select is not derived table or view) try to resolve this reference in the @@ -4759,6 +4817,15 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) if (current_sel->master_unit()->first_select()->linkage != DERIVED_TABLE_TYPE) outer_context= context->outer_context; + + /* + This assert is to ensure we have an outer contex when *from_field + is set. + If this would not be the case, we would assert in mark_as_dependent + as last_checked_countex == context + */ + DBUG_ASSERT(outer_context || !*from_field || + *from_field == not_found_field); for (; outer_context; outer_context= outer_context->outer_context) @@ -4775,7 +4842,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) to find_field_in_tables(). Only need to find appropriate context. */ if (field_found && outer_context->select_lex != - cached_table->select_lex) + table_list->select_lex) continue; /* In case of a view, find_field_in_tables() writes the pointer to @@ -4974,9 +5041,9 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) if (last_checked_context->select_lex->having_fix_field) { Item_ref *rf; - rf= new Item_ref(context, - (cached_table->db[0] ? cached_table->db : 0), - (char*) cached_table->alias, (char*) field_name); + rf= new Item_ref(context, (*from_field)->table->s->db.str, + (*from_field)->table->alias.c_ptr(), + (char*) field_name); if (!rf) return -1; thd->change_item_tree(reference, rf); @@ -5047,6 +5114,7 @@ bool Item_field::fix_fields(THD *thd, Item **reference) if (!field) // If field is not checked { + TABLE_LIST *table_list; /* In case of view, find_field_in_tables() write pointer to view field expression to 'reference', i.e. it substitute that expression instead @@ -5132,11 +5200,14 @@ bool Item_field::fix_fields(THD *thd, Item **reference) else if (!from_field) goto error; - if (!outer_fixed && cached_table && cached_table->select_lex && + table_list= (cached_table ? cached_table : + from_field != view_ref_found ? + from_field->table->pos_in_table_list : 0); + if (!outer_fixed && table_list && table_list->select_lex && context->select_lex && - cached_table->select_lex != context->select_lex && - !context->select_lex->is_merged_child_of(cached_table->select_lex) && - is_outer_table(cached_table, context->select_lex)) + table_list->select_lex != context->select_lex && + !context->select_lex->is_merged_child_of(table_list->select_lex) && + is_outer_table(table_list, context->select_lex)) { int ret; if ((ret= fix_outer_field(thd, &from_field, reference)) < 0) @@ -5198,8 +5269,8 @@ bool Item_field::fix_fields(THD *thd, Item **reference) if (any_privileges) { char *db, *tab; - db= cached_table->get_db_name(); - tab= cached_table->get_table_name(); + db= field->table->s->db.str; + tab= field->table->s->table_name.str; if (!(have_privileges= (get_column_grant(thd, &field->table->grant, db, tab, field_name) & VIEW_ANY_ACL))) @@ -5220,7 +5291,12 @@ bool Item_field::fix_fields(THD *thd, Item **reference) marker= thd->lex->current_select->cur_pos_in_select_list; } mark_non_agg_field: - if (fixed && thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) + /* + table->pos_in_table_list can be 0 when fixing partition functions + or virtual fields. + */ + if (fixed && (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) && + field->table->pos_in_table_list) { /* Mark selects according to presence of non aggregated fields. @@ -5233,7 +5309,7 @@ mark_non_agg_field: (the current level) or a stub added by non-SELECT queries. */ SELECT_LEX *select_lex= cached_table ? - cached_table->select_lex : context->select_lex; + cached_table->select_lex : field->table->pos_in_table_list->select_lex; if (!thd->lex->in_sum_func) select_lex->set_non_agg_field_used(true); else @@ -5873,13 +5949,51 @@ static int save_field_in_field(Field *from, bool *null_value, } +static int memcpy_field_value(Field *to, Field *from) +{ + if (to->ptr != from->ptr) + memcpy(to->ptr,from->ptr, to->pack_length()); + return 0; +} + +fast_field_copier Item_field::setup_fast_field_copier(Field *to) +{ + DBUG_ENTER("Item_field::setup_fast_field_copier"); + DBUG_RETURN(memcpy_field_possible(to, field) ? + &memcpy_field_value : + &field_conv_incompatible); +} + + /** Set a field's value from a item. */ -void Item_field::save_org_in_field(Field *to) +void Item_field::save_org_in_field(Field *to, + fast_field_copier fast_field_copier_func) { - save_field_in_field(field, &null_value, to, TRUE); + DBUG_ENTER("Item_field::save_org_in_field"); + DBUG_PRINT("enter", ("setup: 0x%lx data: 0x%lx", + (ulong) to, (ulong) fast_field_copier_func)); + if (fast_field_copier_func) + { + if (field->is_null()) + { + null_value= TRUE; + set_field_to_null_with_conversions(to, TRUE); + DBUG_VOID_RETURN; + } + to->set_notnull(); + if (to == field) + { + null_value= 0; + DBUG_VOID_RETURN; + } + (*fast_field_copier_func)(to, field); + } + else + save_field_in_field(field, &null_value, to, TRUE); + DBUG_VOID_RETURN; } @@ -7400,9 +7514,9 @@ int Item_ref::save_in_field(Field *to, bool no_conversions) } -void Item_ref::save_org_in_field(Field *field) +void Item_ref::save_org_in_field(Field *field, fast_field_copier optimizer_data) { - (*ref)->save_org_in_field(field); + (*ref)->save_org_in_field(field, optimizer_data); } @@ -8273,7 +8387,7 @@ int Item_default_value::save_in_field(Field *field_arg, bool no_conversions) if (context->error_processor == &view_error_processor) { - TABLE_LIST *view= cached_table->top_table(); + TABLE_LIST *view= field_arg->table->pos_in_table_list->top_table(); push_warning_printf(field_arg->table->in_use, Sql_condition::WARN_LEVEL_WARN, ER_NO_DEFAULT_FOR_VIEW_FIELD, @@ -8695,6 +8809,25 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) { Item_result res_type=item_cmp_type(field->result_type(), item->result_type()); + /* + We have to check field->cmp_type() instead of res_type, + as result_type() - and thus res_type - can never be TIME_RESULT (yet). + */ + if (field->cmp_type() == TIME_RESULT) + { + MYSQL_TIME field_time, item_time; + if (field->type() == MYSQL_TYPE_TIME) + { + field->get_time(&field_time); + item->get_time(&item_time); + } + else + { + field->get_date(&field_time, TIME_INVALID_DATES); + item->get_date(&item_time, TIME_INVALID_DATES); + } + return my_time_compare(&field_time, &item_time); + } if (res_type == STRING_RESULT) { char item_buff[MAX_FIELD_WIDTH]; @@ -8745,25 +8878,6 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) return my_decimal_cmp(field_val, item_val); } /* - We have to check field->cmp_type() instead of res_type, - as result_type() - and thus res_type - can never be TIME_RESULT (yet). - */ - if (field->cmp_type() == TIME_RESULT) - { - MYSQL_TIME field_time, item_time; - if (field->type() == MYSQL_TYPE_TIME) - { - field->get_time(&field_time); - item->get_time(&item_time); - } - else - { - field->get_date(&field_time, TIME_INVALID_DATES); - item->get_date(&item_time, TIME_INVALID_DATES); - } - return my_time_compare(&field_time, &item_time); - } - /* The patch for Bug#13463415 started using this function for comparing BIGINTs. That uncovered a bug in Visual Studio 32bit optimized mode. Prefixing the auto variables with volatile fixes the problem.... diff --git a/sql/item.h b/sql/item.h index 6afeca66f0a..e3ddf56511e 100644 --- a/sql/item.h +++ b/sql/item.h @@ -332,6 +332,8 @@ struct Name_resolution_context: Sql_alloc */ TABLE_LIST *last_name_resolution_table; + /* Cache first_name_resolution_table in setup_natural_join_row_types */ + TABLE_LIST *natural_join_first_table; /* SELECT_LEX item belong to, in case of merged VIEW it can differ from SELECT_LEX where item was created, so we can't use table_list/field_list @@ -707,8 +709,12 @@ public: /* Function returns 1 on overflow and -1 on fatal errors */ int save_in_field_no_warnings(Field *field, bool no_conversions); virtual int save_in_field(Field *field, bool no_conversions); - virtual void save_org_in_field(Field *field) + virtual void save_org_in_field(Field *field, + fast_field_copier data + __attribute__ ((__unused__))) { (void) save_in_field(field, 1); } + virtual fast_field_copier setup_fast_field_copier(Field *field) + { return NULL; } virtual int save_safe_in_field(Field *field) { return save_in_field(field, 1); } virtual bool send(Protocol *protocol, String *str); @@ -944,7 +950,7 @@ public: save_val() is method of val_* family which stores value in the given field. */ - virtual void save_val(Field *to) { save_org_in_field(to); } + virtual void save_val(Field *to) { save_org_in_field(to, NULL); } /* save_result() is method of val*result() family which stores value in the given field. @@ -1069,6 +1075,8 @@ public: virtual bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate); bool get_time(MYSQL_TIME *ltime) { return get_date(ltime, TIME_TIME_ONLY | TIME_INVALID_DATES); } + // Get date with automatic TIME->DATETIME conversion + bool get_date_with_conversion(MYSQL_TIME *ltime, ulonglong fuzzydate); bool get_seconds(ulonglong *sec, ulong *sec_part); virtual bool get_date_result(MYSQL_TIME *ltime, ulonglong fuzzydate) { return get_date(ltime,fuzzydate); } @@ -1460,7 +1468,7 @@ public: { if (is_expensive_cache < 0) is_expensive_cache= walk(&Item::is_expensive_processor, 0, (uchar*)0); - return test(is_expensive_cache); + return MY_TEST(is_expensive_cache); } virtual Field::geometry_type get_geometry_type() const { return Field::GEOM_GEOMETRY; }; @@ -2068,7 +2076,8 @@ public: void fix_after_pullout(st_select_lex *new_parent, Item **ref); void make_field(Send_field *tmp_field); int save_in_field(Field *field,bool no_conversions); - void save_org_in_field(Field *field); + void save_org_in_field(Field *field, fast_field_copier optimizer_data); + fast_field_copier setup_fast_field_copier(Field *field); table_map used_tables() const; table_map all_used_tables() const; enum Item_result result_type () const @@ -2103,7 +2112,11 @@ public: tab->merge_keys.merge(field->part_of_key); if (tab->read_set) bitmap_fast_test_and_set(tab->read_set, field->field_index); - if (field->vcol_info) + /* + Do not mark a self-referecing virtual column. + Such virtual columns are reported as invalid. + */ + if (field->vcol_info && tab->vcol_set) tab->mark_virtual_col(field); } } @@ -2398,7 +2411,7 @@ public: virtual void print(String *str, enum_query_type query_type); Item_num *neg() { value= -value; return this; } uint decimal_precision() const - { return (uint)(max_length - test(value < 0)); } + { return (uint) (max_length - MY_TEST(value < 0)); } bool eq(const Item *, bool binary_cmp) const; bool check_partition_func_processor(uchar *bool_arg) { return FALSE;} bool check_vcol_func_processor(uchar *arg) { return FALSE;} @@ -3097,7 +3110,9 @@ public: bool fix_fields(THD *, Item **); void fix_after_pullout(st_select_lex *new_parent, Item **ref); int save_in_field(Field *field, bool no_conversions); - void save_org_in_field(Field *field); + void save_org_in_field(Field *field, fast_field_copier optimizer_data); + fast_field_copier setup_fast_field_copier(Field *field) + { return (*ref)->setup_fast_field_copier(field); } enum Item_result result_type () const { return (*ref)->result_type(); } enum_field_types field_type() const { return (*ref)->field_type(); } Field *get_tmp_table_field() @@ -3326,7 +3341,8 @@ public: bool is_null(); bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate); bool send(Protocol *protocol, String *buffer); - void save_org_in_field(Field *field) + void save_org_in_field(Field *field, + fast_field_copier data __attribute__ ((__unused__))) { save_val(field); } @@ -3523,7 +3539,8 @@ public: return Item_direct_ref::get_date(ltime, fuzzydate); } bool send(Protocol *protocol, String *buffer); - void save_org_in_field(Field *field) + void save_org_in_field(Field *field, + fast_field_copier data __attribute__ ((__unused__))) { if (check_null_ref()) field->set_null(); @@ -3541,6 +3558,7 @@ public: void cleanup() { null_ref_table= NULL; + item_equal= NULL; Item_direct_ref::cleanup(); } }; @@ -3589,7 +3607,7 @@ public: {} void save_in_result_field(bool no_conversions) { - outer_ref->save_org_in_field(result_field); + outer_ref->save_org_in_field(result_field, NULL); } bool fix_fields(THD *, Item **); void fix_after_pullout(st_select_lex *new_parent, Item **ref); @@ -4223,7 +4241,7 @@ public: virtual void store(Item *item); virtual bool cache_value()= 0; bool basic_const_item() const - { return test(example && example->basic_const_item());} + { return MY_TEST(example && example->basic_const_item()); } virtual void clear() { null_value= TRUE; value_cached= FALSE; } bool is_null() { return null_value; } virtual bool is_expensive() diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 5852108dc43..4b9eb37488e 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -503,7 +503,7 @@ static bool convert_const_to_int(THD *thd, Item_field *field_item, if (0 == field_cmp) { Item *tmp= new Item_int_with_ref(field->val_int(), *item, - test(field->flags & UNSIGNED_FLAG)); + MY_TEST(field->flags & UNSIGNED_FLAG)); if (tmp) thd->change_item_tree(item, tmp); result= 1; // Item was replaced @@ -1044,8 +1044,8 @@ int Arg_comparator::compare_e_string() res1= (*a)->val_str(&value1); res2= (*b)->val_str(&value2); if (!res1 || !res2) - return test(res1 == res2); - return test(sortcmp(res1, res2, cmp_collation.collation) == 0); + return MY_TEST(res1 == res2); + return MY_TEST(sortcmp(res1, res2, cmp_collation.collation) == 0); } @@ -1055,8 +1055,8 @@ int Arg_comparator::compare_e_binary_string() res1= (*a)->val_str(&value1); res2= (*b)->val_str(&value2); if (!res1 || !res2) - return test(res1 == res2); - return test(stringcmp(res1, res2) == 0); + return MY_TEST(res1 == res2); + return MY_TEST(stringcmp(res1, res2) == 0); } @@ -1111,8 +1111,8 @@ int Arg_comparator::compare_e_real() double val1= (*a)->val_real(); double val2= (*b)->val_real(); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return test(val1 == val2); + return MY_TEST((*a)->null_value && (*b)->null_value); + return MY_TEST(val1 == val2); } int Arg_comparator::compare_e_decimal() @@ -1121,8 +1121,8 @@ int Arg_comparator::compare_e_decimal() my_decimal *val1= (*a)->val_decimal(&decimal1); my_decimal *val2= (*b)->val_decimal(&decimal2); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return test(my_decimal_cmp(val1, val2) == 0); + return MY_TEST((*a)->null_value && (*b)->null_value); + return MY_TEST(my_decimal_cmp(val1, val2) == 0); } @@ -1160,8 +1160,8 @@ int Arg_comparator::compare_e_real_fixed() double val1= (*a)->val_real(); double val2= (*b)->val_real(); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return test(val1 == val2 || fabs(val1 - val2) < precision); + return MY_TEST((*a)->null_value && (*b)->null_value); + return MY_TEST(val1 == val2 || fabs(val1 - val2) < precision); } @@ -1272,8 +1272,8 @@ int Arg_comparator::compare_e_int() longlong val1= (*a)->val_int(); longlong val2= (*b)->val_int(); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return test(val1 == val2); + return MY_TEST((*a)->null_value && (*b)->null_value); + return MY_TEST(val1 == val2); } /** @@ -1284,8 +1284,8 @@ int Arg_comparator::compare_e_int_diff_signedness() longlong val1= (*a)->val_int(); longlong val2= (*b)->val_int(); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return (val1 >= 0) && test(val1 == val2); + return MY_TEST((*a)->null_value && (*b)->null_value); + return (val1 >= 0) && MY_TEST(val1 == val2); } int Arg_comparator::compare_row() diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index a0d9b7c20fa..4b3acf83f85 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -1,7 +1,7 @@ #ifndef ITEM_CMPFUNC_INCLUDED #define ITEM_CMPFUNC_INCLUDED /* Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 2009, 2011, Monty Program Ab + Copyright (c) 2009, 2011, Monty Program Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -388,7 +388,7 @@ public: Item_func::print_op(str, query_type); } - bool is_null() { return test(args[0]->is_null() || args[1]->is_null()); } + bool is_null() { return MY_TEST(args[0]->is_null() || args[1]->is_null()); } bool is_bool_func() { return 1; } CHARSET_INFO *compare_collation() { return cmp.cmp_collation.collation; } uint decimal_precision() const { return 1; } @@ -874,7 +874,7 @@ public: /* Compare values number pos1 and pos2 for equality */ bool compare_elems(uint pos1, uint pos2) { - return test(compare(collation, base + pos1*size, base + pos2*size)); + return MY_TEST(compare(collation, base + pos1 * size, base + pos2 * size)); } virtual Item_result result_type()= 0; }; @@ -1838,7 +1838,7 @@ public: bool contains(Field *field); Item* get_first(struct st_join_table *context, Item *field); /** Get number of field items / references to field items in this object */ - uint n_field_items() { return equal_items.elements-test(with_const); } + uint n_field_items() { return equal_items.elements - MY_TEST(with_const); } void merge(Item_equal *item); bool merge_with_check(Item_equal *equal_item, bool save_merged); void merge_into_list(List<Item_equal> *list, bool save_merged, diff --git a/sql/item_create.cc b/sql/item_create.cc index fa8c016d61b..a3e0dc6012b 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -1797,6 +1797,19 @@ protected: }; +class Create_func_master_gtid_wait : public Create_native_func +{ +public: + virtual Item *create_native(THD *thd, LEX_STRING name, List<Item> *item_list); + + static Create_func_master_gtid_wait s_singleton; + +protected: + Create_func_master_gtid_wait() {} + virtual ~Create_func_master_gtid_wait() {} +}; + + class Create_func_md5 : public Create_func_arg1 { public: @@ -3184,6 +3197,13 @@ Create_func_binlog_gtid_pos Create_func_binlog_gtid_pos::s_singleton; Item* Create_func_binlog_gtid_pos::create_2_arg(THD *thd, Item *arg1, Item *arg2) { +#ifdef HAVE_REPLICATION + if (!mysql_bin_log.is_open()) +#endif + { + my_error(ER_NO_BINARY_LOGGING, MYF(0)); + return NULL; + } thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); return new (thd->mem_root) Item_func_binlog_gtid_pos(arg1, arg2); } @@ -4614,6 +4634,47 @@ Create_func_master_pos_wait::create_native(THD *thd, LEX_STRING name, } +Create_func_master_gtid_wait Create_func_master_gtid_wait::s_singleton; + +Item* +Create_func_master_gtid_wait::create_native(THD *thd, LEX_STRING name, + List<Item> *item_list) +{ + Item *func= NULL; + int arg_count= 0; + + thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); + + if (item_list != NULL) + arg_count= item_list->elements; + + if (arg_count < 1 || arg_count > 2) + { + my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); + return func; + } + + thd->lex->safe_to_cache_query= 0; + + Item *param_1= item_list->pop(); + switch (arg_count) { + case 1: + { + func= new (thd->mem_root) Item_master_gtid_wait(param_1); + break; + } + case 2: + { + Item *param_2= item_list->pop(); + func= new (thd->mem_root) Item_master_gtid_wait(param_1, param_2); + break; + } + } + + return func; +} + + Create_func_md5 Create_func_md5::s_singleton; Item* @@ -5558,6 +5619,7 @@ static Native_func_registry func_array[] = { { C_STRING_WITH_LEN("MAKEDATE") }, BUILDER(Create_func_makedate)}, { { C_STRING_WITH_LEN("MAKETIME") }, BUILDER(Create_func_maketime)}, { { C_STRING_WITH_LEN("MAKE_SET") }, BUILDER(Create_func_make_set)}, + { { C_STRING_WITH_LEN("MASTER_GTID_WAIT") }, BUILDER(Create_func_master_gtid_wait)}, { { C_STRING_WITH_LEN("MASTER_POS_WAIT") }, BUILDER(Create_func_master_pos_wait)}, { { C_STRING_WITH_LEN("MBRCONTAINS") }, GEOM_BUILDER(Create_func_mbr_contains)}, { { C_STRING_WITH_LEN("MBRDISJOINT") }, GEOM_BUILDER(Create_func_mbr_disjoint)}, diff --git a/sql/item_func.cc b/sql/item_func.cc index 02aae8085d6..8937c1c47e4 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2615,7 +2615,8 @@ void Item_func_round::fix_length_and_dec() case INT_RESULT: if ((!decimals_to_set && truncate) || (args[0]->decimal_precision() < DECIMAL_LONGLONG_DIGITS)) { - int length_can_increase= test(!truncate && (val1 < 0) && !val1_unsigned); + int length_can_increase= MY_TEST(!truncate && (val1 < 0) && + !val1_unsigned); max_length= args[0]->max_length + length_can_increase; /* Here we can keep INT_RESULT */ cached_result_type= INT_RESULT; @@ -2955,11 +2956,6 @@ bool Item_func_min_max::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) } unpack_time(min_max, ltime); - if (!(fuzzy_date & TIME_TIME_ONLY) && - ((null_value= check_date_with_warn(ltime, fuzzy_date, - MYSQL_TIMESTAMP_ERROR)))) - return true; - if (compare_as_dates->field_type() == MYSQL_TYPE_DATE) { ltime->time_type= MYSQL_TIMESTAMP_DATE; @@ -2970,8 +2966,15 @@ bool Item_func_min_max::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) ltime->time_type= MYSQL_TIMESTAMP_TIME; ltime->hour+= (ltime->month * 32 + ltime->day) * 24; ltime->month= ltime->day= 0; + if (adjust_time_range_with_warn(ltime, + std::min<uint>(decimals, TIME_SECOND_PART_DIGITS))) + return (null_value= true); } + if (!(fuzzy_date & TIME_TIME_ONLY) && + ((null_value= check_date_with_warn(ltime, fuzzy_date, + MYSQL_TIMESTAMP_ERROR)))) + return true; return (null_value= 0); } @@ -3997,6 +4000,34 @@ err: } +longlong Item_master_gtid_wait::val_int() +{ + DBUG_ASSERT(fixed == 1); + longlong result= 0; + + if (args[0]->null_value) + { + null_value= 1; + return 0; + } + + null_value=0; +#ifdef HAVE_REPLICATION + THD* thd= current_thd; + longlong timeout_us; + String *gtid_pos = args[0]->val_str(&value); + + if (arg_count==2 && !args[1]->null_value) + timeout_us= (longlong)(1e6*args[1]->val_real()); + else + timeout_us= (longlong)-1; + + result= rpl_global_gtid_waiting.wait_for_pos(thd, gtid_pos, timeout_us); +#endif + return result; +} + + /** Enables a session to wait on a condition until a timeout or a network disconnect occurs. @@ -4599,7 +4630,7 @@ longlong Item_func_sleep::val_int() mysql_cond_destroy(&cond); - return test(!error); // Return 1 killed + return MY_TEST(!error); // Return 1 killed } @@ -6226,6 +6257,7 @@ bool Item_func_match::fix_fields(THD *thd, Item **ref) return TRUE; } + bool allows_multi_table_search= true; const_item_cache=0; for (uint i=1 ; i < arg_count ; i++) { @@ -6237,7 +6269,10 @@ bool Item_func_match::fix_fields(THD *thd, Item **ref) my_error(ER_WRONG_ARGUMENTS, MYF(0), "AGAINST"); return TRUE; } + allows_multi_table_search &= + allows_search_on_non_indexed_columns(((Item_field *)item)->field->table); } + /* Check that all columns come from the same table. We've already checked that columns in MATCH are fields so @@ -6246,7 +6281,7 @@ bool Item_func_match::fix_fields(THD *thd, Item **ref) if ((used_tables_cache & ~PARAM_TABLE_BIT) != item->used_tables()) key=NO_SUCH_KEY; - if (key == NO_SUCH_KEY && !(flags & FT_BOOL)) + if (key == NO_SUCH_KEY && !allows_multi_table_search) { my_error(ER_WRONG_ARGUMENTS,MYF(0),"MATCH"); return TRUE; @@ -6344,7 +6379,7 @@ bool Item_func_match::fix_index() } err: - if (flags & FT_BOOL) + if (allows_search_on_non_indexed_columns(table)) { key=NO_SUCH_KEY; return 0; @@ -6662,7 +6697,7 @@ void Item_func_sp::fix_length_and_dec() max_length= sp_result_field->field_length; collation.set(sp_result_field->charset()); maybe_null= 1; - unsigned_flag= test(sp_result_field->flags & UNSIGNED_FLAG); + unsigned_flag= MY_TEST(sp_result_field->flags & UNSIGNED_FLAG); DBUG_VOID_RETURN; } diff --git a/sql/item_func.h b/sql/item_func.h index 4b1516dcc4d..69abecc5f39 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1,7 +1,7 @@ #ifndef ITEM_FUNC_INCLUDED #define ITEM_FUNC_INCLUDED -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2009, 2013, Monty Program Ab. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -160,7 +160,7 @@ public: void count_decimal_length(); inline bool get_arg0_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) { - return (null_value=args[0]->get_date(ltime, fuzzy_date)); + return (null_value=args[0]->get_date_with_conversion(ltime, fuzzy_date)); } void count_datetime_length(Item **item, uint nitems); bool count_string_result_length(enum_field_types field_type, @@ -1643,6 +1643,22 @@ public: }; +class Item_master_gtid_wait :public Item_int_func +{ + String value; +public: + Item_master_gtid_wait(Item *a) :Item_int_func(a) {} + Item_master_gtid_wait(Item *a,Item *b) :Item_int_func(a,b) {} + longlong val_int(); + const char *func_name() const { return "master_gtid_wait"; } + void fix_length_and_dec() { max_length=10+1+10+1+20+1; maybe_null=0;} + bool check_vcol_func_processor(uchar *int_arg) + { + return trace_unsupported_by_check_vcol_func_processor(func_name()); + } +}; + + /* Handling of user definable variables */ class user_var_entry; @@ -1724,7 +1740,9 @@ public: { return save_in_field(field, no_conversions, 1); } - void save_org_in_field(Field *field) { (void)save_in_field(field, 1, 0); } + void save_org_in_field(Field *field, + fast_field_copier data __attribute__ ((__unused__))) + { (void)save_in_field(field, 1, 0); } bool register_field_in_read_map(uchar *arg); bool register_field_in_bitmap(uchar *arg); bool set_entry(THD *thd, bool create_if_not_exists); @@ -1909,6 +1927,41 @@ public: /* TODO: consider adding in support for the MATCH-based virtual columns */ return trace_unsupported_by_check_vcol_func_processor(func_name()); } +private: + /** + Check whether storage engine for given table, + allows FTS Boolean search on non-indexed columns. + + @todo A flag should be added to the extended fulltext API so that + it may be checked whether search on non-indexed columns are + supported. Currently, it is not possible to check for such a + flag since @c this->ft_handler is not yet set when this function is + called. The current hack is to assume that search on non-indexed + columns are supported for engines that does not support the extended + fulltext API (e.g., MyISAM), while it is not supported for other + engines (e.g., InnoDB) + + @param table_arg Table for which storage engine to check + + @retval true if BOOLEAN search on non-indexed columns is supported + @retval false otherwise + */ + bool allows_search_on_non_indexed_columns(TABLE* table_arg) + { + // Only Boolean search may support non_indexed columns + if (!(flags & FT_BOOL)) + return false; + + DBUG_ASSERT(table_arg && table_arg->file); + + // Assume that if extended fulltext API is not supported, + // non-indexed columns are allowed. This will be true for MyISAM. + if ((table_arg->file->ha_table_flags() & HA_CAN_FULLTEXT_EXT) == 0) + return true; + + return false; + } + }; diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 665c941414c..1deda83907c 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -244,7 +244,7 @@ String *Item_func_centroid::val_str(String *str) srid= uint4korr(swkb->ptr()); str->q_append(srid); - return (null_value= test(geom->centroid(str))) ? 0 : str; + return (null_value= MY_TEST(geom->centroid(str))) ? 0 : str; } @@ -859,7 +859,7 @@ String *Item_func_spatial_operation::val_str(String *str_value) str_value->length(0); str_value->q_append(srid); - if (!Geometry::create_from_opresult(&buffer1, str_value, res_receiver)) + if (Geometry::create_from_opresult(&buffer1, str_value, res_receiver)) goto exit; exit: @@ -1116,6 +1116,8 @@ int Item_func_buffer::Transporter::start_line() { if (buffer_op == Gcalc_function::op_difference) { + if (m_fn->reserve_op_buffer(1)) + return 1; m_fn->add_operation(Gcalc_function::op_false, 0); skip_line= TRUE; return 0; @@ -1317,7 +1319,7 @@ String *Item_func_buffer::val_str(String *str_value) str_value->length(0); str_value->q_append(srid); - if (!Geometry::create_from_opresult(&buffer, str_value, res_receiver)) + if (Geometry::create_from_opresult(&buffer, str_value, res_receiver)) goto mem_error; null_value= 0; diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index fc5dfe0994e..57af832c151 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2011, Oracle and/or its affiliates. + Copyright (c) 2000, 2013, Oracle and/or its affiliates. Copyright (c) 2009, 2013, Monty Program Ab. This program is free software; you can redistribute it and/or modify @@ -65,11 +65,6 @@ C_MODE_END size_t username_char_length= 80; -/** - @todo Remove this. It is not safe to use a shared String object. - */ -String my_empty_string("",default_charset_info); - /* For the Items which have only val_str_ascii() method and don't have their own "native" val_str(), @@ -1168,6 +1163,7 @@ String *Item_func_reverse::val_str(String *str) if ((l= my_ismbchar(res->charset(),ptr,end))) { tmp-= l; + DBUG_ASSERT(tmp >= tmp_value.ptr()); memcpy(tmp,ptr,l); ptr+= l; } @@ -2097,18 +2093,35 @@ String *Item_func_trim::val_str(String *str) ptr= (char*) res->ptr(); end= ptr+res->length(); r_ptr= remove_str->ptr(); - while (ptr+remove_length <= end && !memcmp(ptr,r_ptr,remove_length)) - ptr+=remove_length; #ifdef USE_MB if (use_mb(res->charset())) { + while (ptr + remove_length <= end) + { + uint num_bytes= 0; + while (num_bytes < remove_length) + { + uint len; + if ((len= my_ismbchar(res->charset(), ptr + num_bytes, end))) + num_bytes+= len; + else + ++num_bytes; + } + if (num_bytes != remove_length) + break; + if (memcmp(ptr, r_ptr, remove_length)) + break; + ptr+= remove_length; + } char *p=ptr; register uint32 l; loop: while (ptr + remove_length < end) { - if ((l=my_ismbchar(res->charset(), ptr,end))) ptr+=l; - else ++ptr; + if ((l= my_ismbchar(res->charset(), ptr,end))) + ptr+= l; + else + ++ptr; } if (ptr + remove_length == end && !memcmp(ptr,r_ptr,remove_length)) { @@ -2121,6 +2134,8 @@ String *Item_func_trim::val_str(String *str) else #endif /* USE_MB */ { + while (ptr+remove_length <= end && !memcmp(ptr,r_ptr,remove_length)) + ptr+=remove_length; while (ptr + remove_length <= end && !memcmp(end-remove_length,r_ptr,remove_length)) end-=remove_length; @@ -2839,7 +2854,7 @@ String *Item_func_make_set::val_str(String *str) ulonglong bits; bool first_found=0; Item **ptr=args+1; - String *result=&my_empty_string; + String *result= make_empty_result(); bits=args[0]->val_int(); if ((null_value=args[0]->null_value)) @@ -3286,7 +3301,9 @@ String *Item_func_conv::val_str(String *str) int to_base= (int) args[2]->val_int(); int err; + // Note that abs(INT_MIN) is undefined. if (args[0]->null_value || args[1]->null_value || args[2]->null_value || + from_base == INT_MIN || to_base == INT_MIN || abs(to_base) > 36 || abs(to_base) < 2 || abs(from_base) > 36 || abs(from_base) < 2 || !(res->length())) { @@ -4787,7 +4804,7 @@ String *Item_dyncol_get::val_str(String *str_result) goto null; case DYN_COL_INT: case DYN_COL_UINT: - str_result->set_int(val.x.long_value, test(val.type == DYN_COL_UINT), + str_result->set_int(val.x.long_value, MY_TEST(val.type == DYN_COL_UINT), &my_charset_latin1); break; case DYN_COL_DOUBLE: diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 4b9ec50c164..7b2591e9346 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -1057,6 +1057,15 @@ public: const char *func_name() const { return "weight_string"; } String *val_str(String *); void fix_length_and_dec(); + bool eq(const Item *item, bool binary_cmp) const + { + if (!Item_str_func::eq(item, binary_cmp)) + return false; + Item_func_weight_string *that= (Item_func_weight_string *)item; + return this->flags == that->flags && + this->nweights == that->nweights && + this->result_length == that->result_length; + } }; class Item_func_crc32 :public Item_int_func @@ -1206,7 +1215,5 @@ public: String *val_str(String *); }; -extern String my_empty_string; - #endif /* ITEM_STRFUNC_INCLUDED */ diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 81c4f0f51e5..67af49c4f9f 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -3341,7 +3341,7 @@ subselect_single_select_engine(THD *thd_arg, st_select_lex *select, select_result_interceptor *result_arg, Item_subselect *item_arg) :subselect_engine(thd_arg, item_arg, result_arg), - prepared(0), executed(0), optimize_error(0), + prepared(0), executed(0), select_lex(select), join(0) { select_lex->master_unit()->item= item_arg; @@ -3355,7 +3355,7 @@ int subselect_single_select_engine::get_identifier() void subselect_single_select_engine::cleanup() { DBUG_ENTER("subselect_single_select_engine::cleanup"); - prepared= executed= optimize_error= 0; + prepared= executed= 0; join= 0; result->cleanup(); select_lex->uncacheable&= ~UNCACHEABLE_DEPENDENT_INJECTED; @@ -3399,7 +3399,7 @@ bool subselect_union_engine::is_executed() const bool subselect_union_engine::no_rows() { /* Check if we got any rows when reading UNION result from temp. table: */ - return test(!unit->fake_select_lex->join->send_records); + return MY_TEST(!unit->fake_select_lex->join->send_records); } @@ -3589,9 +3589,6 @@ int subselect_single_select_engine::exec() { DBUG_ENTER("subselect_single_select_engine::exec"); - if (optimize_error) - DBUG_RETURN(1); - char const *save_where= thd->where; SELECT_LEX *save_select= thd->lex->current_select; thd->lex->current_select= select_lex; @@ -3604,7 +3601,7 @@ int subselect_single_select_engine::exec() if (join->optimize()) { thd->where= save_where; - executed= optimize_error= 1; + executed= 1; thd->lex->current_select= save_select; DBUG_RETURN(join->error ? join->error : 1); } @@ -4685,13 +4682,13 @@ ulonglong subselect_hash_sj_engine::rowid_merge_buff_size( */ static my_bool -bitmap_init_memroot(MY_BITMAP *map, uint n_bits, MEM_ROOT *mem_root) +my_bitmap_init_memroot(MY_BITMAP *map, uint n_bits, MEM_ROOT *mem_root) { my_bitmap_map *bitmap_buf; if (!(bitmap_buf= (my_bitmap_map*) alloc_root(mem_root, bitmap_buffer_size(n_bits))) || - bitmap_init(map, bitmap_buf, n_bits, FALSE)) + my_bitmap_init(map, bitmap_buf, n_bits, FALSE)) return TRUE; bitmap_clear_all(map); return FALSE; @@ -4729,9 +4726,9 @@ bool subselect_hash_sj_engine::init(List<Item> *tmp_columns, uint subquery_id) DBUG_ENTER("subselect_hash_sj_engine::init"); - if (bitmap_init_memroot(&non_null_key_parts, tmp_columns->elements, + if (my_bitmap_init_memroot(&non_null_key_parts, tmp_columns->elements, thd->mem_root) || - bitmap_init_memroot(&partial_match_key_parts, tmp_columns->elements, + my_bitmap_init_memroot(&partial_match_key_parts, tmp_columns->elements, thd->mem_root)) DBUG_RETURN(TRUE); @@ -5241,8 +5238,8 @@ int subselect_hash_sj_engine::exec() /* The subquery should be optimized, and materialized only once. */ DBUG_ASSERT(materialize_join->optimized && !is_materialized); materialize_join->exec(); - if ((res= test(materialize_join->error || thd->is_fatal_error || - thd->is_error()))) + if ((res= MY_TEST(materialize_join->error || thd->is_fatal_error || + thd->is_error()))) goto err; /* @@ -5325,7 +5322,7 @@ int subselect_hash_sj_engine::exec() count_pm_keys= count_partial_match_columns - count_null_only_columns + (nn_key_parts ? 1 : 0); - choose_partial_match_strategy(test(nn_key_parts), + choose_partial_match_strategy(MY_TEST(nn_key_parts), has_covering_null_row, &partial_match_key_parts); DBUG_ASSERT(strategy == PARTIAL_MATCH_MERGE || @@ -5453,7 +5450,7 @@ Ordered_key::Ordered_key(uint keyid_arg, TABLE *tbl_arg, Item *search_key_arg, Ordered_key::~Ordered_key() { my_free(key_buff); - bitmap_free(&null_key); + my_bitmap_free(&null_key); } @@ -5563,7 +5560,7 @@ bool Ordered_key::alloc_keys_buffers() lookup offset. */ /* Notice that max_null_row is max array index, we need count, so +1. */ - if (bitmap_init(&null_key, NULL, (uint)(max_null_row + 1), FALSE)) + if (my_bitmap_init(&null_key, NULL, (uint)(max_null_row + 1), FALSE)) return TRUE; cur_key_idx= HA_POS_ERROR; @@ -6002,8 +5999,8 @@ subselect_rowid_merge_engine::init(MY_BITMAP *non_null_key_parts, */ if (!has_covering_null_columns) { - if (bitmap_init_memroot(&matching_keys, merge_keys_count, thd->mem_root) || - bitmap_init_memroot(&matching_outer_cols, merge_keys_count, thd->mem_root)) + if (my_bitmap_init_memroot(&matching_keys, merge_keys_count, thd->mem_root) || + my_bitmap_init_memroot(&matching_outer_cols, merge_keys_count, thd->mem_root)) return TRUE; /* @@ -6300,7 +6297,7 @@ bool subselect_rowid_merge_engine::partial_match() Do not add the non_null_key, since it was already processed above. */ bitmap_clear_all(&matching_outer_cols); - for (uint i= test(non_null_key); i < merge_keys_count; i++) + for (uint i= MY_TEST(non_null_key); i < merge_keys_count; i++) { DBUG_ASSERT(merge_keys[i]->get_column_count() == 1); if (merge_keys[i]->get_search_key(0)->null_value) @@ -6317,7 +6314,7 @@ bool subselect_rowid_merge_engine::partial_match() nullable columns (above we guarantee there is a match for the non-null coumns), the result is UNKNOWN. */ - if (count_nulls_in_search_key == merge_keys_count - test(non_null_key)) + if (count_nulls_in_search_key == merge_keys_count - MY_TEST(non_null_key)) { res= TRUE; goto end; diff --git a/sql/item_subselect.h b/sql/item_subselect.h index e806f45041a..92b269d02f1 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -566,7 +566,7 @@ public: if ( pushed_cond_guards) pushed_cond_guards[i]= v; } - bool have_guarded_conds() { return test(pushed_cond_guards); } + bool have_guarded_conds() { return MY_TEST(pushed_cond_guards); } Item_func_not_all *upper_item; // point on NOT/NOP before ALL/SOME subquery @@ -621,7 +621,7 @@ public: int get_identifier(); bool test_strategy(uchar strategy) - { return test(in_strategy & strategy); } + { return MY_TEST(in_strategy & strategy); } /** Test that the IN strategy was chosen for execution. This is so @@ -641,7 +641,7 @@ public: } bool is_set_strategy() - { return test(in_strategy & SUBS_STRATEGY_CHOSEN); } + { return MY_TEST(in_strategy & SUBS_STRATEGY_CHOSEN); } bool has_strategy() { return in_strategy != SUBS_NOT_TRANSFORMED; } @@ -815,7 +815,6 @@ class subselect_single_select_engine: public subselect_engine { bool prepared; /* simple subselect is prepared */ bool executed; /* simple subselect is executed */ - bool optimize_error; /* simple subselect optimization failed */ st_select_lex *select_lex; /* corresponding select_lex */ JOIN * join; /* corresponding JOIN structure */ public: diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 367ff39eab6..62db351150b 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2013 Monty Program Ab + Copyright (c) 2008, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -261,7 +261,7 @@ bool Item_sum::check_sum_func(THD *thd, Item **ref) List_iterator<Item_field> of(outer_fields); while ((field= of++)) { - SELECT_LEX *sel= field->cached_table->select_lex; + SELECT_LEX *sel= field->field->table->pos_in_table_list->select_lex; if (sel->nest_level < aggr_level) { if (in_sum_func) @@ -1110,18 +1110,19 @@ void Aggregator_distinct::endup() endup_done= TRUE; } } - else - { - /* - We don't have a tree only if 'setup()' hasn't been called; - this is the case of sql_select.cc:return_zero_rows. - */ - if (tree) - table->field[0]->set_notnull(); - } + /* + We don't have a tree only if 'setup()' hasn't been called; + this is the case of sql_executor.cc:return_zero_rows. + */ if (tree && !endup_done) { + /* + All tree's values are not NULL. + Note that value of field is changed as we walk the tree, in + Aggregator_distinct::unique_walk_function, but it's always not NULL. + */ + table->field[0]->set_notnull(); /* go over the tree of distinct keys and calculate the aggregate value */ use_distinct_values= TRUE; tree_walk_action func; @@ -1417,7 +1418,7 @@ bool Item_sum_sum::add() { my_decimal value; const my_decimal *val= aggr->arg_val_decimal(&value); - if (!aggr->arg_is_null()) + if (!aggr->arg_is_null(true)) { my_decimal_add(E_DEC_FATAL_ERROR, dec_buffs + (curr_dec_buff^1), val, dec_buffs + curr_dec_buff); @@ -1428,7 +1429,7 @@ bool Item_sum_sum::add() else { sum+= aggr->arg_val_real(); - if (!aggr->arg_is_null()) + if (!aggr->arg_is_null(true)) null_value= 0; } DBUG_RETURN(0); @@ -1554,9 +1555,27 @@ double Aggregator_simple::arg_val_real() } -bool Aggregator_simple::arg_is_null() +bool Aggregator_simple::arg_is_null(bool use_null_value) { - return item_sum->args[0]->null_value; + Item **item= item_sum->args; + const uint item_count= item_sum->arg_count; + if (use_null_value) + { + for (uint i= 0; i < item_count; i++) + { + if (item[i]->null_value) + return true; + } + } + else + { + for (uint i= 0; i < item_count; i++) + { + if (item[i]->maybe_null && item[i]->is_null()) + return true; + } + } + return false; } @@ -1574,10 +1593,17 @@ double Aggregator_distinct::arg_val_real() } -bool Aggregator_distinct::arg_is_null() +bool Aggregator_distinct::arg_is_null(bool use_null_value) { - return use_distinct_values ? table->field[0]->is_null() : - item_sum->args[0]->null_value; + if (use_distinct_values) + { + const bool rc= table->field[0]->is_null(); + DBUG_ASSERT(!rc); // NULLs are never stored in 'tree' + return rc; + } + return use_null_value ? + item_sum->args[0]->null_value : + (item_sum->args[0]->maybe_null && item_sum->args[0]->is_null()); } @@ -1595,8 +1621,9 @@ void Item_sum_count::clear() bool Item_sum_count::add() { - if (!args[0]->maybe_null || !args[0]->is_null()) - count++; + if (aggr->arg_is_null(false)) + return 0; + count++; return 0; } @@ -1687,7 +1714,7 @@ bool Item_sum_avg::add() { if (Item_sum_sum::add()) return TRUE; - if (!aggr->arg_is_null()) + if (!aggr->arg_is_null(true)) count++; return FALSE; } diff --git a/sql/item_sum.h b/sql/item_sum.h index e82e0ead1c2..d28c654c438 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -57,19 +57,8 @@ protected: /* the aggregate function class to act on */ Item_sum *item_sum; - /** - When feeding back the data in endup() from Unique/temp table back to - Item_sum::add() methods we must read the data from Unique (and not - recalculate the functions that are given as arguments to the aggregate - function. - This flag is to tell the add() methods to take the data from the Unique - instead by calling the relevant val_..() method - */ - - bool use_distinct_values; - public: - Aggregator (Item_sum *arg): item_sum(arg), use_distinct_values(FALSE) {} + Aggregator (Item_sum *arg): item_sum(arg) {} virtual ~Aggregator () {} /* Keep gcc happy */ enum Aggregator_type { SIMPLE_AGGREGATOR, DISTINCT_AGGREGATOR }; @@ -106,10 +95,16 @@ public: /** Floating point value of being-aggregated argument */ virtual double arg_val_real() = 0; /** - NULLness of being-aggregated argument; can be called only after - arg_val_decimal() or arg_val_real(). + NULLness of being-aggregated argument. + + @param use_null_value Optimization: to determine if the argument is NULL + we must, in the general case, call is_null() on it, which itself might + call val_*() on it, which might be costly. If you just have called + arg_val*(), you can pass use_null_value=true; this way, arg_is_null() + might avoid is_null() and instead do a cheap read of the Item's null_value + (updated by arg_val*()). */ - virtual bool arg_is_null() = 0; + virtual bool arg_is_null(bool use_null_value) = 0; }; @@ -495,7 +490,7 @@ public: Item *get_arg(uint i) { return args[i]; } Item *set_arg(uint i, THD *thd, Item *new_val); - uint get_arg_count() { return arg_count; } + uint get_arg_count() const { return arg_count; } /* Initialization of distinct related members */ void init_aggregator() @@ -626,10 +621,20 @@ class Aggregator_distinct : public Aggregator */ bool always_null; + /** + When feeding back the data in endup() from Unique/temp table back to + Item_sum::add() methods we must read the data from Unique (and not + recalculate the functions that are given as arguments to the aggregate + function. + This flag is to tell the arg_*() methods to take the data from the Unique + instead of calling the relevant val_..() method. + */ + bool use_distinct_values; + public: Aggregator_distinct (Item_sum *sum) : Aggregator(sum), table(NULL), tmp_table_param(NULL), tree(NULL), - always_null(FALSE) {} + always_null(false), use_distinct_values(false) {} virtual ~Aggregator_distinct (); Aggregator_type Aggrtype() { return DISTINCT_AGGREGATOR; } @@ -639,7 +644,7 @@ public: void endup(); virtual my_decimal *arg_val_decimal(my_decimal * value); virtual double arg_val_real(); - virtual bool arg_is_null(); + virtual bool arg_is_null(bool use_null_value); bool unique_walk_function(void *element); bool unique_walk_function_for_count(void *element); @@ -666,7 +671,7 @@ public: void endup() {}; virtual my_decimal *arg_val_decimal(my_decimal * value); virtual double arg_val_real(); - virtual bool arg_is_null(); + virtual bool arg_is_null(bool use_null_value); }; diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 6ffa8b2af46..4d261e7a7d9 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1077,7 +1077,7 @@ longlong Item_func_weekday::val_int() return (longlong) calc_weekday(calc_daynr(ltime.year, ltime.month, ltime.day), - odbc_type) + test(odbc_type); + odbc_type) + MY_TEST(odbc_type); } void Item_func_dayname::fix_length_and_dec() @@ -1480,12 +1480,67 @@ String *Item_temporal_func::val_str(String *str) } +bool Item_temporal_hybrid_func::fix_temporal_type(MYSQL_TIME *ltime) +{ + if (ltime->time_type < 0) /* MYSQL_TIMESTAMP_NONE, MYSQL_TIMESTAMP_ERROR */ + return false; + + if (ltime->time_type != MYSQL_TIMESTAMP_TIME) + goto date_or_datetime_value; + + /* Convert TIME to DATE or DATETIME */ + switch (field_type()) + { + case MYSQL_TYPE_DATE: + case MYSQL_TYPE_DATETIME: + case MYSQL_TYPE_TIMESTAMP: + { + MYSQL_TIME tmp; + if (time_to_datetime_with_warn(current_thd, ltime, &tmp, 0)) + return (null_value= true); + *ltime= tmp; + if (field_type() == MYSQL_TYPE_DATE) + datetime_to_date(ltime); + return false; + } + case MYSQL_TYPE_TIME: + case MYSQL_TYPE_STRING: /* DATE_ADD, ADDTIME can return VARCHAR */ + return false; + default: + DBUG_ASSERT(0); + return (null_value= true); + } + +date_or_datetime_value: + /* Convert DATE or DATETIME to TIME, DATE, or DATETIME */ + switch (field_type()) + { + case MYSQL_TYPE_TIME: + datetime_to_time(ltime); + return false; + case MYSQL_TYPE_DATETIME: + case MYSQL_TYPE_TIMESTAMP: + date_to_datetime(ltime); + return false; + case MYSQL_TYPE_DATE: + datetime_to_date(ltime); + return false; + case MYSQL_TYPE_STRING: /* DATE_ADD, ADDTIME can return VARCHAR */ + return false; + default: + DBUG_ASSERT(0); + return (null_value= true); + } + return false; +} + + String *Item_temporal_hybrid_func::val_str_ascii(String *str) { DBUG_ASSERT(fixed == 1); MYSQL_TIME ltime; - if (get_date(<ime, 0) || + if (get_date(<ime, 0) || fix_temporal_type(<ime) || (null_value= my_TIME_to_str(<ime, str, decimals))) return (String *) 0; @@ -2160,8 +2215,10 @@ longlong Item_extract::val_int() long neg; int is_time_flag = date_value ? 0 : TIME_TIME_ONLY; - if (get_arg0_date(<ime, is_time_flag)) + // Not using get_arg0_date to avoid automatic TIME to DATETIME conversion + if ((null_value= args[0]->get_date(<ime, is_time_flag))) return 0; + neg= ltime.neg ? -1 : 1; DBUG_ASSERT(ltime.time_type != MYSQL_TIMESTAMP_TIME || ltime.day == 0); @@ -2482,26 +2539,7 @@ bool Item_datetime_typecast::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) if (decimals < TIME_SECOND_PART_DIGITS) my_time_trunc(ltime, decimals); - /* - ltime is valid MYSQL_TYPE_TIME (according to fuzzy_date). - But not every valid TIME value is a valid DATETIME value! - */ - if (ltime->time_type == MYSQL_TIMESTAMP_TIME) - { - if (ltime->neg) - { - ErrConvTime str(ltime); - make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, - &str, MYSQL_TIMESTAMP_DATETIME, 0); - return (null_value= 1); - } - - uint day= ltime->hour/24; - ltime->hour %= 24; - ltime->month= day / 31; - ltime->day= day % 31; - } - + DBUG_ASSERT(ltime->time_type != MYSQL_TIMESTAMP_TIME); ltime->time_type= MYSQL_TIMESTAMP_DATETIME; return 0; } @@ -2597,18 +2635,20 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) bool is_time= 0; long days, microseconds; longlong seconds; - int l_sign= sign, was_cut= 0; + int l_sign= sign; - if (is_date) // TIMESTAMP function + if (cached_field_type == MYSQL_TYPE_DATETIME) { + // TIMESTAMP function OR the first argument is DATE/DATETIME/TIMESTAMP if (get_arg0_date(&l_time1, 0) || args[1]->get_time(&l_time2) || l_time1.time_type == MYSQL_TIMESTAMP_TIME || l_time2.time_type != MYSQL_TIMESTAMP_TIME) return (null_value= 1); } - else // ADDTIME function + else { + // ADDTIME function AND the first argument is TIME if (args[0]->get_time(&l_time1) || args[1]->get_time(&l_time2) || l_time2.time_type == MYSQL_TIMESTAMP_DATETIME) @@ -2633,9 +2673,9 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) if (!is_time && ltime->neg) return (null_value= 1); - days= (long)(seconds/86400L); + days= (long) (seconds / SECONDS_IN_24H); - calc_time_from_sec(ltime, (long)(seconds%86400L), microseconds); + calc_time_from_sec(ltime, (long)(seconds % SECONDS_IN_24H), microseconds); ltime->time_type= is_time ? MYSQL_TIMESTAMP_TIME : MYSQL_TIMESTAMP_DATETIME; @@ -2648,16 +2688,7 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) } ltime->hour+= days*24; - - MYSQL_TIME copy= *ltime; - ErrConvTime str(©); - - check_time_range(ltime, decimals, &was_cut); - if (was_cut) - make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, - &str, MYSQL_TIMESTAMP_TIME, NullS); - - return (null_value= 0); + return (null_value= adjust_time_range_with_warn(ltime, decimals)); } @@ -2695,7 +2726,7 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) DBUG_ASSERT(fixed == 1); longlong seconds; long microseconds; - int l_sign= 1, was_cut= 0; + int l_sign= 1; MYSQL_TIME l_time1,l_time2,l_time3; ErrConvTime str(&l_time3); @@ -2739,12 +2770,7 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) return (null_value= 1); *ltime= l_time3; - check_time_range(ltime, decimals, &was_cut); - - if (was_cut) - make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, - &str, MYSQL_TIMESTAMP_TIME, NullS); - return (null_value= 0); + return (null_value= adjust_time_range_with_warn(ltime, decimals)); } /** @@ -2832,8 +2858,12 @@ longlong Item_func_timestamp_diff::val_int() int neg= 1; null_value= 0; - if (args[0]->get_date(<ime1, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE) || - args[1]->get_date(<ime2, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE)) + if (args[0]->get_date_with_conversion(<ime1, + TIME_NO_ZERO_DATE | + TIME_NO_ZERO_IN_DATE) || + args[1]->get_date_with_conversion(<ime2, + TIME_NO_ZERO_DATE | + TIME_NO_ZERO_IN_DATE)) goto null_date; if (calc_time_diff(<ime2,<ime1, 1, @@ -2903,9 +2933,9 @@ longlong Item_func_timestamp_diff::val_int() case INTERVAL_MONTH: return months*neg; case INTERVAL_WEEK: - return seconds/86400L/7L*neg; + return seconds / SECONDS_IN_24H / 7L * neg; case INTERVAL_DAY: - return seconds/86400L*neg; + return seconds / SECONDS_IN_24H * neg; case INTERVAL_HOUR: return seconds/3600L*neg; case INTERVAL_MINUTE: diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index cdf03199a81..8f881487e21 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -542,6 +542,11 @@ public: collation.collation : &my_charset_bin; } /** + Fix the returned timestamp to match field_type(), + which is important for val_str(). + */ + bool fix_temporal_type(MYSQL_TIME *ltime); + /** Return string value in ASCII character set. */ String *val_str_ascii(String *str); diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 456779beec1..75f0ed9ef5a 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. +/* Copyright (c) 2005, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -226,6 +226,9 @@ public: { max_length= MAX_BLOB_WIDTH; collation.collation= pxml->charset(); + // To avoid premature evaluation, mark all nodeset functions as non-const. + used_tables_cache= RAND_TABLE_BIT; + const_item_cache= false; } const char *func_name() const { return "nodeset"; } bool check_vcol_func_processor(uchar *int_arg) diff --git a/sql/key.cc b/sql/key.cc index 8ba3d48e8dc..3556ecf82d7 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* 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 @@ -126,8 +126,8 @@ void key_copy(uchar *to_key, uchar *from_record, KEY *key_info, { if (key_part->null_bit) { - *to_key++= test(from_record[key_part->null_offset] & - key_part->null_bit); + *to_key++= MY_TEST(from_record[key_part->null_offset] & + key_part->null_bit); key_length--; if (to_key[-1]) { @@ -300,8 +300,8 @@ bool key_cmp_if_same(TABLE *table,const uchar *key,uint idx,uint key_length) if (key_part->null_bit) { - if (*key != test(table->record[0][key_part->null_offset] & - key_part->null_bit)) + if (*key != MY_TEST(table->record[0][key_part->null_offset] & + key_part->null_bit)) return 1; if (*key) continue; @@ -438,7 +438,7 @@ void key_unpack(String *to, TABLE *table, KEY *key) } } field_unpack(to, key_part->field, table->record[0], key_part->length, - test(key_part->key_part_flag & HA_PART_KEY_SEG)); + MY_TEST(key_part->key_part_flag & HA_PART_KEY_SEG)); } dbug_tmp_restore_column_map(table->read_set, old_map); DBUG_VOID_RETURN; diff --git a/sql/key.h b/sql/key.h index ba3102947b3..47b981f5298 100644 --- a/sql/key.h +++ b/sql/key.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 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 diff --git a/sql/lex.h b/sql/lex.h index 88d73b9b169..10a52160cf0 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -223,6 +223,7 @@ static SYMBOL symbols[] = { { "EXISTS", SYM(EXISTS)}, { "EXIT", SYM(EXIT_SYM)}, { "EXPANSION", SYM(EXPANSION_SYM)}, + { "EXPORT", SYM(EXPORT_SYM)}, { "EXPLAIN", SYM(DESCRIBE)}, { "EXTENDED", SYM(EXTENDED_SYM)}, { "EXTENT_SIZE", SYM(EXTENT_SIZE_SYM)}, diff --git a/sql/lex_symbol.h b/sql/lex_symbol.h index 5f3c70a50a4..d48ca57df85 100644 --- a/sql/lex_symbol.h +++ b/sql/lex_symbol.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2001, 2004 MySQL AB +/* Copyright (c) 2000, 2001, 2004, 2006, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/sql/log.cc b/sql/log.cc index c0b3f36ee78..a0382d9ad1f 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2009, 2013, Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -651,35 +651,59 @@ int wsrep_write_cache(IO_CACHE *cache, uchar **buf, int *buf_len) } #endif /* REMOVED */ #endif -/* Check if a given table is opened log table */ -int check_if_log_table(size_t db_len, const char *db, size_t table_name_len, - const char *table_name, bool check_if_opened) + + +/** + Check if a given table is opened log table + + @param table Table to check + @param check_if_opened Only fail if it's a log table in use + @param error_msg String to put in error message if not ok. + No error message if 0 + @return 0 ok + @return # Type of log file + */ + +int check_if_log_table(const TABLE_LIST *table, + bool check_if_opened, + const char *error_msg) { - if (db_len == 5 && + int result= 0; + if (table->db_length == 5 && !(lower_case_table_names ? - my_strcasecmp(system_charset_info, db, "mysql") : - strcmp(db, "mysql"))) + my_strcasecmp(system_charset_info, table->db, "mysql") : + strcmp(table->db, "mysql"))) { - if (table_name_len == 11 && !(lower_case_table_names ? - my_strcasecmp(system_charset_info, - table_name, "general_log") : - strcmp(table_name, "general_log"))) + const char *table_name= table->table_name; + + if (table->table_name_length == 11 && + !(lower_case_table_names ? + my_strcasecmp(system_charset_info, + table_name, "general_log") : + strcmp(table_name, "general_log"))) { - if (!check_if_opened || logger.is_log_table_enabled(QUERY_LOG_GENERAL)) - return QUERY_LOG_GENERAL; - return 0; + result= QUERY_LOG_GENERAL; + goto end; } - if (table_name_len == 8 && !(lower_case_table_names ? + if (table->table_name_length == 8 && !(lower_case_table_names ? my_strcasecmp(system_charset_info, table_name, "slow_log") : strcmp(table_name, "slow_log"))) { - if (!check_if_opened || logger.is_log_table_enabled(QUERY_LOG_SLOW)) - return QUERY_LOG_SLOW; - return 0; + result= QUERY_LOG_SLOW; + goto end; } } return 0; + +end: + if (!check_if_opened || logger.is_log_table_enabled(result)) + { + if (error_msg) + my_error(ER_BAD_LOG_STATEMENT, MYF(0), error_msg); + return result; + } + return 0; } @@ -1796,6 +1820,7 @@ static int binlog_close_connection(handlerton *hton, THD *thd) contain updates to non-transactional tables. Or it can be a flush of a statement cache. */ + static int binlog_flush_cache(THD *thd, binlog_cache_mngr *cache_mngr, Log_event *end_ev, bool all, bool using_stmt, @@ -1803,6 +1828,7 @@ binlog_flush_cache(THD *thd, binlog_cache_mngr *cache_mngr, { int error= 0; DBUG_ENTER("binlog_flush_cache"); + DBUG_PRINT("enter", ("end_ev: %p", end_ev)); if ((using_stmt && !cache_mngr->stmt_cache.empty()) || (using_trx && !cache_mngr->trx_cache.empty())) @@ -1861,6 +1887,7 @@ static inline int binlog_commit_flush_stmt_cache(THD *thd, bool all, binlog_cache_mngr *cache_mngr) { + DBUG_ENTER("binlog_commit_flush_stmt_cache"); #ifdef WITH_WSREP if (thd->wsrep_mysql_replicated > 0) { @@ -1871,7 +1898,7 @@ binlog_commit_flush_stmt_cache(THD *thd, bool all, Query_log_event end_evt(thd, STRING_WITH_LEN("COMMIT"), FALSE, TRUE, TRUE, 0); - return (binlog_flush_cache(thd, cache_mngr, &end_evt, all, TRUE, FALSE)); + DBUG_RETURN(binlog_flush_cache(thd, cache_mngr, &end_evt, all, TRUE, FALSE)); } /** @@ -1886,9 +1913,10 @@ binlog_commit_flush_stmt_cache(THD *thd, bool all, static inline int binlog_commit_flush_trx_cache(THD *thd, bool all, binlog_cache_mngr *cache_mngr) { + DBUG_ENTER("binlog_commit_flush_trx_cache"); Query_log_event end_evt(thd, STRING_WITH_LEN("COMMIT"), TRUE, TRUE, TRUE, 0); - return (binlog_flush_cache(thd, cache_mngr, &end_evt, all, FALSE, TRUE)); + DBUG_RETURN(binlog_flush_cache(thd, cache_mngr, &end_evt, all, FALSE, TRUE)); } /** @@ -3116,7 +3144,7 @@ const char *MYSQL_LOG::generate_name(const char *log_name, MYSQL_BIN_LOG::MYSQL_BIN_LOG(uint *sync_period) - :reset_master_pending(false), + :reset_master_pending(false), mark_xid_done_waiting(0), bytes_written(0), file_id(1), open_count(1), group_commit_queue(0), group_commit_queue_busy(FALSE), num_commits(0), num_group_commits(0), @@ -3932,22 +3960,11 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd, bool create_new_log, const char* save_name; DBUG_ENTER("reset_logs"); - if (thd) - ha_reset_logs(thd); - /* - We need to get both locks to be sure that no one is trying to - write to the index log file. - */ - mysql_mutex_lock(&LOCK_log); - mysql_mutex_lock(&LOCK_index); - if (!is_relay_log) { if (init_state && !is_empty_state()) { my_error(ER_BINLOG_MUST_BE_EMPTY, MYF(0)); - mysql_mutex_unlock(&LOCK_index); - mysql_mutex_unlock(&LOCK_log); DBUG_RETURN(1); } @@ -3956,11 +3973,29 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd, bool create_new_log, This ensures that a binlog checkpoint will not try to write binlog checkpoint events, which would be useless (as we are deleting the binlog anyway) and could deadlock, as we are holding LOCK_log. + + Wait for any mark_xid_done() calls that might be already running to + complete (mark_xid_done_waiting counter to drop to zero); we need to + do this before we take the LOCK_log to not deadlock. */ mysql_mutex_lock(&LOCK_xid_list); reset_master_pending= true; + while (mark_xid_done_waiting > 0) + mysql_cond_wait(&COND_xid_list, &LOCK_xid_list); mysql_mutex_unlock(&LOCK_xid_list); + } + + if (thd) + ha_reset_logs(thd); + /* + We need to get both locks to be sure that no one is trying to + write to the index log file. + */ + mysql_mutex_lock(&LOCK_log); + mysql_mutex_lock(&LOCK_index); + if (!is_relay_log) + { /* We are going to nuke all binary log files. Without binlog, we cannot XA recover prepared-but-not-committed @@ -5416,6 +5451,10 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional, (long) table, table->s->table_name.str, table->s->table_map_id)); + /* Ensure that all events in a GTID group are in the same cache */ + if (variables.option_bits & OPTION_GTID_BEGIN) + is_transactional= 1; + /* Pre-conditions */ #ifdef WITH_WSREP DBUG_ASSERT(is_current_stmt_binlog_format_row() && @@ -5438,7 +5477,7 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional, cache_mngr->get_binlog_cache_log(use_trans_cache(this, is_transactional)); if (with_annotate && *with_annotate) { - Annotate_rows_log_event anno(current_thd, is_transactional, false); + Annotate_rows_log_event anno(table->in_use, is_transactional, false); /* Annotate event should be written not more than once */ *with_annotate= 0; if ((error= anno.write(file))) @@ -5605,6 +5644,7 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd, /* Generate a new global transaction ID, and write it to the binlog */ + bool MYSQL_BIN_LOG::write_gtid_event(THD *thd, bool standalone, bool is_transactional, uint64 commit_id) @@ -5614,6 +5654,16 @@ MYSQL_BIN_LOG::write_gtid_event(THD *thd, bool standalone, uint32 server_id= thd->variables.server_id; uint64 seq_no= thd->variables.gtid_seq_no; int err; + DBUG_ENTER("write_gtid_event"); + DBUG_PRINT("enter", ("standalone: %d", standalone)); + + if (thd->variables.option_bits & OPTION_GTID_BEGIN) + { + DBUG_PRINT("error", ("OPTION_GTID_BEGIN is set. " + "Master and slave will have different GTID values")); + /* Reset the flag, as we will write out a GTID anyway */ + thd->variables.option_bits&= ~OPTION_GTID_BEGIN; + } /* Reset the session variable gtid_seq_no, to reduce the risk of accidentally @@ -5638,7 +5688,8 @@ MYSQL_BIN_LOG::write_gtid_event(THD *thd, bool standalone, seq_no= gtid.seq_no; } if (err) - return true; + DBUG_RETURN(true); + thd->last_commit_gtid= gtid; Gtid_log_event gtid_event(thd, seq_no, domain_id, standalone, LOG_EVENT_SUPPRESS_USE_F, is_transactional, @@ -5646,10 +5697,10 @@ MYSQL_BIN_LOG::write_gtid_event(THD *thd, bool standalone, /* Write the event to the binary log. */ if (gtid_event.write(&mysql_bin_log.log_file)) - return true; + DBUG_RETURN(true); status_var_add(thd->status_var.binlog_bytes_written, gtid_event.data_written); - return false; + DBUG_RETURN(false); } @@ -5831,14 +5882,22 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate) { THD *thd= event_info->thd; bool error= 1; - DBUG_ENTER("MYSQL_BIN_LOG::write(Log_event *)"); binlog_cache_data *cache_data= 0; bool is_trans_cache= FALSE; bool using_trans= event_info->use_trans_cache(); bool direct= event_info->use_direct_logging(); ulong prev_binlog_id; + DBUG_ENTER("MYSQL_BIN_LOG::write(Log_event *)"); LINT_INIT(prev_binlog_id); + if (thd->variables.option_bits & OPTION_GTID_BEGIN) + { + DBUG_PRINT("info", ("OPTION_GTID_BEGIN was set")); + /* Wait for commit from binary log before we commit */ + direct= 0; + using_trans= 1; + } + if (thd->binlog_evt_union.do_union) { /* @@ -5892,6 +5951,7 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate) if (direct) { + DBUG_PRINT("info", ("direct is set")); file= &log_file; my_org_b_tell= my_b_tell(file); mysql_mutex_lock(&LOCK_log); @@ -6824,16 +6884,17 @@ MYSQL_BIN_LOG::write_transaction_to_binlog(THD *thd, to commit. If so, we add those to the queue as well, transitively for all waiters. - @retval TRUE If queued as the first entry in the queue (meaning this - is the leader) - @retval FALSE Otherwise + @retval < 0 Error + @retval > 0 If queued as the first entry in the queue (meaning this + is the leader) + @retval 0 Otherwise (queued as participant, leader handles the commit) */ -bool +int MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) { group_commit_entry *entry, *orig_queue; - wait_for_commit *list, *cur, *last; + wait_for_commit *cur, *last; wait_for_commit *wfc; DBUG_ENTER("MYSQL_BIN_LOG::queue_for_group_commit"); @@ -6847,12 +6908,15 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) */ wfc= orig_entry->thd->wait_for_commit_ptr; orig_entry->queued_by_other= false; - if (wfc && wfc->waiting_for_commit) + if (wfc && wfc->waitee) { mysql_mutex_lock(&wfc->LOCK_wait_commit); /* Do an extra check here, this time safely under lock. */ - if (wfc->waiting_for_commit) + if (wfc->waitee) { + PSI_stage_info old_stage; + wait_for_commit *loc_waitee; + /* By setting wfc->opaque_pointer to our own entry, we mark that we are ready to commit, but waiting for another transaction to commit before @@ -6864,15 +6928,56 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) */ wfc->opaque_pointer= orig_entry; DEBUG_SYNC(orig_entry->thd, "group_commit_waiting_for_prior"); - do - { + orig_entry->thd->ENTER_COND(&wfc->COND_wait_commit, + &wfc->LOCK_wait_commit, + &stage_waiting_for_prior_transaction_to_commit, + &old_stage); + while ((loc_waitee= wfc->waitee) && !orig_entry->thd->check_killed()) mysql_cond_wait(&wfc->COND_wait_commit, &wfc->LOCK_wait_commit); - } while (wfc->waiting_for_commit); wfc->opaque_pointer= NULL; DBUG_PRINT("info", ("After waiting for prior commit, queued_by_other=%d", orig_entry->queued_by_other)); + + if (loc_waitee) + { + /* Wait terminated due to kill. */ + mysql_mutex_lock(&loc_waitee->LOCK_wait_commit); + if (loc_waitee->wakeup_subsequent_commits_running || + orig_entry->queued_by_other) + { + /* Our waitee is already waking us up, so ignore the kill. */ + mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit); + do + { + mysql_cond_wait(&wfc->COND_wait_commit, &wfc->LOCK_wait_commit); + } while (wfc->waitee); + } + else + { + /* We were killed, so remove us from the list of waitee. */ + wfc->remove_from_list(&loc_waitee->subsequent_commits_list); + mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit); + wfc->waitee= NULL; + + orig_entry->thd->EXIT_COND(&old_stage); + /* Interrupted by kill. */ + DEBUG_SYNC(orig_entry->thd, "group_commit_waiting_for_prior_killed"); + wfc->wakeup_error= orig_entry->thd->killed_errno(); + if (wfc->wakeup_error) + wfc->wakeup_error= ER_QUERY_INTERRUPTED; + my_message(wfc->wakeup_error, ER(wfc->wakeup_error), MYF(0)); + DBUG_RETURN(-1); + } + } + orig_entry->thd->EXIT_COND(&old_stage); } - mysql_mutex_unlock(&wfc->LOCK_wait_commit); + else + mysql_mutex_unlock(&wfc->LOCK_wait_commit); + } + if (wfc && wfc->wakeup_error) + { + my_error(ER_PRIOR_COMMIT_FAILED, MYF(0)); + DBUG_RETURN(-1); } /* @@ -6881,7 +6986,7 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) then there is nothing else to do. */ if (orig_entry->queued_by_other) - DBUG_RETURN(false); + DBUG_RETURN(0); /* Now enqueue ourselves in the group commit queue. */ DEBUG_SYNC(orig_entry->thd, "commit_before_enqueue"); @@ -6919,9 +7024,8 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) used by the caller or any other function. */ - list= wfc; - cur= list; - last= list; + cur= wfc; + last= wfc; entry= orig_entry; for (;;) { @@ -6947,11 +7051,11 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) */ if (cur->subsequent_commits_list) { - bool have_lock; wait_for_commit *waiter; + wait_for_commit *wakeup_list= NULL; + wait_for_commit **wakeup_next_ptr= &wakeup_list; mysql_mutex_lock(&cur->LOCK_wait_commit); - have_lock= true; /* Grab the list, now safely under lock, and process it if still non-empty. @@ -6992,18 +7096,68 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) For this, we need to set the "wakeup running" flag and release the waitee lock to avoid a deadlock, see comments on THD::wakeup_subsequent_commits2() for details. + + So we need to put these on a list and delay the wakeup until we + have released the lock. + */ + *wakeup_next_ptr= waiter; + wakeup_next_ptr= &waiter->next_subsequent_commit; + } + waiter= next; + } + if (wakeup_list) + { + /* Now release our lock and do the wakeups that were delayed above. */ + cur->wakeup_subsequent_commits_running= true; + mysql_mutex_unlock(&cur->LOCK_wait_commit); + for (;;) + { + wait_for_commit *next; + + /* + ToDo: We wakeup the waiter here, so that it can have the chance to + reach its own commit state and queue up for this same group commit, + if it is still pending. + + One problem with this is that if the waiter does not reach its own + commit state before this group commit starts, and then the group + commit fails (binlog write failure), we do not get to propagate + the error to the waiter. + + A solution for this could be to delay the wakeup until commit is + successful. But then we need to set a flag in the waitee that it is + already queued for group commit, so that the waiter can check this + flag and queue itself if it _does_ reach the commit state in time. + + (But error handling in case of binlog write failure is currently + broken in other ways, as well). */ - if (have_lock) + if (&wakeup_list->next_subsequent_commit == wakeup_next_ptr) { - have_lock= false; - cur->wakeup_subsequent_commits_running= true; - mysql_mutex_unlock(&cur->LOCK_wait_commit); + /* The last one in the list. */ + wakeup_list->wakeup(0); + break; } - waiter->wakeup(0); + /* + Important: don't access wakeup_list->next after the wakeup() call, + it may be invalidated by the other thread. + */ + next= wakeup_list->next_subsequent_commit; + wakeup_list->wakeup(0); + wakeup_list= next; } - waiter= next; + /* + We need a full memory barrier between walking the list and clearing + the flag wakeup_subsequent_commits_running. This barrier is needed + to ensure that no other thread will start to modify the list + pointers before we are done traversing the list. + + But wait_for_commit::wakeup(), which was called above, does a full + memory barrier already (it locks a mutex). + */ + cur->wakeup_subsequent_commits_running= false; } - if (have_lock) + else mysql_mutex_unlock(&cur->LOCK_wait_commit); } if (cur == last) @@ -7017,29 +7171,6 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) DBUG_ASSERT(entry != NULL); } - /* - Now we need to clear the wakeup_subsequent_commits_running flags. - - We need a full memory barrier between walking the list above, and clearing - the flag wakeup_subsequent_commits_running below. This barrier is needed - to ensure that no other thread will start to modify the list pointers - before we are done traversing the list. - - But wait_for_commit::wakeup(), which was called above for any other thread - that might modify the list in parallel, does a full memory barrier already - (it locks a mutex). - */ - if (list) - { - for (;;) - { - list->wakeup_subsequent_commits_running= false; - if (list == last) - break; - list= list->next_subsequent_commit; - } - } - if (opt_binlog_commit_wait_count > 0) mysql_cond_signal(&COND_prepare_ordered); mysql_mutex_unlock(&LOCK_prepare_ordered); @@ -7053,13 +7184,15 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) bool MYSQL_BIN_LOG::write_transaction_to_binlog_events(group_commit_entry *entry) { - bool is_leader= queue_for_group_commit(entry); + int is_leader= queue_for_group_commit(entry); /* The first in the queue handles group commit for all; the others just wait to be signalled when group commit is done. */ - if (is_leader) + if (is_leader < 0) + return true; /* Error */ + else if (is_leader) trx_group_commit_leader(entry); else if (!entry->queued_by_other) entry->thd->wait_for_wakeup_ready(); @@ -7423,16 +7556,17 @@ MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *entry, uint64 commit_id) { binlog_cache_mngr *mngr= entry->cache_mngr; + DBUG_ENTER("MYSQL_BIN_LOG::write_transaction_or_stmt"); if (write_gtid_event(entry->thd, false, entry->using_trx_cache, commit_id)) - return ER_ERROR_ON_WRITE; + DBUG_RETURN(ER_ERROR_ON_WRITE); if (entry->using_stmt_cache && !mngr->stmt_cache.empty() && write_cache(entry->thd, mngr->get_binlog_cache_log(FALSE))) { entry->error_cache= &mngr->stmt_cache.cache_log; entry->commit_errno= errno; - return ER_ERROR_ON_WRITE; + DBUG_RETURN(ER_ERROR_ON_WRITE); } if (entry->using_trx_cache && !mngr->trx_cache.empty()) @@ -7453,7 +7587,7 @@ MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *entry, { entry->error_cache= &mngr->trx_cache.cache_log; entry->commit_errno= errno; - return ER_ERROR_ON_WRITE; + DBUG_RETURN(ER_ERROR_ON_WRITE); } } @@ -7461,7 +7595,7 @@ MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *entry, { entry->error_cache= NULL; entry->commit_errno= errno; - return ER_ERROR_ON_WRITE; + DBUG_RETURN(ER_ERROR_ON_WRITE); } status_var_add(entry->thd->status_var.binlog_bytes_written, entry->end_event->data_written); @@ -7472,7 +7606,7 @@ MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *entry, { entry->error_cache= NULL; entry->commit_errno= errno; - return ER_ERROR_ON_WRITE; + DBUG_RETURN(ER_ERROR_ON_WRITE); } } @@ -7480,16 +7614,16 @@ MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *entry, { entry->error_cache= &mngr->stmt_cache.cache_log; entry->commit_errno= errno; - return ER_ERROR_ON_READ; + DBUG_RETURN(ER_ERROR_ON_WRITE); } if (mngr->get_binlog_cache_log(TRUE)->error) // Error on read { entry->error_cache= &mngr->trx_cache.cache_log; entry->commit_errno= errno; - return ER_ERROR_ON_READ; + DBUG_RETURN(ER_ERROR_ON_WRITE); } - return 0; + DBUG_RETURN(0); } @@ -8979,9 +9113,13 @@ TC_LOG_BINLOG::mark_xid_done(ulong binlog_id, bool write_checkpoint) locks in the opposite order. */ + ++mark_xid_done_waiting; mysql_mutex_unlock(&LOCK_xid_list); mysql_mutex_lock(&LOCK_log); mysql_mutex_lock(&LOCK_xid_list); + --mark_xid_done_waiting; + if (unlikely(reset_master_pending)) + mysql_cond_signal(&COND_xid_list); /* We need to reload current_binlog_id due to release/re-take of lock. */ current= current_binlog_id; @@ -9178,7 +9316,7 @@ start_binlog_background_thread() array_elements(all_binlog_threads)); #endif - if (mysql_thread_create(key_thread_binlog, &th, NULL, + if (mysql_thread_create(key_thread_binlog, &th, &connection_attrib, binlog_background_thread, NULL)) return 1; diff --git a/sql/log.h b/sql/log.h index 928c1058b7f..fb430e4c206 100644 --- a/sql/log.h +++ b/sql/log.h @@ -471,6 +471,7 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG checkpoint arrives - when all have arrived, RESET MASTER will complete. */ bool reset_master_pending; + ulong mark_xid_done_waiting; /* LOCK_log and LOCK_index are inited by init_pthread_objects() */ mysql_mutex_t LOCK_index; @@ -540,7 +541,7 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG void do_checkpoint_request(ulong binlog_id); void purge(); int write_transaction_or_stmt(group_commit_entry *entry, uint64 commit_id); - bool queue_for_group_commit(group_commit_entry *entry); + int queue_for_group_commit(group_commit_entry *entry); bool write_transaction_to_binlog_events(group_commit_entry *entry); void trx_group_commit_leader(group_commit_entry *leader); bool is_xidlist_idle_nolock(); @@ -833,8 +834,8 @@ public: }; -int check_if_log_table(size_t db_len, const char *db, size_t table_name_len, - const char *table_name, bool check_if_opened); +int check_if_log_table(const TABLE_LIST *table, bool check_if_opened, + const char *errmsg); class Log_to_csv_event_handler: public Log_event_handler { diff --git a/sql/log_event.cc b/sql/log_event.cc index de53a26dd81..9a792ad82a0 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -17,6 +17,7 @@ #include "sql_priv.h" +#include "mysqld_error.h" #ifndef MYSQL_CLIENT #include "my_global.h" // REQUIRED by log_event.h > m_string.h > my_bitmap.h @@ -752,7 +753,7 @@ static void print_set_option(IO_CACHE* file, uint32 bits_changed, { if (*need_comma) my_b_write(file, ", ", 2); - my_b_printf(file,"%s=%d", name, test(flags & option)); + my_b_printf(file, "%s=%d", name, MY_TEST(flags & option)); *need_comma= 1; } } @@ -1092,7 +1093,7 @@ my_bool Log_event::need_checksum() (checksum_alg != BINLOG_CHECKSUM_ALG_OFF) : ((binlog_checksum_options != BINLOG_CHECKSUM_ALG_OFF) && (cache_type == Log_event::EVENT_NO_CACHE)) ? - test(binlog_checksum_options) : FALSE); + MY_TEST(binlog_checksum_options) : FALSE); /* FD calls the methods before data_written has been calculated. @@ -2468,6 +2469,14 @@ Rows_log_event::print_verbose_one_row(IO_CACHE *file, table_def *td, else { my_b_printf(file, "### @%lu=", (ulong)i + 1); + size_t fsize= td->calc_field_size((uint)i, (uchar*) value); + if (value + fsize > m_rows_end) + { + my_b_printf(file, "***Corrupted replication event was detected." + " Not printing the value***\n"); + value+= fsize; + return 0; + } size_t size= log_event_print_value(file, value, td->type(i), td->field_metadata(i), typestr, sizeof(typestr)); @@ -3732,9 +3741,14 @@ Query_log_event::begin_event(String *packet, ulong ev_offset, DBUG_ASSERT(checksum_alg == BINLOG_CHECKSUM_ALG_UNDEF || checksum_alg == BINLOG_CHECKSUM_ALG_OFF); - /* Currently we only need to replace GTID event. */ - DBUG_ASSERT(data_len == LOG_EVENT_HEADER_LEN + GTID_HEADER_LEN); - if (data_len != LOG_EVENT_HEADER_LEN + GTID_HEADER_LEN) + /* + Currently we only need to replace GTID event. + The length of GTID differs depending on whether it contains commit id. + */ + DBUG_ASSERT(data_len == LOG_EVENT_HEADER_LEN + GTID_HEADER_LEN || + data_len == LOG_EVENT_HEADER_LEN + GTID_HEADER_LEN + 2); + if (data_len != LOG_EVENT_HEADER_LEN + GTID_HEADER_LEN && + data_len != LOG_EVENT_HEADER_LEN + GTID_HEADER_LEN + 2) return 1; flags= uint2korr(p + FLAGS_OFFSET); @@ -3747,9 +3761,22 @@ Query_log_event::begin_event(String *packet, ulong ev_offset, int4store(q + Q_EXEC_TIME_OFFSET, 0); q[Q_DB_LEN_OFFSET]= 0; int2store(q + Q_ERR_CODE_OFFSET, 0); - int2store(q + Q_STATUS_VARS_LEN_OFFSET, 0); - q[Q_DATA_OFFSET]= 0; /* Zero terminator for empty db */ - q+= Q_DATA_OFFSET + 1; + if (data_len == LOG_EVENT_HEADER_LEN + GTID_HEADER_LEN) + { + int2store(q + Q_STATUS_VARS_LEN_OFFSET, 0); + q[Q_DATA_OFFSET]= 0; /* Zero terminator for empty db */ + q+= Q_DATA_OFFSET + 1; + } + else + { + DBUG_ASSERT(data_len == LOG_EVENT_HEADER_LEN + GTID_HEADER_LEN + 2); + /* Put in an empty time_zone_str to take up the extra 2 bytes. */ + int2store(q + Q_STATUS_VARS_LEN_OFFSET, 2); + q[Q_DATA_OFFSET]= Q_TIME_ZONE_CODE; + q[Q_DATA_OFFSET+1]= 0; /* Zero length for empty time_zone_str */ + q[Q_DATA_OFFSET+2]= 0; /* Zero terminator for empty db */ + q+= Q_DATA_OFFSET + 3; + } memcpy(q, "BEGIN", 5); if (checksum_alg == BINLOG_CHECKSUM_ALG_CRC32) @@ -3989,6 +4016,8 @@ bool test_if_equal_repl_errors(int expected_error, int actual_error) case ER_AUTOINC_READ_FAILED: return (actual_error == ER_AUTOINC_READ_FAILED || actual_error == HA_ERR_AUTOINC_ERANGE); + case ER_UNKNOWN_TABLE: + return actual_error == ER_IT_IS_A_VIEW; default: break; } @@ -4027,6 +4056,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, #else Rpl_filter *rpl_filter= rli->mi->rpl_filter; #endif /* WITH_WSREP */ + bool current_stmt_is_commit; DBUG_ENTER("Query_log_event::do_apply_event"); /* @@ -4053,7 +4083,9 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, DBUG_PRINT("info", ("log_pos: %lu", (ulong) log_pos)); clear_all_errors(thd, const_cast<Relay_log_info*>(rli)); - if (strcmp("COMMIT", query) == 0 && rgi->tables_to_lock) + current_stmt_is_commit= is_commit(); + + if (current_stmt_is_commit && rgi->tables_to_lock) { /* Cleaning-up the last statement context: @@ -4102,9 +4134,11 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, thd->variables.pseudo_thread_id= thread_id; // for temp tables DBUG_PRINT("query",("%s", thd->query())); - if (ignored_error_code((expected_error= error_code)) || - !unexpected_error_code(expected_error)) + if (!(expected_error= error_code) || + ignored_error_code(expected_error) || + !unexpected_error_code(expected_error)) { + thd->slave_expected_error= expected_error; if (flags2_inited) /* all bits of thd->variables.option_bits which are 1 in OPTIONS_WRITTEN_TO_BIN_LOG @@ -4206,12 +4240,13 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, Record any GTID in the same transaction, so slave state is transactionally consistent. */ - if (strcmp("COMMIT", query) == 0 && (sub_id= rgi->gtid_sub_id)) + if (current_stmt_is_commit && (sub_id= rgi->gtid_sub_id)) { /* Clear the GTID from the RLI so we don't accidentally reuse it. */ rgi->gtid_sub_id= 0; gtid= rgi->current_gtid; + thd->variables.option_bits&= ~OPTION_GTID_BEGIN; if (rpl_global_gtid_slave_state.record_gtid(thd, >id, sub_id, true, false)) { rli->report(ERROR_LEVEL, ER_CANNOT_UPDATE_GTID_STATE, @@ -4241,6 +4276,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, concurrency_error_code(expected_error))) { thd->variables.option_bits|= OPTION_MASTER_SQL_ERROR; + thd->variables.option_bits&= ~OPTION_GTID_BEGIN; } /* Execute the query (note that we bypass dispatch_command()) */ Parser_state parser_state; @@ -4404,8 +4440,7 @@ Default database: '%s'. Query: '%s'", to shutdown trying to finish incomplete events group. */ DBUG_EXECUTE_IF("stop_slave_middle_group", - if (strcmp("COMMIT", query) != 0 && - strcmp("BEGIN", query) != 0) + if (!current_stmt_is_commit && is_begin() == 0) { if (thd->transaction.all.modified_non_trans_table) const_cast<Relay_log_info*>(rli)->abort_slave= 1; @@ -4466,7 +4501,7 @@ Query_log_event::do_shall_skip(rpl_group_info *rgi) { Relay_log_info *rli= rgi->rli; DBUG_ENTER("Query_log_event::do_shall_skip"); - DBUG_PRINT("debug", ("query: %s; q_len: %d", query, q_len)); + DBUG_PRINT("debug", ("query: '%s' q_len: %d", query, q_len)); DBUG_ASSERT(query && q_len > 0); DBUG_ASSERT(thd == rgi->thd); @@ -4482,13 +4517,13 @@ Query_log_event::do_shall_skip(rpl_group_info *rgi) { if (is_begin()) { - thd->variables.option_bits|= OPTION_BEGIN; + thd->variables.option_bits|= OPTION_BEGIN | OPTION_GTID_BEGIN; DBUG_RETURN(Log_event::continue_group(rgi)); } if (is_commit() || is_rollback()) { - thd->variables.option_bits&= ~OPTION_BEGIN; + thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_GTID_BEGIN); DBUG_RETURN(Log_event::EVENT_SKIP_COUNT); } } @@ -5559,11 +5594,22 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len, fields = (char*)field_lens + num_fields; table_name = fields + field_block_len; db = table_name + table_name_len + 1; + DBUG_EXECUTE_IF ("simulate_invalid_address", + db_len = data_len;); fname = db + db_len + 1; + if ((db_len > data_len) || (fname > buf_end)) + goto err; fname_len = (uint) strlen(fname); + if ((fname_len > data_len) || (fname + fname_len > buf_end)) + goto err; // null termination is accomplished by the caller doing buf[event_len]=0 DBUG_RETURN(0); + +err: + // Invalid event. + table_name = 0; + DBUG_RETURN(1); } @@ -5930,6 +5976,7 @@ error: thd->reset_query(); thd->get_stmt_da()->set_overwrite_status(true); thd->is_error() ? trans_rollback_stmt(thd) : trans_commit_stmt(thd); + thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_GTID_BEGIN); thd->get_stmt_da()->set_overwrite_status(false); close_thread_tables(thd); /* @@ -6232,6 +6279,16 @@ void Binlog_checkpoint_log_event::pack_info(THD *thd, Protocol *protocol) { protocol->store(binlog_file_name, binlog_file_len, &my_charset_bin); } + + +Log_event::enum_skip_reason +Binlog_checkpoint_log_event::do_shall_skip(rpl_group_info *rgi) +{ + enum_skip_reason reason= Log_event::do_shall_skip(rgi); + if (reason == EVENT_SKIP_COUNT) + reason= EVENT_SKIP_NOT; + return reason; +} #endif @@ -6432,8 +6489,7 @@ Gtid_log_event::make_compatible_event(String *packet, bool *need_dummy_event, { if (*need_dummy_event) return Query_log_event::dummy_event(packet, ev_offset, checksum_alg); - else - return 0; + return 0; } *need_dummy_event= true; @@ -6480,24 +6536,28 @@ Gtid_log_event::do_apply_event(rpl_group_info *rgi) this->server_id, this->seq_no)) return 1; } + + DBUG_ASSERT((thd->variables.option_bits & OPTION_GTID_BEGIN) == 0); if (flags2 & FL_STANDALONE) return 0; /* Execute this like a BEGIN query event. */ + thd->variables.option_bits|= OPTION_GTID_BEGIN; + DBUG_PRINT("info", ("Set OPTION_GTID_BEGIN")); thd->set_query_and_id(gtid_begin_string, sizeof(gtid_begin_string)-1, &my_charset_bin, next_query_id()); - Parser_state parser_state; - if (!parser_state.init(thd, thd->query(), thd->query_length())) - { - mysql_parse(thd, thd->query(), thd->query_length(), &parser_state); - /* Finalize server status flags after executing a statement. */ - thd->update_server_status(); - log_slow_statement(thd); - if (unlikely(thd->is_fatal_error)) - thd->is_slave_error= 1; - else if (likely(!thd->is_slave_error)) - general_log_write(thd, COM_QUERY, thd->query(), thd->query_length()); + thd->lex->sql_command= SQLCOM_BEGIN; + thd->is_slave_error= 0; + status_var_increment(thd->status_var.com_stat[thd->lex->sql_command]); + if (trans_begin(thd, 0)) + { + DBUG_PRINT("error", ("trans_begin() failed")); + thd->is_slave_error= 1; } + thd->update_stats(); + + if (likely(!thd->is_slave_error)) + general_log_write(thd, COM_QUERY, thd->query(), thd->query_length()); thd->reset_query(); free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC)); @@ -6759,7 +6819,7 @@ Gtid_list_log_event::write(IO_CACHE *file) int Gtid_list_log_event::do_apply_event(rpl_group_info *rgi) { - Relay_log_info const *rli= rgi->rli; + Relay_log_info *rli= const_cast<Relay_log_info*>(rgi->rli); int ret; if (gl_flags & FLAG_IGN_GTIDS) { @@ -6779,15 +6839,26 @@ Gtid_list_log_event::do_apply_event(rpl_group_info *rgi) { char str_buf[128]; String str(str_buf, sizeof(str_buf), system_charset_info); - const_cast<Relay_log_info*>(rli)->until_gtid_pos.to_string(&str); + rli->until_gtid_pos.to_string(&str); sql_print_information("Slave SQL thread stops because it reached its" " UNTIL master_gtid_pos %s", str.c_ptr_safe()); - const_cast<Relay_log_info*>(rli)->abort_slave= true; + rli->abort_slave= true; + rli->stop_for_until= true; } return ret; } +Log_event::enum_skip_reason +Gtid_list_log_event::do_shall_skip(rpl_group_info *rgi) +{ + enum_skip_reason reason= Log_event::do_shall_skip(rgi); + if (reason == EVENT_SKIP_COUNT) + reason= EVENT_SKIP_NOT; + return reason; +} + + void Gtid_list_log_event::pack_info(THD *thd, Protocol *protocol) { @@ -7012,9 +7083,7 @@ int Intvar_log_event::do_apply_event(rpl_group_info *rgi) switch (type) { case LAST_INSERT_ID_EVENT: - thd->stmt_depends_on_first_successful_insert_id_in_prev_stmt= 1; - thd->first_successful_insert_id_in_prev_stmt_for_binlog= - thd->first_successful_insert_id_in_prev_stmt= val; + thd->first_successful_insert_id_in_prev_stmt= val; DBUG_PRINT("info",("last_insert_id_event: %ld", (long) val)); break; case INSERT_ID_EVENT: @@ -7276,10 +7345,11 @@ int Xid_log_event::do_apply_event(rpl_group_info *rgi) /* For a slave Xid_log_event is COMMIT */ general_log_print(thd, COM_QUERY, "COMMIT /* implicit, from Xid_log_event */"); + thd->variables.option_bits&= ~OPTION_GTID_BEGIN; res= trans_commit(thd); /* Automatically rolls back on error. */ thd->mdl_context.release_transactional_locks(); - if (sub_id) + if (!res && sub_id) rpl_global_gtid_slave_state.update_state_hash(sub_id, >id); /* @@ -7297,7 +7367,7 @@ Xid_log_event::do_shall_skip(rpl_group_info *rgi) if (rgi->rli->slave_skip_counter > 0) { DBUG_ASSERT(!rgi->rli->get_flag(Relay_log_info::IN_TRANSACTION)); - thd->variables.option_bits&= ~OPTION_BEGIN; + thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_GTID_BEGIN); DBUG_RETURN(Log_event::EVENT_SKIP_COUNT); } #ifdef WITH_WSREP @@ -9168,8 +9238,8 @@ Rows_log_event::Rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid, set_flags(NO_FOREIGN_KEY_CHECKS_F); if (thd_arg->variables.option_bits & OPTION_RELAXED_UNIQUE_CHECKS) set_flags(RELAXED_UNIQUE_CHECKS_F); - /* if bitmap_init fails, caught in is_valid() */ - if (likely(!bitmap_init(&m_cols, + /* if my_bitmap_init fails, caught in is_valid() */ + if (likely(!my_bitmap_init(&m_cols, m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL, m_width, false))) @@ -9183,7 +9253,7 @@ Rows_log_event::Rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid, } else { - // Needed because bitmap_init() does not set it to null on failure + // Needed because my_bitmap_init() does not set it to null on failure m_cols.bitmap= 0; } } @@ -9284,8 +9354,8 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len, DBUG_PRINT("debug", ("Reading from %p", ptr_after_width)); m_width = net_field_length(&ptr_after_width); DBUG_PRINT("debug", ("m_width=%lu", m_width)); - /* if bitmap_init fails, catched in is_valid() */ - if (likely(!bitmap_init(&m_cols, + /* if my_bitmap_init fails, catched in is_valid() */ + if (likely(!my_bitmap_init(&m_cols, m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL, m_width, false))) @@ -9298,7 +9368,7 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len, } else { - // Needed because bitmap_init() does not set it to null on failure + // Needed because my_bitmap_init() does not set it to null on failure m_cols.bitmap= NULL; DBUG_VOID_RETURN; } @@ -9310,8 +9380,8 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len, { DBUG_PRINT("debug", ("Reading from %p", ptr_after_width)); - /* if bitmap_init fails, caught in is_valid() */ - if (likely(!bitmap_init(&m_cols_ai, + /* if my_bitmap_init fails, caught in is_valid() */ + if (likely(!my_bitmap_init(&m_cols_ai, m_width <= sizeof(m_bitbuf_ai)*8 ? m_bitbuf_ai : NULL, m_width, false))) @@ -9325,7 +9395,7 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len, } else { - // Needed because bitmap_init() does not set it to null on failure + // Needed because my_bitmap_init() does not set it to null on failure m_cols_ai.bitmap= 0; DBUG_VOID_RETURN; } @@ -9356,8 +9426,8 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len, Rows_log_event::~Rows_log_event() { if (m_cols.bitmap == m_bitbuf) // no my_malloc happened - m_cols.bitmap= 0; // so no my_free in bitmap_free - bitmap_free(&m_cols); // To pair with bitmap_init(). + m_cols.bitmap= 0; // so no my_free in my_bitmap_free + my_bitmap_free(&m_cols); // To pair with my_bitmap_init(). my_free(m_rows_buf); my_free(m_extra_row_data); } @@ -12073,8 +12143,8 @@ Update_rows_log_event::Update_rows_log_event(THD *thd_arg, TABLE *tbl_arg, void Update_rows_log_event::init(MY_BITMAP const *cols) { - /* if bitmap_init fails, caught in is_valid() */ - if (likely(!bitmap_init(&m_cols_ai, + /* if my_bitmap_init fails, caught in is_valid() */ + if (likely(!my_bitmap_init(&m_cols_ai, m_width <= sizeof(m_bitbuf_ai)*8 ? m_bitbuf_ai : NULL, m_width, false))) @@ -12093,8 +12163,8 @@ void Update_rows_log_event::init(MY_BITMAP const *cols) Update_rows_log_event::~Update_rows_log_event() { if (m_cols_ai.bitmap == m_bitbuf_ai) // no my_malloc happened - m_cols_ai.bitmap= 0; // so no my_free in bitmap_free - bitmap_free(&m_cols_ai); // To pair with bitmap_init(). + m_cols_ai.bitmap= 0; // so no my_free in my_bitmap_free + my_bitmap_free(&m_cols_ai); // To pair with my_bitmap_init(). } diff --git a/sql/log_event.h b/sql/log_event.h index cd00b40f080..a9d1b08171f 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -3075,6 +3075,7 @@ public: bool is_valid() const { return binlog_file_name != 0; } #ifdef MYSQL_SERVER bool write(IO_CACHE* file); + enum_skip_reason do_shall_skip(rpl_group_info *rgi); #endif }; @@ -3122,12 +3123,15 @@ public: <td>flags</td> <td>1 byte bitfield</td> <td>Bit 0 set indicates stand-alone event (no terminating COMMIT)</td> + <td>Bit 1 set indicates group commit, and that commit id exists</td> </tr> <tr> - <td>Reserved</td> - <td>6 bytes</td> - <td>Reserved bytes, set to 0. Maybe be used for future expansion.</td> + <td>Reserved (no group commit) / commit id (group commit) (see flags bit 1)</td> + <td>6 bytes / 8 bytes</td> + <td>Reserved bytes, set to 0. Maybe be used for future expansion (no + group commit). OR commit id, same for all GTIDs in the same group + commit (see flags bit 1).</td> </tr> </table> @@ -3292,6 +3296,7 @@ public: bool to_packet(String *packet); bool write(IO_CACHE *file); virtual int do_apply_event(rpl_group_info *rgi); + enum_skip_reason do_shall_skip(rpl_group_info *rgi); #endif static bool peek(const char *event_start, uint32 event_len, uint8 checksum_alg, @@ -4321,13 +4326,8 @@ protected: DBUG_ASSERT(m_table); ASSERT_OR_RETURN_ERROR(m_curr_row < m_rows_end, HA_ERR_CORRUPT_EVENT); - int const result= ::unpack_row(rgi, m_table, m_width, m_curr_row, - m_rows_end, &m_cols, - &m_curr_row_end, &m_master_reclength); - if (m_curr_row_end > m_rows_end) - my_error(ER_SLAVE_CORRUPT_EVENT, MYF(0)); - ASSERT_OR_RETURN_ERROR(m_curr_row_end <= m_rows_end, HA_ERR_CORRUPT_EVENT); - return result; + return ::unpack_row(rgi, m_table, m_width, m_curr_row, &m_cols, + &m_curr_row_end, &m_master_reclength, m_rows_end); } #endif diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 7b89d5bdf08..0cb78686243 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -1244,8 +1244,8 @@ Old_rows_log_event::Old_rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid, set_flags(NO_FOREIGN_KEY_CHECKS_F); if (thd_arg->variables.option_bits & OPTION_RELAXED_UNIQUE_CHECKS) set_flags(RELAXED_UNIQUE_CHECKS_F); - /* if bitmap_init fails, caught in is_valid() */ - if (likely(!bitmap_init(&m_cols, + /* if my_bitmap_init fails, caught in is_valid() */ + if (likely(!my_bitmap_init(&m_cols, m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL, m_width, false))) @@ -1259,7 +1259,7 @@ Old_rows_log_event::Old_rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid, } else { - // Needed because bitmap_init() does not set it to null on failure + // Needed because my_bitmap_init() does not set it to null on failure m_cols.bitmap= 0; } } @@ -1313,8 +1313,8 @@ Old_rows_log_event::Old_rows_log_event(const char *buf, uint event_len, DBUG_PRINT("debug", ("Reading from %p", ptr_after_width)); m_width = net_field_length(&ptr_after_width); DBUG_PRINT("debug", ("m_width=%lu", m_width)); - /* if bitmap_init fails, catched in is_valid() */ - if (likely(!bitmap_init(&m_cols, + /* if my_bitmap_init fails, catched in is_valid() */ + if (likely(!my_bitmap_init(&m_cols, m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL, m_width, false))) @@ -1327,7 +1327,7 @@ Old_rows_log_event::Old_rows_log_event(const char *buf, uint event_len, } else { - // Needed because bitmap_init() does not set it to null on failure + // Needed because my_bitmap_init() does not set it to null on failure m_cols.bitmap= NULL; DBUG_VOID_RETURN; } @@ -1358,8 +1358,8 @@ Old_rows_log_event::Old_rows_log_event(const char *buf, uint event_len, Old_rows_log_event::~Old_rows_log_event() { if (m_cols.bitmap == m_bitbuf) // no my_malloc happened - m_cols.bitmap= 0; // so no my_free in bitmap_free - bitmap_free(&m_cols); // To pair with bitmap_init(). + m_cols.bitmap= 0; // so no my_free in my_bitmap_free + my_bitmap_free(&m_cols); // To pair with my_bitmap_init(). my_free(m_rows_buf); } diff --git a/sql/log_event_old.h b/sql/log_event_old.h index 97fc24a1bef..7408e121f96 100644 --- a/sql/log_event_old.h +++ b/sql/log_event_old.h @@ -1,4 +1,4 @@ -/* Copyright 2007 MySQL AB. +/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -207,11 +207,8 @@ protected: { DBUG_ASSERT(m_table); ASSERT_OR_RETURN_ERROR(m_curr_row < m_rows_end, HA_ERR_CORRUPT_EVENT); - int const result= ::unpack_row(rgi, m_table, m_width, m_curr_row, - m_rows_end, &m_cols, - &m_curr_row_end, &m_master_reclength); - ASSERT_OR_RETURN_ERROR(m_curr_row_end <= m_rows_end, HA_ERR_CORRUPT_EVENT); - return result; + return ::unpack_row(rgi, m_table, m_width, m_curr_row, &m_cols, + &m_curr_row_end, &m_master_reclength, m_rows_end); } #endif diff --git a/sql/mdl.cc b/sql/mdl.cc index 2f00388a14b..7ef105b9269 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -136,15 +136,9 @@ class MDL_map_partition public: MDL_map_partition(); ~MDL_map_partition(); - inline MDL_lock *find_or_insert(const MDL_key *mdl_key, - my_hash_value_type hash_value); - unsigned long get_lock_owner(const MDL_key *key, - my_hash_value_type hash_value); + inline MDL_lock *find_or_insert(const MDL_key *mdl_key); + unsigned long get_lock_owner(const MDL_key *key); inline void remove(MDL_lock *lock); - my_hash_value_type get_key_hash(const MDL_key *mdl_key) const - { - return my_calc_hash(&m_locks, mdl_key->ptr(), mdl_key->length()); - } private: bool move_from_hash_to_lock_mutex(MDL_lock *lock); /** A partition of all acquired locks in the server. */ @@ -778,13 +772,21 @@ void MDL_map::init() } +my_hash_value_type mdl_hash_function(const CHARSET_INFO *cs, + const uchar *key, size_t length) +{ + MDL_key *mdl_key= (MDL_key*) (key - offsetof(MDL_key, m_ptr)); + return mdl_key->hash_value(); +} + + /** Initialize the partition in the container with all MDL locks. */ MDL_map_partition::MDL_map_partition() { mysql_mutex_init(key_MDL_map_mutex, &m_mutex, NULL); - my_hash_init(&m_locks, &my_charset_bin, 16 /* FIXME */, 0, 0, - mdl_locks_key, 0, 0); + my_hash_init2(&m_locks, 0, &my_charset_bin, 16 /* FIXME */, 0, 0, + mdl_locks_key, mdl_hash_function, 0, 0); }; @@ -858,11 +860,10 @@ MDL_lock* MDL_map::find_or_insert(const MDL_key *mdl_key) return lock; } - my_hash_value_type hash_value= m_partitions.at(0)->get_key_hash(mdl_key); - uint part_id= hash_value % mdl_locks_hash_partitions; + uint part_id= mdl_key->hash_value() % mdl_locks_hash_partitions; MDL_map_partition *part= m_partitions.at(part_id); - return part->find_or_insert(mdl_key, hash_value); + return part->find_or_insert(mdl_key); } @@ -875,15 +876,14 @@ MDL_lock* MDL_map::find_or_insert(const MDL_key *mdl_key) @retval NULL - Failure (OOM). */ -MDL_lock* MDL_map_partition::find_or_insert(const MDL_key *mdl_key, - my_hash_value_type hash_value) +MDL_lock* MDL_map_partition::find_or_insert(const MDL_key *mdl_key) { MDL_lock *lock; retry: mysql_mutex_lock(&m_mutex); if (!(lock= (MDL_lock*) my_hash_search_using_hash_value(&m_locks, - hash_value, + mdl_key->hash_value(), mdl_key->ptr(), mdl_key->length()))) { @@ -1035,10 +1035,9 @@ MDL_map::get_lock_owner(const MDL_key *mdl_key) } else { - my_hash_value_type hash_value= m_partitions.at(0)->get_key_hash(mdl_key); - uint part_id= hash_value % mdl_locks_hash_partitions; + uint part_id= mdl_key->hash_value() % mdl_locks_hash_partitions; MDL_map_partition *part= m_partitions.at(part_id); - res= part->get_lock_owner(mdl_key, hash_value); + res= part->get_lock_owner(mdl_key); } return res; } @@ -1046,15 +1045,14 @@ MDL_map::get_lock_owner(const MDL_key *mdl_key) unsigned long -MDL_map_partition::get_lock_owner(const MDL_key *mdl_key, - my_hash_value_type hash_value) +MDL_map_partition::get_lock_owner(const MDL_key *mdl_key) { MDL_lock *lock; unsigned long res= 0; mysql_mutex_lock(&m_mutex); lock= (MDL_lock*) my_hash_search_using_hash_value(&m_locks, - hash_value, + mdl_key->hash_value(), mdl_key->ptr(), mdl_key->length()); if (lock) diff --git a/sql/mdl.h b/sql/mdl.h index b1e6bfa428a..13c098e26d8 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -28,6 +28,7 @@ #include <my_sys.h> #include <m_string.h> #include <mysql_com.h> +#include <hash.h> #include <algorithm> @@ -347,12 +348,15 @@ public: m_ptr - 1); m_length= static_cast<uint16>(strmake(m_ptr + m_db_name_length + 2, name, NAME_LEN) - m_ptr + 1); + m_hash_value= my_hash_sort(&my_charset_bin, (uchar*) m_ptr + 1, + m_length - 1); } void mdl_key_init(const MDL_key *rhs) { memcpy(m_ptr, rhs->m_ptr, rhs->m_length); m_length= rhs->m_length; m_db_name_length= rhs->m_db_name_length; + m_hash_value= rhs->m_hash_value; } bool is_equal(const MDL_key *rhs) const { @@ -392,15 +396,26 @@ public: { return & m_namespace_to_wait_state_name[(int)mdl_namespace()]; } + my_hash_value_type hash_value() const + { + return m_hash_value + mdl_namespace(); + } + my_hash_value_type tc_hash_value() const + { + return m_hash_value; + } private: uint16 m_length; uint16 m_db_name_length; + my_hash_value_type m_hash_value; char m_ptr[MAX_MDLKEY_LENGTH]; static PSI_stage_info m_namespace_to_wait_state_name[NAMESPACE_END]; private: MDL_key(const MDL_key &); /* not implemented */ MDL_key &operator=(const MDL_key &); /* not implemented */ + friend my_hash_value_type mdl_hash_function(const CHARSET_INFO *, + const uchar *, size_t); }; diff --git a/sql/mem_root_array.h b/sql/mem_root_array.h index 9dc9638c13f..2dcc475cd7b 100644 --- a/sql/mem_root_array.h +++ b/sql/mem_root_array.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2012, 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 diff --git a/sql/message.h b/sql/message.h index dac0576d0c4..6641453a965 100644 --- a/sql/message.h +++ b/sql/message.h @@ -1,77 +1,77 @@ -#ifndef MESSAGE_INCLUDED
-#define MESSAGE_INCLUDED
-/* Copyright (c) 2008, 2009 Sun Microsystems, Inc.
- Use is subject to license terms.
-
- 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 */
-
-/*
- To change or add messages mysqld writes to the Windows error log, run
- mc.exe message.mc
- and checkin generated messages.h, messages.rc and msg000001.bin under the
- source control.
- mc.exe can be installed with Windows SDK, some Visual Studio distributions
- do not include it.
-*/
-
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-
-//
-// Define the severity codes
-//
-
-
-//
-// MessageId: MSG_DEFAULT
-//
-// MessageText:
-//
-// %1For more information, see Help and Support Center at http://www.mysql.com.
-//
-//
-//
-#define MSG_DEFAULT 0xC0000064L
-
-#endif /* MESSAGE_INCLUDED */
-
+#ifndef MESSAGE_INCLUDED +#define MESSAGE_INCLUDED +/* Copyright (c) 2008, 2009 Sun Microsystems, Inc. + Use is subject to license terms. + + 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 */ + +/* + To change or add messages mysqld writes to the Windows error log, run + mc.exe message.mc + and checkin generated messages.h, messages.rc and msg000001.bin under the + source control. + mc.exe can be installed with Windows SDK, some Visual Studio distributions + do not include it. +*/ + + +// +// Values are 32 bit values layed out as follows: +// +// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +---+-+-+-----------------------+-------------------------------+ +// |Sev|C|R| Facility | Code | +// +---+-+-+-----------------------+-------------------------------+ +// +// where +// +// Sev - is the severity code +// +// 00 - Success +// 01 - Informational +// 10 - Warning +// 11 - Error +// +// C - is the Customer code flag +// +// R - is a reserved bit +// +// Facility - is the facility code +// +// Code - is the facility's status code +// +// +// Define the facility codes +// + + +// +// Define the severity codes +// + + +// +// MessageId: MSG_DEFAULT +// +// MessageText: +// +// %1For more information, see Help and Support Center at http://www.mysql.com. +// +// +// +#define MSG_DEFAULT 0xC0000064L + +#endif /* MESSAGE_INCLUDED */ + diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc index 03023927a1d..0c35ac5b029 100644 --- a/sql/multi_range_read.cc +++ b/sql/multi_range_read.cc @@ -225,7 +225,7 @@ handler::multi_range_read_init(RANGE_SEQ_IF *seq_funcs, void *seq_init_param, DBUG_ENTER("handler::multi_range_read_init"); mrr_iter= seq_funcs->init(seq_init_param, n_ranges, mode); mrr_funcs= *seq_funcs; - mrr_is_output_sorted= test(mode & HA_MRR_SORTED); + mrr_is_output_sorted= MY_TEST(mode & HA_MRR_SORTED); mrr_have_range= FALSE; DBUG_RETURN(0); } @@ -292,7 +292,7 @@ scan_it_again: &mrr_cur_range.start_key : 0, mrr_cur_range.end_key.keypart_map ? &mrr_cur_range.end_key : 0, - test(mrr_cur_range.range_flag & EQ_RANGE), + MY_TEST(mrr_cur_range.range_flag & EQ_RANGE), mrr_is_output_sorted); if (result != HA_ERR_END_OF_FILE) break; @@ -549,12 +549,12 @@ int Mrr_ordered_index_reader::init(handler *h_arg, RANGE_SEQ_IF *seq_funcs, keypar= *key_par_arg; KEY *key_info= &file->get_table()->key_info[file->active_index]; - keypar.index_ranges_unique= test(key_info->flags & HA_NOSAME && - key_info->user_defined_key_parts == - my_count_bits(keypar.key_tuple_map)); + keypar.index_ranges_unique= MY_TEST(key_info->flags & HA_NOSAME && + key_info->user_defined_key_parts == + my_count_bits(keypar.key_tuple_map)); mrr_iter= seq_funcs->init(seq_init_param, n_ranges, mode); - is_mrr_assoc= !test(mode & HA_MRR_NO_ASSOCIATION); + is_mrr_assoc= !MY_TEST(mode & HA_MRR_NO_ASSOCIATION); mrr_funcs= *seq_funcs; source_exhausted= FALSE; if (support_scan_interruptions) @@ -578,7 +578,7 @@ int Mrr_ordered_rndpos_reader::init(handler *h_arg, file= h_arg; index_reader= index_reader_arg; rowid_buffer= buf; - is_mrr_assoc= !test(mode & HA_MRR_NO_ASSOCIATION); + is_mrr_assoc= !MY_TEST(mode & HA_MRR_NO_ASSOCIATION); index_reader_exhausted= FALSE; index_reader_needs_refill= TRUE; return 0; @@ -817,7 +817,7 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs, has not been called, so set the owner handler here as well. */ primary_file= h_arg; - is_mrr_assoc= !test(mode & HA_MRR_NO_ASSOCIATION); + is_mrr_assoc= !MY_TEST(mode & HA_MRR_NO_ASSOCIATION); strategy_exhausted= FALSE; @@ -867,7 +867,7 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs, if (do_sort_keys) { /* Pre-calculate some parameters of key sorting */ - keypar.use_key_pointers= test(mode & HA_MRR_MATERIALIZED_KEYS); + keypar.use_key_pointers= MY_TEST(mode & HA_MRR_MATERIALIZED_KEYS); seq_funcs->get_key_info(seq_init_param, &keypar.key_tuple_length, &keypar.key_tuple_map); keypar.key_size_in_keybuf= keypar.use_key_pointers? @@ -996,7 +996,7 @@ use_default_impl: so small that it can accomodate one rowid and one index tuple) */ if ((res= primary_file->ha_rnd_end()) || - (res= primary_file->ha_index_init(keyno, test(mode & HA_MRR_SORTED)))) + (res= primary_file->ha_index_init(keyno, MY_TEST(mode & HA_MRR_SORTED)))) { DBUG_RETURN(res); } @@ -1521,10 +1521,10 @@ bool key_uses_partial_cols(TABLE_SHARE *share, uint keyno) bool DsMrr_impl::check_cpk_scan(THD *thd, TABLE_SHARE *share, uint keyno, uint mrr_flags) { - return test((mrr_flags & HA_MRR_SINGLE_POINT) && - keyno == share->primary_key && - primary_file->primary_key_is_clustered() && - optimizer_flag(thd, OPTIMIZER_SWITCH_MRR_SORT_KEYS)); + return MY_TEST((mrr_flags & HA_MRR_SINGLE_POINT) && + keyno == share->primary_key && + primary_file->primary_key_is_clustered() && + optimizer_flag(thd, OPTIMIZER_SWITCH_MRR_SORT_KEYS)); } @@ -1561,8 +1561,8 @@ bool DsMrr_impl::choose_mrr_impl(uint keyno, ha_rows rows, uint *flags, TABLE_SHARE *share= primary_file->get_table_share(); bool doing_cpk_scan= check_cpk_scan(thd, share, keyno, *flags); - bool using_cpk= test(keyno == share->primary_key && - primary_file->primary_key_is_clustered()); + bool using_cpk= MY_TEST(keyno == share->primary_key && + primary_file->primary_key_is_clustered()); *flags &= ~HA_MRR_IMPLEMENTATION_FLAGS; if (!optimizer_flag(thd, OPTIMIZER_SWITCH_MRR) || *flags & HA_MRR_INDEX_ONLY || @@ -1685,7 +1685,7 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags, double index_read_cost; elem_size= primary_file->ref_length + - sizeof(void*) * (!test(flags & HA_MRR_NO_ASSOCIATION)); + sizeof(void*) * (!MY_TEST(flags & HA_MRR_NO_ASSOCIATION)); max_buff_entries = *buffer_size / elem_size; if (!max_buff_entries) diff --git a/sql/my_apc.h b/sql/my_apc.h index 4643e641ff1..dfeef5eb8ac 100644 --- a/sql/my_apc.h +++ b/sql/my_apc.h @@ -62,7 +62,7 @@ public: */ inline bool have_apc_requests() { - return test(apc_calls); + return MY_TEST(apc_calls); } inline bool is_enabled() { return enabled; } diff --git a/sql/my_decimal.h b/sql/my_decimal.h index e561d180d12..fa85b41d70c 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -1,5 +1,5 @@ -/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. - Copyright (c) 2011 Monty Program Ab +/* Copyright (c) 2005, 2013, Oracle and/or its affiliates. + Copyright (c) 2011, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/mysqld.cc b/sql/mysqld.cc index e486630f390..0997d30d88e 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 2008, 2013, Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2008, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -380,7 +380,8 @@ static DYNAMIC_ARRAY all_options; ulong my_bind_addr; #endif /* WITH_WSREP */ bool opt_bin_log, opt_bin_log_used=0, opt_ignore_builtin_innodb= 0; -my_bool opt_log, opt_slow_log, debug_assert_if_crashed_table= 0, opt_help= 0, opt_abort; +my_bool opt_log, opt_slow_log, debug_assert_if_crashed_table= 0, opt_help= 0; +static my_bool opt_abort; ulonglong log_output_options; my_bool opt_userstat_running; my_bool opt_log_queries_not_using_indexes= 0; @@ -496,6 +497,7 @@ ulong open_files_limit, max_binlog_size; ulong slave_trans_retries; uint slave_net_timeout; ulong slave_exec_mode_options; +ulong slave_ddl_exec_mode_options= SLAVE_EXEC_MODE_IDEMPOTENT; ulonglong slave_type_conversions_options; ulong thread_cache_size=0; ulonglong binlog_cache_size=0; @@ -565,6 +567,7 @@ ulong rpl_recovery_rank=0; ulong stored_program_cache_size= 0; ulong opt_slave_parallel_threads= 0; +ulong opt_slave_domain_parallel_threads= 0; ulong opt_binlog_commit_wait_count= 0; ulong opt_binlog_commit_wait_usec= 0; ulong opt_slave_parallel_max_queued= 131072; @@ -905,6 +908,7 @@ PSI_mutex_key key_LOCK_stats, key_LOCK_global_user_client_stats, key_LOCK_global_table_stats, key_LOCK_global_index_stats, key_LOCK_wakeup_ready, key_LOCK_wait_commit; +PSI_mutex_key key_LOCK_gtid_waiting; PSI_mutex_key key_LOCK_prepare_ordered, key_LOCK_commit_ordered; PSI_mutex_key key_TABLE_SHARE_LOCK_share; @@ -950,6 +954,7 @@ static PSI_mutex_info all_server_mutexes[]= { &key_LOCK_global_index_stats, "LOCK_global_index_stats", PSI_FLAG_GLOBAL}, { &key_LOCK_wakeup_ready, "THD::LOCK_wakeup_ready", 0}, { &key_LOCK_wait_commit, "wait_for_commit::LOCK_wait_commit", 0}, + { &key_LOCK_gtid_waiting, "gtid_waiting::LOCK_gtid_waiting", 0}, { &key_LOCK_thd_data, "THD::LOCK_thd_data", 0}, { &key_LOCK_user_conn, "LOCK_user_conn", PSI_FLAG_GLOBAL}, { &key_LOCK_uuid_short_generator, "LOCK_uuid_short_generator", PSI_FLAG_GLOBAL}, @@ -1036,8 +1041,11 @@ PSI_cond_key key_RELAYLOG_update_cond, key_COND_wakeup_ready, key_COND_wait_commit; PSI_cond_key key_RELAYLOG_COND_queue_busy; PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy; -PSI_cond_key key_COND_rpl_thread, key_COND_rpl_thread_pool, - key_COND_parallel_entry, key_COND_prepare_ordered; +PSI_cond_key key_COND_rpl_thread_queue, key_COND_rpl_thread, + key_COND_rpl_thread_pool, + key_COND_parallel_entry, key_COND_group_commit_orderer, + key_COND_prepare_ordered; +PSI_cond_key key_COND_wait_gtid; static PSI_cond_info all_server_conds[]= { @@ -1089,9 +1097,12 @@ static PSI_cond_info all_server_conds[]= #endif { &key_COND_flush_thread_cache, "COND_flush_thread_cache", PSI_FLAG_GLOBAL}, { &key_COND_rpl_thread, "COND_rpl_thread", 0}, + { &key_COND_rpl_thread_queue, "COND_rpl_thread_queue", 0}, { &key_COND_rpl_thread_pool, "COND_rpl_thread_pool", 0}, { &key_COND_parallel_entry, "COND_parallel_entry", 0}, - { &key_COND_prepare_ordered, "COND_prepare_ordered", 0} + { &key_COND_group_commit_orderer, "COND_group_commit_orderer", 0}, + { &key_COND_prepare_ordered, "COND_prepare_ordered", 0}, + { &key_COND_wait_gtid, "COND_wait_gtid", 0} }; PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert, @@ -2060,6 +2071,7 @@ static void mysqld_exit(int exit_code) but if a kill -15 signal was sent, the signal thread did spawn the kill_server_thread thread, which is running concurrently. */ + rpl_deinit_gtid_waiting(); rpl_deinit_gtid_slave_state(); wait_for_signal_thread_to_end(); mysql_audit_finalize(); @@ -2085,7 +2097,7 @@ void clean_up(bool print_message) // We must call end_slave() as clean_up may have been called during startup end_slave(); if (use_slave_mask) - bitmap_free(&slave_error_mask); + my_bitmap_free(&slave_error_mask); #endif stop_handle_manager(); release_ddl_log(); @@ -2139,7 +2151,7 @@ void clean_up(bool print_message) if (defaults_argv) free_defaults(defaults_argv); free_tmpdir(&mysql_tmpdir_list); - bitmap_free(&temp_pool); + my_bitmap_free(&temp_pool); free_max_user_conn(); free_global_user_stats(); free_global_client_stats(); @@ -3536,7 +3548,6 @@ void my_message_sql(uint error, const char *str, myf MyFlags) DBUG_ASSERT(str != NULL); DBUG_ASSERT(error != 0); - mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_ERROR, error, str); if (MyFlags & ME_JUST_INFO) { level= Sql_condition::WARN_LEVEL_NOTE; @@ -3559,6 +3570,8 @@ void my_message_sql(uint error, const char *str, myf MyFlags) thd->is_fatal_error= 1; (void) thd->raise_condition(error, NULL, level, str); } + else + mysql_audit_general(0, MYSQL_AUDIT_GENERAL_ERROR, error, str); /* When simulating OOM, skip writing to error log to avoid mtr errors */ DBUG_EXECUTE_IF("simulate_out_of_memory", DBUG_VOID_RETURN;); @@ -4407,7 +4420,7 @@ static int init_common_variables() #endif /* defined(ENABLED_DEBUG_SYNC) */ #if (ENABLE_TEMP_POOL) - if (use_temp_pool && bitmap_init(&temp_pool,0,1024,1)) + if (use_temp_pool && my_bitmap_init(&temp_pool,0,1024,1)) return 1; #else use_temp_pool= 0; @@ -4553,6 +4566,7 @@ static int init_thread_environment() #ifdef HAVE_REPLICATION rpl_init_gtid_slave_state(); + rpl_init_gtid_waiting(); #endif #ifdef WITH_WSREP @@ -6323,7 +6337,7 @@ default_service_handling(char **argv, /* We have to quote filename if it contains spaces */ pos= add_quoted_string(path_and_service, file_path, end); - if (*extra_opt) + if (extra_opt && *extra_opt) { /* Add option after file_path. There will be zero or one extra option. It's @@ -8742,7 +8756,6 @@ static int option_cmp(my_option *a, my_option *b) return 1; } } - DBUG_ASSERT(a->name == b->name); return 0; } @@ -8757,9 +8770,16 @@ static void print_help() sys_var_add_options(&all_options, sys_var::PARSE_EARLY); add_plugin_options(&all_options, &mem_root); sort_dynamic(&all_options, (qsort_cmp) option_cmp); + sort_dynamic(&all_options, (qsort_cmp) option_cmp); add_terminator(&all_options); my_print_help((my_option*) all_options.buffer); + + /* Add variables that can be shown but not changed, like version numbers */ + pop_dynamic(&all_options); + sys_var_add_options(&all_options, sys_var::SHOW_VALUE_IN_HELP); + sort_dynamic(&all_options, (qsort_cmp) option_cmp); + add_terminator(&all_options); my_print_variables((my_option*) all_options.buffer); free_root(&mem_root, MYF(0)); @@ -8901,7 +8921,7 @@ static int mysql_init_variables(void) my_atomic_rwlock_init(&thread_running_lock); my_atomic_rwlock_init(&thread_count_lock); my_atomic_rwlock_init(&statistics_lock); - my_atomic_rwlock_init(slave_executed_entries_lock); + my_atomic_rwlock_init(&slave_executed_entries_lock); strmov(server_version, MYSQL_SERVER_VERSION); threads.empty(); thread_cache.empty(); @@ -9125,7 +9145,7 @@ mysqld_get_one_option(int optid, opt_myisam_log=1; break; case (int) OPT_BIN_LOG: - opt_bin_log= test(argument != disabled_my_option); + opt_bin_log= MY_TEST(argument != disabled_my_option); opt_bin_log_used= 1; break; case (int) OPT_LOG_BASENAME: @@ -9639,7 +9659,7 @@ static int get_options(int *argc_ptr, char ***argv_ptr) Set some global variables from the global_system_variables In most cases the global variables will not be used */ - my_disable_locking= myisam_single_user= test(opt_external_locking == 0); + my_disable_locking= myisam_single_user= MY_TEST(opt_external_locking == 0); my_default_record_cache_size=global_system_variables.read_buff_size; /* @@ -9696,8 +9716,8 @@ static int get_options(int *argc_ptr, char ***argv_ptr) #endif global_system_variables.engine_condition_pushdown= - test(global_system_variables.optimizer_switch & - OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); + MY_TEST(global_system_variables.optimizer_switch & + OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); opt_readonly= read_only; @@ -9732,6 +9752,13 @@ static int get_options(int *argc_ptr, char ***argv_ptr) max_binlog_size_var->option.def_value; } } + + /* Ensure that some variables are not set higher than needed */ + if (back_log > max_connections) + back_log= max_connections; + if (thread_cache_size > max_connections) + thread_cache_size= max_connections; + return 0; } @@ -10207,6 +10234,10 @@ PSI_stage_info stage_binlog_waiting_background_tasks= { 0, "Waiting for backgrou PSI_stage_info stage_binlog_processing_checkpoint_notify= { 0, "Processing binlog checkpoint notification", 0}; PSI_stage_info stage_binlog_stopping_background_thread= { 0, "Stopping binlog background thread", 0}; PSI_stage_info stage_waiting_for_work_from_sql_thread= { 0, "Waiting for work from SQL thread", 0}; +PSI_stage_info stage_waiting_for_prior_transaction_to_commit= { 0, "Waiting for prior transaction to start commit before starting next transaction", 0}; +PSI_stage_info stage_waiting_for_room_in_worker_thread= { 0, "Waiting for room in worker thread event queue", 0}; +PSI_stage_info stage_master_gtid_wait_primary= { 0, "Waiting in MASTER_GTID_WAIT() (primary waiter)", 0}; +PSI_stage_info stage_master_gtid_wait= { 0, "Waiting in MASTER_GTID_WAIT()", 0}; #ifdef HAVE_PSI_INTERFACE @@ -10214,6 +10245,12 @@ PSI_stage_info *all_server_stages[]= { & stage_after_create, & stage_allocating_local_table, + & stage_alter_inplace, + & stage_alter_inplace_commit, + & stage_alter_inplace_prepare, + & stage_binlog_processing_checkpoint_notify, + & stage_binlog_stopping_background_thread, + & stage_binlog_waiting_background_tasks, & stage_changing_master, & stage_checking_master_version, & stage_checking_permissions, @@ -10223,9 +10260,9 @@ PSI_stage_info *all_server_stages[]= & stage_closing_tables, & stage_connecting_to_master, & stage_converting_heap_to_myisam, + & stage_copy_to_tmp_table, & stage_copying_to_group_table, & stage_copying_to_tmp_table, - & stage_copy_to_tmp_table, & stage_creating_delayed_handler, & stage_creating_sort_index, & stage_creating_table, @@ -10274,8 +10311,13 @@ PSI_stage_info *all_server_stages[]= & stage_sending_cached_result_to_client, & stage_sending_data, & stage_setup, - & stage_slave_has_read_all_relay_log, & stage_show_explain, + & stage_slave_has_read_all_relay_log, + & stage_slave_waiting_event_from_coordinator, + & stage_slave_waiting_worker_queue, + & stage_slave_waiting_worker_to_free_events, + & stage_slave_waiting_worker_to_release_partition, + & stage_slave_waiting_workers_to_exit, & stage_sorting, & stage_sorting_for_group, & stage_sorting_for_order, @@ -10294,20 +10336,27 @@ PSI_stage_info *all_server_stages[]= & stage_user_sleep, & stage_verifying_table, & stage_waiting_for_delay_list, + & stage_waiting_for_gtid_to_be_written_to_binary_log, & stage_waiting_for_handler_insert, & stage_waiting_for_handler_lock, & stage_waiting_for_handler_open, & stage_waiting_for_insert, & stage_waiting_for_master_to_send_event, & stage_waiting_for_master_update, + & stage_waiting_for_prior_transaction_to_commit, + & stage_waiting_for_query_cache_lock, + & stage_waiting_for_relay_log_space, + & stage_waiting_for_room_in_worker_thread, & stage_waiting_for_slave_mutex_on_exit, & stage_waiting_for_slave_thread_to_start, & stage_waiting_for_table_flush, - & stage_waiting_for_query_cache_lock, & stage_waiting_for_the_next_event_in_relay_log, & stage_waiting_for_the_slave_thread_to_advance_position, + & stage_waiting_for_work_from_sql_thread, & stage_waiting_to_finalize_termination, - & stage_waiting_to_get_readlock + & stage_waiting_to_get_readlock, + & stage_master_gtid_wait_primary, + & stage_master_gtid_wait }; PSI_socket_key key_socket_tcpip, key_socket_unix, key_socket_client_connection; diff --git a/sql/mysqld.h b/sql/mysqld.h index 3cd810f7040..c443d4eed62 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 2013, 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 @@ -100,7 +100,7 @@ extern uint connection_count; extern my_bool opt_safe_user_create; extern my_bool opt_safe_show_db, opt_local_infile, opt_myisam_use_mmap; extern my_bool opt_slave_compressed_protocol, use_temp_pool; -extern ulong slave_exec_mode_options; +extern ulong slave_exec_mode_options, slave_ddl_exec_mode_options; extern ulong slave_retried_transactions; extern ulonglong slave_type_conversions_options; extern my_bool read_only, opt_readonly; @@ -184,6 +184,7 @@ extern ulong opt_binlog_rows_event_max_size; extern ulong rpl_recovery_rank, thread_cache_size; extern ulong stored_program_cache_size; extern ulong opt_slave_parallel_threads; +extern ulong opt_slave_domain_parallel_threads; extern ulong opt_slave_parallel_max_queued; extern ulong opt_binlog_commit_wait_count; extern ulong opt_binlog_commit_wait_usec; @@ -276,6 +277,7 @@ extern PSI_mutex_key key_LOCK_slave_state, key_LOCK_binlog_state, extern PSI_mutex_key key_TABLE_SHARE_LOCK_share, key_LOCK_stats, key_LOCK_global_user_client_stats, key_LOCK_global_table_stats, key_LOCK_global_index_stats, key_LOCK_wakeup_ready, key_LOCK_wait_commit; +extern PSI_mutex_key key_LOCK_gtid_waiting; extern PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger, key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave, @@ -303,8 +305,10 @@ extern PSI_cond_key key_RELAYLOG_update_cond, key_COND_wakeup_ready, key_COND_wait_commit; extern PSI_cond_key key_RELAYLOG_COND_queue_busy; extern PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy; -extern PSI_cond_key key_COND_rpl_thread, key_COND_rpl_thread_pool, - key_COND_parallel_entry; +extern PSI_cond_key key_COND_rpl_thread, key_COND_rpl_thread_queue, + key_COND_rpl_thread_pool, + key_COND_parallel_entry, key_COND_group_commit_orderer; +extern PSI_cond_key key_COND_wait_gtid; extern PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert, key_thread_handle_manager, key_thread_kill_server, key_thread_main, @@ -441,6 +445,11 @@ extern PSI_stage_info stage_binlog_waiting_background_tasks; extern PSI_stage_info stage_binlog_processing_checkpoint_notify; extern PSI_stage_info stage_binlog_stopping_background_thread; extern PSI_stage_info stage_waiting_for_work_from_sql_thread; +extern PSI_stage_info stage_waiting_for_prior_transaction_to_commit; +extern PSI_stage_info stage_waiting_for_room_in_worker_thread; +extern PSI_stage_info stage_master_gtid_wait_primary; +extern PSI_stage_info stage_master_gtid_wait; + #ifdef HAVE_PSI_STATEMENT_INTERFACE /** Statement instrumentation keys (sql). diff --git a/sql/net_serv.cc b/sql/net_serv.cc index fcb08bfbfc9..546542fa207 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2010, 2012, Monty Program Ab. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2010, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -144,7 +144,7 @@ my_bool my_net_init(NET *net, Vio* vio, uint my_flags) net->net_skip_rest_factor= 0; net->last_errno=0; net->unused= 0; - net->thread_specific_malloc= test(my_flags & MY_THREAD_SPECIFIC); + net->thread_specific_malloc= MY_TEST(my_flags & MY_THREAD_SPECIFIC); #ifdef MYSQL_SERVER net->extension= NULL; #endif @@ -267,7 +267,7 @@ static int net_data_is_ready(my_socket sd) if ((res= select((int) (sd + 1), &sfds, NULL, NULL, &tv)) < 0) return 0; else - return test(res ? FD_ISSET(sd, &sfds) : 0); + return MY_TEST(res ? FD_ISSET(sd, &sfds) : 0); #endif /* HAVE_POLL */ } @@ -360,8 +360,8 @@ my_bool net_flush(NET *net) DBUG_ENTER("net_flush"); if (net->buff != net->write_pos) { - error=test(net_real_write(net, net->buff, - (size_t) (net->write_pos - net->buff))); + error= MY_TEST(net_real_write(net, net->buff, + (size_t) (net->write_pos - net->buff))); net->write_pos= net->buff; } /* Sync packet number if using compression */ @@ -424,7 +424,7 @@ my_bool my_net_write(NET *net, const uchar *packet, size_t len) #ifndef DEBUG_DATA_PACKETS DBUG_DUMP("packet_header", buff, NET_HEADER_SIZE); #endif - rc= test(net_write_buff(net,packet,len)); + rc= MY_TEST(net_write_buff(net, packet, len)); MYSQL_NET_WRITE_DONE(rc); return rc; } @@ -498,9 +498,9 @@ net_write_command(NET *net,uchar command, } int3store(buff,length); buff[3]= (uchar) net->pkt_nr++; - rc= test(net_write_buff(net, buff, header_size) || - (head_len && net_write_buff(net, header, head_len)) || - net_write_buff(net, packet, len) || net_flush(net)); + rc= MY_TEST(net_write_buff(net, buff, header_size) || + (head_len && net_write_buff(net, header, head_len)) || + net_write_buff(net, packet, len) || net_flush(net)); MYSQL_NET_WRITE_DONE(rc); DBUG_RETURN(rc); } diff --git a/sql/opt_index_cond_pushdown.cc b/sql/opt_index_cond_pushdown.cc index fb55aea1968..be33e46bf94 100644 --- a/sql/opt_index_cond_pushdown.cc +++ b/sql/opt_index_cond_pushdown.cc @@ -205,7 +205,7 @@ Item *make_cond_for_index(Item *cond, TABLE *table, uint keyno, new_cond->argument_list()->push_back(fix); used_tables|= fix->used_tables(); } - if (test(item->marker == ICP_COND_USES_INDEX_ONLY)) + if (MY_TEST(item->marker == ICP_COND_USES_INDEX_ONLY)) { n_marked++; item->marker= 0; @@ -238,7 +238,7 @@ Item *make_cond_for_index(Item *cond, TABLE *table, uint keyno, if (!fix) return (COND*) 0; new_cond->argument_list()->push_back(fix); - if (test(item->marker == ICP_COND_USES_INDEX_ONLY)) + if (MY_TEST(item->marker == ICP_COND_USES_INDEX_ONLY)) { n_marked++; item->marker= 0; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 6982db898fb..b08ecc399bf 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -408,7 +408,7 @@ public: new_max=arg->max_value; flag_max=arg->max_flag; } return new SEL_ARG(field, part, new_min, new_max, flag_min, flag_max, - test(maybe_flag && arg->maybe_flag)); + MY_TEST(maybe_flag && arg->maybe_flag)); } SEL_ARG *clone_first(SEL_ARG *arg) { // min <= X < arg->min @@ -1823,7 +1823,7 @@ QUICK_RANGE_SELECT::QUICK_RANGE_SELECT(THD *thd, TABLE *table, uint key_nr, *create_error= 1; } else - bitmap_init(&column_bitmap, bitmap, head->s->fields, FALSE); + my_bitmap_init(&column_bitmap, bitmap, head->s->fields, FALSE); DBUG_VOID_RETURN; } @@ -2847,7 +2847,7 @@ static int fill_used_fields_bitmap(PARAM *param) param->fields_bitmap_size= table->s->column_bitmap_size; if (!(tmp= (my_bitmap_map*) alloc_root(param->mem_root, param->fields_bitmap_size)) || - bitmap_init(¶m->needed_fields, tmp, table->s->fields, FALSE)) + my_bitmap_init(¶m->needed_fields, tmp, table->s->fields, FALSE)) return 1; bitmap_copy(¶m->needed_fields, table->read_set); @@ -3223,7 +3223,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, Assume that if the user is using 'limit' we will only need to scan limit rows if we are using a key */ - DBUG_RETURN(records ? test(quick) : -1); + DBUG_RETURN(records ? MY_TEST(quick) : -1); } /**************************************************************************** @@ -3460,6 +3460,11 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond) table->reginfo.impossible_range= 1; goto free_alloc; } + else if (tree->type == SEL_TREE::ALWAYS) + { + rows= table_records; + goto free_alloc; + } else if (tree->type == SEL_TREE::MAYBE) { rows= table_records; @@ -3782,8 +3787,8 @@ typedef struct st_part_prune_param int last_subpart_partno; /* Same as above for supartitioning */ /* - is_part_keypart[i] == test(keypart #i in partitioning index is a member - used in partitioning) + is_part_keypart[i] == MY_TEST(keypart #i in partitioning index is a member + used in partitioning) Used to maintain current values of cur_part_fields and cur_subpart_fields */ my_bool *is_part_keypart; @@ -3974,7 +3979,7 @@ bool prune_partitions(THD *thd, TABLE *table, Item *pprune_cond) res == 1 => some used partitions => retval=FALSE res == -1 - we jump over this line to all_used: */ - retval= test(!res); + retval= MY_TEST(!res); goto end; all_used: @@ -4104,7 +4109,7 @@ static int find_used_partitions_imerge_list(PART_PRUNE_PARAM *ppar, */ return find_used_partitions_imerge(ppar, merges.head()); } - bitmap_init(&all_merges, bitmap_buf, n_bits, FALSE); + my_bitmap_init(&all_merges, bitmap_buf, n_bits, FALSE); bitmap_set_prefix(&all_merges, n_bits); List_iterator<SEL_IMERGE> it(merges); @@ -4607,7 +4612,7 @@ process_next_key_part: ppar->mark_full_partition_used(ppar->part_info, part_id); found= TRUE; } - res= test(found); + res= MY_TEST(found); } /* Restore the "used partitions iterator" to the default setting that @@ -4751,7 +4756,7 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar) uint32 bufsize= bitmap_buffer_size(ppar->part_info->num_subparts); if (!(buf= (my_bitmap_map*) alloc_root(alloc, bufsize))) return TRUE; - bitmap_init(&ppar->subparts_bitmap, buf, ppar->part_info->num_subparts, + my_bitmap_init(&ppar->subparts_bitmap, buf, ppar->part_info->num_subparts, FALSE); } range_par->key_parts= key_part; @@ -5511,7 +5516,7 @@ bool create_fields_bitmap(PARAM *param, MY_BITMAP *fields_bitmap) if (!(bitmap_buf= (my_bitmap_map *) alloc_root(param->mem_root, param->fields_bitmap_size))) return TRUE; - if (bitmap_init(fields_bitmap, bitmap_buf, param->table->s->fields, FALSE)) + if (my_bitmap_init(fields_bitmap, bitmap_buf, param->table->s->fields, FALSE)) return TRUE; return FALSE; @@ -5649,7 +5654,7 @@ bool prepare_search_best_index_intersect(PARAM *param, } } - i= n_index_scans - test(cpk_scan != NULL) + 1; + i= n_index_scans - MY_TEST(cpk_scan != NULL) + 1; if (!(common->search_scans = (INDEX_SCAN_INFO **) alloc_root (param->mem_root, @@ -5719,7 +5724,7 @@ bool prepare_search_best_index_intersect(PARAM *param, if (!(common->best_intersect= (INDEX_SCAN_INFO **) alloc_root (param->mem_root, sizeof(INDEX_SCAN_INFO *) * - (i + test(cpk_scan != NULL))))) + (i + MY_TEST(cpk_scan != NULL))))) return TRUE; size_t calc_cost_buff_size= @@ -6329,7 +6334,7 @@ ROR_SCAN_INFO *make_ror_scan(const PARAM *param, int idx, SEL_ARG *sel_arg) param->fields_bitmap_size))) DBUG_RETURN(NULL); - if (bitmap_init(&ror_scan->covered_fields, bitmap_buf, + if (my_bitmap_init(&ror_scan->covered_fields, bitmap_buf, param->table->s->fields, FALSE)) DBUG_RETURN(NULL); bitmap_clear_all(&ror_scan->covered_fields); @@ -6447,7 +6452,7 @@ ROR_INTERSECT_INFO* ror_intersect_init(const PARAM *param) if (!(buf= (my_bitmap_map*) alloc_root(param->mem_root, param->fields_bitmap_size))) return NULL; - if (bitmap_init(&info->covered_fields, buf, param->table->s->fields, + if (my_bitmap_init(&info->covered_fields, buf, param->table->s->fields, FALSE)) return NULL; info->is_covering= FALSE; @@ -6571,8 +6576,8 @@ static double ror_scan_selectivity(const ROR_INTERSECT_INFO *info, SEL_ARG *sel_arg, *tuple_arg= NULL; key_part_map keypart_map= 0; bool cur_covered; - bool prev_covered= test(bitmap_is_set(&info->covered_fields, - key_part->fieldnr-1)); + bool prev_covered= MY_TEST(bitmap_is_set(&info->covered_fields, + key_part->fieldnr - 1)); key_range min_range; key_range max_range; min_range.key= key_val; @@ -6586,8 +6591,8 @@ static double ror_scan_selectivity(const ROR_INTERSECT_INFO *info, sel_arg= sel_arg->next_key_part) { DBUG_PRINT("info",("sel_arg step")); - cur_covered= test(bitmap_is_set(&info->covered_fields, - key_part[sel_arg->part].fieldnr-1)); + cur_covered= MY_TEST(bitmap_is_set(&info->covered_fields, + key_part[sel_arg->part].fieldnr - 1)); if (cur_covered != prev_covered) { /* create (part1val, ..., part{n-1}val) tuple. */ @@ -7024,7 +7029,7 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param, covered_fields->bitmap= (my_bitmap_map*)alloc_root(param->mem_root, param->fields_bitmap_size); if (!covered_fields->bitmap || - bitmap_init(covered_fields, covered_fields->bitmap, + my_bitmap_init(covered_fields, covered_fields->bitmap, param->table->s->fields, FALSE)) DBUG_RETURN(0); bitmap_clear_all(covered_fields); @@ -7684,7 +7689,8 @@ static SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param, Item_func *cond_func, param PARAM from SQL_SELECT::test_quick_select cond_func item for the predicate field_item field in the predicate - value constant in the predicate + value constant in the predicate (or a field already read from + a table in the case of dynamic range access) (for BETWEEN it contains the number of the field argument, for IN it's always 0) inv TRUE <> NOT cond_func is considered @@ -7953,24 +7959,43 @@ static SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param,COND *cond) DBUG_RETURN(ftree); } default: + + DBUG_ASSERT (!ftree); if (cond_func->arguments()[0]->real_item()->type() == Item::FIELD_ITEM) { field_item= (Item_field*) (cond_func->arguments()[0]->real_item()); - value= cond_func->arg_count > 1 ? cond_func->arguments()[1] : 0; + value= cond_func->arg_count > 1 ? cond_func->arguments()[1] : NULL; + if (value && value->is_expensive()) + DBUG_RETURN(0); + if (!cond_func->arguments()[0]->real_item()->const_item()) + ftree= get_full_func_mm_tree(param, cond_func, field_item, value, inv); } - else if (cond_func->have_rev_func() && - cond_func->arguments()[1]->real_item()->type() == - Item::FIELD_ITEM) + /* + Even if get_full_func_mm_tree() was executed above and did not + return a range predicate it may still be possible to create one + by reversing the order of the operands. Note that this only + applies to predicates where both operands are fields. Example: A + query of the form + + WHERE t1.a OP t2.b + + In this case, arguments()[0] == t1.a and arguments()[1] == t2.b. + When creating range predicates for t2, get_full_func_mm_tree() + above will return NULL because 'field' belongs to t1 and only + predicates that applies to t2 are of interest. In this case a + call to get_full_func_mm_tree() with reversed operands (see + below) may succeed. + */ + if (!ftree && cond_func->have_rev_func() && + cond_func->arguments()[1]->real_item()->type() == Item::FIELD_ITEM) { field_item= (Item_field*) (cond_func->arguments()[1]->real_item()); value= cond_func->arguments()[0]; + if (value && value->is_expensive()) + DBUG_RETURN(0); + if (!cond_func->arguments()[1]->real_item()->const_item()) + ftree= get_full_func_mm_tree(param, cond_func, field_item, value, inv); } - else - DBUG_RETURN(0); - if (value && value->is_expensive()) - DBUG_RETURN(0); - - ftree= get_full_func_mm_tree(param, cond_func, field_item, value, inv); } DBUG_RETURN(ftree); @@ -10606,8 +10631,13 @@ static bool is_key_scan_ror(PARAM *param, uint keynr, uint8 nparts) if (param->table->field[fieldnr]->key_length() != kp->length) return FALSE; } - - if (key_part == key_part_end) + + /* + If there are equalities for all key parts, it is a ROR scan. If there are + equalities all keyparts and even some of key parts from "Extended Key" + index suffix, it is a ROR-scan, too. + */ + if (key_part >= key_part_end) return TRUE; key_part= table_key->key_part + nparts; @@ -10663,12 +10693,12 @@ get_quick_select(PARAM *param,uint idx,SEL_ARG *key_tree, uint mrr_flags, if (param->table->key_info[param->real_keynr[idx]].flags & HA_SPATIAL) quick=new QUICK_RANGE_SELECT_GEOM(param->thd, param->table, param->real_keynr[idx], - test(parent_alloc), + MY_TEST(parent_alloc), parent_alloc, &create_err); else quick=new QUICK_RANGE_SELECT(param->thd, param->table, param->real_keynr[idx], - test(parent_alloc), NULL, &create_err); + MY_TEST(parent_alloc), NULL, &create_err); if (quick) { @@ -10778,15 +10808,16 @@ get_quick_keys(PARAM *param,QUICK_RANGE_SELECT *quick,KEY_PART *key, { KEY *table_key=quick->head->key_info+quick->index; flag=EQ_RANGE; - if ((table_key->flags & HA_NOSAME) && key->part == table_key->user_defined_key_parts-1) + if ((table_key->flags & HA_NOSAME) && + key_tree->part == table_key->user_defined_key_parts-1) { - if (!(table_key->flags & HA_NULL_PART_KEY) || - !null_part_in_key(key, - param->min_key, - (uint) (tmp_min_key - param->min_key))) - flag|= UNIQUE_RANGE; - else - flag|= NULL_RANGE; + if ((table_key->flags & HA_NULL_PART_KEY) && + null_part_in_key(key, + param->min_key, + (uint) (tmp_min_key - param->min_key))) + flag|= NULL_RANGE; + else + flag|= UNIQUE_RANGE; } } } @@ -10816,7 +10847,7 @@ get_quick_keys(PARAM *param,QUICK_RANGE_SELECT *quick,KEY_PART *key, } /* - Return 1 if there is only one range and this uses the whole primary key + Return 1 if there is only one range and this uses the whole unique key */ bool QUICK_RANGE_SELECT::unique_key_range() @@ -11662,7 +11693,7 @@ int QUICK_RANGE_SELECT::get_next_prefix(uint prefix_length, result= file->read_range_first(last_range->min_keypart_map ? &start_key : 0, last_range->max_keypart_map ? &end_key : 0, - test(last_range->flag & EQ_RANGE), + MY_TEST(last_range->flag & EQ_RANGE), TRUE); if (last_range->flag == (UNIQUE_RANGE | EQ_RANGE)) last_range= 0; // Stop searching diff --git a/sql/opt_range.h b/sql/opt_range.h index 4f2ab6df60d..1ca245ea420 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -1004,7 +1004,7 @@ class SQL_SELECT :public Sql_alloc { */ inline int skip_record(THD *thd) { - int rc= test(!cond || cond->val_int()); + int rc= MY_TEST(!cond || cond->val_int()); if (thd->is_error()) rc= -1; return rc; diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index a9bff4b37bf..e00083c4b8b 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -1082,7 +1082,7 @@ bool convert_join_subqueries_to_semijoins(JOIN *join) if (convert_join_subqueries_to_semijoins(child_join)) DBUG_RETURN(TRUE); in_subq->sj_convert_priority= - test(in_subq->emb_on_expr_nest != NO_JOIN_NEST) * MAX_TABLES * 2 + + MY_TEST(in_subq->emb_on_expr_nest != NO_JOIN_NEST) * MAX_TABLES * 2 + in_subq->is_correlated * MAX_TABLES + child_join->outer_tables; } @@ -1529,7 +1529,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) for (tl= (TABLE_LIST*)(parent_lex->table_list.first); tl->next_local; tl= tl->next_local) {} - tl->next_local= subq_lex->leaf_tables.head(); + tl->next_local= subq_lex->join->tables_list; /* A theory: no need to re-connect the next_global chain */ @@ -2384,7 +2384,7 @@ bool find_eq_ref_candidate(TABLE *table, table_map sj_inner_tables) if (!is_excluded_key) { keyinfo= table->key_info + key; - is_excluded_key= !test(keyinfo->flags & HA_NOSAME); + is_excluded_key= !MY_TEST(keyinfo->flags & HA_NOSAME); } if (!is_excluded_key) { @@ -2471,8 +2471,8 @@ bool is_multiple_semi_joins(JOIN *join, POSITION *prefix, uint idx, table_map in if ((emb_sj_nest= prefix[i].table->emb_sj_nest)) { if (inner_tables & emb_sj_nest->sj_inner_tables) - return !test(inner_tables == (emb_sj_nest->sj_inner_tables & - ~join->const_table_map)); + return !MY_TEST(inner_tables == (emb_sj_nest->sj_inner_tables & + ~join->const_table_map)); } } return FALSE; @@ -3206,9 +3206,9 @@ at_sjmat_pos(const JOIN *join, table_map remaining_tables, const JOIN_TAB *tab, if (join->positions[idx - i].table->emb_sj_nest != tab->emb_sj_nest) return NULL; } - *loose_scan= test(remaining_tables & ~tab->table->map & - (emb_sj_nest->sj_inner_tables | - emb_sj_nest->nested_join->sj_depends_on)); + *loose_scan= MY_TEST(remaining_tables & ~tab->table->map & + (emb_sj_nest->sj_inner_tables | + emb_sj_nest->nested_join->sj_depends_on)); if (*loose_scan && !emb_sj_nest->sj_subq_pred->sjm_scan_allowed) return NULL; else @@ -3594,12 +3594,12 @@ bool setup_sj_materialization_part2(JOIN_TAB *sjm_tab) for (i= 0; i < tmp_key_parts; i++, cur_key_part++, ref_key++) { tab_ref->items[i]= emb_sj_nest->sj_subq_pred->left_expr->element_index(i); - int null_count= test(cur_key_part->field->real_maybe_null()); + int null_count= MY_TEST(cur_key_part->field->real_maybe_null()); *ref_key= new store_key_item(thd, cur_key_part->field, /* TODO: the NULL byte is taken into account in cur_key_part->store_length, so instead of - cur_ref_buff + test(maybe_null), we could + cur_ref_buff + MY_TEST(maybe_null), we could use that information instead. */ cur_ref_buff + null_count, @@ -3828,7 +3828,7 @@ static bool is_cond_sj_in_equality(Item *item) ((Item_func*)item)->functype()== Item_func::EQ_FUNC) { Item_func_eq *item_eq= (Item_func_eq*)item; - return test(item_eq->in_equality_no != UINT_MAX); + return MY_TEST(item_eq->in_equality_no != UINT_MAX); } return FALSE; } @@ -4100,7 +4100,7 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd) { DBUG_PRINT("info",("Creating group key in temporary table")); share->keys=1; - share->uniques= test(using_unique_constraint); + share->uniques= MY_TEST(using_unique_constraint); table->key_info=keyinfo; keyinfo->key_part=key_part_info; keyinfo->flags=HA_NOSAME; @@ -5288,6 +5288,7 @@ bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list, if (!(*join_where)->fixed) (*join_where)->fix_fields(join->thd, join_where); } + table->table->maybe_null= MY_TEST(join->mixed_implicit_grouping); } if ((nested_join= table->nested_join)) @@ -5318,9 +5319,9 @@ bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list, through Item::cleanup() calls). */ -void cleanup_empty_jtbm_semi_joins(JOIN *join) +void cleanup_empty_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list) { - List_iterator<TABLE_LIST> li(*join->join_list); + List_iterator<TABLE_LIST> li(*join_list); TABLE_LIST *table; while ((table= li++)) { @@ -5332,6 +5333,10 @@ void cleanup_empty_jtbm_semi_joins(JOIN *join) table->table= NULL; } } + else if (table->nested_join && table->sj_subq_pred) + { + cleanup_empty_jtbm_semi_joins(join, &table->nested_join->join_list); + } } } diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h index 6ed077dcfcb..acfbebed6b3 100644 --- a/sql/opt_subselect.h +++ b/sql/opt_subselect.h @@ -28,7 +28,7 @@ int pull_out_semijoin_tables(JOIN *join); bool optimize_semijoin_nests(JOIN *join, table_map all_table_map); bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list, Item **join_where); -void cleanup_empty_jtbm_semi_joins(JOIN *join); +void cleanup_empty_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list); // used by Loose_scan_opt ulonglong get_bound_sj_equalities(TABLE_LIST *sj_nest, @@ -168,7 +168,7 @@ public: } } - bool have_a_case() { return test(handled_sj_equalities); } + bool have_a_case() { return MY_TEST(handled_sj_equalities); } void check_ref_access_part1(JOIN_TAB *s, uint key, KEYUSE *start_key, table_map found_part) diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index d4fc458c948..4e8fcefa6d2 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -295,9 +295,9 @@ int opt_sum_query(THD *thd, if (!(tl->table->file->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT) || tl->schema_table) { - maybe_exact_count&= test(!tl->schema_table && - (tl->table->file->ha_table_flags() & - HA_HAS_RECORDS)); + maybe_exact_count&= MY_TEST(!tl->schema_table && + (tl->table->file->ha_table_flags() & + HA_HAS_RECORDS)); is_exact_count= FALSE; count= 1; // ensure count != 0 } @@ -361,7 +361,7 @@ int opt_sum_query(THD *thd, case Item_sum::MIN_FUNC: case Item_sum::MAX_FUNC: { - int is_max= test(item_sum->sum_func() == Item_sum::MAX_FUNC); + int is_max= MY_TEST(item_sum->sum_func() == Item_sum::MAX_FUNC); /* If MIN/MAX(expr) is the first part of a key or if all previous parts of the key is found in the COND, then we can use @@ -658,7 +658,7 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo, DBUG_RETURN(FALSE); } if (!(cond->used_tables() & field->table->map) && - test(cond->used_tables() & ~PSEUDO_TABLE_BITS)) + MY_TEST(cond->used_tables() & ~PSEUDO_TABLE_BITS)) { /* Condition doesn't restrict the used table */ DBUG_RETURN(!cond->const_item()); @@ -811,7 +811,7 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo, Item *value= args[between && max_fl ? 2 : 1]; value->save_in_field_no_warnings(part->field, 1); if (part->null_bit) - *key_ptr++= (uchar) test(part->field->is_null()); + *key_ptr++= (uchar) MY_TEST(part->field->is_null()); part->field->get_key_image(key_ptr, part->length, Field::itRAW); } if (is_field_part) @@ -831,7 +831,7 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo, else if (eq_type) { if ((!is_null && !cond->val_int()) || - (is_null && !test(part->field->is_null()))) + (is_null && !MY_TEST(part->field->is_null()))) DBUG_RETURN(FALSE); // Impossible test } else if (is_field_part) diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc index 46bed0e60e7..2ef565517b5 100644 --- a/sql/opt_table_elimination.cc +++ b/sql/opt_table_elimination.cc @@ -356,7 +356,7 @@ public: bound. */ void touch() { unbound_args--; } - bool is_applicable() { return !test(unbound_args); } + bool is_applicable() { return !MY_TEST(unbound_args); } /* Iteration over values that */ typedef char *Iterator; @@ -1042,7 +1042,7 @@ bool Dep_analysis_context::setup_equality_modules_deps(List<Dep_module> void *buf; if (!(buf= current_thd->alloc(bitmap_buffer_size(offset))) || - bitmap_init(&expr_deps, (my_bitmap_map*)buf, offset, FALSE)) + my_bitmap_init(&expr_deps, (my_bitmap_map*)buf, offset, FALSE)) { DBUG_RETURN(TRUE); /* purecov: inspected */ } @@ -1072,7 +1072,7 @@ bool Dep_analysis_context::setup_equality_modules_deps(List<Dep_module> else { /* It's a multi-equality */ - eq_mod->unbound_args= !test(eq_mod->expr); + eq_mod->unbound_args= !MY_TEST(eq_mod->expr); List_iterator<Dep_value_field> it(*eq_mod->mult_equal_fields); Dep_value_field* field_val; while ((field_val= it++)) @@ -1398,7 +1398,7 @@ Dep_module_expr *merge_eq_mods(Dep_module_expr *start, } } - if (fv->elements + test(old->expr) > 1) + if (fv->elements + MY_TEST(old->expr) > 1) { old->mult_equal_fields= fv; old->level= and_level; diff --git a/sql/partition_element.h b/sql/partition_element.h index d0a67c6af3e..308a4d6ddd2 100644 --- a/sql/partition_element.h +++ b/sql/partition_element.h @@ -1,7 +1,7 @@ #ifndef PARTITION_ELEMENT_INCLUDED #define PARTITION_ELEMENT_INCLUDED -/* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. +/* 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 diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 44407bd737f..1ae62011b43 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -385,7 +385,7 @@ bool partition_info::can_prune_insert(THD* thd, DBUG_RETURN(true); } /* Also clears all bits. */ - if (bitmap_init(used_partitions, bitmap_buf, num_partitions, false)) + if (my_bitmap_init(used_partitions, bitmap_buf, num_partitions, false)) { /* purecov: begin deadcode */ /* Cannot happen, due to pre-alloc. */ @@ -1852,7 +1852,7 @@ end: RETURN VALUES */ -void partition_info::print_no_partition_found(TABLE *table_arg) +void partition_info::print_no_partition_found(TABLE *table_arg, myf errflag) { char buf[100]; char *buf_ptr= (char*)&buf; @@ -1866,7 +1866,7 @@ void partition_info::print_no_partition_found(TABLE *table_arg) SELECT_ACL, &table_list, TRUE)) { my_message(ER_NO_PARTITION_FOR_GIVEN_VALUE, - ER(ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT), MYF(0)); + ER(ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT), errflag); } else { @@ -1882,7 +1882,7 @@ void partition_info::print_no_partition_found(TABLE *table_arg) part_expr->unsigned_flag ? 10 : -10); dbug_tmp_restore_column_map(table_arg->read_set, old_map); } - my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), buf_ptr); + my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, errflag, buf_ptr); } } diff --git a/sql/partition_info.h b/sql/partition_info.h index 777cd6065eb..8ad7b1fd1fd 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -1,7 +1,7 @@ #ifndef PARTITION_INFO_INCLUDED #define PARTITION_INFO_INCLUDED -/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2006, 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 @@ -317,7 +317,7 @@ public: bool check_partition_info(THD *thd, handlerton **eng_type, handler *file, HA_CREATE_INFO *info, bool check_partition_function); - void print_no_partition_found(TABLE *table); + void print_no_partition_found(TABLE *table, myf errflag); void print_debug(const char *str, uint*); Item* get_column_item(Item *item, Field *field); int fix_partition_values(THD *thd, diff --git a/sql/password.c b/sql/password.c index 22e0060abd2..7a3d8aafde3 100644 --- a/sql/password.c +++ b/sql/password.c @@ -510,7 +510,7 @@ check_scramble(const uchar *scramble_arg, const char *message, /* now buf supposedly contains hash_stage1: so we can get hash_stage2 */ compute_sha1_hash(hash_stage2_reassured, (const char *) buf, SHA1_HASH_SIZE); - return test(memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE)); + return MY_TEST(memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE)); } /* diff --git a/sql/records.cc b/sql/records.cc index e534c04935a..1b230c41156 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -189,7 +189,8 @@ bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table, info->table=table; info->forms= &info->table; /* Only one table */ - if (table->s->tmp_table == NON_TRANSACTIONAL_TMP_TABLE && + if ((table->s->tmp_table == INTERNAL_TMP_TABLE || + table->s->tmp_table == NON_TRANSACTIONAL_TMP_TABLE) && !table->sort.addon_field) (void) table->file->extra(HA_EXTRA_MMAP); diff --git a/sql/rpl_filter.cc b/sql/rpl_filter.cc index 72e7770b6ee..2b4a3093e0f 100644 --- a/sql/rpl_filter.cc +++ b/sql/rpl_filter.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc index 3f79a0cb528..e51dee20c19 100644 --- a/sql/rpl_gtid.cc +++ b/sql/rpl_gtid.cc @@ -43,9 +43,9 @@ rpl_slave_state::update_state_hash(uint64 sub_id, rpl_gtid *gtid) there will not be an attempt to delete the corresponding table row before it is even committed. */ - lock(); + mysql_mutex_lock(&LOCK_slave_state); err= update(gtid->domain_id, gtid->server_id, sub_id, gtid->seq_no); - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); if (err) { sql_print_warning("Slave: Out of memory during slave state maintenance. " @@ -82,11 +82,20 @@ rpl_slave_state::record_and_update_gtid(THD *thd, rpl_group_info *rgi) } +static void +rpl_slave_state_free_element(void *arg) +{ + struct rpl_slave_state::element *elem= (struct rpl_slave_state::element *)arg; + mysql_cond_destroy(&elem->COND_wait_gtid); + my_free(elem); +} + + rpl_slave_state::rpl_slave_state() : last_sub_id(0), inited(false), loaded(false) { my_hash_init(&hash, &my_charset_bin, 32, offsetof(element, domain_id), - sizeof(uint32), NULL, my_free, HASH_UNIQUE); + sizeof(uint32), NULL, rpl_slave_state_free_element, HASH_UNIQUE); } @@ -146,6 +155,21 @@ rpl_slave_state::update(uint32 domain_id, uint32 server_id, uint64 sub_id, if (!(elem= get_element(domain_id))) return 1; + if (seq_no > elem->highest_seq_no) + elem->highest_seq_no= seq_no; + if (elem->gtid_waiter && elem->min_wait_seq_no <= seq_no) + { + /* + Someone was waiting in MASTER_GTID_WAIT() for this GTID to appear. + Signal (and remove) them. The waiter will handle all the processing + of all pending MASTER_GTID_WAIT(), so we do not slow down the + replication SQL thread. + */ + mysql_mutex_assert_owner(&LOCK_slave_state); + elem->gtid_waiter= NULL; + mysql_cond_broadcast(&elem->COND_wait_gtid); + } + if (!(list_elem= (list_element *)my_malloc(sizeof(*list_elem), MYF(MY_WME)))) return 1; list_elem->server_id= server_id; @@ -173,6 +197,9 @@ rpl_slave_state::get_element(uint32 domain_id) return NULL; elem->list= NULL; elem->domain_id= domain_id; + elem->highest_seq_no= 0; + elem->gtid_waiter= NULL; + mysql_cond_init(key_COND_wait_gtid, &elem->COND_wait_gtid, 0); if (my_hash_insert(&hash, (uchar *)elem)) { my_free(elem); @@ -352,7 +379,8 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id, { DBUG_PRINT("info", ("resetting OPTION_BEGIN")); thd->variables.option_bits&= - ~(ulonglong)(OPTION_NOT_AUTOCOMMIT|OPTION_BEGIN|OPTION_BIN_LOG); + ~(ulonglong)(OPTION_NOT_AUTOCOMMIT |OPTION_BEGIN |OPTION_BIN_LOG | + OPTION_GTID_BEGIN); } else thd->variables.option_bits&= ~(ulonglong)OPTION_BIN_LOG; @@ -378,10 +406,10 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id, goto end; } - lock(); + mysql_mutex_lock(&LOCK_slave_state); if ((elem= get_element(gtid->domain_id)) == NULL) { - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); my_error(ER_OUT_OF_RESOURCES, MYF(0)); err= 1; goto end; @@ -410,7 +438,7 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id, cur->next= NULL; elem->list= cur; } - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); if (!elist) goto end; @@ -470,9 +498,9 @@ end: */ if (elist) { - lock(); + mysql_mutex_lock(&LOCK_slave_state); put_back_list(gtid->domain_id, elist); - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); } ha_rollback_trans(thd, FALSE); @@ -499,9 +527,9 @@ rpl_slave_state::next_sub_id(uint32 domain_id) { uint64 sub_id= 0; - lock(); + mysql_mutex_lock(&LOCK_slave_state); sub_id= ++last_sub_id; - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); return sub_id; } @@ -541,7 +569,7 @@ rpl_slave_state::iterate(int (*cb)(rpl_gtid *, void *), void *data, my_hash_insert(>id_hash, (uchar *)(&extra_gtids[i]))) goto err; - lock(); + mysql_mutex_lock(&LOCK_slave_state); for (i= 0; i < hash.records; ++i) { @@ -576,19 +604,19 @@ rpl_slave_state::iterate(int (*cb)(rpl_gtid *, void *), void *data, memcpy(&best_gtid, gtid, sizeof(best_gtid)); if (my_hash_delete(>id_hash, rec)) { - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); goto err; } } if ((res= (*cb)(&best_gtid, data))) { - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); goto err; } } - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); /* Also add any remaining extra domain_ids. */ for (i= 0; i < gtid_hash.records; ++i) @@ -659,11 +687,11 @@ rpl_slave_state::domain_to_gtid(uint32 domain_id, rpl_gtid *out_gtid) list_element *list; uint64 best_sub_id; - lock(); + mysql_mutex_lock(&LOCK_slave_state); elem= (element *)my_hash_search(&hash, (const uchar *)&domain_id, 0); if (!elem || !(list= elem->list)) { - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); return false; } @@ -681,7 +709,7 @@ rpl_slave_state::domain_to_gtid(uint32 domain_id, rpl_gtid *out_gtid) out_gtid->seq_no= list->seq_no; } - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); return true; } @@ -811,7 +839,7 @@ rpl_slave_state::is_empty() uint32 i; bool result= true; - lock(); + mysql_mutex_lock(&LOCK_slave_state); for (i= 0; i < hash.records; ++i) { element *e= (element *)my_hash_element(&hash, i); @@ -821,7 +849,7 @@ rpl_slave_state::is_empty() break; } } - unlock(); + mysql_mutex_unlock(&LOCK_slave_state); return result; } @@ -1647,3 +1675,444 @@ slave_connection_state::get_gtid_list(rpl_gtid *gtid_list, uint32 list_size) return 0; } + + +/* + Execute a MASTER_GTID_WAIT(). + The position to wait for is in gtid_str in string form. + The timeout in microseconds is in timeout_us, zero means no timeout. + + Returns: + 1 for error. + 0 for wait completed. + -1 for wait timed out. +*/ +int +gtid_waiting::wait_for_pos(THD *thd, String *gtid_str, longlong timeout_us) +{ + int err; + rpl_gtid *wait_pos; + uint32 count, i; + struct timespec wait_until, *wait_until_ptr; + + /* Wait for the empty position returns immediately. */ + if (gtid_str->length() == 0) + return 0; + + if (!(wait_pos= gtid_parse_string_to_list(gtid_str->ptr(), gtid_str->length(), + &count))) + { + my_error(ER_INCORRECT_GTID_STATE, MYF(0)); + return 1; + } + + if (timeout_us >= 0) + { + set_timespec_nsec(wait_until, (ulonglong)1000*timeout_us); + wait_until_ptr= &wait_until; + } + else + wait_until_ptr= NULL; + err= 0; + for (i= 0; i < count; ++i) + { + if ((err= wait_for_gtid(thd, &wait_pos[i], wait_until_ptr))) + break; + } + my_free(wait_pos); + return err; +} + + +void +gtid_waiting::promote_new_waiter(gtid_waiting::hash_element *he) +{ + queue_element *qe; + + mysql_mutex_assert_owner(&LOCK_gtid_waiting); + if (queue_empty(&he->queue)) + return; + qe= (queue_element *)queue_top(&he->queue); + qe->do_small_wait= true; + mysql_cond_signal(&qe->thd->COND_wakeup_ready); +} + +void +gtid_waiting::process_wait_hash(uint64 wakeup_seq_no, + gtid_waiting::hash_element *he) +{ + mysql_mutex_assert_owner(&LOCK_gtid_waiting); + + for (;;) + { + queue_element *qe; + + if (queue_empty(&he->queue)) + break; + qe= (queue_element *)queue_top(&he->queue); + if (qe->wait_seq_no > wakeup_seq_no) + break; + DBUG_ASSERT(!qe->done); + queue_remove_top(&he->queue); + qe->done= true;; + mysql_cond_signal(&qe->thd->COND_wakeup_ready); + } +} + + +/* + Execute a MASTER_GTID_WAIT() for one specific domain. + + The implementation is optimised primarily for (1) minimal performance impact + on the slave replication threads, and secondarily for (2) quick performance + of MASTER_GTID_WAIT() on a single GTID, which can be useful for consistent + read to clients in an async replication read-scaleout scenario. + + To achieve (1), we have a "small" wait and a "large" wait. The small wait + contends with the replication threads on the lock on the gtid_slave_pos, so + only minimal processing is done under that lock, and only a single waiter at + a time does the small wait. + + If there is already a small waiter, a new thread will either replace the + small waiter (if it needs to wait for an earlier sequence number), or + instead do a "large" wait. + + Once awoken on the small wait, the waiting thread releases the lock shared + with the SQL threads quickly, and then processes all waiters currently doing + the large wait using a different lock that does not impact replication. + + This way, the SQL threads only need to do a single check + possibly a + pthread_cond_signal() when updating the gtid_slave_state, and the time that + non-SQL threads contend for the lock on gtid_slave_state is minimized. + + There is always at least one thread that has the responsibility to ensure + that there is a small waiter; this thread has queue_element::do_small_wait + set to true. This thread will do the small wait until it is done, at which + point it will make sure to pass on the responsibility to another thread. + Normally only one thread has do_small_wait==true, but it can occasionally + happen that there is more than one, when threads race one another for the + lock on the small wait (this results in slightly increased activity on the + small lock but is otherwise harmless). + + Returns: + 0 Wait completed normally + -1 Wait completed due to timeout + 1 An error (my_error() will have been called to set the error in the da) +*/ +int +gtid_waiting::wait_for_gtid(THD *thd, rpl_gtid *wait_gtid, + struct timespec *wait_until) +{ + bool timed_out= false; +#ifdef HAVE_REPLICATION + queue_element elem; + uint32 domain_id= wait_gtid->domain_id; + uint64 seq_no= wait_gtid->seq_no; + hash_element *he; + rpl_slave_state::element *slave_state_elem= NULL; + PSI_stage_info old_stage; + bool did_enter_cond= false; + + elem.wait_seq_no= seq_no; + elem.thd= thd; + elem.done= false; + + mysql_mutex_lock(&LOCK_gtid_waiting); + if (!(he= get_entry(wait_gtid->domain_id))) + { + mysql_mutex_unlock(&LOCK_gtid_waiting); + return 1; + } + /* + If there is already another waiter with seq_no no larger than our own, + we are sure that there is already a small waiter that will wake us up + (or later pass the small wait responsibility to us). So in this case, we + do not need to touch the small wait lock at all. + */ + elem.do_small_wait= + (queue_empty(&he->queue) || + ((queue_element *)queue_top(&he->queue))->wait_seq_no > seq_no); + + if (register_in_wait_queue(thd, wait_gtid, he, &elem)) + { + mysql_mutex_unlock(&LOCK_gtid_waiting); + return 1; + } + /* + Loop, doing either the small or large wait as appropriate, until either + the position waited for is reached, or we get a kill or timeout. + */ + for (;;) + { + mysql_mutex_assert_owner(&LOCK_gtid_waiting); + + if (elem.do_small_wait) + { + uint64 wakeup_seq_no; + queue_element *cur_waiter; + + mysql_mutex_lock(&rpl_global_gtid_slave_state.LOCK_slave_state); + /* + The elements in the gtid_slave_state_hash are never re-allocated once + they enter the hash, so we do not need to re-do the lookup after releasing + and re-aquiring the lock. + */ + if (!slave_state_elem && + !(slave_state_elem= rpl_global_gtid_slave_state.get_element(domain_id))) + { + mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state); + remove_from_wait_queue(he, &elem); + promote_new_waiter(he); + if (did_enter_cond) + thd->EXIT_COND(&old_stage); + else + mysql_mutex_unlock(&LOCK_gtid_waiting); + my_error(ER_OUT_OF_RESOURCES, MYF(0)); + return 1; + } + + if ((wakeup_seq_no= slave_state_elem->highest_seq_no) >= seq_no) + { + /* + We do not have to wait. (We will be removed from the wait queue when + we call process_wait_hash() below. + */ + mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state); + } + else if ((cur_waiter= slave_state_elem->gtid_waiter) && + slave_state_elem->min_wait_seq_no <= seq_no) + { + /* + There is already a suitable small waiter, go do the large wait. + (Normally we would not have needed to check the small wait in this + case, but it can happen if we race with another thread for the small + lock). + */ + elem.do_small_wait= false; + mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state); + } + else + { + /* + We have to do the small wait ourselves (stealing it from any thread + that might already be waiting for a later seq_no). + */ + slave_state_elem->gtid_waiter= &elem; + slave_state_elem->min_wait_seq_no= seq_no; + if (cur_waiter) + { + /* We stole the wait, so wake up the old waiting thread. */ + mysql_cond_signal(&slave_state_elem->COND_wait_gtid); + } + + /* Release the large lock, and do the small wait. */ + if (did_enter_cond) + { + thd->EXIT_COND(&old_stage); + did_enter_cond= false; + } + else + mysql_mutex_unlock(&LOCK_gtid_waiting); + thd->ENTER_COND(&slave_state_elem->COND_wait_gtid, + &rpl_global_gtid_slave_state.LOCK_slave_state, + &stage_master_gtid_wait_primary, &old_stage); + do + { + if (thd->check_killed()) + break; + else if (wait_until) + { + int err= + mysql_cond_timedwait(&slave_state_elem->COND_wait_gtid, + &rpl_global_gtid_slave_state.LOCK_slave_state, + wait_until); + if (err == ETIMEDOUT || err == ETIME) + { + timed_out= true; + break; + } + } + else + mysql_cond_wait(&slave_state_elem->COND_wait_gtid, + &rpl_global_gtid_slave_state.LOCK_slave_state); + } while (slave_state_elem->gtid_waiter == &elem); + wakeup_seq_no= slave_state_elem->highest_seq_no; + /* + If we aborted due to timeout or kill, remove us as waiter. + + If we were replaced by another waiter with a smaller seq_no, then we + no longer have responsibility for the small wait. + */ + if ((cur_waiter= slave_state_elem->gtid_waiter)) + { + if (cur_waiter == &elem) + slave_state_elem->gtid_waiter= NULL; + else if (slave_state_elem->min_wait_seq_no <= seq_no) + elem.do_small_wait= false; + } + thd->EXIT_COND(&old_stage); + + mysql_mutex_lock(&LOCK_gtid_waiting); + } + + /* + Note that hash_entry pointers do not change once allocated, so we do + not need to lookup `he' again after re-aquiring LOCK_gtid_waiting. + */ + process_wait_hash(wakeup_seq_no, he); + } + else + { + /* Do the large wait. */ + if (!did_enter_cond) + { + thd->ENTER_COND(&thd->COND_wakeup_ready, &LOCK_gtid_waiting, + &stage_master_gtid_wait, &old_stage); + did_enter_cond= true; + } + while (!elem.done && !thd->check_killed()) + { + thd_wait_begin(thd, THD_WAIT_BINLOG); + if (wait_until) + { + int err= mysql_cond_timedwait(&thd->COND_wakeup_ready, + &LOCK_gtid_waiting, wait_until); + if (err == ETIMEDOUT || err == ETIME) + timed_out= true; + } + else + mysql_cond_wait(&thd->COND_wakeup_ready, &LOCK_gtid_waiting); + thd_wait_end(thd); + if (elem.do_small_wait || timed_out) + break; + } + } + + if ((thd->killed || timed_out) && !elem.done) + { + /* Aborted, so remove ourselves from the hash. */ + remove_from_wait_queue(he, &elem); + elem.done= true; + } + if (elem.done) + { + /* + If our wait is done, but we have (or were passed) responsibility for + the small wait, then we need to pass on that task to someone else. + */ + if (elem.do_small_wait) + promote_new_waiter(he); + break; + } + } + + if (did_enter_cond) + thd->EXIT_COND(&old_stage); + else + mysql_mutex_unlock(&LOCK_gtid_waiting); + if (thd->killed) + thd->send_kill_message(); +#endif /* HAVE_REPLICATION */ + return timed_out ? -1 : 0; +} + + +static void +free_hash_element(void *p) +{ + gtid_waiting::hash_element *e= (gtid_waiting::hash_element *)p; + delete_queue(&e->queue); + my_free(e); +} + + +void +gtid_waiting::init() +{ + my_hash_init(&hash, &my_charset_bin, 32, + offsetof(hash_element, domain_id), sizeof(uint32), NULL, + free_hash_element, HASH_UNIQUE); + mysql_mutex_init(key_LOCK_gtid_waiting, &LOCK_gtid_waiting, 0); +} + + +void +gtid_waiting::destroy() +{ + mysql_mutex_destroy(&LOCK_gtid_waiting); + my_hash_free(&hash); +} + + +static int +cmp_queue_elem(void *, uchar *a, uchar *b) +{ + uint64 seq_no_a= *(uint64 *)a; + uint64 seq_no_b= *(uint64 *)b; + if (seq_no_a < seq_no_b) + return -1; + else if (seq_no_a == seq_no_b) + return 0; + else + return 1; +} + + +gtid_waiting::hash_element * +gtid_waiting::get_entry(uint32 domain_id) +{ + hash_element *e; + + if ((e= (hash_element *)my_hash_search(&hash, (const uchar *)&domain_id, 0))) + return e; + + if (!(e= (hash_element *)my_malloc(sizeof(*e), MYF(MY_WME)))) + { + my_error(ER_OUTOFMEMORY, MYF(0), sizeof(*e)); + return NULL; + } + + if (init_queue(&e->queue, 8, offsetof(queue_element, wait_seq_no), 0, + cmp_queue_elem, NULL, 1+offsetof(queue_element, queue_idx), 1)) + { + my_error(ER_OUT_OF_RESOURCES, MYF(0)); + my_free(e); + return NULL; + } + e->domain_id= domain_id; + if (my_hash_insert(&hash, (uchar *)e)) + { + my_error(ER_OUT_OF_RESOURCES, MYF(0)); + delete_queue(&e->queue); + my_free(e); + return NULL; + } + return e; +} + + +int +gtid_waiting::register_in_wait_queue(THD *thd, rpl_gtid *wait_gtid, + gtid_waiting::hash_element *he, + gtid_waiting::queue_element *elem) +{ + mysql_mutex_assert_owner(&LOCK_gtid_waiting); + + if (queue_insert_safe(&he->queue, (uchar *)elem)) + { + my_error(ER_OUT_OF_RESOURCES, MYF(0)); + return 1; + } + + return 0; +} + + +void +gtid_waiting::remove_from_wait_queue(gtid_waiting::hash_element *he, + gtid_waiting::queue_element *elem) +{ + mysql_mutex_assert_owner(&LOCK_gtid_waiting); + + queue_remove(&he->queue, elem->queue_idx); +} diff --git a/sql/rpl_gtid.h b/sql/rpl_gtid.h index b0bc54900e7..54f352661a7 100644 --- a/sql/rpl_gtid.h +++ b/sql/rpl_gtid.h @@ -16,6 +16,10 @@ #ifndef RPL_GTID_H #define RPL_GTID_H +#include "hash.h" +#include "queues.h" + + /* Definitions for MariaDB global transaction ID (GTID). */ @@ -37,6 +41,57 @@ enum enum_gtid_skip_type { /* + Structure to keep track of threads waiting in MASTER_GTID_WAIT(). + + Since replication is (mostly) single-threaded, we want to minimise the + performance impact on that from MASTER_GTID_WAIT(). To achieve this, we + are careful to keep the common lock between replication threads and + MASTER_GTID_WAIT threads held for as short as possible. We keep only + a single thread waiting to be notified by the replication threads; this + thread then handles all the (potentially heavy) lifting of dealing with + all current waiting threads. +*/ +struct gtid_waiting { + /* Elements in the hash, basically a priority queue for each domain. */ + struct hash_element { + QUEUE queue; + uint32 domain_id; + }; + /* A priority queue to handle waiters in one domain in seq_no order. */ + struct queue_element { + uint64 wait_seq_no; + THD *thd; + int queue_idx; + /* + do_small_wait is true if we have responsibility for ensuring that there + is a small waiter. + */ + bool do_small_wait; + /* + The flag `done' is set when the wait is completed (either due to reaching + the position waited for, or due to timeout or kill). The queue_element + is in the queue if and only if `done' is true. + */ + bool done; + }; + + mysql_mutex_t LOCK_gtid_waiting; + HASH hash; + + void init(); + void destroy(); + hash_element *get_entry(uint32 domain_id); + int wait_for_pos(THD *thd, String *gtid_str, longlong timeout_us); + void promote_new_waiter(gtid_waiting::hash_element *he); + int wait_for_gtid(THD *thd, rpl_gtid *wait_gtid, struct timespec *wait_until); + void process_wait_hash(uint64 wakeup_seq_no, gtid_waiting::hash_element *he); + int register_in_wait_queue(THD *thd, rpl_gtid *wait_gtid, hash_element *he, + queue_element *elem); + void remove_from_wait_queue(hash_element *he, queue_element *elem); +}; + + +/* Replication slave state. For every independent replication stream (identified by domain_id), this @@ -61,6 +116,20 @@ struct rpl_slave_state { struct list_element *list; uint32 domain_id; + /* Highest seq_no seen so far in this domain. */ + uint64 highest_seq_no; + /* + If this is non-NULL, then it is the waiter responsible for the small + wait in MASTER_GTID_WAIT(). + */ + gtid_waiting::queue_element *gtid_waiter; + /* + If gtid_waiter is non-NULL, then this is the seq_no that its + MASTER_GTID_WAIT() is waiting on. When we reach this seq_no, we need to + signal the waiter on COND_wait_gtid. + */ + uint64 min_wait_seq_no; + mysql_cond_t COND_wait_gtid; list_element *grab_list() { list_element *l= list; list= NULL; return l; } void add(list_element *l) @@ -99,9 +168,6 @@ struct rpl_slave_state bool in_statement); bool is_empty(); - void lock() { DBUG_ASSERT(inited); mysql_mutex_lock(&LOCK_slave_state); } - void unlock() { DBUG_ASSERT(inited); mysql_mutex_unlock(&LOCK_slave_state); } - element *get_element(uint32 domain_id); int put_back_list(uint32 domain_id, list_element *list); @@ -204,6 +270,7 @@ struct slave_connection_state int get_gtid_list(rpl_gtid *gtid_list, uint32 list_size); }; + extern bool rpl_slave_state_tostring_helper(String *dest, const rpl_gtid *gtid, bool *first); extern int gtid_check_rpl_slave_state_table(TABLE *table); diff --git a/sql/rpl_injector.h b/sql/rpl_injector.h index f4790cc963a..98788955e24 100644 --- a/sql/rpl_injector.h +++ b/sql/rpl_injector.h @@ -94,13 +94,13 @@ public: injector::transaction::table tbl(share->table, true); MY_BITMAP cols; - bitmap_init(&cols, NULL, (i + 7) / 8, false); + my_bitmap_init(&cols, NULL, (i + 7) / 8, false); inj->write_row(::server_id, tbl, &cols, row_data); or MY_BITMAP cols; - bitmap_init(&cols, NULL, (i + 7) / 8, false); + my_bitmap_init(&cols, NULL, (i + 7) / 8, false); inj->write_row(::server_id, injector::transaction::table(share->table, true), &cols, row_data); diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc index fced238e334..7764400becb 100644 --- a/sql/rpl_mi.cc +++ b/sql/rpl_mi.cc @@ -547,7 +547,7 @@ file '%s')", fname); mi->rli.is_relay_log_recovery= FALSE; // now change cache READ -> WRITE - must do this before flush_master_info reinit_io_cache(&mi->file, WRITE_CACHE, 0L, 0, 1); - if ((error=test(flush_master_info(mi, TRUE, TRUE)))) + if ((error= MY_TEST(flush_master_info(mi, TRUE, TRUE)))) sql_print_error("Failed to flush master info file"); mysql_mutex_unlock(&mi->data_lock); DBUG_RETURN(error); diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 80125e8aa29..27f17668849 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -2,6 +2,7 @@ #include "rpl_parallel.h" #include "slave.h" #include "rpl_mi.h" +#include "debug_sync.h" /* @@ -24,7 +25,7 @@ static int rpt_handle_event(rpl_parallel_thread::queued_event *qev, struct rpl_parallel_thread *rpt) { - int err __attribute__((unused)); + int err; rpl_group_info *rgi= qev->rgi; Relay_log_info *rli= rgi->rli; THD *thd= rgi->thd; @@ -92,32 +93,12 @@ handle_queued_pos_update(THD *thd, rpl_parallel_thread::queued_event *qev) } -static bool -sql_worker_killed(THD *thd, rpl_group_info *rgi, bool in_event_group) -{ - if (!rgi->rli->abort_slave && !abort_loop) - return false; - - /* - Do not abort in the middle of an event group that cannot be rolled back. - */ - if ((thd->transaction.all.modified_non_trans_table || - (thd->variables.option_bits & OPTION_KEEP_LOG)) - && in_event_group) - return false; - /* ToDo: should we add some timeout like in sql_slave_killed? - if (rgi->last_event_start_time == 0) - rgi->last_event_start_time= my_time(0); - */ - - return true; -} - - static void finish_event_group(THD *thd, int err, uint64 sub_id, - rpl_parallel_entry *entry, wait_for_commit *wfc) + rpl_parallel_entry *entry, rpl_group_info *rgi) { + wait_for_commit *wfc= &rgi->commit_orderer; + /* Remove any left-over registration to wait for a prior commit to complete. Normally, such wait would already have been removed at @@ -142,7 +123,7 @@ finish_event_group(THD *thd, int err, uint64 sub_id, if (err) wfc->unregister_wait_for_prior_commit(); else - wfc->wait_for_prior_commit(); + err= wfc->wait_for_prior_commit(thd); thd->wait_for_commit_ptr= NULL; /* @@ -162,16 +143,57 @@ finish_event_group(THD *thd, int err, uint64 sub_id, */ mysql_mutex_lock(&entry->LOCK_parallel_entry); if (entry->last_committed_sub_id < sub_id) - { entry->last_committed_sub_id= sub_id; - mysql_cond_broadcast(&entry->COND_parallel_entry); - } + + /* + If this event group got error, then any following event groups that have + not yet started should just skip their group, preparing for stop of the + SQL driver thread. + */ + if (unlikely(rgi->is_error) && + entry->stop_on_error_sub_id == (uint64)ULONGLONG_MAX) + entry->stop_on_error_sub_id= sub_id; + /* + We need to mark that this event group started its commit phase, in case we + missed it before (otherwise we would deadlock the next event group that is + waiting for this). In most cases (normal DML), it will be a no-op. + */ + rgi->mark_start_commit_no_lock(); mysql_mutex_unlock(&entry->LOCK_parallel_entry); + thd->clear_error(); + thd->get_stmt_da()->reset_diagnostics_area(); wfc->wakeup_subsequent_commits(err); } +static void +signal_error_to_sql_driver_thread(THD *thd, rpl_group_info *rgi) +{ + rgi->is_error= true; + rgi->cleanup_context(thd, true); + rgi->rli->abort_slave= true; + rgi->rli->stop_for_until= false; + mysql_mutex_lock(rgi->rli->relay_log.get_log_lock()); + mysql_mutex_unlock(rgi->rli->relay_log.get_log_lock()); + rgi->rli->relay_log.signal_update(); +} + + +static void +unlock_or_exit_cond(THD *thd, mysql_mutex_t *lock, bool *did_enter_cond, + PSI_stage_info *old_stage) +{ + if (*did_enter_cond) + { + thd->EXIT_COND(old_stage); + *did_enter_cond= false; + } + else + mysql_mutex_unlock(lock); +} + + pthread_handler_t handle_rpl_parallel_thread(void *arg) { @@ -180,8 +202,14 @@ handle_rpl_parallel_thread(void *arg) struct rpl_parallel_thread::queued_event *events; bool group_standalone= true; bool in_event_group= false; + bool group_skip_for_stop= false; rpl_group_info *group_rgi= NULL; + group_commit_orderer *gco, *tmp_gco; uint64 event_gtid_sub_id= 0; + rpl_parallel_thread::queued_event *qevs_to_free; + rpl_group_info *rgis_to_free; + group_commit_orderer *gcos_to_free; + size_t total_event_size; int err; struct rpl_parallel_thread *rpt= (struct rpl_parallel_thread *)arg; @@ -207,6 +235,7 @@ handle_rpl_parallel_thread(void *arg) thd->variables.log_slow_filter= global_system_variables.log_slow_filter; set_slave_thread_options(thd); thd->client_capabilities = CLIENT_LOCAL_FILES; + thd->net.reading_or_writing= 0; thd_proc_info(thd, "Waiting for work from main SQL threads"); thd->set_time(); thd->variables.lock_wait_timeout= LONG_TIMEOUT; @@ -220,43 +249,61 @@ handle_rpl_parallel_thread(void *arg) rpt->running= true; mysql_cond_signal(&rpt->COND_rpl_thread); - while (!rpt->stop && !thd->killed) + while (!rpt->stop) { - rpl_parallel_thread *list; - thd->ENTER_COND(&rpt->COND_rpl_thread, &rpt->LOCK_rpl_thread, &stage_waiting_for_work_from_sql_thread, &old_stage); - while (!(events= rpt->event_queue) && !rpt->stop && !thd->killed && - !(rpt->current_entry && rpt->current_entry->force_abort)) + /* + There are 4 cases that should cause us to wake up: + - Events have been queued for us to handle. + - We have an owner, but no events and not inside event group -> we need + to release ourself to the thread pool + - SQL thread is stopping, and we have an owner but no events, and we are + inside an event group; no more events will be queued to us, so we need + to abort the group (force_abort==1). + - Thread pool shutdown (rpt->stop==1). + */ + while (!( (events= rpt->event_queue) || + (rpt->current_owner && !in_event_group) || + (rpt->current_owner && group_rgi->parallel_entry->force_abort) || + rpt->stop)) mysql_cond_wait(&rpt->COND_rpl_thread, &rpt->LOCK_rpl_thread); - rpt->dequeue(events); + rpt->dequeue1(events); thd->EXIT_COND(&old_stage); - mysql_cond_signal(&rpt->COND_rpl_thread); more_events: + qevs_to_free= NULL; + rgis_to_free= NULL; + gcos_to_free= NULL; + total_event_size= 0; while (events) { struct rpl_parallel_thread::queued_event *next= events->next; Log_event_type event_type; rpl_group_info *rgi= events->rgi; rpl_parallel_entry *entry= rgi->parallel_entry; - uint64 wait_for_sub_id; - uint64 wait_start_sub_id; - bool end_of_group; + bool end_of_group, group_ending; + total_event_size+= events->event_size; if (!events->ev) { handle_queued_pos_update(thd, events); - my_free(events); + events->next= qevs_to_free; + qevs_to_free= events; events= next; continue; } err= 0; group_rgi= rgi; + gco= rgi->gco; /* Handle a new event group, which will be initiated by a GTID event. */ if ((event_type= events->ev->get_type_code()) == GTID_EVENT) { + bool did_enter_cond= false; + PSI_stage_info old_stage; + uint64 wait_count; + in_event_group= true; /* If the standalone flag is set, then this event group consists of a @@ -278,29 +325,87 @@ handle_rpl_parallel_thread(void *arg) occured. Also do not start parallel execution of this event group until all - prior groups have committed that are not safe to run in parallel with. + prior groups have reached the commit phase that are not safe to run + in parallel with. */ - wait_for_sub_id= rgi->wait_commit_sub_id; - wait_start_sub_id= rgi->wait_start_sub_id; - if (wait_for_sub_id || wait_start_sub_id) + mysql_mutex_lock(&entry->LOCK_parallel_entry); + if (!gco->installed) { - mysql_mutex_lock(&entry->LOCK_parallel_entry); - if (wait_start_sub_id) - { - while (wait_start_sub_id > entry->last_committed_sub_id) - mysql_cond_wait(&entry->COND_parallel_entry, - &entry->LOCK_parallel_entry); - } - rgi->wait_start_sub_id= 0; /* No need to check again. */ - if (wait_for_sub_id > entry->last_committed_sub_id) + if (gco->prev_gco) + gco->prev_gco->next_gco= gco; + gco->installed= true; + } + wait_count= gco->wait_count; + if (wait_count > entry->count_committing_event_groups) + { + DEBUG_SYNC(thd, "rpl_parallel_start_waiting_for_prior"); + thd->ENTER_COND(&gco->COND_group_commit_orderer, + &entry->LOCK_parallel_entry, + &stage_waiting_for_prior_transaction_to_commit, + &old_stage); + did_enter_cond= true; + do { - wait_for_commit *waitee= - &rgi->wait_commit_group_info->commit_orderer; - rgi->commit_orderer.register_wait_for_prior_commit(waitee); - } - mysql_mutex_unlock(&entry->LOCK_parallel_entry); + if (thd->check_killed() && !rgi->is_error) + { + DEBUG_SYNC(thd, "rpl_parallel_start_waiting_for_prior_killed"); + thd->send_kill_message(); + slave_output_error_info(rgi->rli, thd); + signal_error_to_sql_driver_thread(thd, rgi); + /* + Even though we were killed, we need to continue waiting for the + prior event groups to signal that we can continue. Otherwise we + mess up the accounting for ordering. However, now that we have + marked the error, events will just be skipped rather than + executed, and things will progress quickly towards stop. + */ + } + mysql_cond_wait(&gco->COND_group_commit_orderer, + &entry->LOCK_parallel_entry); + } while (wait_count > entry->count_committing_event_groups); + } + + if ((tmp_gco= gco->prev_gco)) + { + /* + Now all the event groups in the previous batch have entered their + commit phase, and will no longer access their gco. So we can free + it here. + */ + DBUG_ASSERT(!tmp_gco->prev_gco); + gco->prev_gco= NULL; + tmp_gco->next_gco= gcos_to_free; + gcos_to_free= tmp_gco; } + if (entry->force_abort && wait_count > entry->stop_count) + { + /* + We are stopping (STOP SLAVE), and this event group is beyond the + point where we can safely stop. So set a flag that will cause us + to skip, rather than execute, the following events. + */ + group_skip_for_stop= true; + } + else + group_skip_for_stop= false; + + if (unlikely(entry->stop_on_error_sub_id <= rgi->wait_commit_sub_id)) + group_skip_for_stop= true; + else if (rgi->wait_commit_sub_id > entry->last_committed_sub_id) + { + /* + Register that the commit of this event group must wait for the + commit of the previous event group to complete before it may + complete itself, so that we preserve commit order. + */ + wait_for_commit *waitee= + &rgi->wait_commit_group_info->commit_orderer; + rgi->commit_orderer.register_wait_for_prior_commit(waitee); + } + unlock_or_exit_cond(thd, &entry->LOCK_parallel_entry, + &did_enter_cond, &old_stage); + if(thd->wait_for_commit_ptr) { /* @@ -317,13 +422,23 @@ handle_rpl_parallel_thread(void *arg) thd->wait_for_commit_ptr= &rgi->commit_orderer; } + group_ending= event_type == XID_EVENT || + (event_type == QUERY_EVENT && + (((Query_log_event *)events->ev)->is_commit() || + ((Query_log_event *)events->ev)->is_rollback())); + if (group_ending) + { + DEBUG_SYNC(thd, "rpl_parallel_before_mark_start_commit"); + rgi->mark_start_commit(); + } + /* If the SQL thread is stopping, we just skip execution of all the following event groups. We still do all the normal waiting and wakeup processing between the event groups as a simple way to ensure that everything is stopped and cleaned up correctly. */ - if (!rgi->is_error && !sql_worker_killed(thd, rgi, in_event_group)) + if (!rgi->is_error && !group_skip_for_stop) err= rpt_handle_event(events, rpt); else err= thd->wait_for_prior_commit(); @@ -331,34 +446,55 @@ handle_rpl_parallel_thread(void *arg) end_of_group= in_event_group && ((group_standalone && !Log_event::is_part_of_group(event_type)) || - event_type == XID_EVENT || - (event_type == QUERY_EVENT && - (((Query_log_event *)events->ev)->is_commit() || - ((Query_log_event *)events->ev)->is_rollback()))); + group_ending); delete_or_keep_event_post_apply(rgi, event_type, events->ev); - my_free(events); + events->next= qevs_to_free; + qevs_to_free= events; if (err) { - rgi->is_error= true; slave_output_error_info(rgi->rli, thd); - rgi->cleanup_context(thd, true); - rgi->rli->abort_slave= true; + signal_error_to_sql_driver_thread(thd, rgi); } if (end_of_group) { in_event_group= false; - finish_event_group(thd, err, event_gtid_sub_id, entry, - &rgi->commit_orderer); - delete rgi; + finish_event_group(thd, err, event_gtid_sub_id, entry, rgi); + rgi->next= rgis_to_free; + rgis_to_free= rgi; group_rgi= rgi= NULL; + group_skip_for_stop= false; + DEBUG_SYNC(thd, "rpl_parallel_end_of_group"); } events= next; } mysql_mutex_lock(&rpt->LOCK_rpl_thread); + /* Signal that our queue can now accept more events. */ + rpt->dequeue2(total_event_size); + mysql_cond_signal(&rpt->COND_rpl_thread_queue); + /* We need to delay the free here, to when we have the lock. */ + while (gcos_to_free) + { + group_commit_orderer *next= gcos_to_free->next_gco; + rpt->free_gco(gcos_to_free); + gcos_to_free= next; + } + while (rgis_to_free) + { + rpl_group_info *next= rgis_to_free->next; + rpt->free_rgi(rgis_to_free); + rgis_to_free= next; + } + while (qevs_to_free) + { + rpl_parallel_thread::queued_event *next= qevs_to_free->next; + rpt->free_qev(qevs_to_free); + qevs_to_free= next; + } + if ((events= rpt->event_queue) != NULL) { /* @@ -366,9 +502,8 @@ handle_rpl_parallel_thread(void *arg) This is faster than having to wakeup the pool manager thread to give us a new event. */ - rpt->dequeue(events); + rpt->dequeue1(events); mysql_mutex_unlock(&rpt->LOCK_rpl_thread); - mysql_cond_signal(&rpt->COND_rpl_thread); goto more_events; } @@ -383,29 +518,26 @@ handle_rpl_parallel_thread(void *arg) half-processed event group. */ mysql_mutex_unlock(&rpt->LOCK_rpl_thread); - group_rgi->is_error= true; + thd->wait_for_prior_commit(); finish_event_group(thd, 1, group_rgi->gtid_sub_id, - group_rgi->parallel_entry, &group_rgi->commit_orderer); - group_rgi->cleanup_context(thd, true); - group_rgi->rli->abort_slave= true; + group_rgi->parallel_entry, group_rgi); + signal_error_to_sql_driver_thread(thd, group_rgi); in_event_group= false; - delete group_rgi; - group_rgi= NULL; mysql_mutex_lock(&rpt->LOCK_rpl_thread); + rpt->free_rgi(group_rgi); + group_rgi= NULL; + group_skip_for_stop= false; } if (!in_event_group) { + rpt->current_owner= NULL; + /* Tell wait_for_done() that we are done, if it is waiting. */ + if (likely(rpt->current_entry) && + unlikely(rpt->current_entry->force_abort)) + mysql_cond_broadcast(&rpt->current_entry->COND_parallel_entry); rpt->current_entry= NULL; if (!rpt->stop) - { - mysql_mutex_lock(&rpt->pool->LOCK_rpl_thread_pool); - list= rpt->pool->free_list; - rpt->next= list; - rpt->pool->free_list= rpt; - if (!list) - mysql_cond_broadcast(&rpt->pool->COND_rpl_thread_pool); - mysql_mutex_unlock(&rpt->pool->LOCK_rpl_thread_pool); - } + rpt->pool->release_thread(rpt); } } @@ -434,6 +566,15 @@ handle_rpl_parallel_thread(void *arg) } +static void +dealloc_gco(group_commit_orderer *gco) +{ + DBUG_ASSERT(!gco->prev_gco /* Must only free after dealloc previous */); + mysql_cond_destroy(&gco->COND_group_commit_orderer); + my_free(gco); +} + + int rpl_parallel_change_thread_count(rpl_parallel_thread_pool *pool, uint32 new_count, bool skip_check) @@ -468,8 +609,10 @@ rpl_parallel_change_thread_count(rpl_parallel_thread_pool *pool, mysql_mutex_init(key_LOCK_rpl_thread, &new_list[i]->LOCK_rpl_thread, MY_MUTEX_INIT_SLOW); mysql_cond_init(key_COND_rpl_thread, &new_list[i]->COND_rpl_thread, NULL); + mysql_cond_init(key_COND_rpl_thread_queue, + &new_list[i]->COND_rpl_thread_queue, NULL); new_list[i]->pool= pool; - if (mysql_thread_create(key_rpl_parallel_thread, &th, NULL, + if (mysql_thread_create(key_rpl_parallel_thread, &th, &connection_attrib, handle_rpl_parallel_thread, new_list[i])) { my_error(ER_OUT_OF_RESOURCES, MYF(0)); @@ -506,7 +649,7 @@ rpl_parallel_change_thread_count(rpl_parallel_thread_pool *pool, */ for (i= 0; i < pool->count; ++i) { - rpl_parallel_thread *rpt= pool->get_thread(NULL); + rpl_parallel_thread *rpt= pool->get_thread(NULL, NULL); rpt->stop= true; mysql_cond_signal(&rpt->COND_rpl_thread); mysql_mutex_unlock(&rpt->LOCK_rpl_thread); @@ -521,6 +664,24 @@ rpl_parallel_change_thread_count(rpl_parallel_thread_pool *pool, mysql_mutex_unlock(&rpt->LOCK_rpl_thread); mysql_mutex_destroy(&rpt->LOCK_rpl_thread); mysql_cond_destroy(&rpt->COND_rpl_thread); + while (rpt->qev_free_list) + { + rpl_parallel_thread::queued_event *next= rpt->qev_free_list->next; + my_free(rpt->qev_free_list); + rpt->qev_free_list= next; + } + while (rpt->rgi_free_list) + { + rpl_group_info *next= rpt->rgi_free_list->next; + delete rpt->rgi_free_list; + rpt->rgi_free_list= next; + } + while (rpt->gco_free_list) + { + group_commit_orderer *next= rpt->gco_free_list->next_gco; + dealloc_gco(rpt->gco_free_list); + rpt->gco_free_list= next; + } } my_free(pool->threads); @@ -544,6 +705,11 @@ rpl_parallel_change_thread_count(rpl_parallel_thread_pool *pool, pool->changing= false; mysql_mutex_unlock(&LOCK_active_mi); } + + mysql_mutex_lock(&pool->LOCK_rpl_thread_pool); + mysql_cond_broadcast(&pool->COND_rpl_thread_pool); + mysql_mutex_unlock(&pool->LOCK_rpl_thread_pool); + return 0; err: @@ -576,6 +742,117 @@ err: } +rpl_parallel_thread::queued_event * +rpl_parallel_thread::get_qev(Log_event *ev, ulonglong event_size, + Relay_log_info *rli) +{ + queued_event *qev; + mysql_mutex_assert_owner(&LOCK_rpl_thread); + if ((qev= qev_free_list)) + qev_free_list= qev->next; + else if(!(qev= (queued_event *)my_malloc(sizeof(*qev), MYF(0)))) + { + my_error(ER_OUTOFMEMORY, MYF(0), (int)sizeof(*qev)); + return NULL; + } + qev->ev= ev; + qev->event_size= event_size; + qev->next= NULL; + strcpy(qev->event_relay_log_name, rli->event_relay_log_name); + qev->event_relay_log_pos= rli->event_relay_log_pos; + qev->future_event_relay_log_pos= rli->future_event_relay_log_pos; + strcpy(qev->future_event_master_log_name, rli->future_event_master_log_name); + return qev; +} + + +void +rpl_parallel_thread::free_qev(rpl_parallel_thread::queued_event *qev) +{ + mysql_mutex_assert_owner(&LOCK_rpl_thread); + qev->next= qev_free_list; + qev_free_list= qev; +} + + +rpl_group_info* +rpl_parallel_thread::get_rgi(Relay_log_info *rli, Gtid_log_event *gtid_ev, + rpl_parallel_entry *e) +{ + rpl_group_info *rgi; + mysql_mutex_assert_owner(&LOCK_rpl_thread); + if ((rgi= rgi_free_list)) + { + rgi_free_list= rgi->next; + rgi->reinit(rli); + } + else + { + if(!(rgi= new rpl_group_info(rli))) + { + my_error(ER_OUTOFMEMORY, MYF(0), (int)sizeof(*rgi)); + return NULL; + } + rgi->is_parallel_exec = true; + } + if ((rgi->deferred_events_collecting= rli->mi->rpl_filter->is_on()) && + !rgi->deferred_events) + rgi->deferred_events= new Deferred_log_events(rli); + if (event_group_new_gtid(rgi, gtid_ev)) + { + free_rgi(rgi); + my_error(ER_OUT_OF_RESOURCES, MYF(MY_WME)); + return NULL; + } + rgi->parallel_entry= e; + + return rgi; +} + + +void +rpl_parallel_thread::free_rgi(rpl_group_info *rgi) +{ + mysql_mutex_assert_owner(&LOCK_rpl_thread); + DBUG_ASSERT(rgi->commit_orderer.waitee == NULL); + rgi->free_annotate_event(); + rgi->next= rgi_free_list; + rgi_free_list= rgi; +} + + +group_commit_orderer * +rpl_parallel_thread::get_gco(uint64 wait_count, group_commit_orderer *prev) +{ + group_commit_orderer *gco; + mysql_mutex_assert_owner(&LOCK_rpl_thread); + if ((gco= gco_free_list)) + gco_free_list= gco->next_gco; + else if(!(gco= (group_commit_orderer *)my_malloc(sizeof(*gco), MYF(0)))) + { + my_error(ER_OUTOFMEMORY, MYF(0), (int)sizeof(*gco)); + return NULL; + } + mysql_cond_init(key_COND_group_commit_orderer, + &gco->COND_group_commit_orderer, NULL); + gco->wait_count= wait_count; + gco->prev_gco= prev; + gco->next_gco= NULL; + gco->installed= false; + return gco; +} + + +void +rpl_parallel_thread::free_gco(group_commit_orderer *gco) +{ + mysql_mutex_assert_owner(&LOCK_rpl_thread); + DBUG_ASSERT(!gco->prev_gco /* Must not free until wait has completed. */); + gco->next_gco= gco_free_list; + gco_free_list= gco; +} + + rpl_parallel_thread_pool::rpl_parallel_thread_pool() : count(0), threads(0), free_list(0), changing(false), inited(false) { @@ -618,7 +895,8 @@ rpl_parallel_thread_pool::destroy() Note that we return with the worker threads's LOCK_rpl_thread mutex locked. */ struct rpl_parallel_thread * -rpl_parallel_thread_pool::get_thread(rpl_parallel_entry *entry) +rpl_parallel_thread_pool::get_thread(rpl_parallel_thread **owner, + rpl_parallel_entry *entry) { rpl_parallel_thread *rpt; @@ -628,16 +906,152 @@ rpl_parallel_thread_pool::get_thread(rpl_parallel_entry *entry) free_list= rpt->next; mysql_mutex_unlock(&LOCK_rpl_thread_pool); mysql_mutex_lock(&rpt->LOCK_rpl_thread); + rpt->current_owner= owner; rpt->current_entry= entry; return rpt; } +/* + Release a thread to the thread pool. + The thread should be locked, and should not have any work queued for it. +*/ +void +rpl_parallel_thread_pool::release_thread(rpl_parallel_thread *rpt) +{ + rpl_parallel_thread *list; + + mysql_mutex_assert_owner(&rpt->LOCK_rpl_thread); + DBUG_ASSERT(rpt->current_owner == NULL); + mysql_mutex_lock(&LOCK_rpl_thread_pool); + list= free_list; + rpt->next= list; + free_list= rpt; + if (!list) + mysql_cond_broadcast(&COND_rpl_thread_pool); + mysql_mutex_unlock(&LOCK_rpl_thread_pool); +} + + +/* + Obtain a worker thread that we can queue an event to. + + Each invocation allocates a new worker thread, to maximise + parallelism. However, only up to a maximum of + --slave-domain-parallel-threads workers can be occupied by a single + replication domain; after that point, we start re-using worker threads that + are still executing events that were queued earlier for this thread. + + We never queue more than --rpl-parallel-wait-queue_max amount of events + for one worker, to avoid the SQL driver thread using up all memory with + queued events while worker threads are stalling. + + Note that this function returns with rpl_parallel_thread::LOCK_rpl_thread + locked. Exception is if we were killed, in which case NULL is returned. + + The *did_enter_cond flag is set true if we had to wait for a worker thread + to become free (with mysql_cond_wait()). If so, old_stage will also be set, + and the LOCK_rpl_thread must be released with THD::EXIT_COND() instead + of mysql_mutex_unlock. + + If the flag `reuse' is set, the last worker thread will be returned again, + if it is still available. Otherwise a new worker thread is allocated. +*/ +rpl_parallel_thread * +rpl_parallel_entry::choose_thread(Relay_log_info *rli, bool *did_enter_cond, + PSI_stage_info *old_stage, bool reuse) +{ + uint32 idx; + rpl_parallel_thread *thr; + + idx= rpl_thread_idx; + if (!reuse) + { + ++idx; + if (idx >= rpl_thread_max) + idx= 0; + rpl_thread_idx= idx; + } + thr= rpl_threads[idx]; + if (thr) + { + *did_enter_cond= false; + mysql_mutex_lock(&thr->LOCK_rpl_thread); + for (;;) + { + if (thr->current_owner != &rpl_threads[idx]) + { + /* + The worker thread became idle, and returned to the free list and + possibly was allocated to a different request. So we should allocate + a new worker thread. + */ + unlock_or_exit_cond(rli->sql_driver_thd, &thr->LOCK_rpl_thread, + did_enter_cond, old_stage); + thr= NULL; + break; + } + else if (thr->queued_size <= opt_slave_parallel_max_queued) + { + /* The thread is ready to queue into. */ + break; + } + else if (rli->sql_driver_thd->check_killed()) + { + unlock_or_exit_cond(rli->sql_driver_thd, &thr->LOCK_rpl_thread, + did_enter_cond, old_stage); + my_error(ER_CONNECTION_KILLED, MYF(0)); + DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max", + { + debug_sync_set_action(rli->sql_driver_thd, + STRING_WITH_LEN("now SIGNAL wait_queue_killed")); + };); + slave_output_error_info(rli, rli->sql_driver_thd); + return NULL; + } + else + { + /* + We have reached the limit of how much memory we are allowed to use + for queuing events, so wait for the thread to consume some of its + queue. + */ + if (!*did_enter_cond) + { + /* + We need to do the debug_sync before ENTER_COND(). + Because debug_sync changes the thd->mysys_var->current_mutex, + and this can cause THD::awake to use the wrong mutex. + */ + DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max", + { + debug_sync_set_action(rli->sql_driver_thd, + STRING_WITH_LEN("now SIGNAL wait_queue_ready")); + };); + rli->sql_driver_thd->ENTER_COND(&thr->COND_rpl_thread_queue, + &thr->LOCK_rpl_thread, + &stage_waiting_for_room_in_worker_thread, + old_stage); + *did_enter_cond= true; + } + mysql_cond_wait(&thr->COND_rpl_thread_queue, &thr->LOCK_rpl_thread); + } + } + } + if (!thr) + rpl_threads[idx]= thr= global_rpl_thread_pool.get_thread(&rpl_threads[idx], + this); + + return thr; +} + static void free_rpl_parallel_entry(void *element) { rpl_parallel_entry *e= (rpl_parallel_entry *)element; + if (e->current_gco) + dealloc_gco(e->current_gco); mysql_cond_destroy(&e->COND_parallel_entry); mysql_mutex_destroy(&e->LOCK_parallel_entry); my_free(e); @@ -677,10 +1091,22 @@ rpl_parallel::find(uint32 domain_id) (const uchar *)&domain_id, 0))) { /* Allocate a new, empty one. */ - if (!(e= (struct rpl_parallel_entry *)my_malloc(sizeof(*e), - MYF(MY_ZEROFILL)))) + ulong count= opt_slave_domain_parallel_threads; + if (count == 0 || count > opt_slave_parallel_threads) + count= opt_slave_parallel_threads; + rpl_parallel_thread **p; + if (!my_multi_malloc(MYF(MY_WME|MY_ZEROFILL), + &e, sizeof(*e), + &p, count*sizeof(*p), + NULL)) + { + my_error(ER_OUTOFMEMORY, MYF(0), (int)(sizeof(*e)+count*sizeof(*p))); return NULL; + } + e->rpl_threads= p; + e->rpl_thread_max= count; e->domain_id= domain_id; + e->stop_on_error_sub_id= (uint64)ULONGLONG_MAX; if (my_hash_insert(&domain_hash, (uchar *)e)) { my_free(e); @@ -698,10 +1124,11 @@ rpl_parallel::find(uint32 domain_id) void -rpl_parallel::wait_for_done() +rpl_parallel::wait_for_done(THD *thd, Relay_log_info *rli) { struct rpl_parallel_entry *e; - uint32 i; + rpl_parallel_thread *rpt; + uint32 i, j; /* First signal all workers that they must force quit; no more events will @@ -709,27 +1136,123 @@ rpl_parallel::wait_for_done() */ for (i= 0; i < domain_hash.records; ++i) { - rpl_parallel_thread *rpt; - e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i); + mysql_mutex_lock(&e->LOCK_parallel_entry); + /* + We want the worker threads to stop as quickly as is safe. If the slave + SQL threads are behind, we could have significant amount of events + queued for the workers, and we want to stop without waiting for them + all to be applied first. But if any event group has already started + executing in a worker, we want to be sure that all prior event groups + are also executed, so that we stop at a consistent point in the binlog + stream (per replication domain). + + All event groups wait for e->count_committing_event_groups to reach + the value of group_commit_orderer::wait_count before starting to + execute. Thus, at this point we know that any event group with a + strictly larger wait_count are safe to skip, none of them can have + started executing yet. So we set e->stop_count here and use it to + decide in the worker threads whether to continue executing an event + group or whether to skip it, when force_abort is set. + + If we stop due to reaching the START SLAVE UNTIL condition, then we + need to continue executing any queued events up to that point. + */ e->force_abort= true; - if ((rpt= e->rpl_thread)) + e->stop_count= rli->stop_for_until ? + e->count_queued_event_groups : e->count_committing_event_groups; + mysql_mutex_unlock(&e->LOCK_parallel_entry); + for (j= 0; j < e->rpl_thread_max; ++j) { - mysql_mutex_lock(&rpt->LOCK_rpl_thread); - if (rpt->current_entry == e) - mysql_cond_signal(&rpt->COND_rpl_thread); - mysql_mutex_unlock(&rpt->LOCK_rpl_thread); + if ((rpt= e->rpl_threads[j])) + { + mysql_mutex_lock(&rpt->LOCK_rpl_thread); + if (rpt->current_owner == &e->rpl_threads[j]) + mysql_cond_signal(&rpt->COND_rpl_thread); + mysql_mutex_unlock(&rpt->LOCK_rpl_thread); + } + } + } + DBUG_EXECUTE_IF("rpl_parallel_wait_for_done_trigger", + { + debug_sync_set_action(thd, + STRING_WITH_LEN("now SIGNAL wait_for_done_waiting")); + };); + + for (i= 0; i < domain_hash.records; ++i) + { + e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i); + for (j= 0; j < e->rpl_thread_max; ++j) + { + if ((rpt= e->rpl_threads[j])) + { + mysql_mutex_lock(&rpt->LOCK_rpl_thread); + while (rpt->current_owner == &e->rpl_threads[j]) + mysql_cond_wait(&e->COND_parallel_entry, &rpt->LOCK_rpl_thread); + mysql_mutex_unlock(&rpt->LOCK_rpl_thread); + } } } +} + + +/* + This function handles the case where the SQL driver thread reached the + START SLAVE UNTIL position; we stop queueing more events but continue + processing remaining, already queued events; then use executes manual + STOP SLAVE; then this function signals to worker threads that they + should stop the processing of any remaining queued events. +*/ +void +rpl_parallel::stop_during_until() +{ + struct rpl_parallel_entry *e; + uint32 i; for (i= 0; i < domain_hash.records; ++i) { e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i); mysql_mutex_lock(&e->LOCK_parallel_entry); - while (e->current_sub_id > e->last_committed_sub_id) - mysql_cond_wait(&e->COND_parallel_entry, &e->LOCK_parallel_entry); + if (e->force_abort) + e->stop_count= e->count_committing_event_groups; + mysql_mutex_unlock(&e->LOCK_parallel_entry); + } +} + + +bool +rpl_parallel::workers_idle() +{ + struct rpl_parallel_entry *e; + uint32 i, max_i; + + max_i= domain_hash.records; + for (i= 0; i < max_i; ++i) + { + bool active; + e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i); + mysql_mutex_lock(&e->LOCK_parallel_entry); + active= e->current_sub_id > e->last_committed_sub_id; mysql_mutex_unlock(&e->LOCK_parallel_entry); + if (active) + break; } + return (i == max_i); +} + + +/* + This is used when we get an error during processing in do_event(); + We will not queue any event to the thread, but we still need to wake it up + to be sure that it will be returned to the pool. +*/ +static void +abandon_worker_thread(THD *thd, rpl_parallel_thread *cur_thread, + bool *did_enter_cond, PSI_stage_info *old_stage) +{ + unlock_or_exit_cond(thd, &cur_thread->LOCK_rpl_thread, + did_enter_cond, old_stage); + mysql_cond_signal(&cur_thread->COND_rpl_thread); } @@ -737,11 +1260,12 @@ rpl_parallel::wait_for_done() do_event() is executed by the sql_driver_thd thread. It's main purpose is to find a thread that can execute the query. - @retval false ok, event was accepted - @retval true error + @retval 0 ok, event was accepted + @retval 1 error + @retval -1 event should be executed serially, in the sql driver thread */ -bool +int rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, ulonglong event_size) { @@ -752,6 +1276,34 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, Relay_log_info *rli= serial_rgi->rli; enum Log_event_type typ; bool is_group_event; + bool did_enter_cond= false; + PSI_stage_info old_stage; + + /* Handle master log name change, seen in Rotate_log_event. */ + typ= ev->get_type_code(); + if (unlikely(typ == ROTATE_EVENT)) + { + Rotate_log_event *rev= static_cast<Rotate_log_event *>(ev); + if ((rev->server_id != global_system_variables.server_id || + rli->replicate_same_server_id) && + !rev->is_relay_log_event() && + !rli->is_in_group()) + { + memcpy(rli->future_event_master_log_name, + rev->new_log_ident, rev->ident_len+1); + } + } + + /* + Execute queries non-parallel if slave_skip_counter is set, as it's is + easier to skip queries in single threaded mode. + */ + if (rli->slave_skip_counter) + return -1; + + /* Execute pre-10.0 event, which have no GTID, in single-threaded mode. */ + if (unlikely(!current) && typ != GTID_EVENT) + return -1; /* ToDo: what to do with this lock?!? */ mysql_mutex_unlock(&rli->data_lock); @@ -759,161 +1311,132 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, /* Stop queueing additional event groups once the SQL thread is requested to stop. + + We have to queue any remaining events of any event group that has already + been partially queued, but after that we will just ignore any further + events the SQL driver thread may try to queue, and eventually it will stop. */ - if (((typ= ev->get_type_code()) == GTID_EVENT || - !(is_group_event= Log_event::is_group_event(typ))) && - rli->abort_slave) + is_group_event= Log_event::is_group_event(typ); + if ((typ == GTID_EVENT || !is_group_event) && rli->abort_slave) sql_thread_stopping= true; if (sql_thread_stopping) { - /* QQ: Need a better comment why we return false here */ - return false; + delete ev; + /* + Return "no error"; normal stop is not an error, and otherwise the error + has already been recorded. + */ + return 0; } - if (!(qev= (rpl_parallel_thread::queued_event *)my_malloc(sizeof(*qev), - MYF(0)))) + if (typ == GTID_EVENT) { - my_error(ER_OUT_OF_RESOURCES, MYF(0)); - return true; + uint32 domain_id; + if (likely(typ == GTID_EVENT)) + { + Gtid_log_event *gtid_ev= static_cast<Gtid_log_event *>(ev); + domain_id= (rli->mi->using_gtid == Master_info::USE_GTID_NO ? + 0 : gtid_ev->domain_id); + } + else + domain_id= 0; + if (!(e= find(domain_id))) + { + my_error(ER_OUT_OF_RESOURCES, MYF(MY_WME)); + delete ev; + return 1; + } + current= e; + } + else + e= current; + + /* + Find a worker thread to queue the event for. + Prefer a new thread, so we maximise parallelism (at least for the group + commit). But do not exceed a limit of --slave-domain-parallel-threads; + instead re-use a thread that we queued for previously. + */ + cur_thread= + e->choose_thread(rli, &did_enter_cond, &old_stage, typ != GTID_EVENT); + if (!cur_thread) + { + /* This means we were killed. The error is already signalled. */ + delete ev; + return 1; + } + + if (!(qev= cur_thread->get_qev(ev, event_size, rli))) + { + abandon_worker_thread(rli->sql_driver_thd, cur_thread, + &did_enter_cond, &old_stage); + delete ev; + return 1; } - qev->ev= ev; - qev->event_size= event_size; - qev->next= NULL; - strcpy(qev->event_relay_log_name, rli->event_relay_log_name); - qev->event_relay_log_pos= rli->event_relay_log_pos; - qev->future_event_relay_log_pos= rli->future_event_relay_log_pos; - strcpy(qev->future_event_master_log_name, rli->future_event_master_log_name); if (typ == GTID_EVENT) { Gtid_log_event *gtid_ev= static_cast<Gtid_log_event *>(ev); - uint32 domain_id= (rli->mi->using_gtid == Master_info::USE_GTID_NO ? - 0 : gtid_ev->domain_id); - if (!(e= find(domain_id)) || - !(rgi= new rpl_group_info(rli)) || - event_group_new_gtid(rgi, gtid_ev)) + if (!(rgi= cur_thread->get_rgi(rli, gtid_ev, e))) { - my_error(ER_OUT_OF_RESOURCES, MYF(MY_WME)); - delete rgi; - return true; + cur_thread->free_qev(qev); + abandon_worker_thread(rli->sql_driver_thd, cur_thread, + &did_enter_cond, &old_stage); + delete ev; + return 1; } - rgi->is_parallel_exec = true; - if ((rgi->deferred_events_collecting= rli->mi->rpl_filter->is_on())) - rgi->deferred_events= new Deferred_log_events(rli); - if ((gtid_ev->flags2 & Gtid_log_event::FL_GROUP_COMMIT_ID) && - e->last_commit_id == gtid_ev->commit_id) - { - /* - We are already executing something else in this domain. But the two - event groups were committed together in the same group commit on the - master, so we can still do them in parallel here on the slave. + /* + We queue the event group in a new worker thread, to run in parallel + with previous groups. - However, the commit of this event must wait for the commit of the prior - event, to preserve binlog commit order and visibility across all - servers in the replication hierarchy. - */ - rpl_parallel_thread *rpt= global_rpl_thread_pool.get_thread(e); - rgi->wait_commit_sub_id= e->current_sub_id; - rgi->wait_commit_group_info= e->current_group_info; - rgi->wait_start_sub_id= e->prev_groupcommit_sub_id; - e->rpl_thread= cur_thread= rpt; - /* get_thread() returns with the LOCK_rpl_thread locked. */ - } - else + To preserve commit order within the replication domain, we set up + rgi->wait_commit_sub_id to make the new group commit only after the + previous group has committed. + + Event groups that group-committed together on the master can be run + in parallel with each other without restrictions. But one batch of + group-commits may not start before all groups in the previous batch + have initiated their commit phase; we set up rgi->gco to ensure that. + */ + rgi->wait_commit_sub_id= e->current_sub_id; + rgi->wait_commit_group_info= e->current_group_info; + + if (!((gtid_ev->flags2 & Gtid_log_event::FL_GROUP_COMMIT_ID) && + e->last_commit_id == gtid_ev->commit_id)) { /* - Check if we already have a worker thread for this entry. - - We continue to queue more events up for the worker thread while it is - still executing the first ones, to be able to start executing a large - event group without having to wait for the end to be fetched from the - master. And we continue to queue up more events after the first group, - so that we can continue to process subsequent parts of the relay log in - parallel without having to wait for previous long-running events to - complete. - - But if the worker thread is idle at any point, it may return to the - idle list or start servicing a different request. So check this, and - allocate a new thread if the old one is no longer processing for us. + A new batch of transactions that group-committed together on the master. + + Remember the count that marks the end of the previous group committed + batch, and allocate a new gco. */ - cur_thread= e->rpl_thread; - if (cur_thread) - { - mysql_mutex_lock(&cur_thread->LOCK_rpl_thread); - for (;;) - { - if (cur_thread->current_entry != e) - { - /* - The worker thread became idle, and returned to the free list and - possibly was allocated to a different request. This also means - that everything previously queued has already been executed, - else the worker thread would not have become idle. So we should - allocate a new worker thread. - */ - mysql_mutex_unlock(&cur_thread->LOCK_rpl_thread); - e->rpl_thread= cur_thread= NULL; - break; - } - else if (cur_thread->queued_size <= opt_slave_parallel_max_queued) - break; // The thread is ready to queue into - else - { - /* - We have reached the limit of how much memory we are allowed to - use for queuing events, so wait for the thread to consume some - of its queue. - */ - mysql_cond_wait(&cur_thread->COND_rpl_thread, - &cur_thread->LOCK_rpl_thread); - } - } - } + uint64 count= e->count_queued_event_groups; + group_commit_orderer *gco; - if (!cur_thread) - { - /* - Nothing else is currently running in this domain. We can - spawn a new thread to do this event group in parallel with - anything else that might be running in other domains. - */ - cur_thread= e->rpl_thread= global_rpl_thread_pool.get_thread(e); - /* get_thread() returns with the LOCK_rpl_thread locked. */ - } - else + if (!(gco= cur_thread->get_gco(count, e->current_gco))) { - /* - We are still executing the previous event group for this replication - domain, and we have to wait for that to finish before we can start on - the next one. So just re-use the thread. - */ + cur_thread->free_rgi(rgi); + cur_thread->free_qev(qev); + abandon_worker_thread(rli->sql_driver_thd, cur_thread, + &did_enter_cond, &old_stage); + delete ev; + return 1; } - - rgi->wait_commit_sub_id= 0; - rgi->wait_start_sub_id= 0; - e->prev_groupcommit_sub_id= e->current_sub_id; + e->current_gco= rgi->gco= gco; } - + else + rgi->gco= e->current_gco; if (gtid_ev->flags2 & Gtid_log_event::FL_GROUP_COMMIT_ID) - { - e->last_server_id= gtid_ev->server_id; - e->last_seq_no= gtid_ev->seq_no; e->last_commit_id= gtid_ev->commit_id; - } else - { - e->last_server_id= 0; - e->last_seq_no= 0; e->last_commit_id= 0; - } - qev->rgi= e->current_group_info= rgi; e->current_sub_id= rgi->gtid_sub_id; - current= rgi->parallel_entry= e; + ++e->count_queued_event_groups; } - else if (!is_group_event || !current) + else if (!is_group_event) { my_off_t log_pos; int err; @@ -922,45 +1445,22 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, Events like ROTATE and FORMAT_DESCRIPTION. Do not run in worker thread. Same for events not preceeded by GTID (we should not see those normally, but they might be from an old master). - - The varuable `current' is NULL for the case where the master did not - have GTID, like a MariaDB 5.5 or MySQL master. */ qev->rgi= serial_rgi; - /* Handle master log name change, seen in Rotate_log_event. */ - if (typ == ROTATE_EVENT) - { - Rotate_log_event *rev= static_cast<Rotate_log_event *>(qev->ev); - if ((rev->server_id != global_system_variables.server_id || - rli->replicate_same_server_id) && - !rev->is_relay_log_event() && - !rli->is_in_group()) - { - memcpy(rli->future_event_master_log_name, - rev->new_log_ident, rev->ident_len+1); - } - } tmp= serial_rgi->is_parallel_exec; serial_rgi->is_parallel_exec= true; err= rpt_handle_event(qev, NULL); serial_rgi->is_parallel_exec= tmp; - log_pos= qev->ev->log_pos; - delete_or_keep_event_post_apply(serial_rgi, typ, qev->ev); + log_pos= ev->log_pos; + delete_or_keep_event_post_apply(serial_rgi, typ, ev); if (err) { - my_free(qev); - return true; - } - qev->ev= NULL; - qev->future_event_master_log_pos= log_pos; - if (!current) - { - rli->event_relay_log_pos= rli->future_event_relay_log_pos; - handle_queued_pos_update(rli->sql_driver_thd, qev); - my_free(qev); - return false; + cur_thread->free_qev(qev); + abandon_worker_thread(rli->sql_driver_thd, cur_thread, + &did_enter_cond, &old_stage); + return 1; } /* Queue an empty event, so that the position will be updated in a @@ -974,40 +1474,12 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, least the position will not be updated until one of them has reached the current point. */ - cur_thread= current->rpl_thread; - if (cur_thread) - { - mysql_mutex_lock(&cur_thread->LOCK_rpl_thread); - if (cur_thread->current_entry != current) - { - /* Not ours anymore, we need to grab a new one. */ - mysql_mutex_unlock(&cur_thread->LOCK_rpl_thread); - cur_thread= NULL; - } - } - if (!cur_thread) - cur_thread= current->rpl_thread= - global_rpl_thread_pool.get_thread(current); + qev->ev= NULL; + qev->future_event_master_log_pos= log_pos; } else { - cur_thread= current->rpl_thread; - if (cur_thread) - { - mysql_mutex_lock(&cur_thread->LOCK_rpl_thread); - if (cur_thread->current_entry != current) - { - /* Not ours anymore, we need to grab a new one. */ - mysql_mutex_unlock(&cur_thread->LOCK_rpl_thread); - cur_thread= NULL; - } - } - if (!cur_thread) - { - cur_thread= current->rpl_thread= - global_rpl_thread_pool.get_thread(current); - } - qev->rgi= current->current_group_info; + qev->rgi= e->current_group_info; } /* @@ -1015,8 +1487,9 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, */ rli->event_relay_log_pos= rli->future_event_relay_log_pos; cur_thread->enqueue(qev); - mysql_mutex_unlock(&cur_thread->LOCK_rpl_thread); + unlock_or_exit_cond(rli->sql_driver_thd, &cur_thread->LOCK_rpl_thread, + &did_enter_cond, &old_stage); mysql_cond_signal(&cur_thread->COND_rpl_thread); - return false; + return 0; } diff --git a/sql/rpl_parallel.h b/sql/rpl_parallel.h index 0e88e09652b..c4bb407e5eb 100644 --- a/sql/rpl_parallel.h +++ b/sql/rpl_parallel.h @@ -9,16 +9,66 @@ struct rpl_parallel_entry; struct rpl_parallel_thread_pool; class Relay_log_info; + + +/* + Structure used to keep track of the parallel replication of a batch of + event-groups that group-committed together on the master. + + It is used to ensure that every event group in one batch has reached the + commit stage before the next batch starts executing. + + Note the lifetime of this structure: + + - It is allocated when the first event in a new batch of group commits + is queued, from the free list rpl_parallel_entry::gco_free_list. + + - The gco for the batch currently being queued is owned by + rpl_parallel_entry::current_gco. The gco for a previous batch that has + been fully queued is owned by the gco->prev_gco pointer of the gco for + the following batch. + + - The worker thread waits on gco->COND_group_commit_orderer for + rpl_parallel_entry::count_committing_event_groups to reach wait_count + before starting; the first waiter links the gco into the next_gco + pointer of the gco of the previous batch for signalling. + + - When an event group reaches the commit stage, it signals the + COND_group_commit_orderer if its gco->next_gco pointer is non-NULL and + rpl_parallel_entry::count_committing_event_groups has reached + gco->next_gco->wait_count. + + - When gco->wait_count is reached for a worker and the wait completes, + the worker frees gco->prev_gco; at this point it is guaranteed not to + be needed any longer. +*/ +struct group_commit_orderer { + /* Wakeup condition, used with rpl_parallel_entry::LOCK_parallel_entry. */ + mysql_cond_t COND_group_commit_orderer; + uint64 wait_count; + group_commit_orderer *prev_gco; + group_commit_orderer *next_gco; + bool installed; +}; + + struct rpl_parallel_thread { bool delay_start; bool running; bool stop; mysql_mutex_t LOCK_rpl_thread; mysql_cond_t COND_rpl_thread; + mysql_cond_t COND_rpl_thread_queue; struct rpl_parallel_thread *next; /* For free list. */ struct rpl_parallel_thread_pool *pool; THD *thd; - struct rpl_parallel_entry *current_entry; + /* + Who owns the thread, if any (it's a pointer into the + rpl_parallel_entry::rpl_threads array. + */ + struct rpl_parallel_thread **current_owner; + /* The rpl_parallel_entry of the owner. */ + rpl_parallel_entry *current_entry; struct queued_event { queued_event *next; Log_event *ev; @@ -31,6 +81,9 @@ struct rpl_parallel_thread { size_t event_size; } *event_queue, *last_in_queue; uint64 queued_size; + queued_event *qev_free_list; + rpl_group_info *rgi_free_list; + group_commit_orderer *gco_free_list; void enqueue(queued_event *qev) { @@ -42,15 +95,25 @@ struct rpl_parallel_thread { queued_size+= qev->event_size; } - void dequeue(queued_event *list) + void dequeue1(queued_event *list) { - queued_event *tmp; - DBUG_ASSERT(list == event_queue); event_queue= last_in_queue= NULL; - for (tmp= list; tmp; tmp= tmp->next) - queued_size-= tmp->event_size; } + + void dequeue2(size_t dequeue_size) + { + queued_size-= dequeue_size; + } + + queued_event *get_qev(Log_event *ev, ulonglong event_size, + Relay_log_info *rli); + void free_qev(queued_event *qev); + rpl_group_info *get_rgi(Relay_log_info *rli, Gtid_log_event *gtid_ev, + rpl_parallel_entry *e); + void free_rgi(rpl_group_info *rgi); + group_commit_orderer *get_gco(uint64 wait_count, group_commit_orderer *prev); + void free_gco(group_commit_orderer *gco); }; @@ -66,14 +129,16 @@ struct rpl_parallel_thread_pool { rpl_parallel_thread_pool(); int init(uint32 size); void destroy(); - struct rpl_parallel_thread *get_thread(rpl_parallel_entry *entry); + struct rpl_parallel_thread *get_thread(rpl_parallel_thread **owner, + rpl_parallel_entry *entry); + void release_thread(rpl_parallel_thread *rpt); }; struct rpl_parallel_entry { + mysql_mutex_t LOCK_parallel_entry; + mysql_cond_t COND_parallel_entry; uint32 domain_id; - uint32 last_server_id; - uint64 last_seq_no; uint64 last_commit_id; bool active; /* @@ -82,15 +147,41 @@ struct rpl_parallel_entry { waiting for event groups to complete. */ bool force_abort; + /* + At STOP SLAVE (force_abort=true), we do not want to process all events in + the queue (which could unnecessarily delay stop, if a lot of events happen + to be queued). The stop_count provides a safe point at which to stop, so + that everything before becomes committed and nothing after does. The value + corresponds to group_commit_orderer::wait_count; if wait_count is less than + or equal to stop_count, we execute the associated event group, else we + skip it (and all following) and stop. + */ + uint64 stop_count; - rpl_parallel_thread *rpl_thread; + /* + Cyclic array recording the last rpl_thread_max worker threads that we + queued event for. This is used to limit how many workers a single domain + can occupy (--slave-domain-parallel-threads). + + Note that workers are never explicitly deleted from the array. Instead, + we need to check (under LOCK_rpl_thread) that the thread still belongs + to us before re-using (rpl_thread::current_owner). + */ + rpl_parallel_thread **rpl_threads; + uint32 rpl_thread_max; + uint32 rpl_thread_idx; /* The sub_id of the last transaction to commit within this domain_id. Must be accessed under LOCK_parallel_entry protection. + + Event groups commit in order, so the rpl_group_info for an event group + will be alive (at least) as long as + rpl_grou_info::gtid_sub_id > last_committed_sub_id. This can be used to + safely refer back to previous event groups if they are still executing, + and ignore them if they completed, without requiring explicit + synchronisation between the threads. */ uint64 last_committed_sub_id; - mysql_mutex_t LOCK_parallel_entry; - mysql_cond_t COND_parallel_entry; /* The sub_id of the last event group in this replication domain that was queued for execution by a worker thread. @@ -98,14 +189,29 @@ struct rpl_parallel_entry { uint64 current_sub_id; rpl_group_info *current_group_info; /* - The sub_id of the last event group in the previous batch of group-committed - transactions. - - When we spawn parallel worker threads for the next group-committed batch, - they first need to wait for this sub_id to be committed before it is safe - to start executing them. + If we get an error in some event group, we set the sub_id of that event + group here. Then later event groups (with higher sub_id) can know not to + try to start (event groups that already started will be rolled back when + wait_for_prior_commit() returns error). + The value is ULONGLONG_MAX when no error occured. + */ + uint64 stop_on_error_sub_id; + /* Total count of event groups queued so far. */ + uint64 count_queued_event_groups; + /* + Count of event groups that have started (but not necessarily completed) + the commit phase. We use this to know when every event group in a previous + batch of master group commits have started committing on the slave, so + that it is safe to start executing the events in the following batch. */ - uint64 prev_groupcommit_sub_id; + uint64 count_committing_event_groups; + /* The group_commit_orderer object for the events currently being queued. */ + group_commit_orderer *current_gco; + + rpl_parallel_thread * choose_thread(Relay_log_info *rli, bool *did_enter_cond, + PSI_stage_info *old_stage, bool reuse); + group_commit_orderer *get_gco(); + void free_gco(group_commit_orderer *gco); }; struct rpl_parallel { HASH domain_hash; @@ -116,9 +222,10 @@ struct rpl_parallel { ~rpl_parallel(); void reset(); rpl_parallel_entry *find(uint32 domain_id); - void wait_for_done(); - bool do_event(rpl_group_info *serial_rgi, Log_event *ev, - ulonglong event_size); + void wait_for_done(THD *thd, Relay_log_info *rli); + void stop_during_until(); + bool workers_idle(); + int do_event(rpl_group_info *serial_rgi, Log_event *ev, ulonglong event_size); }; diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index 4a2e88150bf..0ac7d6d7a36 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -1,6 +1,5 @@ -/* - Copyright (c) 2007, 2010, Oracle and/or its affiliates. - Copyright (c) 2008-2011 Monty Program Ab +/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. + Copyright (c) 2008, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -171,11 +170,15 @@ pack_row(TABLE *table, MY_BITMAP const* cols, @param row_data Packed row data @param cols Pointer to bitset describing columns to fill in - @param row_end Pointer to variable that will hold the value of the - one-after-end position for the row + @param curr_row_end + Pointer to variable that will hold the value of the + one-after-end position for the current row @param master_reclength Pointer to variable that will be set to the length of the record on the master side + @param row_end + Pointer to variable that will hold the value of the + end position for the data in the row event @retval 0 No error @@ -188,9 +191,9 @@ pack_row(TABLE *table, MY_BITMAP const* cols, int unpack_row(rpl_group_info *rgi, TABLE *table, uint const colcnt, - uchar const *const row_data, uchar const *const row_buffer_end, - MY_BITMAP const *cols, - uchar const **const row_end, ulong *const master_reclength) + uchar const *const row_data, MY_BITMAP const *cols, + uchar const **const current_row_end, ulong *const master_reclength, + uchar const *const row_end) { DBUG_ENTER("unpack_row"); DBUG_ASSERT(row_data); @@ -309,7 +312,7 @@ unpack_row(rpl_group_info *rgi, uchar const *const old_pack_ptr= pack_ptr; #endif #endif - pack_ptr= f->unpack(f->ptr, pack_ptr, row_buffer_end, metadata); + pack_ptr= f->unpack(f->ptr, pack_ptr, row_end, metadata); DBUG_PRINT("debug", ("field: %s; metadata: 0x%x;" " pack_ptr: 0x%lx; pack_ptr': 0x%lx; bytes: %d", f->field_name, metadata, @@ -322,10 +325,10 @@ unpack_row(rpl_group_info *rgi, */ WSREP_WARN("ROW event unpack field: %s metadata: 0x%x;" " pack_ptr: 0x%lx; conv_table %p conv_field %p table %s" - " row_buffer_end: 0x%lx", + " row_end: 0x%lx", f->field_name, metadata, (ulong) old_pack_ptr, conv_table, conv_field, - (table_found) ? "found" : "not found", (ulong)row_buffer_end + (table_found) ? "found" : "not found", (ulong)row_end ); rgi->rli->report(ERROR_LEVEL, ER_SLAVE_CORRUPT_EVENT, @@ -407,7 +410,7 @@ unpack_row(rpl_group_info *rgi, DBUG_DUMP("row_data", row_data, pack_ptr - row_data); - *row_end = pack_ptr; + *current_row_end = pack_ptr; if (master_reclength) { if (*field_ptr) diff --git a/sql/rpl_record.h b/sql/rpl_record.h index 7d17d4f7200..c10eb8225b0 100644 --- a/sql/rpl_record.h +++ b/sql/rpl_record.h @@ -1,6 +1,5 @@ -/* - Copyright (c) 2007, 2010, Oracle and/or its affiliates. - Copyright (c) 2008-2011 Monty Program Ab +/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. + Copyright (c) 2008, 2013, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,9 +32,9 @@ size_t pack_row(TABLE* table, MY_BITMAP const* cols, #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) int unpack_row(rpl_group_info *rgi, TABLE *table, uint const colcnt, - uchar const *const row_data, uchar const *row_buffer_end, - MY_BITMAP const *cols, - uchar const **const row_end, ulong *const master_reclength); + uchar const *const row_data, MY_BITMAP const *cols, + uchar const **const curr_row_end, ulong *const master_reclength, + uchar const *const row_end); // Fill table's record[0] with default values. int prepare_record(TABLE *const table, const uint skip, const bool check); diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 9036f810020..0fae3a3bb89 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -37,6 +37,8 @@ static int count_relay_log_space(Relay_log_info* rli); domain). */ rpl_slave_state rpl_global_gtid_slave_state; +/* Object used for MASTER_GTID_WAIT(). */ +gtid_waiting rpl_global_gtid_waiting; // Defined in slave.cc @@ -56,9 +58,10 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery) is_fake(FALSE), #endif group_master_log_pos(0), log_space_total(0), ignore_log_space_limit(0), - last_master_timestamp(0), slave_skip_counter(0), + last_master_timestamp(0), sql_thread_caught_up(true), slave_skip_counter(0), abort_pos_wait(0), slave_run_id(0), sql_driver_thd(), - inited(0), abort_slave(0), slave_running(0), until_condition(UNTIL_NONE), + inited(0), abort_slave(0), stop_for_until(0), + slave_running(0), until_condition(UNTIL_NONE), until_log_pos(0), retried_trans(0), executed_entries(0), m_flags(0) { @@ -886,11 +889,11 @@ void Relay_log_info::inc_group_relay_log_pos(ulonglong log_pos, int cmp= strcmp(group_relay_log_name, event_relay_log_name); if (cmp < 0) { - group_relay_log_pos= event_relay_log_pos; + group_relay_log_pos= rgi->future_event_relay_log_pos; strmake_buf(group_relay_log_name, event_relay_log_name); notify_group_relay_log_name_update(); - } else if (cmp == 0 && group_relay_log_pos < event_relay_log_pos) - group_relay_log_pos= event_relay_log_pos; + } else if (cmp == 0 && group_relay_log_pos < rgi->future_event_relay_log_pos) + group_relay_log_pos= rgi->future_event_relay_log_pos; /* In the parallel case we need to update the master_log_name here, rather @@ -1287,9 +1290,14 @@ void Relay_log_info::stmt_done(my_off_t event_master_log_pos, (probably ok - except in some very rare cases, only consequence is that value may take some time to display in Seconds_Behind_Master - not critical). + + In parallel replication, we take care to not set last_master_timestamp + backwards, in case of out-of-order calls here. */ if (!(event_creation_time == 0 && - IF_DBUG(debug_not_change_ts_if_art_event > 0, 1))) + IF_DBUG(debug_not_change_ts_if_art_event > 0, 1)) && + !(rgi->is_parallel_exec && event_creation_time <= last_master_timestamp) + ) last_master_timestamp= event_creation_time; } DBUG_VOID_RETURN; @@ -1312,9 +1320,9 @@ rpl_load_gtid_slave_state(THD *thd) uint32 i; DBUG_ENTER("rpl_load_gtid_slave_state"); - rpl_global_gtid_slave_state.lock(); + mysql_mutex_lock(&rpl_global_gtid_slave_state.LOCK_slave_state); bool loaded= rpl_global_gtid_slave_state.loaded; - rpl_global_gtid_slave_state.unlock(); + mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state); if (loaded) DBUG_RETURN(0); @@ -1414,10 +1422,10 @@ rpl_load_gtid_slave_state(THD *thd) } } - rpl_global_gtid_slave_state.lock(); + mysql_mutex_lock(&rpl_global_gtid_slave_state.LOCK_slave_state); if (rpl_global_gtid_slave_state.loaded) { - rpl_global_gtid_slave_state.unlock(); + mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state); goto end; } @@ -1429,7 +1437,7 @@ rpl_load_gtid_slave_state(THD *thd) tmp_entry.sub_id, tmp_entry.gtid.seq_no))) { - rpl_global_gtid_slave_state.unlock(); + mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state); my_error(ER_OUT_OF_RESOURCES, MYF(0)); goto end; } @@ -1442,14 +1450,14 @@ rpl_load_gtid_slave_state(THD *thd) mysql_bin_log.bump_seq_no_counter_if_needed(entry->gtid.domain_id, entry->gtid.seq_no)) { - rpl_global_gtid_slave_state.unlock(); + mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state); my_error(ER_OUT_OF_RESOURCES, MYF(0)); goto end; } } rpl_global_gtid_slave_state.loaded= true; - rpl_global_gtid_slave_state.unlock(); + mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state); err= 0; /* Clear HA_ERR_END_OF_FILE */ @@ -1472,14 +1480,27 @@ end: } -rpl_group_info::rpl_group_info(Relay_log_info *rli_) - : rli(rli_), thd(0), gtid_sub_id(0), wait_commit_sub_id(0), - wait_commit_group_info(0), wait_start_sub_id(0), parallel_entry(0), - deferred_events(NULL), m_annotate_event(0), tables_to_lock(0), - tables_to_lock_count(0), trans_retries(0), last_event_start_time(0), - is_parallel_exec(false), is_error(false), - row_stmt_start_timestamp(0), long_find_row_note_printed(false) +void +rpl_group_info::reinit(Relay_log_info *rli) +{ + this->rli= rli; + tables_to_lock= NULL; + tables_to_lock_count= 0; + trans_retries= 0; + last_event_start_time= 0; + is_error= false; + row_stmt_start_timestamp= 0; + long_find_row_note_printed= false; + did_mark_start_commit= false; + commit_orderer.reinit(); +} + +rpl_group_info::rpl_group_info(Relay_log_info *rli) + : thd(0), gtid_sub_id(0), wait_commit_sub_id(0), + wait_commit_group_info(0), parallel_entry(0), + deferred_events(NULL), m_annotate_event(0), is_parallel_exec(false) { + reinit(rli); bzero(¤t_gtid, sizeof(current_gtid)); mysql_mutex_init(key_rpl_group_info_sleep_lock, &sleep_lock, MY_MUTEX_INIT_FAST); @@ -1583,6 +1604,7 @@ void rpl_group_info::cleanup_context(THD *thd, bool error) if (error) { trans_rollback_stmt(thd); // if a "statement transaction" + /* trans_rollback() also resets OPTION_GTID_BEGIN */ trans_rollback(thd); // if a "real transaction" } m_table_map.clear_tables(); @@ -1702,4 +1724,40 @@ void rpl_group_info::slave_close_thread_tables(THD *thd) } + +static void +mark_start_commit_inner(rpl_parallel_entry *e, group_commit_orderer *gco) +{ + uint64 count= ++e->count_committing_event_groups; + if (gco->next_gco && gco->next_gco->wait_count == count) + mysql_cond_broadcast(&gco->next_gco->COND_group_commit_orderer); +} + + +void +rpl_group_info::mark_start_commit_no_lock() +{ + if (did_mark_start_commit) + return; + mark_start_commit_inner(parallel_entry, gco); + did_mark_start_commit= true; +} + + +void +rpl_group_info::mark_start_commit() +{ + rpl_parallel_entry *e; + + if (did_mark_start_commit) + return; + + e= this->parallel_entry; + mysql_mutex_lock(&e->LOCK_parallel_entry); + mark_start_commit_inner(e, gco); + mysql_mutex_unlock(&e->LOCK_parallel_entry); + did_mark_start_commit= true; +} + + #endif diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index ff2ffd0b366..6db4ce5d61b 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -221,6 +221,12 @@ public: bool sql_force_rotate_relay; time_t last_master_timestamp; + /* + The SQL driver thread sets this true while it is waiting at the end of the + relay log for more events to arrive. SHOW SLAVE STATUS uses this to report + Seconds_Behind_Master as zero while the SQL thread is so waiting. + */ + bool sql_thread_caught_up; void clear_until_condition(); @@ -256,6 +262,7 @@ public: */ volatile bool inited; volatile bool abort_slave; + volatile bool stop_for_until; volatile uint slave_running; /* @@ -475,6 +482,7 @@ private: struct rpl_group_info { + rpl_group_info *next; /* For free list in rpl_parallel_thread */ Relay_log_info *rli; THD *thd; /* @@ -504,14 +512,15 @@ struct rpl_group_info uint64 wait_commit_sub_id; rpl_group_info *wait_commit_group_info; /* - If non-zero, the event group must wait for this sub_id to be committed - before the execution of the event group is allowed to start. + This holds a pointer to a struct that keeps track of the need to wait + for the previous batch of event groups to reach the commit stage, before + this batch can start to execute. (When we execute in parallel the transactions that group committed together on the master, we still need to wait for any prior transactions - to have commtted). + to have reached the commit stage). */ - uint64 wait_start_sub_id; + group_commit_orderer *gco; struct rpl_parallel_entry *parallel_entry; @@ -561,18 +570,22 @@ struct rpl_group_info char future_event_master_log_name[FN_REFLEN]; bool is_parallel_exec; bool is_error; + /* + Set true when we signalled that we reach the commit phase. Used to avoid + counting one event group twice. + */ + bool did_mark_start_commit; -private: /* Runtime state for printing a note when slave is taking too long while processing a row event. */ time_t row_stmt_start_timestamp; bool long_find_row_note_printed; -public: rpl_group_info(Relay_log_info *rli_); ~rpl_group_info(); + void reinit(Relay_log_info *rli); /* Returns true if the argument event resides in the containter; @@ -655,6 +668,8 @@ public: void clear_tables_to_lock(); void cleanup_context(THD *, bool); void slave_close_thread_tables(THD *); + void mark_start_commit_no_lock(); + void mark_start_commit(); time_t get_row_stmt_start_timestamp() { @@ -702,6 +717,7 @@ int init_relay_log_info(Relay_log_info* rli, const char* info_fname); extern struct rpl_slave_state rpl_global_gtid_slave_state; +extern gtid_waiting rpl_global_gtid_waiting; int rpl_load_gtid_slave_state(THD *thd); int event_group_new_gtid(rpl_group_info *rgi, Gtid_log_event *gev); diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc index e8bc042e565..fcb6a849fb1 100644 --- a/sql/rpl_utility.cc +++ b/sql/rpl_utility.cc @@ -208,7 +208,7 @@ int compare_lengths(Field *field, enum_field_types source_type, uint16 metadata) DBUG_PRINT("result", ("%d", result)); DBUG_RETURN(result); } - +#endif //MYSQL_CLIENT /********************************************************************* * table_def member definitions * *********************************************************************/ @@ -219,7 +219,7 @@ int compare_lengths(Field *field, enum_field_types source_type, uint16 metadata) */ uint32 table_def::calc_field_size(uint col, uchar *master_data) const { - uint32 length; + uint32 length= 0; switch (type(col)) { case MYSQL_TYPE_NEWDECIMAL: @@ -316,7 +316,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const case MYSQL_TYPE_VARCHAR: { length= m_field_metadata[col] > 255 ? 2 : 1; // c&p of Field_varstring::data_length() - DBUG_ASSERT(uint2korr(master_data) > 0); length+= length == 1 ? (uint32) *master_data : uint2korr(master_data); break; } @@ -326,17 +325,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const case MYSQL_TYPE_BLOB: case MYSQL_TYPE_GEOMETRY: { -#if 1 - /* - BUG#29549: - This is currently broken for NDB, which is using big-endian - order when packing length of BLOB. Once they have decided how to - fix the issue, we can enable the code below to make sure to - always read the length in little-endian order. - */ - Field_blob fb(m_field_metadata[col]); - length= fb.get_packed_size(master_data); -#else /* Compute the length of the data. We cannot use get_length() here since it is dependent on the specific table (and also checks the @@ -362,7 +350,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const } length+= m_field_metadata[col]; -#endif break; } default: @@ -371,7 +358,7 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const return length; } - +#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) /** */ void show_sql_type(enum_field_types type, uint16 metadata, String *str, CHARSET_INFO *field_cs) diff --git a/sql/scheduler.cc b/sql/scheduler.cc index 71789b0303b..ecf49e633ab 100644 --- a/sql/scheduler.cc +++ b/sql/scheduler.cc @@ -142,7 +142,6 @@ void one_thread_scheduler(scheduler_functions *func) { scheduler_init(); func->max_threads= 1; - //max_connections= 1; func->max_connections= &max_connections; func->connection_count= &connection_count; #ifndef EMBEDDED_LIBRARY diff --git a/sql/scheduler.h b/sql/scheduler.h index 4e200e86d74..06c17c7b114 100644 --- a/sql/scheduler.h +++ b/sql/scheduler.h @@ -99,7 +99,8 @@ public: void *data; /* scheduler-specific data structure */ }; -#if !defined(EMBEDDED_LIBRARY) +#undef HAVE_POOL_OF_THREADS +#if !defined(EMBEDDED_LIBRARY) && !defined(_AIX) #define HAVE_POOL_OF_THREADS 1 void pool_of_threads_scheduler(scheduler_functions* func, ulong *arg_max_connections, diff --git a/sql/set_var.cc b/sql/set_var.cc index 8ae29e01a20..ea577bbfa74 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2002, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2013, Monty Program Ab + Copyright (c) 2008, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -212,7 +212,6 @@ uchar *sys_var::global_value_ptr(THD *thd, LEX_STRING *base) bool sys_var::check(THD *thd, set_var *var) { - do_deprecated_warning(thd); if ((var->value && do_check(thd, var)) || (on_check && on_check(this, thd, var))) { @@ -546,10 +545,10 @@ int mysql_del_sys_var_chain(sys_var *first) { int result= 0; - /* A write lock should be held on LOCK_system_variables_hash */ - + mysql_rwlock_wrlock(&LOCK_system_variables_hash); for (sys_var *var= first; var; var= var->next) result|= my_hash_delete(&system_variable_hash, (uchar*) var); + mysql_rwlock_unlock(&LOCK_system_variables_hash); return result; } @@ -669,7 +668,7 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list) if ((error= var->check(thd))) goto err; } - if (!(error= test(thd->is_error()))) + if (!(error= MY_TEST(thd->is_error()))) { it.rewind(); while ((var= it++)) @@ -697,6 +696,7 @@ err: int set_var::check(THD *thd) { + var->do_deprecated_warning(thd); if (var->is_readonly()) { my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), var->name.str, "read only"); @@ -855,9 +855,7 @@ int set_var_password::update(THD *thd) int set_var_role::check(THD *thd) { #ifndef NO_EMBEDDED_ACCESS_CHECKS - ulonglong access; - int status= acl_check_setrole(thd, base.str, &access); - save_result.ulonglong_value= access; + int status= acl_check_setrole(thd, role.str, &access); return status; #else return 0; @@ -867,7 +865,7 @@ int set_var_role::check(THD *thd) int set_var_role::update(THD *thd) { #ifndef NO_EMBEDDED_ACCESS_CHECKS - return acl_setrole(thd, base.str, save_result.ulonglong_value); + return acl_setrole(thd, role.str, access); #else return 0; #endif diff --git a/sql/set_var.h b/sql/set_var.h index eebbf9b590f..de47c4646e7 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -1,6 +1,7 @@ #ifndef SET_VAR_INCLUDED #define SET_VAR_INCLUDED /* Copyright (c) 2002, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,7 +61,7 @@ public: sys_var *next; LEX_CSTRING name; enum flag_enum { GLOBAL, SESSION, ONLY_SESSION, SCOPE_MASK=1023, - READONLY=1024, ALLOCATED=2048, PARSE_EARLY=4096 }; + READONLY=1024, ALLOCATED=2048, PARSE_EARLY=4096, SHOW_VALUE_IN_HELP=8192 }; /** Enumeration type to indicate for a system variable whether it will be written to the binlog or not. @@ -142,9 +143,11 @@ public: } bool register_option(DYNAMIC_ARRAY *array, int parse_flags) { - return (option.id != -1) && ((flags & PARSE_EARLY) == parse_flags) && - insert_dynamic(array, (uchar*)&option); + return ((((option.id != -1) && ((flags & PARSE_EARLY) == parse_flags)) || + (flags & parse_flags)) && + insert_dynamic(array, (uchar*)&option)); } + void do_deprecated_warning(THD *thd); private: virtual bool do_check(THD *thd, set_var *var) = 0; @@ -158,7 +161,7 @@ private: virtual void global_save_default(THD *thd, set_var *var) = 0; virtual bool session_update(THD *thd, set_var *var) = 0; virtual bool global_update(THD *thd, set_var *var) = 0; - void do_deprecated_warning(THD *thd); + protected: /** A pointer to a value of the variable for SHOW. @@ -281,11 +284,12 @@ public: /* For SET ROLE */ -class set_var_role: public set_var +class set_var_role: public set_var_base { + LEX_STRING role; + ulonglong access; public: - set_var_role(LEX_STRING role_arg) : - set_var(OPT_SESSION, NULL, &role_arg, NULL){}; + set_var_role(LEX_STRING role_arg) : role(role_arg) {} int check(THD *thd); int update(THD *thd); }; diff --git a/sql/share/charsets/Index.xml b/sql/share/charsets/Index.xml index e82ffc85ea6..3e402226a34 100644 --- a/sql/share/charsets/Index.xml +++ b/sql/share/charsets/Index.xml @@ -3,7 +3,7 @@ <charsets max-id="99"> <copyright> - Copyright (c) 2003, 2012, Oracle and/or its affiliates. + Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/share/charsets/armscii8.xml b/sql/share/charsets/armscii8.xml index 52382c83af0..c1eb93b1f91 100644 --- a/sql/share/charsets/armscii8.xml +++ b/sql/share/charsets/armscii8.xml @@ -3,7 +3,8 @@ <charsets> <copyright> - Copyright (C) 2003 MySQL AB + Copyright (c) 2003, 2004 MySQL AB + Use is subject to license terms 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 diff --git a/sql/share/charsets/ascii.xml b/sql/share/charsets/ascii.xml index bec34ad525e..29336b3a665 100644 --- a/sql/share/charsets/ascii.xml +++ b/sql/share/charsets/ascii.xml @@ -3,7 +3,7 @@ <charsets> <copyright> - Copyright (C) 2003 MySQL AB + Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/share/charsets/cp1250.xml b/sql/share/charsets/cp1250.xml index 58e55de9bdc..1b4a71ef6d5 100644 --- a/sql/share/charsets/cp1250.xml +++ b/sql/share/charsets/cp1250.xml @@ -3,7 +3,7 @@ <charsets> <copyright> - Copyright (C) 2003 MySQL AB + Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/share/charsets/cp852.xml b/sql/share/charsets/cp852.xml index 7608296d5b7..e0c574d2ea1 100644 --- a/sql/share/charsets/cp852.xml +++ b/sql/share/charsets/cp852.xml @@ -3,7 +3,8 @@ <charsets> <copyright> - Copyright (C) 2003 MySQL AB + Copyright (c) 2003, 2004 MySQL AB + Use is subject to license terms 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 diff --git a/sql/share/charsets/hebrew.xml b/sql/share/charsets/hebrew.xml index e7f896a3e12..0544b27ef4f 100644 --- a/sql/share/charsets/hebrew.xml +++ b/sql/share/charsets/hebrew.xml @@ -3,7 +3,7 @@ <charsets> <copyright> - Copyright (C) 2003 MySQL AB + Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/share/charsets/latin1.xml b/sql/share/charsets/latin1.xml index 8963c3481d3..4054eea8d33 100644 --- a/sql/share/charsets/latin1.xml +++ b/sql/share/charsets/latin1.xml @@ -3,7 +3,7 @@ <charsets> <copyright> - Copyright (C) 2003 MySQL AB + Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/share/charsets/latin2.xml b/sql/share/charsets/latin2.xml index 183da7b6cd3..a44ec7e0ec6 100644 --- a/sql/share/charsets/latin2.xml +++ b/sql/share/charsets/latin2.xml @@ -3,7 +3,7 @@ <charsets> <copyright> - Copyright (C) 2003 MySQL AB + Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/share/charsets/latin5.xml b/sql/share/charsets/latin5.xml index 489299564f1..6b60e58cdda 100644 --- a/sql/share/charsets/latin5.xml +++ b/sql/share/charsets/latin5.xml @@ -3,7 +3,7 @@ <charsets> <copyright> - Copyright (C) 2003 MySQL AB + Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 2d061fc314c..dc50c68bcdd 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -1732,30 +1732,8 @@ ER_WRONG_AUTO_KEY 42000 S1009 spa "Puede ser solamente un campo automatico y este debe ser definido como una clave" swe "Det fÃ¥r finnas endast ett AUTO_INCREMENT-fält och detta mÃ¥ste vara en nyckel" ukr "Ðевірне Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ–; Може бути лише один автоматичний Ñтовбець, що повинен бути визначений Ñк ключ" -ER_READY - cze "%s: pÅ™ipraven na spojenÃ\nVersion: '%s' socket: '%s' port: %d"" - dan "%s: klar til tilslutninger\nVersion: '%s' socket: '%s' port: %d"" - nla "%s: klaar voor verbindingen\nVersion: '%s' socket: '%s' port: %d"" - eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d" - est "%s: ootab ühendusi\nVersion: '%s' socket: '%s' port: %d"" - fre "%s: Prêt pour des connexions\nVersion: '%s' socket: '%s' port: %d"" - ger "%s: Bereit für Verbindungen.\nVersion: '%s' Socket: '%s' Port: %d" - greek "%s: σε αναμονή συνδÎσεων\nVersion: '%s' socket: '%s' port: %d"" - hun "%s: kapcsolatra kesz\nVersion: '%s' socket: '%s' port: %d"" - ita "%s: Pronto per le connessioni\nVersion: '%s' socket: '%s' port: %d"" - jpn "%s: 接続準備完了。\nãƒãƒ¼ã‚¸ãƒ§ãƒ³: '%s' socket: '%s' port: %d"" - kor "%s: ì—°ê²° 준비중입니다\nVersion: '%s' socket: '%s' port: %d"" - nor "%s: klar for tilkoblinger\nVersion: '%s' socket: '%s' port: %d"" - norwegian-ny "%s: klar for tilkoblingar\nVersion: '%s' socket: '%s' port: %d"" - pol "%s: gotowe do poÅ‚?czenia\nVersion: '%s' socket: '%s' port: %d"" - por "%s: Pronto para conexões\nVersion: '%s' socket: '%s' port: %d"" - rum "%s: sint gata pentru conectii\nVersion: '%s' socket: '%s' port: %d"" - rus "%s: Готов принимать ÑоединениÑ.\nВерÑиÑ: '%s' Ñокет: '%s' порт: %d" - serbian "%s: Spreman za konekcije\nVersion: '%s' socket: '%s' port: %d"" - slo "%s: pripravený na spojenie\nVersion: '%s' socket: '%s' port: %d"" - spa "%s: preparado para conexiones\nVersion: '%s' socket: '%s' port: %d"" - swe "%s: klar att ta emot klienter\nVersion: '%s' socket: '%s' port: %d"" - ukr "%s: Готовий Ð´Ð»Ñ Ð·'єднань!\nVersion: '%s' socket: '%s' port: %d"" +ER_UNUSED_9 + eng "You should never see it" ER_NORMAL_SHUTDOWN cze "%s: normálnà ukonÄenÃ\n" dan "%s: Normal nedlukning\n" @@ -2140,13 +2118,9 @@ ER_INSERT_INFO spa "Registros: %ld Duplicados: %ld Peligros: %ld" swe "Rader: %ld Dubletter: %ld Varningar: %ld" ukr "ЗапиÑів: %ld Дублікатів: %ld ЗаÑтережень: %ld" -ER_UPDATE_TABLE_USED - eng "You can't specify target table '%-.192s' for update in FROM clause" - ger "Die Verwendung der zu aktualisierenden Zieltabelle '%-.192s' ist in der FROM-Klausel nicht zulässig." - jpn "FROMå¥ã«ã‚る表 '%-.192s' ã¯UPDATEã®å¯¾è±¡ã«ã§ãã¾ã›ã‚“。" - rus "Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ðµ таблицы '%-.192s' в ÑпиÑке таблиц FROM Ð´Ð»Ñ Ð²Ð½ÐµÑÐµÐ½Ð¸Ñ Ð² нее изменений" - swe "INSERT-table '%-.192s' fÃ¥r inte finnas i FROM tabell-listan" - ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.192s' що змінюєтьÑÑ Ð½Ðµ дозволена у переліку таблиць FROM" +ER_UPDATE_TABLE_USED + eng "Table '%-.192s' is specified twice, both as a target for '%s' and as a separate source for data" + swe "Table '%-.192s' är använd tvÃ¥ gÃ¥nger. BÃ¥de för '%s' och för att hämta data" ER_NO_SUCH_THREAD cze "Neznámá identifikace threadu: %lu" dan "Ukendt trÃ¥d id: %lu" @@ -5055,19 +5029,19 @@ ER_UNSUPPORTED_PS eng "This command is not supported in the prepared statement protocol yet" ger "Dieser Befehl wird im Protokoll für vorbereitete Anweisungen noch nicht unterstützt" ER_GET_ERRMSG - dan "Modtog fejl %d '%-.100s' fra %s" - eng "Got error %d '%-.100s' from %s" - ger "Fehler %d '%-.100s' von %s" - jpn "エラー %d '%-.100s' ㌠%s ã‹ã‚‰è¿”ã•れã¾ã—ãŸã€‚" - nor "Mottok feil %d '%-.100s' fa %s" - norwegian-ny "Mottok feil %d '%-.100s' fra %s" + dan "Modtog fejl %d '%-.200s' fra %s" + eng "Got error %d '%-.200s' from %s" + ger "Fehler %d '%-.200s' von %s" + jpn "エラー %d '%-.200s' ㌠%s ã‹ã‚‰è¿”ã•れã¾ã—ãŸã€‚" + nor "Mottok feil %d '%-.200s' fa %s" + norwegian-ny "Mottok feil %d '%-.200s' fra %s" ER_GET_TEMPORARY_ERRMSG - dan "Modtog temporary fejl %d '%-.100s' fra %s" - eng "Got temporary error %d '%-.100s' from %s" - jpn "一時エラー %d '%-.100s' ㌠%s ã‹ã‚‰è¿”ã•れã¾ã—ãŸã€‚" - ger "Temporärer Fehler %d '%-.100s' von %s" - nor "Mottok temporary feil %d '%-.100s' fra %s" - norwegian-ny "Mottok temporary feil %d '%-.100s' fra %s" + dan "Modtog temporary fejl %d '%-.200s' fra %s" + eng "Got temporary error %d '%-.200s' from %s" + jpn "一時エラー %d '%-.200s' ㌠%s ã‹ã‚‰è¿”ã•れã¾ã—ãŸã€‚" + ger "Temporärer Fehler %d '%-.200s' von %s" + nor "Mottok temporary feil %d '%-.200s' fra %s" + norwegian-ny "Mottok temporary feil %d '%-.200s' fra %s" ER_UNKNOWN_TIME_ZONE eng "Unknown or incorrect time zone: '%-.64s'" ger "Unbekannte oder falsche Zeitzone: '%-.64s'" @@ -6757,7 +6731,7 @@ ER_TABLESPACE_DISCARDED eng "Tablespace has been discarded for table '%-.192s'" ER_INTERNAL_ERROR - eng "Internal error: '%-.192s'" + eng "Internal error: %-.192s" ER_INNODB_IMPORT_ERROR eng "ALTER TABLE '%-.192s' IMPORT TABLESPACE failed with error %lu : '%s'" @@ -7056,7 +7030,7 @@ ER_UNTIL_REQUIRES_USING_GTID ER_GTID_STRICT_OUT_OF_ORDER eng "An attempt was made to binlog GTID %u-%u-%llu which would create an out-of-order sequence number with existing GTID %u-%u-%llu, and gtid strict mode is enabled." ER_GTID_START_FROM_BINLOG_HOLE - eng "The binlog on the master is missing the GTID %u-%u-%llu requested by the slave (even though both a prior and a subsequent sequence number does exist), and GTID strict mode is enabled" + eng "The binlog on the master is missing the GTID %u-%u-%llu requested by the slave (even though a subsequent sequence number does exist), and GTID strict mode is enabled" ER_SLAVE_UNEXPECTED_MASTER_SWITCH eng "Unexpected GTID received from master after reconnect. This normally indicates that the master server was replaced without restarting the slave threads. %s" ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_GTID_DOMAIN_ID_SEQ_NO @@ -7089,3 +7063,7 @@ ER_CHANGE_SLAVE_PARALLEL_THREADS_ACTIVE eng "Cannot change @@slave_parallel_threads while another change is in progress" ER_PRIOR_COMMIT_FAILED eng "Commit failed due to failure of an earlier commit on which this one depends" +ER_IT_IS_A_VIEW 42S02 + eng "'%-.192s' is a view" +ER_SLAVE_SKIP_NOT_IN_GTID + eng "When using GTID, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position." diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc index c50072f5159..3fadbcd088f 100644 --- a/sql/signal_handler.cc +++ b/sql/signal_handler.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2011, Oracle and/or its affiliates. - Copyright (c) 2011, Monty Program Ab. +/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. + Copyright (c) 2011, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/slave.cc b/sql/slave.cc index e29387a4b7f..ecfd048fd26 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 2008, 2011, Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2008, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -334,7 +334,7 @@ run_slave_init_thread() pthread_t th; slave_init_thread_running= true; - if (mysql_thread_create(key_thread_slave_init, &th, NULL, + if (mysql_thread_create(key_thread_slave_init, &th, &connection_attrib, handle_slave_init, NULL)) { sql_print_error("Failed to create thread while initialising slave"); @@ -576,7 +576,7 @@ void init_slave_skip_errors(const char* arg) const char *p; DBUG_ENTER("init_slave_skip_errors"); - if (bitmap_init(&slave_error_mask,0,MAX_SLAVE_ERROR,0)) + if (my_bitmap_init(&slave_error_mask,0,MAX_SLAVE_ERROR,0)) { fprintf(stderr, "Badly out of memory, please check your system status\n"); exit(1); @@ -618,7 +618,14 @@ int terminate_slave_threads(Master_info* mi,int thread_mask,bool skip_lock) if (thread_mask & (SLAVE_SQL|SLAVE_FORCE_ALL)) { DBUG_PRINT("info",("Terminating SQL thread")); - mi->rli.abort_slave=1; + if (opt_slave_parallel_threads > 0 && + mi->rli.abort_slave && mi->rli.stop_for_until) + { + mi->rli.stop_for_until= false; + mi->rli.parallel.stop_during_until(); + } + else + mi->rli.abort_slave=1; if ((error=terminate_slave_thread(mi->rli.sql_driver_thd, sql_lock, &mi->rli.stop_cond, &mi->rli.slave_running, @@ -1050,9 +1057,10 @@ static bool sql_slave_killed(rpl_group_info *rgi) "documentation for details)."; DBUG_PRINT("info", ("modified_non_trans_table: %d OPTION_BEGIN: %d " - "is_in_group: %d", + "OPTION_KEEP_LOG: %d is_in_group: %d", thd->transaction.all.modified_non_trans_table, - test(thd->variables.option_bits & OPTION_BEGIN), + MY_TEST(thd->variables.option_bits & OPTION_BEGIN), + MY_TEST(thd->variables.option_bits & OPTION_KEEP_LOG), rli->is_in_group())); if (rli->abort_slave) @@ -1338,6 +1346,7 @@ bool is_network_error(uint errorno) errorno == ER_CON_COUNT_ERROR || errorno == ER_CONNECTION_KILLED || errorno == ER_NEW_ABORTING_CONNECTION || + errorno == ER_NET_READ_INTERRUPTED || errorno == ER_SERVER_SHUTDOWN) return TRUE; @@ -1797,10 +1806,14 @@ when it try to get the value of TIME_ZONE global variable from master."; if (mysql_errno(mysql) == ER_UNKNOWN_SYSTEM_VARIABLE) { - // this is tolerable as OM -> NS is supported - mi->report(WARNING_LEVEL, mysql_errno(mysql), - "Notifying master by %s failed with " - "error: %s", query, mysql_error(mysql)); + /* Ignore this expected error if not a high error level */ + if (global_system_variables.log_warnings > 1) + { + // this is tolerable as OM -> NS is supported + mi->report(WARNING_LEVEL, mysql_errno(mysql), + "Notifying master by %s failed with " + "error: %s", query, mysql_error(mysql)); + } } else { @@ -2626,8 +2639,24 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full, if ((mi->slave_running == MYSQL_SLAVE_RUN_CONNECT) && mi->rli.slave_running) { - long time_diff= ((long)(time(0) - mi->rli.last_master_timestamp) - - mi->clock_diff_with_master); + long time_diff; + bool idle; + time_t stamp= mi->rli.last_master_timestamp; + + if (!stamp) + idle= true; + else + { + idle= mi->rli.sql_thread_caught_up; + if (opt_slave_parallel_threads > 0 && idle && + !mi->rli.parallel.workers_idle()) + idle= false; + } + if (idle) + time_diff= 0; + else + { + time_diff= ((long)(time(0) - stamp) - mi->clock_diff_with_master); /* Apparently on some systems time_diff can be <0. Here are possible reasons related to MySQL: @@ -2643,13 +2672,15 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full, slave is 2. At SHOW SLAVE STATUS time, assume that the difference between timestamp of slave and rli->last_master_timestamp is 0 (i.e. they are in the same second), then we get 0-(2-1)=-1 as a result. - This confuses users, so we don't go below 0: hence the MY_MAX(). + This confuses users, so we don't go below 0. last_master_timestamp == 0 (an "impossible" timestamp 1970) is a special marker to say "consider we have caught up". */ - protocol->store((longlong)(mi->rli.last_master_timestamp ? - MY_MAX(0, time_diff) : 0)); + if (time_diff < 0) + time_diff= 0; + } + protocol->store((longlong)time_diff); } else { @@ -3127,9 +3158,10 @@ int apply_event_and_update_pos(Log_event* ev, THD* thd, DBUG_PRINT("exec_event",("%s(type_code: %d; server_id: %d)", ev->get_type_str(), ev->get_type_code(), ev->server_id)); - DBUG_PRINT("info", ("thd->options: %s%s; rgi->last_event_start_time: %lu", + DBUG_PRINT("info", ("thd->options: '%s%s%s' rgi->last_event_start_time: %lu", FLAGSTR(thd->variables.option_bits, OPTION_NOT_AUTOCOMMIT), FLAGSTR(thd->variables.option_bits, OPTION_BEGIN), + FLAGSTR(thd->variables.option_bits, OPTION_GTID_BEGIN), (ulong) rgi->last_event_start_time)); /* @@ -3202,7 +3234,7 @@ int apply_event_and_update_pos(Log_event* ev, THD* thd, "skipped because event skip counter was non-zero" }; DBUG_PRINT("info", ("OPTION_BEGIN: %d IN_STMT: %d IN_TRANSACTION: %d", - test(thd->variables.option_bits & OPTION_BEGIN), + MY_TEST(thd->variables.option_bits & OPTION_BEGIN), rli->get_flag(Relay_log_info::IN_STMT), rli->get_flag(Relay_log_info::IN_TRANSACTION))); DBUG_PRINT("skip_event", ("%s event was %s", @@ -3406,6 +3438,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, message about error in query execution to be printed. */ rli->abort_slave= 1; + rli->stop_for_until= true; mysql_mutex_unlock(&rli->data_lock); delete ev; DBUG_RETURN(1); @@ -3433,13 +3466,17 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, update_state_of_relay_log(rli, ev); - /* - Execute queries in parallel, except if slave_skip_counter is set, - as it's is easier to skip queries in single threaded mode. - */ - - if (opt_slave_parallel_threads > 0 && rli->slave_skip_counter == 0) - DBUG_RETURN(rli->parallel.do_event(serial_rgi, ev, event_size)); + if (opt_slave_parallel_threads > 0) + { + int res= rli->parallel.do_event(serial_rgi, ev, event_size); + if (res >= 0) + DBUG_RETURN(res); + /* + Else we proceed to execute the event non-parallel. + This is the case for pre-10.0 events without GTID, and for handling + slave_skip_counter. + */ + } /* For GTID, allocate a new sub_id for the given domain_id. @@ -4350,6 +4387,7 @@ pthread_handler_t handle_slave_sql(void *arg) Seconds_Behind_Master grows. No big deal. */ rli->abort_slave = 0; + rli->stop_for_until= false; mysql_mutex_unlock(&rli->run_lock); mysql_cond_broadcast(&rli->start_cond); @@ -4526,7 +4564,7 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME, } if (opt_slave_parallel_threads > 0) - rli->parallel.wait_for_done(); + rli->parallel.wait_for_done(thd, rli); /* Thread stopped. Print the current replication position to the log */ { @@ -4552,7 +4590,7 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME, get the correct position printed.) */ if (opt_slave_parallel_threads > 0) - rli->parallel.wait_for_done(); + rli->parallel.wait_for_done(thd, rli); /* Some events set some playgrounds, which won't be cleared because thread @@ -5746,8 +5784,8 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi, mysql_options(mysql, MYSQL_SET_CHARSET_DIR, (char *) charsets_dir); /* Set MYSQL_PLUGIN_DIR in case master asks for an external authentication plugin */ - if (opt_plugin_dir_ptr && *opt_plugin_dir_ptr)
- mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir_ptr);
+ if (opt_plugin_dir_ptr && *opt_plugin_dir_ptr) + mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir_ptr); /* we disallow empty users */ if (mi->user == NULL || mi->user[0] == 0) @@ -6122,6 +6160,7 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) if (hot_log) mysql_mutex_unlock(log_lock); + rli->sql_thread_caught_up= false; DBUG_RETURN(ev); } if (opt_reckless_slave) // For mysql-test @@ -6159,12 +6198,10 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) Seconds_Behind_Master would be zero only when master has no more updates in binlog for slave. The heartbeat can be sent in a (small) fraction of slave_net_timeout. Until it's done - rli->last_master_timestamp is temporarely (for time of - waiting for the following event) reset whenever EOF is - reached. + rli->sql_thread_caught_up is temporarely (for time of waiting for + the following event) set whenever EOF is reached. */ - time_t save_timestamp= rli->last_master_timestamp; - rli->last_master_timestamp= 0; + rli->sql_thread_caught_up= true; DBUG_ASSERT(rli->relay_log.get_open_count() == rli->cur_log_old_open_count); @@ -6208,6 +6245,17 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) } /* + We have to check sql_slave_killed() here an extra time. + Otherwise we may miss a wakeup, since last check was done + without holding LOCK_log. + */ + if (sql_slave_killed(rgi)) + { + mysql_mutex_unlock(log_lock); + break; + } + + /* We can, and should release data_lock while we are waiting for update. If we do not, show slave status will block */ @@ -6279,7 +6327,7 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) rli->relay_log.wait_for_update_relay_log(rli->sql_driver_thd); // re-acquire data lock since we released it earlier mysql_mutex_lock(&rli->data_lock); - rli->last_master_timestamp= save_timestamp; + rli->sql_thread_caught_up= false; continue; } /* diff --git a/sql/sp_head.h b/sql/sp_head.h index 77adbf091b8..c1fb455e103 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -462,9 +462,10 @@ public: else if (m_flags & HAS_SQLCOM_FLUSH) my_error(ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0), "FLUSH"); - return test(m_flags & - (CONTAINS_DYNAMIC_SQL|MULTI_RESULTS|HAS_SET_AUTOCOMMIT_STMT| - HAS_COMMIT_OR_ROLLBACK|HAS_SQLCOM_RESET|HAS_SQLCOM_FLUSH)); + return MY_TEST(m_flags & + (CONTAINS_DYNAMIC_SQL | MULTI_RESULTS | + HAS_SET_AUTOCOMMIT_STMT | HAS_COMMIT_OR_ROLLBACK | + HAS_SQLCOM_RESET | HAS_SQLCOM_FLUSH)); } #ifndef DBUG_OFF diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h index ce692024d0d..c48025da93d 100644 --- a/sql/sp_rcontext.h +++ b/sql/sp_rcontext.h @@ -450,7 +450,7 @@ public: int close(THD *thd); my_bool is_open() - { return test(server_side_cursor); } + { return MY_TEST(server_side_cursor); } int fetch(THD *, List<sp_variable> *vars); diff --git a/sql/spatial.cc b/sql/spatial.cc index b82e6977f8a..34d2417f632 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -302,7 +302,8 @@ int Geometry::create_from_opresult(Geometry_buffer *g_buf, res->q_append((char) wkb_ndr); res->q_append(geom_type); - return obj->init_from_opresult(res, rr.result(), rr.length()); + return obj->init_from_opresult(res, rr.result(), rr.length()) == 0 && + rr.length(); } diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index f2e762980b9..91bdb174d51 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2009, 2013, Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -800,7 +800,7 @@ ACL_ROLE::ACL_ROLE(const char * rolename, ulong privileges, MEM_ROOT *root) : static bool is_invalid_role_name(const char *str) { - if (strcasecmp(str, "PUBLIC") && strcasecmp(str, "NONE")) + if (*str && strcasecmp(str, "PUBLIC") && strcasecmp(str, "NONE")) return false; my_error(ER_INVALID_ROLE, MYF(0), str); @@ -1085,7 +1085,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) table->use_all_columns(); (void) my_init_dynamic_array(&acl_users,sizeof(ACL_USER), 50, 100, MYF(0)); (void) my_hash_init2(&acl_roles,50, &my_charset_utf8_bin, - 0,0,0, (my_hash_get_key) acl_role_get_key, + 0, 0, 0, (my_hash_get_key) acl_role_get_key, 0, (void (*)(void *))free_acl_role, 0); username_char_length= MY_MIN(table->field[1]->char_length(), @@ -1427,8 +1427,8 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) table->use_all_columns(); /* account for every role mapping */ - (void) my_hash_init2(&acl_roles_mappings, 50, system_charset_info, - 0,0,0, (my_hash_get_key) acl_role_map_get_key, 0,0); + (void) my_hash_init2(&acl_roles_mappings, 50, system_charset_info, 0, 0, 0, + (my_hash_get_key) acl_role_map_get_key, 0, 0, 0); MEM_ROOT temp_root; init_alloc_root(&temp_root, ACL_ALLOC_BLOCK_SIZE, 0, MYF(0)); while (!(read_record_info.read_record(&read_record_info))) @@ -3001,9 +3001,9 @@ static bool update_user_table(THD *thd, TABLE *table, static bool test_if_create_new_users(THD *thd) { Security_context *sctx= thd->security_ctx; - bool create_new_users= test(sctx->master_access & INSERT_ACL) || + bool create_new_users= MY_TEST(sctx->master_access & INSERT_ACL) || (!opt_safe_user_create && - test(sctx->master_access & CREATE_USER_ACL)); + MY_TEST(sctx->master_access & CREATE_USER_ACL)); if (!create_new_users) { TABLE_LIST tl; @@ -3420,7 +3420,7 @@ abort: } /** - Updates the mysql.roles_mapping table and the acl_roles_mappings hash. + Updates the mysql.roles_mapping table @param table TABLE to update @param user user name of the grantee @@ -3468,20 +3468,10 @@ replace_roles_mapping_table(TABLE *table, LEX_STRING *user, LEX_STRING *host, host->str, user->str, role->str)); goto table_error; } - /* - This should always return something, as the check was performed - earlier - */ - my_hash_delete(&acl_roles_mappings, (uchar*)existing); } - else + else if (with_admin) { - if (revoke_grant) - existing->with_admin= false; - else - existing->with_admin|= with_admin; - - table->field[3]->store(existing->with_admin + 1); + table->field[3]->store(!revoke_grant + 1); if ((error= table->file->ha_update_row(table->record[1], table->record[0]))) { @@ -3501,14 +3491,6 @@ replace_roles_mapping_table(TABLE *table, LEX_STRING *user, LEX_STRING *host, host->str, user->str, role->str)); goto table_error; } - else - { - /* allocate a new entry that will go in the hash */ - ROLE_GRANT_PAIR *hash_entry= new (&acl_memroot) ROLE_GRANT_PAIR; - if (hash_entry->init(&acl_memroot, user->str, host->str, role->str, with_admin)) - DBUG_RETURN(1); - my_hash_insert(&acl_roles_mappings, (uchar*) hash_entry); - } /* all ok */ DBUG_RETURN(0); @@ -3519,6 +3501,48 @@ table_error: DBUG_RETURN(1); } + +/** + Updates the acl_roles_mappings hash + + @param user user name of the grantee + @param host host name of the grantee + @param role role name to grant + @param with_admin WITH ADMIN OPTION flag + @param existing the entry in the acl_roles_mappings hash or NULL. + it is never NULL if revoke_grant is true. + it is NULL when a new pair is added, it's not NULL + when an existing pair is updated. + @param revoke_grant true for REVOKE, false for GRANT +*/ +static int +update_role_mapping(LEX_STRING *user, LEX_STRING *host, LEX_STRING *role, + bool with_admin, ROLE_GRANT_PAIR *existing, bool revoke_grant) +{ + if (revoke_grant) + { + if (with_admin) + { + existing->with_admin= false; + return 0; + } + return my_hash_delete(&acl_roles_mappings, (uchar*)existing); + } + + if (existing) + { + existing->with_admin|= with_admin; + return 0; + } + + /* allocate a new entry that will go in the hash */ + ROLE_GRANT_PAIR *hash_entry= new (&acl_memroot) ROLE_GRANT_PAIR; + if (hash_entry->init(&acl_memroot, user->str, host->str, + role->str, with_admin)) + return 1; + return my_hash_insert(&acl_roles_mappings, (uchar*) hash_entry); +} + static void acl_update_proxy_user(ACL_PROXY_USER *new_value, bool is_revoke) { @@ -3742,8 +3766,8 @@ public: bool ok() { return privs != 0 || cols != 0; } void init_hash() { - my_hash_init2(&hash_columns, 4, system_charset_info, - 0, 0, 0, (my_hash_get_key) get_key_column, 0, 0); + my_hash_init2(&hash_columns, 4, system_charset_info, 0, 0, 0, + (my_hash_get_key) get_key_column, 0, 0, 0); } }; @@ -5092,7 +5116,8 @@ static int update_role_table_columns(GRANT_TABLE *merged, now those roles were dropped or had their privileges revoked). we need to remove this GRANT_TABLE */ - DBUG_EXECUTE_IF("role_merge_stats", role_column_merges+= test(merged->cols);); + DBUG_EXECUTE_IF("role_merge_stats", + role_column_merges+= MY_TEST(merged->cols);); my_hash_delete(&column_priv_hash,(uchar*) merged); return 4; } @@ -5117,7 +5142,7 @@ static bool merge_role_table_and_column_privileges(ACL_ROLE *grantee, const char *db, const char *tname, role_hash_t *rhash) { Dynamic_array<GRANT_TABLE *> grants; - DBUG_ASSERT(test(db) == test(tname)); // both must be set, or neither + DBUG_ASSERT(MY_TEST(db) == MY_TEST(tname)); // both must be set, or neither /* first, collect table/column privileges granted to @@ -5240,7 +5265,7 @@ static bool merge_role_routine_grant_privileges(ACL_ROLE *grantee, { ulong update_flags= 0; - DBUG_ASSERT(test(db) == test(tname)); // both must be set, or neither + DBUG_ASSERT(MY_TEST(db) == MY_TEST(tname)); // both must be set, or neither DBUG_EXECUTE_IF("role_merge_stats", role_routine_merges++;); @@ -5538,8 +5563,8 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, else error=replace_user_table(thd, tables[0].table, *Str, 0, revoke_grant, create_new_users, - test(thd->variables.sql_mode & - MODE_NO_AUTO_CREATE_USER)); + MY_TEST(thd->variables.sql_mode & + MODE_NO_AUTO_CREATE_USER)); if (error) { result= TRUE; // Remember error @@ -5746,8 +5771,8 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, /* Create user if needed */ error=replace_user_table(thd, tables[0].table, *Str, 0, revoke_grant, create_new_users, - test(thd->variables.sql_mode & - MODE_NO_AUTO_CREATE_USER)); + MY_TEST(thd->variables.sql_mode & + MODE_NO_AUTO_CREATE_USER)); if (error) { result= TRUE; // Remember error @@ -5876,6 +5901,7 @@ bool mysql_grant_role(THD *thd, List <LEX_USER> &list, bool revoke) */ DBUG_ASSERT(list.elements >= 2); bool result= 0; + bool create_new_user, no_auto_create_user; String wrong_users; LEX_USER *user, *granted_role; LEX_STRING rolename; @@ -5891,12 +5917,19 @@ bool mysql_grant_role(THD *thd, List <LEX_USER> &list, bool revoke) DBUG_ASSERT(granted_role->is_role()); rolename= granted_role->user; - TABLE_LIST tables; - tables.init_one_table(C_STRING_WITH_LEN("mysql"), - C_STRING_WITH_LEN("roles_mapping"), - "roles_mapping", TL_WRITE); + create_new_user= test_if_create_new_users(thd); + no_auto_create_user= MY_TEST(thd->variables.sql_mode & + MODE_NO_AUTO_CREATE_USER); + + TABLE_LIST tables[2]; + tables[0].init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("roles_mapping"), + "roles_mapping", TL_WRITE); + tables[1].init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("user"), "user", TL_WRITE); + tables[0].next_local= tables[0].next_global= tables+1; - if (open_and_lock_tables(thd, &tables, FALSE, MYSQL_LOCK_IGNORE_TIMEOUT)) + if (open_and_lock_tables(thd, tables, FALSE, MYSQL_LOCK_IGNORE_TIMEOUT)) DBUG_RETURN(TRUE); /* purecov: deadcode */ mysql_rwlock_wrlock(&LOCK_grant); @@ -5984,6 +6017,27 @@ bool mysql_grant_role(THD *thd, List <LEX_USER> &list, bool revoke) if (!grantee) grantee= find_user_exact(hostname.str, username.str); + if (!grantee && !revoke) + { + LEX_USER user_combo = *user; + user_combo.host = hostname; + user_combo.user = username; + + /* create the user if it does not exist */ + if (replace_user_table(thd, tables[1].table, user_combo, 0, + false, create_new_user, + no_auto_create_user)) + { + append_user(&wrong_users, username.str, hostname.str); + result= 1; + continue; + } + grantee= find_user_exact(hostname.str, username.str); + + /* either replace_user_table failed, or we've added the user */ + DBUG_ASSERT(grantee); + } + if (!grantee) { append_user(&wrong_users, username.str, hostname.str); @@ -6036,7 +6090,7 @@ bool mysql_grant_role(THD *thd, List <LEX_USER> &list, bool revoke) } /* write into the roles_mapping table */ - if (replace_roles_mapping_table(tables.table, + if (replace_roles_mapping_table(tables[0].table, &username, &hostname, &rolename, thd->lex->with_admin_option, hash_entry, revoke)) @@ -6055,6 +6109,8 @@ bool mysql_grant_role(THD *thd, List <LEX_USER> &list, bool revoke) } continue; } + update_role_mapping(&username, &hostname, &rolename, + thd->lex->with_admin_option, hash_entry, revoke); /* Only need to propagate grants when granting/revoking a role to/from @@ -6181,8 +6237,8 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list, else if (replace_user_table(thd, tables[0].table, *Str, (!db ? rights : 0), revoke_grant, create_new_users, - test(thd->variables.sql_mode & - MODE_NO_AUTO_CREATE_USER))) + MY_TEST(thd->variables.sql_mode & + MODE_NO_AUTO_CREATE_USER))) result= -1; else if (db) { @@ -6611,7 +6667,7 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables, for (tl= tables; number-- ; tl= tl->next_global) { - sctx = test(tl->security_ctx) ? tl->security_ctx : thd->security_ctx; + sctx= MY_TEST(tl->security_ctx) ? tl->security_ctx : thd->security_ctx; const ACL_internal_table_access *access= get_cached_table_access(&tl->grant.m_internal, @@ -6866,7 +6922,7 @@ bool check_column_grant_in_table_ref(THD *thd, TABLE_LIST * table_ref, GRANT_INFO *grant; const char *db_name; const char *table_name; - Security_context *sctx= test(table_ref->security_ctx) ? + Security_context *sctx= MY_TEST(table_ref->security_ctx) ? table_ref->security_ctx : thd->security_ctx; if (table_ref->view || table_ref->field_translation) @@ -8355,7 +8411,7 @@ static int handle_roles_mappings_table(TABLE *table, bool drop, { role= safe_str(get_field(thd->mem_root, role_field)); - if (strcmp(user_from->user.str, role)) + if (!user_from->is_role() || strcmp(user_from->user.str, role)) continue; error= 0; @@ -8578,7 +8634,6 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop, const char *UNINIT_VAR(user); const char *UNINIT_VAR(host); const char *UNINIT_VAR(role); - uint role_not_matched= 1; ACL_USER *acl_user= NULL; ACL_ROLE *acl_role= NULL; ACL_DB *acl_db= NULL; @@ -8738,11 +8793,10 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop, if (struct_no == ROLES_MAPPINGS_HASH) { - role_not_matched= strcmp(user_from->user.str, role); - if (role_not_matched && + if (user_from->is_role() ? strcmp(user_from->user.str, role) : (strcmp(user_from->user.str, user) || my_strcasecmp(system_charset_info, user_from->host.str, host))) - continue; + continue; } else { @@ -8862,14 +8916,14 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop, size_t old_key_length= role_grant_pair->hashkey.length; bool oom; - if (role_not_matched) - oom= role_grant_pair->init(&acl_memroot, user_to->user.str, - user_to->host.str, - role_grant_pair->r_uname, false); - else + if (user_to->is_role()) oom= role_grant_pair->init(&acl_memroot, role_grant_pair->u_uname, role_grant_pair->u_hname, user_to->user.str, false); + else + oom= role_grant_pair->init(&acl_memroot, user_to->user.str, + user_to->host.str, + role_grant_pair->r_uname, false); if (oom) DBUG_RETURN(-1); @@ -9211,6 +9265,10 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list, bool handle_as_role) undo_add_role_user_mapping(grantee, role); result= TRUE; } + else if (grantee) + update_role_mapping(&thd->lex->definer->user, + &thd->lex->definer->host, + &user_name->user, true, NULL, false); } } @@ -9275,7 +9333,7 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list, bool handle_as_role) if (handle_as_role != user_name->is_role()) { - append_user(&wrong_users, tmp_user_name); + append_user(&wrong_users, user_name); result= TRUE; continue; } @@ -9353,20 +9411,20 @@ bool mysql_rename_user(THD *thd, List <LEX_USER> &list) while ((tmp_user_from= user_list++)) { tmp_user_to= user_list++; - if (!(user_from= get_current_user(thd, tmp_user_from, false)) || - user_from->is_role()) + if (!(user_from= get_current_user(thd, tmp_user_from, false))) { append_user(&wrong_users, user_from); result= TRUE; continue; } - if (!(user_to= get_current_user(thd, tmp_user_to, false)) || - user_to->is_role()) + if (!(user_to= get_current_user(thd, tmp_user_to, false))) { append_user(&wrong_users, user_to); result= TRUE; continue; } + DBUG_ASSERT(!user_from->is_role()); + DBUG_ASSERT(!user_to->is_role()); /* Search all in-memory structures and grant tables @@ -9597,6 +9655,8 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list) { result= -1; //Something went wrong } + update_role_mapping(&lex_user->user, &lex_user->host, + &role_grant->user, false, pair, true); /* Delete from the parent_grantee array of the roles granted, the entry pointing to this user_or_role @@ -11448,7 +11508,7 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio, db + passwd_len + 1 : 0; if (passwd == NULL || - passwd + passwd_len + test(db) > (char *)net->read_pos + pkt_len) + passwd + passwd_len + MY_TEST(db) > (char*) net->read_pos + pkt_len) return packet_error; /* strlen() can't be easily deleted without changing protocol */ diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 3f5ae79299d..6989b76accb 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -163,10 +163,11 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list, - Run a normal repair using the new index file and the old data file */ - if (table->s->frm_version != FRM_VER_TRUE_VARCHAR) + if (table->s->frm_version != FRM_VER_TRUE_VARCHAR && + table->s->varchar_fields) { error= send_check_errmsg(thd, table_list, "repair", - "Failed repairing incompatible .frm file"); + "Failed repairing a very old .frm file as the data file format has changed between versions. Please dump the table in your old system with mysqldump and read it into this system with mysql or mysqlimport"); goto end; } @@ -1222,7 +1223,7 @@ bool Sql_cmd_repair_table::execute(THD *thd) WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL) res= mysql_admin_table(thd, first_table, &m_lex->check_opt, "repair", TL_WRITE, 1, - test(m_lex->check_opt.sql_flags & TT_USEFRM), + MY_TEST(m_lex->check_opt.sql_flags & TT_USEFRM), HA_OPEN_FOR_REPAIR, &prepare_for_repair, &handler::ha_repair, 0); diff --git a/sql/sql_admin.h b/sql/sql_admin.h index fa89fc9063f..77fc41e2ec4 100644 --- a/sql/sql_admin.h +++ b/sql/sql_admin.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. +/* 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 diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc index 86bc3bb4e54..e3282709cd6 100644 --- a/sql/sql_alter.cc +++ b/sql/sql_alter.cc @@ -356,19 +356,8 @@ bool Sql_cmd_discard_import_tablespace::execute(THD *thd) it is the case. TODO: this design is obsolete and will be removed. */ - int table_kind= check_if_log_table(table_list->db_length, table_list->db, - table_list->table_name_length, - table_list->table_name, false); - - if (table_kind) - { - /* Disable alter of enabled log tables */ - if (logger.is_log_table_enabled(table_kind)) - { - my_error(ER_BAD_LOG_STATEMENT, MYF(0), "ALTER"); - return true; - } - } + if (check_if_log_table(table_list, TRUE, "ALTER")) + return true; return mysql_discard_or_import_tablespace(thd, table_list, diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index be35340df27..ac3f7f25518 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2011, Oracle and/or its affiliates. + Copyright (c) 2000, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc index f0e35cb022f..a92f69f3da4 100644 --- a/sql/sql_audit.cc +++ b/sql/sql_audit.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2013, 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 diff --git a/sql/sql_audit.h b/sql/sql_audit.h index bf8d837580a..85e7abb23e9 100644 --- a/sql/sql_audit.h +++ b/sql/sql_audit.h @@ -1,7 +1,7 @@ #ifndef SQL_AUDIT_INCLUDED #define SQL_AUDIT_INCLUDED -/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2013, 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 diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 5c70c4501f0..f1479d47fcd 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -389,7 +389,8 @@ void kill_delayed_threads_for_table(TABLE_SHARE *share) { THD *in_use= tab->in_use; - if (in_use && (in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT) && + DBUG_ASSERT(in_use && tab->s->tdc.flushed); + if ((in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT) && ! in_use->killed) { in_use->killed= KILL_SYSTEM_THREAD; @@ -430,9 +431,12 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables, { bool result= FALSE; struct timespec abstime; + ulong refresh_version; DBUG_ENTER("close_cached_tables"); DBUG_ASSERT(thd || (!wait_for_refresh && !tables)); + refresh_version= tdc_increment_refresh_version(); + if (!tables) { /* @@ -442,13 +446,12 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables, incrementing of refresh_version is followed by purge of unused table shares. */ - tdc_increment_refresh_version(); kill_delayed_threads(); /* Get rid of all unused TABLE and TABLE_SHARE instances. By doing this we automatically close all tables which were marked as "old". */ - tc_purge(); + tc_purge(true); /* Free table shares which were not freed implicitly by loop above. */ tdc_purge(true); } @@ -530,7 +533,7 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables, while ((share= tdc_it.next())) { mysql_mutex_lock(&share->tdc.LOCK_table_share); - if (share->has_old_version()) + if (share->tdc.flushed && share->tdc.version < refresh_version) { /* wait_for_old_version() will unlock mutex and free share */ found= true; @@ -558,7 +561,8 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables, if (thd->killed) break; if (tdc_wait_for_old_version(thd, table->db, table->table_name, timeout, - MDL_wait_for_subgraph::DEADLOCK_WEIGHT_DDL)) + MDL_wait_for_subgraph::DEADLOCK_WEIGHT_DDL, + refresh_version)) { result= TRUE; break; @@ -788,12 +792,18 @@ static void close_open_tables(THD *thd) access the table cache key @param[in] extra - HA_EXTRA_PREPRE_FOR_DROP if the table is being dropped - HA_EXTRA_PREPARE_FOR_REANME if the table is being renamed - HA_EXTRA_NOT_USED no drop/rename - In case of drop/reanme the documented behaviour is to + HA_EXTRA_PREPARE_FOR_DROP + - The table is dropped + HA_EXTRA_PREPARE_FOR_RENAME + - The table is renamed + HA_EXTRA_NOT_USED + - The table is marked as closed in the + locked_table_list but kept there so one can call + locked_table_list->reopen_tables() to put it back. + + In case of drop/rename the documented behavior is to implicitly remove the table from LOCK TABLES - list. + list. @pre Must be called with an X MDL lock on the table. */ @@ -1136,7 +1146,8 @@ bool close_temporary_tables(THD *thd) /* We always quote db,table names though it is slight overkill */ if (found_user_tables && - !(was_quote_show= test(thd->variables.option_bits & OPTION_QUOTE_SHOW_CREATE))) + !(was_quote_show= MY_TEST(thd->variables.option_bits & + OPTION_QUOTE_SHOW_CREATE))) { thd->variables.option_bits |= OPTION_QUOTE_SHOW_CREATE; } @@ -1481,7 +1492,7 @@ void update_non_unique_table_error(TABLE_LIST *update, return; } } - my_error(ER_UPDATE_TABLE_USED, MYF(0), update->alias); + my_error(ER_UPDATE_TABLE_USED, MYF(0), update->alias, operation); } @@ -1592,26 +1603,21 @@ TABLE *find_temporary_table(THD *thd, thd->temporary_tables list, it's impossible to tell here whether we're dealing with an internal or a user temporary table. - If is_trans is not null, we return the type of the table: - either transactional (e.g. innodb) as TRUE or non-transactional - (e.g. myisam) as FALSE. + @param thd Thread handler + @param table Temporary table to be deleted + @param is_trans Is set to the type of the table: + transactional (e.g. innodb) as TRUE or non-transactional + (e.g. myisam) as FALSE. @retval 0 the table was found and dropped successfully. - @retval 1 the table was not found in the list of temporary tables - of this thread @retval -1 the table is in use by a outer query */ -int drop_temporary_table(THD *thd, TABLE_LIST *table_list, bool *is_trans) +int drop_temporary_table(THD *thd, TABLE *table, bool *is_trans) { DBUG_ENTER("drop_temporary_table"); DBUG_PRINT("tmptable", ("closing table: '%s'.'%s'", - table_list->db, table_list->table_name)); - - if (!is_temporary_table(table_list)) - DBUG_RETURN(1); - - TABLE *table= table_list->table; + table->s->db.str, table->s->table_name.str)); /* Table might be in use by some outer statement. */ if (table->query_id && table->query_id != thd->query_id) @@ -1631,10 +1637,10 @@ int drop_temporary_table(THD *thd, TABLE_LIST *table_list, bool *is_trans) */ mysql_lock_remove(thd, thd->lock, table); close_temporary_table(thd, table, 1, 1); - table_list->table= NULL; DBUG_RETURN(0); } + /* unlink from thd->temporary tables and close temporary table */ @@ -1757,7 +1763,7 @@ bool wait_while_table_is_used(THD *thd, TABLE *table, DBUG_ENTER("wait_while_table_is_used"); DBUG_PRINT("enter", ("table: '%s' share: 0x%lx db_stat: %u version: %lu", table->s->table_name.str, (ulong) table->s, - table->db_stat, table->s->version)); + table->db_stat, table->s->tdc.version)); if (thd->mdl_context.upgrade_shared_lock( table->mdl_ticket, MDL_EXCLUSIVE, @@ -2294,7 +2300,9 @@ bool open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, retry_share: share= tdc_acquire_share(thd, table_list->db, table_list->table_name, - key, key_length, gts_flags, &table); + key, key_length, + table_list->mdl_request.key.tc_hash_value(), + gts_flags, &table); if (!share) { @@ -2324,7 +2332,7 @@ retry_share: /* Check if this TABLE_SHARE-object corresponds to a view. Note, that there is - no need to call TABLE_SHARE::has_old_version() as we do for regular tables, + no need to check TABLE_SHARE::tdc.flushed as we do for regular tables, because view shares are always up to date. */ if (share->is_view) @@ -2365,8 +2373,10 @@ retry_share: if (!(flags & MYSQL_OPEN_IGNORE_FLUSH)) { - if (share->has_old_version()) + if (share->tdc.flushed) { + DBUG_PRINT("info", ("Found old share version: %lu current: %lu", + share->tdc.version, tdc_refresh_version())); /* We already have an MDL lock. But we have encountered an old version of table in the table definition cache which is possible @@ -2397,7 +2407,7 @@ retry_share: goto retry_share; } - if (thd->open_tables && thd->open_tables->s->version != share->version) + if (thd->open_tables && thd->open_tables->s->tdc.flushed) { /* If the version changes while we're opening the tables, @@ -2498,6 +2508,7 @@ retry_share: err_lock: tdc_release_share(share); + DBUG_PRINT("exit", ("failed")); DBUG_RETURN(TRUE); } @@ -2615,9 +2626,9 @@ Locked_tables_list::init_locked_tables(THD *thd) { TABLE_LIST *src_table_list= table->pos_in_table_list; char *db, *table_name, *alias; - size_t db_len= src_table_list->db_length; - size_t table_name_len= src_table_list->table_name_length; - size_t alias_len= strlen(src_table_list->alias); + size_t db_len= table->s->db.length; + size_t table_name_len= table->s->table_name.length; + size_t alias_len= table->alias.length(); TABLE_LIST *dst_table_list; if (! multi_alloc_root(&m_locked_tables_root, @@ -2627,23 +2638,15 @@ Locked_tables_list::init_locked_tables(THD *thd) &alias, alias_len + 1, NullS)) { - unlock_locked_tables(0); + reset(); return TRUE; } - memcpy(db, src_table_list->db, db_len + 1); - memcpy(table_name, src_table_list->table_name, table_name_len + 1); - memcpy(alias, src_table_list->alias, alias_len + 1); - /** - Sic: remember the *actual* table level lock type taken, to - acquire the exact same type in reopen_tables(). - E.g. if the table was locked for write, src_table_list->lock_type is - TL_WRITE_DEFAULT, whereas reginfo.lock_type has been updated from - thd->update_lock_default. - */ + memcpy(db, table->s->db.str, db_len + 1); + memcpy(table_name, table->s->table_name.str, table_name_len + 1); + strmake(alias, table->alias.ptr(), alias_len); dst_table_list->init_one_table(db, db_len, table_name, table_name_len, - alias, - src_table_list->table->reginfo.lock_type); + alias, table->reginfo.lock_type); dst_table_list->table= table; dst_table_list->mdl_request.ticket= src_table_list->mdl_request.ticket; @@ -2664,7 +2667,7 @@ Locked_tables_list::init_locked_tables(THD *thd) (m_locked_tables_count+1)); if (m_reopen_array == NULL) { - unlock_locked_tables(0); + reset(); return TRUE; } } @@ -2685,42 +2688,50 @@ Locked_tables_list::init_locked_tables(THD *thd) void Locked_tables_list::unlock_locked_tables(THD *thd) { - if (thd) + DBUG_ASSERT(!thd->in_sub_stmt && + !(thd->state_flags & Open_tables_state::BACKUPS_AVAIL)); + /* + Sic: we must be careful to not close open tables if + we're not in LOCK TABLES mode: unlock_locked_tables() is + sometimes called implicitly, expecting no effect on + open tables, e.g. from begin_trans(). + */ + if (thd->locked_tables_mode != LTM_LOCK_TABLES) + return; + + for (TABLE_LIST *table_list= m_locked_tables; + table_list; table_list= table_list->next_global) { - DBUG_ASSERT(!thd->in_sub_stmt && - !(thd->state_flags & Open_tables_state::BACKUPS_AVAIL)); /* - Sic: we must be careful to not close open tables if - we're not in LOCK TABLES mode: unlock_locked_tables() is - sometimes called implicitly, expecting no effect on - open tables, e.g. from begin_trans(). + Clear the position in the list, the TABLE object will be + returned to the table cache. */ - if (thd->locked_tables_mode != LTM_LOCK_TABLES) - return; + if (table_list->table) // If not closed + table_list->table->pos_in_locked_tables= NULL; + } + thd->leave_locked_tables_mode(); - for (TABLE_LIST *table_list= m_locked_tables; - table_list; table_list= table_list->next_global) - { - /* - Clear the position in the list, the TABLE object will be - returned to the table cache. - */ - if (table_list->table) // If not closed - table_list->table->pos_in_locked_tables= NULL; - } - thd->leave_locked_tables_mode(); + DBUG_ASSERT(thd->transaction.stmt.is_empty()); + close_thread_tables(thd); + + /* + We rely on the caller to implicitly commit the + transaction and release transactional locks. + */ - DBUG_ASSERT(thd->transaction.stmt.is_empty()); - close_thread_tables(thd); - /* - We rely on the caller to implicitly commit the - transaction and release transactional locks. - */ - } /* After closing tables we can free memory used for storing lock request for metadata locks and TABLE_LIST elements. */ + reset(); +} + +/* + Free memory allocated for storing locks +*/ + +void Locked_tables_list::reset() +{ free_root(&m_locked_tables_root, MYF(0)); m_locked_tables= NULL; m_locked_tables_last= &m_locked_tables; @@ -2785,6 +2796,7 @@ void Locked_tables_list::unlink_from_list(THD *thd, m_locked_tables_last= table_list->prev_global; else table_list->next_global->prev_global= table_list->prev_global; + m_locked_tables_count--; } } @@ -2838,8 +2850,13 @@ unlink_all_closed_tables(THD *thd, MYSQL_LOCK *lock, size_t reopen_count) m_locked_tables_last= table_list->prev_global; else table_list->next_global->prev_global= table_list->prev_global; + m_locked_tables_count--; } } + + /* If no tables left, do an automatic UNLOCK TABLES */ + if (thd->lock && thd->lock->table_count == 0) + unlock_locked_tables(thd); } @@ -2912,6 +2929,62 @@ Locked_tables_list::reopen_tables(THD *thd) return FALSE; } +/** + Add back a locked table to the locked list that we just removed from it. + This is needed in CREATE OR REPLACE TABLE where we are dropping, creating + and re-opening a locked table. + + @return 0 0k + @return 1 error +*/ + +bool Locked_tables_list::restore_lock(THD *thd, TABLE_LIST *dst_table_list, + TABLE *table, MYSQL_LOCK *lock) +{ + MYSQL_LOCK *merged_lock; + DBUG_ENTER("restore_lock"); + DBUG_ASSERT(!strcmp(dst_table_list->table_name, table->s->table_name.str)); + + /* Ensure we have the memory to add the table back */ + if (!(merged_lock= mysql_lock_merge(thd->lock, lock))) + DBUG_RETURN(1); + thd->lock= merged_lock; + + /* Link to the new table */ + dst_table_list->table= table; + /* + The lock type may have changed (normally it should not as create + table will lock the table in write mode + */ + dst_table_list->lock_type= table->reginfo.lock_type; + table->pos_in_locked_tables= dst_table_list; + + add_back_last_deleted_lock(dst_table_list); + + table->mdl_ticket->downgrade_lock(table->reginfo.lock_type >= + TL_WRITE_ALLOW_WRITE ? + MDL_SHARED_NO_READ_WRITE : + MDL_SHARED_READ); + + DBUG_RETURN(0); +} + +/* + Add back the last deleted lock structure. + This should be followed by a call to reopen_tables() to + open the table. +*/ + +void Locked_tables_list::add_back_last_deleted_lock(TABLE_LIST *dst_table_list) +{ + /* Link the lock back in the locked tables list */ + dst_table_list->prev_global= m_locked_tables_last; + *m_locked_tables_last= dst_table_list; + m_locked_tables_last= &dst_table_list->next_global; + dst_table_list->next_global= 0; + m_locked_tables_count++; +} + #ifndef DBUG_OFF /* Cause a spurious statement reprepare for debug purposes. */ @@ -4049,9 +4122,9 @@ lock_table_names(THD *thd, if (mdl_requests.is_empty()) DBUG_RETURN(FALSE); - /* Check if CREATE TABLE was used */ - create_table= (tables_start && tables_start->open_strategy == - TABLE_LIST::OPEN_IF_EXISTS); + /* Check if CREATE TABLE without REPLACE was used */ + create_table= (thd->lex->sql_command == SQLCOM_CREATE_TABLE && + !(thd->lex->create_info.options & HA_LEX_CREATE_REPLACE)); if (!(flags & MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK)) { @@ -5332,6 +5405,39 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count, } +/* + Restart transaction for tables + + This is used when we had to do an implicit commit after tables are opened + and want to restart transactions on tables. + + This is used in case of: + LOCK TABLES xx + CREATE OR REPLACE TABLE xx; +*/ + +bool restart_trans_for_tables(THD *thd, TABLE_LIST *table) +{ + DBUG_ENTER("restart_trans_for_tables"); + + if (!thd->locked_tables_mode) + DBUG_RETURN(FALSE); + + for (; table; table= table->next_global) + { + if (table->placeholder()) + continue; + + if (check_lock_and_start_stmt(thd, thd->lex, table)) + { + DBUG_ASSERT(0); // Should never happen + DBUG_RETURN(TRUE); + } + } + DBUG_RETURN(FALSE); +} + + /** Prepare statement for reopening of tables and recalculation of set of prelocked tables. @@ -6495,7 +6601,7 @@ find_field_in_tables(THD *thd, Item_ident *item, */ if (db) return cur_field; - + if (found) { if (report_error == REPORT_ALL_ERRORS || @@ -6510,7 +6616,7 @@ find_field_in_tables(THD *thd, Item_ident *item, if (found) return found; - + /* If the field was qualified and there were no tables to search, issue an error that an unknown table was given. The situation is detected @@ -7437,10 +7543,16 @@ err: order, thus when we iterate over it, we are moving from the right to the left in the FROM clause. + NOTES + We can't run this many times as the first_name_resolution_table would + be different for subsequent runs when sub queries has been optimized + away. + RETURN TRUE Error FALSE OK */ + static bool setup_natural_join_row_types(THD *thd, List<TABLE_LIST> *from_clause, Name_resolution_context *context) @@ -7450,6 +7562,19 @@ static bool setup_natural_join_row_types(THD *thd, if (from_clause->elements == 0) DBUG_RETURN(false); /* We come here in the case of UNIONs. */ + /* + Do not redo work if already done: + 1) for stored procedures, + 2) for multitable update after lock failure and table reopening. + */ + if (!context->select_lex->first_natural_join_processing) + { + context->first_name_resolution_table= context->natural_join_first_table; + DBUG_PRINT("info", ("using cached setup_natural_join_row_types")); + DBUG_RETURN(false); + } + context->select_lex->first_natural_join_processing= false; + List_iterator_fast<TABLE_LIST> table_ref_it(*from_clause); TABLE_LIST *table_ref; /* Current table reference. */ /* Table reference to the left of the current. */ @@ -7466,22 +7591,15 @@ static bool setup_natural_join_row_types(THD *thd, left_neighbor= table_ref_it++; } while (left_neighbor && left_neighbor->sj_subq_pred); - /* - Do not redo work if already done: - 1) for stored procedures, - 2) for multitable update after lock failure and table reopening. - */ - if (context->select_lex->first_natural_join_processing) + + if (store_top_level_join_columns(thd, table_ref, + left_neighbor, right_neighbor)) + DBUG_RETURN(true); + if (left_neighbor) { - if (store_top_level_join_columns(thd, table_ref, - left_neighbor, right_neighbor)) - DBUG_RETURN(true); - if (left_neighbor) - { - TABLE_LIST *first_leaf_on_the_right; - first_leaf_on_the_right= table_ref->first_leaf_for_name_resolution(); - left_neighbor->next_name_resolution_table= first_leaf_on_the_right; - } + TABLE_LIST *first_leaf_on_the_right; + first_leaf_on_the_right= table_ref->first_leaf_for_name_resolution(); + left_neighbor->next_name_resolution_table= first_leaf_on_the_right; } right_neighbor= table_ref; } @@ -7495,8 +7613,11 @@ static bool setup_natural_join_row_types(THD *thd, DBUG_ASSERT(right_neighbor); context->first_name_resolution_table= right_neighbor->first_leaf_for_name_resolution(); - context->select_lex->first_natural_join_processing= false; - + /* + This is only to ensure that first_name_resolution_table doesn't + change on re-execution + */ + context->natural_join_first_table= context->first_name_resolution_table; DBUG_RETURN (false); } @@ -7670,7 +7791,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array, thd->lex->allow_sum_func= save_allow_sum_func; thd->mark_used_columns= save_mark_used_columns; DBUG_PRINT("info", ("thd->mark_used_columns: %d", thd->mark_used_columns)); - DBUG_RETURN(test(thd->is_error())); + DBUG_RETURN(MY_TEST(thd->is_error())); } @@ -7842,12 +7963,9 @@ bool setup_tables(THD *thd, Name_resolution_context *context, if (table_list->merge_underlying_list) { DBUG_ASSERT(table_list->is_merged_derived()); - Query_arena *arena= thd->stmt_arena, backup; + Query_arena *arena, backup; + arena= thd->activate_stmt_arena_if_needed(&backup); bool res; - if (arena->is_conventional()) - arena= 0; // For easier test - else - thd->set_n_backup_active_arena(arena, &backup); res= table_list->setup_underlying(thd); if (arena) thd->restore_active_arena(arena, &backup); @@ -8098,7 +8216,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name, if (!(item= field_iterator.create_item(thd))) DBUG_RETURN(TRUE); -// DBUG_ASSERT(item->fixed); + /* cache the table for the Item_fields inserted by expanding stars */ if (item->type() == Item::FIELD_ITEM && tables->cacheable_table) ((Item_field *)item)->cached_table= tables; @@ -8226,11 +8344,8 @@ void wrap_ident(THD *thd, Item **conds) { Item_direct_ref_to_ident *wrapper; DBUG_ASSERT((*conds)->type() == Item::FIELD_ITEM || (*conds)->type() == Item::REF_ITEM); - Query_arena *arena= thd->stmt_arena, backup; - if (arena->is_conventional()) - arena= 0; - else - thd->set_n_backup_active_arena(arena, &backup); + Query_arena *arena, backup; + arena= thd->activate_stmt_arena_if_needed(&backup); if ((wrapper= new Item_direct_ref_to_ident((Item_ident *)(*conds)))) (*conds)= (Item*) wrapper; if (arena) @@ -8377,7 +8492,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List<TABLE_LIST> &leaves, select_lex->where= *conds; } thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup; - DBUG_RETURN(test(thd->is_error())); + DBUG_RETURN(MY_TEST(thd->is_error())); err_no_arena: select_lex->is_item_list_lookup= save_is_item_list_lookup; diff --git a/sql/sql_base.h b/sql/sql_base.h index 3e633fad084..61442843a39 100644 --- a/sql/sql_base.h +++ b/sql/sql_base.h @@ -248,7 +248,7 @@ void close_thread_table(THD *thd, TABLE **table_ptr); bool close_temporary_tables(THD *thd); TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list, bool check_alias); -int drop_temporary_table(THD *thd, TABLE_LIST *table_list, bool *is_trans); +int drop_temporary_table(THD *thd, TABLE *table, bool *is_trans); void close_temporary_table(THD *thd, TABLE *table, bool free_share, bool delete_table); void close_temporary(TABLE *table, bool free_share, bool delete_table); @@ -486,6 +486,8 @@ inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables, } +bool restart_trans_for_tables(THD *thd, TABLE_LIST *table); + /** A context of open_tables() function, used to recover from a failed open_table() or open_routine() attempt. diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index 4d91dbab9a6..fef959c37ca 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2011, Oracle and/or its affiliates. + Copyright (c) 2005, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h index 7e163b0dbcc..55b2d7eefd9 100644 --- a/sql/sql_bitmap.h +++ b/sql/sql_bitmap.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2003, 2010, Oracle and/or its affiliates +/* Copyright (c) 2003, 2013, Oracle and/or its affiliates Copyright (c) 2009, 2013, Monty Program Ab. This program is free software; you can redistribute it and/or modify @@ -34,7 +34,7 @@ public: Bitmap() { init(); } Bitmap(const Bitmap& from) { *this=from; } explicit Bitmap(uint prefix_to_set) { init(prefix_to_set); } - void init() { bitmap_init(&map, buffer, default_width, 0); } + void init() { my_bitmap_init(&map, buffer, default_width, 0); } void init(uint prefix_to_set) { init(); set_prefix(prefix_to_set); } uint length() const { return default_width; } Bitmap& operator=(const Bitmap& map2) @@ -52,7 +52,7 @@ public: void intersect(ulonglong map2buff) { MY_BITMAP map2; - bitmap_init(&map2, (uint32 *)&map2buff, sizeof(ulonglong)*8, 0); + my_bitmap_init(&map2, (uint32 *)&map2buff, sizeof(ulonglong)*8, 0); bitmap_intersect(&map, &map2); } /* Use highest bit for all bits above sizeof(ulonglong)*8. */ @@ -61,7 +61,7 @@ public: intersect(map2buff); if (map.n_bits > sizeof(ulonglong) * 8) bitmap_set_above(&map, sizeof(ulonglong), - test(map2buff & (1LL << (sizeof(ulonglong) * 8 - 1)))); + MY_TEST(map2buff & (1LL << (sizeof(ulonglong) * 8 - 1)))); } void subtract(Bitmap& map2) { bitmap_subtract(&map, &map2.map); } void merge(Bitmap& map2) { bitmap_union(&map, &map2.map); } @@ -156,7 +156,7 @@ public: void intersect_extended(ulonglong map2) { map&= map2; } void subtract(Bitmap<64>& map2) { map&= ~map2.map; } void merge(Bitmap<64>& map2) { map|= map2.map; } - bool is_set(uint n) const { return test(map & (((ulonglong)1) << n)); } + bool is_set(uint n) const { return MY_TEST(map & (((ulonglong) 1) << n)); } bool is_prefix(uint n) const { return map == (((ulonglong)1) << n)-1; } bool is_clear_all() const { return map == (ulonglong)0; } bool is_set_all() const { return map == ~(ulonglong)0; } diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 5307f4f01f8..c6c5418e0cf 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1333,6 +1333,7 @@ ulong Query_cache::resize(ulong query_cache_size_arg) query->unlock_n_destroy(); block= block->next; } while (block != queries_blocks); + queries_blocks= NULL; // avoid second destroying by free_cache } free_cache(); @@ -1404,9 +1405,9 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) Query_cache_query_flags flags; // fill all gaps between fields with 0 to get repeatable key bzero(&flags, QUERY_CACHE_FLAGS_SIZE); - flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG); - flags.client_protocol_41= test(thd->client_capabilities & - CLIENT_PROTOCOL_41); + flags.client_long_flag= MY_TEST(thd->client_capabilities & CLIENT_LONG_FLAG); + flags.client_protocol_41= MY_TEST(thd->client_capabilities & + CLIENT_PROTOCOL_41); /* Protocol influences result format, so statement results in the binary protocol (COM_EXECUTE) cannot be served to statements asking for results @@ -1415,10 +1416,10 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) flags.protocol_type= (unsigned int) thd->protocol->type(); /* PROTOCOL_LOCAL results are not cached. */ DBUG_ASSERT(flags.protocol_type != (unsigned int) Protocol::PROTOCOL_LOCAL); - flags.more_results_exists= test(thd->server_status & - SERVER_MORE_RESULTS_EXISTS); + flags.more_results_exists= MY_TEST(thd->server_status & + SERVER_MORE_RESULTS_EXISTS); flags.in_trans= thd->in_active_multi_stmt_transaction(); - flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); + flags.autocommit= MY_TEST(thd->server_status & SERVER_STATUS_AUTOCOMMIT); flags.pkt_nr= net->pkt_nr; flags.character_set_client_num= thd->variables.character_set_client->number; @@ -1899,14 +1900,14 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length) // fill all gaps between fields with 0 to get repeatable key bzero(&flags, QUERY_CACHE_FLAGS_SIZE); - flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG); - flags.client_protocol_41= test(thd->client_capabilities & - CLIENT_PROTOCOL_41); + flags.client_long_flag= MY_TEST(thd->client_capabilities & CLIENT_LONG_FLAG); + flags.client_protocol_41= MY_TEST(thd->client_capabilities & + CLIENT_PROTOCOL_41); flags.protocol_type= (unsigned int) thd->protocol->type(); - flags.more_results_exists= test(thd->server_status & - SERVER_MORE_RESULTS_EXISTS); + flags.more_results_exists= MY_TEST(thd->server_status & + SERVER_MORE_RESULTS_EXISTS); flags.in_trans= thd->in_active_multi_stmt_transaction(); - flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); + flags.autocommit= MY_TEST(thd->server_status & SERVER_STATUS_AUTOCOMMIT); flags.pkt_nr= thd->net.pkt_nr; flags.character_set_client_num= thd->variables.character_set_client->number; flags.character_set_results_num= @@ -3409,7 +3410,7 @@ my_bool Query_cache::register_all_tables(THD *thd, if (block_table->parent) unlink_table(block_table); } - return test(n); + return MY_TEST(n); } @@ -4109,7 +4110,7 @@ Query_cache::is_cacheable(THD *thd, LEX *lex, (long) OPTION_TO_QUERY_CACHE, (long) lex->select_lex.options, (int) thd->variables.query_cache_type, - (uint) test(qc_is_able_to_intercept_result(thd)))); + (uint) MY_TEST(qc_is_able_to_intercept_result(thd)))); DBUG_RETURN(0); } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index b1b8a017992..d979df6dc33 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -518,14 +518,14 @@ extern "C" int mysql_tmpfile(const char *prefix) extern "C" int thd_in_lock_tables(const THD *thd) { - return test(thd->in_lock_tables); + return MY_TEST(thd->in_lock_tables); } extern "C" int thd_tablespace_op(const THD *thd) { - return test(thd->tablespace_op); + return MY_TEST(thd->tablespace_op); } extern "C" @@ -1445,6 +1445,7 @@ Sql_condition* THD::raise_condition(uint sql_errno, got_warning= 1; break; case Sql_condition::WARN_LEVEL_ERROR: + mysql_audit_general(this, MYSQL_AUDIT_GENERAL_ERROR, sql_errno, msg); break; default: DBUG_ASSERT(FALSE); @@ -1591,6 +1592,7 @@ void THD::init(void) set_status_var_init(); bzero((char *) &org_status_var, sizeof(org_status_var)); start_bytes_received= 0; + last_commit_gtid.seq_no= 0; #ifdef WITH_WSREP wsrep_exec_mode= wsrep_applier ? REPL_RECV : LOCAL_STATE; wsrep_conflict_state= NO_CONFLICT; @@ -2702,6 +2704,7 @@ bool select_result::check_simple_select() const static String default_line_term("\n",default_charset_info); static String default_escaped("\\",default_charset_info); static String default_field_term("\t",default_charset_info); +static String default_enclosed_and_line_start("", default_charset_info); static String default_xml_row_term("<row>", default_charset_info); sql_exchange::sql_exchange(char *name, bool flag, @@ -2710,7 +2713,7 @@ sql_exchange::sql_exchange(char *name, bool flag, { filetype= filetype_arg; field_term= &default_field_term; - enclosed= line_start= &my_empty_string; + enclosed= line_start= &default_enclosed_and_line_start; line_term= filetype == FILETYPE_CSV ? &default_line_term : &default_xml_row_term; escaped= &default_escaped; @@ -2850,7 +2853,7 @@ void select_to_file::send_error(uint errcode,const char *err) bool select_to_file::send_eof() { - int error= test(end_io_cache(&cache)); + int error= MY_TEST(end_io_cache(&cache)); if (mysql_file_close(file, MYF(MY_WME)) || thd->is_error()) error= true; @@ -3031,8 +3034,8 @@ select_export::prepare(List<Item> &list, SELECT_LEX_UNIT *u) escape_char= (int) (uchar) (*exchange->escaped)[0]; else escape_char= -1; - is_ambiguous_field_sep= test(strchr(ESCAPE_CHARS, field_sep_char)); - is_unsafe_field_sep= test(strchr(NUMERIC_CHARS, field_sep_char)); + is_ambiguous_field_sep= MY_TEST(strchr(ESCAPE_CHARS, field_sep_char)); + is_unsafe_field_sep= MY_TEST(strchr(NUMERIC_CHARS, field_sep_char)); line_sep_char= (exchange->line_term->length() ? (int) (uchar) (*exchange->line_term)[0] : INT_MAX); if (!field_term_length) @@ -5307,7 +5310,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) DBUG_PRINT("info", ("table: %s; ha_table_flags: 0x%llx", table->table_name, flags)); - if (table->table->no_replicate && !table->table->s->is_gtid_slave_pos) + if (table->table->no_replicate) { /* The statement uses a table that is not replicated. @@ -5649,6 +5652,10 @@ THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id, /* Fetch the type code for the RowsEventT template parameter */ int const general_type_code= RowsEventT::TYPE_CODE; + /* Ensure that all events in a GTID group are in the same cache */ + if (variables.option_bits & OPTION_GTID_BEGIN) + is_transactional= 1; + /* There is no good place to set up the transactional data, so we have to do it here. @@ -5850,6 +5857,10 @@ int THD::binlog_write_row(TABLE* table, bool is_trans, size_t const len= pack_row(table, cols, row_data, record); + /* Ensure that all events in a GTID group are in the same cache */ + if (variables.option_bits & OPTION_GTID_BEGIN) + is_trans= 1; + Rows_log_event* const ev= binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt, len, is_trans, @@ -5889,6 +5900,10 @@ int THD::binlog_update_row(TABLE* table, bool is_trans, size_t const after_size= pack_row(table, cols, after_row, after_record); + /* Ensure that all events in a GTID group are in the same cache */ + if (variables.option_bits & OPTION_GTID_BEGIN) + is_trans= 1; + /* Don't print debug messages when running valgrind since they can trigger false warnings. @@ -5937,6 +5952,10 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans, size_t const len= pack_row(table, cols, row_data, record); + /* Ensure that all events in a GTID group are in the same cache */ + if (variables.option_bits & OPTION_GTID_BEGIN) + is_trans= 1; + Rows_log_event* const ev= binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt, len, is_trans, @@ -5961,6 +5980,10 @@ int THD::binlog_remove_pending_rows_event(bool clear_maps, #endif DBUG_RETURN(0); + /* Ensure that all events in a GTID group are in the same cache */ + if (variables.option_bits & OPTION_GTID_BEGIN) + is_transactional= 1; + mysql_bin_log.remove_pending_rows_event(this, is_transactional); if (clear_maps) @@ -5984,6 +6007,10 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end, bool is_transactional) #endif DBUG_RETURN(0); + /* Ensure that all events in a GTID group are in the same cache */ + if (variables.option_bits & OPTION_GTID_BEGIN) + is_transactional= 1; + /* Mark the event as the last event of a statement if the stmt_end flag is set. @@ -6236,6 +6263,14 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg, DBUG_ASSERT(query_arg && mysql_bin_log.is_open()); #endif + /* If this is withing a BEGIN ... COMMIT group, don't log it */ + if (variables.option_bits & OPTION_GTID_BEGIN) + { + direct= 0; + is_trans= 1; + } + DBUG_PRINT("info", ("is_trans: %d direct: %d", is_trans, direct)); + if (get_binlog_local_stmt_filter() == BINLOG_FILTER_SET) { /* @@ -6373,14 +6408,23 @@ bool THD::rgi_have_temporary_tables() } +void +wait_for_commit::reinit() +{ + subsequent_commits_list= NULL; + next_subsequent_commit= NULL; + waitee= NULL; + opaque_pointer= NULL; + wakeup_error= 0; + wakeup_subsequent_commits_running= false; +} + + wait_for_commit::wait_for_commit() - : subsequent_commits_list(0), next_subsequent_commit(0), waitee(0), - opaque_pointer(0), - waiting_for_commit(false), wakeup_error(0), - wakeup_subsequent_commits_running(false) { mysql_mutex_init(key_LOCK_wait_commit, &LOCK_wait_commit, MY_MUTEX_INIT_FAST); mysql_cond_init(key_COND_wait_commit, &COND_wait_commit, 0); + reinit(); } @@ -6428,7 +6472,7 @@ wait_for_commit::wakeup(int wakeup_error) */ mysql_mutex_lock(&LOCK_wait_commit); - waiting_for_commit= false; + waitee= NULL; this->wakeup_error= wakeup_error; /* Note that it is critical that the mysql_cond_signal() here is done while @@ -6460,9 +6504,8 @@ wait_for_commit::wakeup(int wakeup_error) void wait_for_commit::register_wait_for_prior_commit(wait_for_commit *waitee) { - waiting_for_commit= true; - wakeup_error= 0; DBUG_ASSERT(!this->waitee /* No prior registration allowed */); + wakeup_error= 0; this->waitee= waitee; mysql_mutex_lock(&waitee->LOCK_wait_commit); @@ -6472,7 +6515,7 @@ wait_for_commit::register_wait_for_prior_commit(wait_for_commit *waitee) see comments on wakeup_subsequent_commits2() for details. */ if (waitee->wakeup_subsequent_commits_running) - waiting_for_commit= false; + this->waitee= NULL; else { /* @@ -6492,13 +6535,62 @@ wait_for_commit::register_wait_for_prior_commit(wait_for_commit *waitee) returns immediately. */ int -wait_for_commit::wait_for_prior_commit2() +wait_for_commit::wait_for_prior_commit2(THD *thd) { + PSI_stage_info old_stage; + wait_for_commit *loc_waitee; + mysql_mutex_lock(&LOCK_wait_commit); - while (waiting_for_commit) + DEBUG_SYNC(thd, "wait_for_prior_commit_waiting"); + thd->ENTER_COND(&COND_wait_commit, &LOCK_wait_commit, + &stage_waiting_for_prior_transaction_to_commit, + &old_stage); + while ((loc_waitee= this->waitee) && !thd->check_killed()) mysql_cond_wait(&COND_wait_commit, &LOCK_wait_commit); - mysql_mutex_unlock(&LOCK_wait_commit); - waitee= NULL; + if (!loc_waitee) + { + if (wakeup_error) + my_error(ER_PRIOR_COMMIT_FAILED, MYF(0)); + goto end; + } + /* + Wait was interrupted by kill. We need to unregister our wait and give the + error. But if a wakeup is already in progress, then we must ignore the + kill and not give error, otherwise we get inconsistency between waitee and + waiter as to whether we succeed or fail (eg. we may roll back but waitee + might attempt to commit both us and any subsequent commits waiting for us). + */ + mysql_mutex_lock(&loc_waitee->LOCK_wait_commit); + if (loc_waitee->wakeup_subsequent_commits_running) + { + /* We are being woken up; ignore the kill and just wait. */ + mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit); + do + { + mysql_cond_wait(&COND_wait_commit, &LOCK_wait_commit); + } while (this->waitee); + if (wakeup_error) + my_error(ER_PRIOR_COMMIT_FAILED, MYF(0)); + goto end; + } + remove_from_list(&loc_waitee->subsequent_commits_list); + mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit); + this->waitee= NULL; + + wakeup_error= thd->killed_errno(); + if (!wakeup_error) + wakeup_error= ER_QUERY_INTERRUPTED; + my_message(wakeup_error, ER(wakeup_error), MYF(0)); + thd->EXIT_COND(&old_stage); + /* + Must do the DEBUG_SYNC() _after_ exit_cond(), as DEBUG_SYNC is not safe to + use within enter_cond/exit_cond. + */ + DEBUG_SYNC(thd, "wait_for_prior_commit_killed"); + return wakeup_error; + +end: + thd->EXIT_COND(&old_stage); return wakeup_error; } @@ -6581,11 +6673,11 @@ wait_for_commit::wakeup_subsequent_commits2(int wakeup_error) void wait_for_commit::unregister_wait_for_prior_commit2() { + wait_for_commit *loc_waitee; + mysql_mutex_lock(&LOCK_wait_commit); - if (waiting_for_commit) + if ((loc_waitee= this->waitee)) { - wait_for_commit *loc_waitee= this->waitee; - wait_for_commit **next_ptr_ptr, *cur; mysql_mutex_lock(&loc_waitee->LOCK_wait_commit); if (loc_waitee->wakeup_subsequent_commits_running) { @@ -6597,28 +6689,18 @@ wait_for_commit::unregister_wait_for_prior_commit2() See comments on wakeup_subsequent_commits2() for more details. */ mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit); - while (waiting_for_commit) + while (this->waitee) mysql_cond_wait(&COND_wait_commit, &LOCK_wait_commit); } else { /* Remove ourselves from the list in the waitee. */ - next_ptr_ptr= &loc_waitee->subsequent_commits_list; - while ((cur= *next_ptr_ptr) != NULL) - { - if (cur == this) - { - *next_ptr_ptr= this->next_subsequent_commit; - break; - } - next_ptr_ptr= &cur->next_subsequent_commit; - } - waiting_for_commit= false; + remove_from_list(&loc_waitee->subsequent_commits_list); mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit); + this->waitee= NULL; } } mysql_mutex_unlock(&LOCK_wait_commit); - this->waitee= NULL; } diff --git a/sql/sql_class.h b/sql/sql_class.h index 6144dd42a0a..ab11249cafd 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -55,6 +55,7 @@ void set_thd_stage_info(void *thd, (thd)->enter_stage(& stage, NULL, __func__, __FILE__, __LINE__) #include "my_apc.h" +#include "rpl_gtid.h" #ifdef WITH_WSREP #include "wsrep_mysqld.h" @@ -131,6 +132,11 @@ enum enum_filetype { FILETYPE_CSV, FILETYPE_XML }; #define MODE_NO_ENGINE_SUBSTITUTION (1ULL << 30) #define MODE_PAD_CHAR_TO_FULL_LENGTH (1ULL << 31) +/* Bits for different old style modes */ +#define OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE (1 << 0) +#define OLD_MODE_NO_PROGRESS_INFO (1 << 1) +#define OLD_MODE_ZERO_DATE_TIME_CAST (1 << 2) + extern char internal_table_name[2]; extern char empty_c_string[1]; extern LEX_STRING EMPTY_STR; @@ -510,6 +516,7 @@ typedef struct system_variables ulonglong long_query_time; ulonglong optimizer_switch; sql_mode_t sql_mode; ///< which non-standard SQL behaviour should be enabled + sql_mode_t old_behavior; ///< which old SQL behaviour should be enabled ulonglong option_bits; ///< OPTION_xxx constants, e.g. OPTION_PROFILING ulonglong join_buff_space_limit; ulonglong log_slow_filter; @@ -1530,8 +1537,9 @@ public: void unlock_locked_tables(THD *thd); ~Locked_tables_list() { - unlock_locked_tables(0); + reset(); } + void reset(); bool init_locked_tables(THD *thd); TABLE_LIST *locked_tables() { return m_locked_tables; } void unlink_from_list(THD *thd, TABLE_LIST *table_list, @@ -1540,6 +1548,9 @@ public: MYSQL_LOCK *lock, size_t reopen_count); bool reopen_tables(THD *thd); + bool restore_lock(THD *thd, TABLE_LIST *dst_table_list, TABLE *table, + MYSQL_LOCK *lock); + void add_back_last_deleted_lock(TABLE_LIST *dst_table_list); }; @@ -1663,8 +1674,8 @@ struct wait_for_commit { /* The LOCK_wait_commit protects the fields subsequent_commits_list and - wakeup_subsequent_commits_running (for a waitee), and the flag - waiting_for_commit and associated COND_wait_commit (for a waiter). + wakeup_subsequent_commits_running (for a waitee), and the pointer + waiterr and associated COND_wait_commit (for a waiter). */ mysql_mutex_t LOCK_wait_commit; mysql_cond_t COND_wait_commit; @@ -1672,7 +1683,13 @@ struct wait_for_commit wait_for_commit *subsequent_commits_list; /* Link field for entries in subsequent_commits_list. */ wait_for_commit *next_subsequent_commit; - /* Our waitee, if we did register_wait_for_prior_commit(), else NULL. */ + /* + Our waitee, if we did register_wait_for_prior_commit(), and were not + yet woken up. Else NULL. + + When this is cleared for wakeup, the COND_wait_commit condition is + signalled. + */ wait_for_commit *waitee; /* Generic pointer for use by the transaction coordinator to optimise the @@ -1683,12 +1700,6 @@ struct wait_for_commit used by another transaction coordinator for similar purposes. */ void *opaque_pointer; - /* - The waiting_for_commit flag is cleared when a waiter has been woken - up. The COND_wait_commit condition is signalled when this has been - cleared. - */ - bool waiting_for_commit; /* The wakeup error code from the waitee. 0 means no error. */ int wakeup_error; /* @@ -1698,16 +1709,20 @@ struct wait_for_commit bool wakeup_subsequent_commits_running; void register_wait_for_prior_commit(wait_for_commit *waitee); - int wait_for_prior_commit() + int wait_for_prior_commit(THD *thd) { /* Quick inline check, to avoid function call and locking in the common case where no wakeup is registered, or a registered wait was already signalled. */ - if (waiting_for_commit) - return wait_for_prior_commit2(); + if (waitee) + return wait_for_prior_commit2(thd); else + { + if (wakeup_error) + my_error(ER_PRIOR_COMMIT_FAILED, MYF(0)); return wakeup_error; + } } void wakeup_subsequent_commits(int wakeup_error) { @@ -1728,18 +1743,38 @@ struct wait_for_commit } void unregister_wait_for_prior_commit() { - if (waiting_for_commit) + if (waitee) unregister_wait_for_prior_commit2(); } + /* + Remove a waiter from the list in the waitee. Used to unregister a wait. + The caller must be holding the locks of both waiter and waitee. + */ + void remove_from_list(wait_for_commit **next_ptr_ptr) + { + wait_for_commit *cur; + + while ((cur= *next_ptr_ptr) != NULL) + { + if (cur == this) + { + *next_ptr_ptr= this->next_subsequent_commit; + break; + } + next_ptr_ptr= &cur->next_subsequent_commit; + } + waitee= NULL; + } void wakeup(int wakeup_error); - int wait_for_prior_commit2(); + int wait_for_prior_commit2(THD *thd); void wakeup_subsequent_commits2(int wakeup_error); void unregister_wait_for_prior_commit2(); wait_for_commit(); ~wait_for_commit(); + void reinit(); }; @@ -1964,7 +1999,10 @@ public: uint in_sub_stmt; /* True when opt_userstat_running is set at start of query */ bool userstat_running; - /* True if we want to log all errors */ + /* + True if we have to log all errors. Are set by some engines to temporary + force errors to the error log. + */ bool log_all_errors; /* Do not set socket timeouts for wait_timeout (used with threadpool) */ @@ -2555,12 +2593,12 @@ public: */ LEX_STRING connection_name; char default_master_connection_buff[MAX_CONNECTION_NAME+1]; + uint8 password; /* 0, 1 or 2 */ + uint8 failed_com_change_user; bool slave_thread, one_shot_set; bool extra_port; /* If extra connection */ bool no_errors; - uint8 password; - uint8 failed_com_change_user; /** Set to TRUE if execution of the current compound statement @@ -2593,13 +2631,6 @@ public: /* for IS NULL => = last_insert_id() fix in remove_eq_conds() */ bool substitute_null_with_insert_id; bool in_lock_tables; - /** - True if a slave error. Causes the slave to stop. Not the same - as the statement execution error (is_error()), since - a statement may be expected to return an error, e.g. because - it returned an error on master, and this is OK on the slave. - */ - bool is_slave_error; bool bootstrap, cleanup_done; /** is set if some thread specific value(s) used in a statement. */ @@ -2616,6 +2647,20 @@ public: /* set during loop of derived table processing */ bool derived_tables_processing; bool tablespace_op; /* This is TRUE in DISCARD/IMPORT TABLESPACE */ + /* True if we have to log the current statement */ + bool log_current_statement; + /** + True if a slave error. Causes the slave to stop. Not the same + as the statement execution error (is_error()), since + a statement may be expected to return an error, e.g. because + it returned an error on master, and this is OK on the slave. + */ + bool is_slave_error; + /* + In case of a slave, set to the error code the master got when executing + the query. 0 if no error on the master. + */ + int slave_expected_error; sp_rcontext *spcont; // SP runtime context sp_cache *sp_proc_cache; @@ -3634,12 +3679,7 @@ public: int wait_for_prior_commit() { if (wait_for_commit_ptr) - { - int err= wait_for_commit_ptr->wait_for_prior_commit(); - if (err) - my_error(ER_PRIOR_COMMIT_FAILED, MYF(0)); - return err; - } + return wait_for_commit_ptr->wait_for_prior_commit(this); return 0; } void wakeup_subsequent_commits(int wakeup_error) @@ -3691,6 +3731,12 @@ private: */ LEX_STRING invoker_user; LEX_STRING invoker_host; + + /* Protect against add/delete of temporary tables in parallel replication */ + void rgi_lock_temporary_tables(); + void rgi_unlock_temporary_tables(); + bool rgi_have_temporary_tables(); +public: /* Flag, mutex and condition for a thread to wait for a signal from another thread. @@ -3701,12 +3747,12 @@ private: bool wakeup_ready; mysql_mutex_t LOCK_wakeup_ready; mysql_cond_t COND_wakeup_ready; + /* + The GTID assigned to the last commit. If no GTID was assigned to any commit + so far, this is indicated by last_commit_gtid.seq_no == 0. + */ + rpl_gtid last_commit_gtid; - /* Protect against add/delete of temporary tables in parallel replication */ - void rgi_lock_temporary_tables(); - void rgi_unlock_temporary_tables(); - bool rgi_have_temporary_tables(); -public: inline void lock_temporary_tables() { if (rgi_slave) @@ -4058,6 +4104,8 @@ class select_create: public select_insert { MYSQL_LOCK *m_lock; /* m_lock or thd->extra_lock */ MYSQL_LOCK **m_plock; + bool exit_done; + public: select_create (TABLE_LIST *table_arg, HA_CREATE_INFO *create_info_par, @@ -4069,7 +4117,7 @@ public: create_info(create_info_par), select_tables(select_tables_arg), alter_info(alter_info_arg), - m_plock(NULL) + m_plock(NULL), exit_done(0) {} int prepare(List<Item> &list, SELECT_LEX_UNIT *u); @@ -4469,7 +4517,7 @@ public: table.str= internal_table_name; table.length=1; } - bool is_derived_table() const { return test(sel); } + bool is_derived_table() const { return MY_TEST(sel); } inline void change_db(char *db_name) { db.str= db_name; db.length= (uint) strlen(db_name); diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 03d9a804372..5acc8b1e473 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2007, 2012, Oracle and/or its affiliates. - Copyright (c) 2008, 2013, Monty Program Ab + Copyright (c) 2007, 2013, Oracle and/or its affiliates. + Copyright (c) 2008, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 8068901ebec..fcde2b4acbd 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -798,14 +798,8 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) if ((my_strcasecmp(system_charset_info, MYSQL_SCHEMA_NAME.str, db) == 0)) { for (table= tables; table; table= table->next_local) - { - if (check_if_log_table(table->db_length, table->db, - table->table_name_length, table->table_name, true)) - { - my_error(ER_BAD_LOG_STATEMENT, MYF(0), "DROP"); + if (check_if_log_table(table, TRUE, "DROP")) goto exit; - } - } } /* Lock all tables and stored routines about to be dropped. */ @@ -835,7 +829,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) thd->push_internal_handler(&err_handler); if (!thd->killed && !(tables && - mysql_rm_table_no_locks(thd, tables, true, false, true, true))) + mysql_rm_table_no_locks(thd, tables, true, false, true, true, false))) { /* We temporarily disable the binary log while dropping the objects diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 840fd4947a6..014da5cfbaf 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -140,7 +140,7 @@ void Update_plan::save_explain_data_intern(Explain_query *query, explain->jtype= JT_NEXT; } - explain->using_where= test(select && select->cond); + explain->using_where= MY_TEST(select && select->cond); explain->using_filesort= using_filesort; explain->using_io_buffer= using_io_buffer; @@ -252,7 +252,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, table->map=1; query_plan.select_lex= &thd->lex->select_lex; query_plan.table= table; - query_plan.updating_a_view= test(table_list->view); + query_plan.updating_a_view= MY_TEST(table_list->view); if (mysql_prepare_delete(thd, table_list, select_lex->with_wild, select_lex->item_list, &conds)) @@ -291,7 +291,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, DBUG_RETURN(TRUE); const_cond= (!conds || conds->const_item()); - safe_update=test(thd->variables.option_bits & OPTION_SAFE_UPDATES); + safe_update= MY_TEST(thd->variables.option_bits & OPTION_SAFE_UPDATES); if (safe_update && const_cond) { my_message(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE, diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 712b1606c11..00ea0977a07 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -358,6 +358,14 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived) if (derived->merged) return FALSE; + if (dt_select->uncacheable & UNCACHEABLE_RAND) + { + /* There is random function => fall back to materialization. */ + derived->change_refs_to_fields(); + derived->set_materialized_derived(); + return FALSE; + } + if (thd->lex->sql_command == SQLCOM_UPDATE_MULTI || thd->lex->sql_command == SQLCOM_DELETE_MULTI) thd->save_prep_leaf_list= TRUE; @@ -604,11 +612,8 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived) thd->lex->sql_command == SQLCOM_DELETE_MULTI)))) DBUG_RETURN(FALSE); - Query_arena *arena= thd->stmt_arena, backup; - if (arena->is_conventional()) - arena= 0; // For easier test - else - thd->set_n_backup_active_arena(arena, &backup); + Query_arena *arena, backup; + arena= thd->activate_stmt_arena_if_needed(&backup); SELECT_LEX *first_select= unit->first_select(); @@ -620,7 +625,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived) if ((res= sl->handle_derived(lex, DT_PREPARE))) goto exit; - if (derived->outer_join) + if (derived->outer_join && sl->first_cond_optimization) { /* Mark that table is part of OUTER JOIN and fields may be NULL */ for (TABLE_LIST *cursor= (TABLE_LIST*) sl->table_list.first; @@ -708,7 +713,7 @@ exit: { TABLE *table= derived->table; table->derived_select_number= first_select->select_number; - table->s->tmp_table= NON_TRANSACTIONAL_TMP_TABLE; + table->s->tmp_table= INTERNAL_TMP_TABLE; #ifndef NO_EMBEDDED_ACCESS_CHECKS if (derived->referencing_view) table->grant= derived->grant; diff --git a/sql/sql_error.cc b/sql/sql_error.cc index f382f18a983..fb1bb811c9d 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -464,6 +464,7 @@ Diagnostics_area::set_error_status(uint sql_errno, const Sql_condition *error_condition) { DBUG_ENTER("set_error_status"); + DBUG_PRINT("enter", ("error: %d", sql_errno)); /* Only allowed to report error if has not yet reported a success The only exception is when we flush the message to the client, diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 812a5dc1461..6b961ac2262 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -1135,7 +1135,7 @@ void mysql_ha_flush(THD *thd) ((hash_tables->table->mdl_ticket && hash_tables->table->mdl_ticket->has_pending_conflicting_lock()) || (!hash_tables->table->s->tmp_table && - hash_tables->table->s->has_old_version()))) + hash_tables->table->s->tdc.flushed))) mysql_ha_close_table(hash_tables); } diff --git a/sql/sql_help.cc b/sql/sql_help.cc index d3c36e2c5d7..844810af0f4 100644 --- a/sql/sql_help.cc +++ b/sql/sql_help.cc @@ -1,5 +1,4 @@ -/* - Copyright (c) 2002, 2011, Oracle and/or its affiliates. +/* Copyright (c) 2002, 2012, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index c93d1ae7a1e..7901e2b681e 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -660,7 +660,7 @@ static void save_insert_query_plan(THD* thd, TABLE_LIST *table_list) thd->lex->explain->add_insert_plan(explain); /* See Update_plan::updating_a_view for details */ - bool skip= test(table_list->view); + bool skip= MY_TEST(table_list->view); /* Save subquery children */ for (SELECT_LEX_UNIT *unit= thd->lex->select_lex.first_inner_unit(); @@ -1233,7 +1233,7 @@ static bool check_view_insertability(THD * thd, TABLE_LIST *view) DBUG_ASSERT(view->table != 0 && view->field_translation != 0); - (void) bitmap_init(&used_fields, used_fields_buff, table->s->fields, 0); + (void) my_bitmap_init(&used_fields, used_fields_buff, table->s->fields, 0); bitmap_clear_all(&used_fields); view->contain_auto_increment= 0; @@ -1753,7 +1753,9 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) if (info->ignore && !table->file->is_fatal_error(error, HA_CHECK_DUP_KEY)) { - table->file->print_error(error, MYF(ME_JUST_WARNING)); + if (!(thd->variables.old_behavior & + OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE)) + table->file->print_error(error, MYF(ME_JUST_WARNING)); goto ok_or_after_trg_err; } goto err; @@ -1881,7 +1883,9 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) if (!info->ignore || table->file->is_fatal_error(error, HA_CHECK_DUP)) goto err; - table->file->print_error(error, MYF(ME_JUST_WARNING)); + if (!(thd->variables.old_behavior & + OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE)) + table->file->print_error(error, MYF(ME_JUST_WARNING)); table->file->restore_auto_increment(prev_insert_id); goto ok_or_after_trg_err; } @@ -1933,7 +1937,7 @@ int check_that_all_fields_are_given_values(THD *thd, TABLE *entry, if (table_list) { table_list= table_list->top_table(); - view= test(table_list->view); + view= MY_TEST(table_list->view); } if (view) { @@ -2432,6 +2436,10 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) goto error; dfield_ptr= copy->default_field; } + + /* Ensure we don't use the table list of the original table */ + copy->pos_in_table_list= 0; + /* Make a copy of all fields. The copied fields need to point into the copied record. This is done @@ -3068,7 +3076,7 @@ bool Delayed_insert::handle_inserts(void) THD_STAGE_INFO(&thd, stage_insert); max_rows= delayed_insert_limit; - if (thd.killed || table->s->has_old_version()) + if (thd.killed || table->s->tdc.flushed) { thd.killed= KILL_SYSTEM_THREAD; max_rows= ULONG_MAX; // Do as much as possible @@ -3565,7 +3573,8 @@ int select_insert::prepare2(void) { DBUG_ENTER("select_insert::prepare2"); if (thd->lex->current_select->options & OPTION_BUFFER_RESULT && - thd->locked_tables_mode <= LTM_LOCK_TABLES) + thd->locked_tables_mode <= LTM_LOCK_TABLES && + !thd->lex->describe) table->file->ha_start_bulk_insert((ha_rows) 0); DBUG_RETURN(0); } @@ -3816,7 +3825,8 @@ void select_insert::abort_result_set() { */ changed= (info.copied || info.deleted || info.updated); transactional_table= table->file->has_transactions(); - if (thd->transaction.stmt.modified_non_trans_table) + if (thd->transaction.stmt.modified_non_trans_table || + thd->log_current_statement) { if (!can_rollback_data()) thd->transaction.all.modified_non_trans_table= TRUE; @@ -3942,6 +3952,16 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, DEBUG_SYNC(thd,"create_table_select_before_create"); + /* Check if LOCK TABLES + CREATE OR REPLACE of existing normal table*/ + if (thd->locked_tables_mode && create_table->table && + !create_info->tmp_table()) + { + /* Remember information about the locked table */ + create_info->pos_in_locked_tables= + create_table->table->pos_in_locked_tables; + create_info->mdl_ticket= create_table->table->mdl_ticket; + } + /* Create and lock table. @@ -3958,52 +3978,63 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, TABLE, which is a wrong order. So we keep binary logging disabled when we open_table(). */ + + if (!mysql_create_table_no_lock(thd, create_table->db, + create_table->table_name, + create_info, alter_info, NULL, + select_field_count)) { - if (!mysql_create_table_no_lock(thd, create_table->db, - create_table->table_name, - create_info, alter_info, NULL, - select_field_count)) + DEBUG_SYNC(thd,"create_table_select_before_open"); + + /* + If we had a temporary table or a table used with LOCK TABLES, + it was closed by mysql_create() + */ + create_table->table= 0; + + if (!create_info->tmp_table()) { - DEBUG_SYNC(thd,"create_table_select_before_open"); + Open_table_context ot_ctx(thd, MYSQL_OPEN_REOPEN); + TABLE_LIST::enum_open_strategy save_open_strategy; - if (!create_info->tmp_table()) - { - Open_table_context ot_ctx(thd, MYSQL_OPEN_REOPEN); - /* - Here we open the destination table, on which we already have - an exclusive metadata lock. - */ - if (open_table(thd, create_table, thd->mem_root, &ot_ctx)) - { - quick_rm_table(thd, create_info->db_type, create_table->db, - table_case_name(create_info, create_table->table_name), - 0); - } - else - table= create_table->table; - } - else + /* Force the newly created table to be opened */ + save_open_strategy= create_table->open_strategy; + create_table->open_strategy= TABLE_LIST::OPEN_NORMAL; + /* + Here we open the destination table, on which we already have + an exclusive metadata lock. + */ + if (open_table(thd, create_table, thd->mem_root, &ot_ctx)) { - if (open_temporary_table(thd, create_table)) - { - /* - This shouldn't happen as creation of temporary table should make - it preparable for open. Anyway we can't drop temporary table if - we are unable to find it. - */ - DBUG_ASSERT(0); - } - else - table= create_table->table; + quick_rm_table(thd, create_info->db_type, create_table->db, + table_case_name(create_info, create_table->table_name), + 0); } + /* Restore */ + create_table->open_strategy= save_open_strategy; } - if (!table) // open failed + else { - if (!thd->is_error()) // CREATE ... IF NOT EXISTS - my_ok(thd); // succeed, but did nothing - DBUG_RETURN(0); + if (open_temporary_table(thd, create_table)) + { + /* + This shouldn't happen as creation of temporary table should make + it preparable for open. Anyway we can't drop temporary table if + we are unable to find it. + */ + DBUG_ASSERT(0); + } } } + else + create_table->table= 0; // Create failed + + if (!(table= create_table->table)) + { + if (!thd->is_error()) // CREATE ... IF NOT EXISTS + my_ok(thd); // succeed, but did nothing + DBUG_RETURN(0); + } DEBUG_SYNC(thd,"create_table_select_before_lock"); @@ -4020,7 +4051,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, /* purecov: begin tested */ /* This can happen in innodb when you get a deadlock when using same table - in insert and select + in insert and select or when you run out of memory. */ my_error(ER_CANT_LOCK, MYF(0), my_errno); if (*lock) @@ -4118,8 +4149,6 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) thd->binlog_start_trans_and_stmt(); } - DBUG_ASSERT(create_table->table == NULL); - DEBUG_SYNC(thd,"create_table_select_before_check_if_exists"); if (!(table= create_table_from_items(thd, create_info, create_table, @@ -4207,7 +4236,9 @@ select_create::binlog_show_create_table(TABLE **tables, uint count) query.length(0); // Have to zero it since constructor doesn't result= store_create_info(thd, &tmp_table_list, &query, create_info, - /* show_database */ TRUE); + /* show_database */ TRUE, + MY_TEST(create_info->options & + HA_LEX_CREATE_REPLACE)); DBUG_ASSERT(result == 0); /* store_create_info() always return 0 */ #ifdef WITH_WSREP @@ -4269,19 +4300,22 @@ void select_create::send_error(uint errcode,const char *err) bool select_create::send_eof() { - bool tmp=select_insert::send_eof(); - if (tmp) + if (select_insert::send_eof()) + { abort_result_set(); - else + return 1; + } + + exit_done= 1; // Avoid double calls + /* + Do an implicit commit at end of statement for non-temporary + tables. This can fail, but we should unlock the table + nevertheless. + */ + if (!table->s->tmp_table) { - /* - Do an implicit commit at end of statement for non-temporary - tables. This can fail, but we should unlock the table - nevertheless. - */ - if (!table->s->tmp_table) - { - trans_commit_stmt(thd); + trans_commit_stmt(thd); + if (!(thd->variables.option_bits & OPTION_GTID_BEGIN)) trans_commit_implicit(thd); #ifdef WITH_WSREP mysql_mutex_lock(&thd->LOCK_wsrep_thd); @@ -4295,25 +4329,52 @@ bool select_create::send_eof() } mysql_mutex_unlock(&thd->LOCK_wsrep_thd); #endif /* WITH_WSREP */ - } + } + else if (!thd->is_current_stmt_binlog_format_row()) + table->s->table_creation_was_logged= 1; - table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); - table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); - if (m_plock) + table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); + table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); + + if (m_plock) + { + MYSQL_LOCK *lock= *m_plock; + *m_plock= NULL; + m_plock= NULL; + + if (create_info->pos_in_locked_tables) { - mysql_unlock_tables(thd, *m_plock); - *m_plock= NULL; - m_plock= NULL; + /* + If we are under lock tables, we have created a table that was + originally locked. We should add back the lock to ensure that + all tables in the thd->open_list are locked! + */ + table->mdl_ticket= create_info->mdl_ticket; + + /* The following should never fail, except if out of memory */ + if (!thd->locked_tables_list.restore_lock(thd, + create_info-> + pos_in_locked_tables, + table, lock)) + return 0; // ok + /* Fail. Continue without locking the table */ } + mysql_unlock_tables(thd, lock); } - return tmp; + return 0; } void select_create::abort_result_set() { + ulonglong save_option_bits; DBUG_ENTER("select_create::abort_result_set"); + /* Avoid double calls, could happen in case of out of memory on cleanup */ + if (exit_done) + DBUG_VOID_RETURN; + exit_done= 1; + /* In select_insert::abort_result_set() we roll back the statement, including truncating the transaction cache of the binary log. To do this, we @@ -4328,11 +4389,18 @@ void select_create::abort_result_set() We also roll back the statement regardless of whether the creation of the table succeeded or not, since we need to reset the binary log state. + + However if there was an orignal table that was deleted, as part of + create or replace table, then we must log the statement. */ - tmp_disable_binlog(thd); + + save_option_bits= thd->variables.option_bits; + if (!(thd->log_current_statement)) + thd->variables.option_bits&= ~OPTION_BIN_LOG; select_insert::abort_result_set(); thd->transaction.stmt.modified_non_trans_table= FALSE; - reenable_binlog(thd); + thd->variables.option_bits= save_option_bits; + /* possible error of writing binary log is ignored deliberately */ (void) thd->binlog_flush_pending_rows_event(TRUE, TRUE); diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index 3b39ebf145f..abd23c344c2 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -222,8 +222,8 @@ void JOIN_CACHE::calc_record_fields() for (; tab != join_tab ; tab= next_linear_tab(join, tab, WITHOUT_BUSH_ROOTS)) { tab->calc_used_field_length(FALSE); - flag_fields+= test(tab->used_null_fields || tab->used_uneven_bit_fields); - flag_fields+= test(tab->table->maybe_null); + flag_fields+= MY_TEST(tab->used_null_fields || tab->used_uneven_bit_fields); + flag_fields+= MY_TEST(tab->table->maybe_null); fields+= tab->used_fields; blobs+= tab->used_blobs; } @@ -736,7 +736,7 @@ void JOIN_CACHE::set_constants() uint JOIN_CACHE::get_record_max_affix_length() { uint len= get_prefix_length() + - test(with_match_flag) + + MY_TEST(with_match_flag) + size_of_fld_ofs * data_field_count; return len; } @@ -1012,7 +1012,7 @@ int JOIN_CACHE::realloc_buffer() { int rc; free(); - rc= test(!(buff= (uchar*) my_malloc(buff_size, MYF(MY_THREAD_SPECIFIC)))); + rc= MY_TEST(!(buff= (uchar*) my_malloc(buff_size, MYF(MY_THREAD_SPECIFIC)))); reset(TRUE); return rc; } @@ -1766,7 +1766,7 @@ uint JOIN_CACHE::read_flag_fields() CACHE_FIELD *copy_end= copy+flag_fields; if (with_match_flag) { - copy->str[0]= test((Match_flag) pos[0] == MATCH_FOUND); + copy->str[0]= MY_TEST((Match_flag) pos[0] == MATCH_FOUND); pos+= copy->length; copy++; } @@ -2520,7 +2520,7 @@ enum_nested_loop_state JOIN_CACHE::join_null_complements(bool skip_last) if (!records) DBUG_RETURN(NESTED_LOOP_OK); - cnt= records - (is_key_access() ? 0 : test(skip_last)); + cnt= records - (is_key_access() ? 0 : MY_TEST(skip_last)); /* This function may be called only for inner tables of outer joins */ DBUG_ASSERT(join_tab->first_inner); @@ -2570,7 +2570,7 @@ finish: void JOIN_CACHE::save_explain_data(struct st_explain_bka_type *explain) { - explain->incremental= test(prev_cache); + explain->incremental= MY_TEST(prev_cache); switch (get_join_alg()) { case BNL_JOIN_ALG: @@ -2792,7 +2792,7 @@ int JOIN_CACHE_HASHED::realloc_buffer() { int rc; free(); - rc= test(!(buff= (uchar*) my_malloc(buff_size, MYF(MY_THREAD_SPECIFIC)))); + rc= MY_TEST(!(buff= (uchar*) my_malloc(buff_size, MYF(MY_THREAD_SPECIFIC)))); init_hash_table(); reset(TRUE); return rc; @@ -3472,7 +3472,7 @@ bool JOIN_CACHE_BNL::prepare_look_for_matches(bool skip_last) if (!records) return TRUE; reset(FALSE); - rem_records= records-test(skip_last); + rem_records= records - MY_TEST(skip_last); return rem_records == 0; } @@ -4588,7 +4588,7 @@ int JOIN_CACHE_BKAH::init() { bool check_only_first_match= join_tab->check_only_first_match(); - no_association= test(mrr_mode & HA_MRR_NO_ASSOCIATION); + no_association= MY_TEST(mrr_mode & HA_MRR_NO_ASSOCIATION); RANGE_SEQ_IF rs_funcs= { bka_range_seq_key_info, bkah_range_seq_init, diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index e5b8090dfbc..26cef090b83 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -299,7 +299,7 @@ Lex_input_stream::reset(char *buffer, unsigned int length) m_cpp_utf8_processed_ptr= NULL; next_state= MY_LEX_START; found_semicolon= NULL; - ignore_space= test(m_thd->variables.sql_mode & MODE_IGNORE_SPACE); + ignore_space= MY_TEST(m_thd->variables.sql_mode & MODE_IGNORE_SPACE); stmt_prepare_mode= FALSE; multi_statements= TRUE; in_comment=NO_COMMENT; @@ -497,13 +497,13 @@ void lex_start(THD *thd) lex->select_lex.ftfunc_list= &lex->select_lex.ftfunc_list_alloc; lex->select_lex.group_list.empty(); lex->select_lex.order_list.empty(); + lex->select_lex.gorder_list.empty(); lex->m_sql_cmd= NULL; lex->duplicates= DUP_ERROR; lex->ignore= 0; lex->spname= NULL; lex->sphead= NULL; lex->spcont= NULL; - lex->m_sql_cmd= NULL; lex->proc_list.first= 0; lex->escape_used= FALSE; lex->query_tables= 0; @@ -2120,14 +2120,15 @@ void st_select_lex_unit::exclude_tree() this to 'last' as dependent SYNOPSIS - last - pointer to last st_select_lex struct, before wich all + last - pointer to last st_select_lex struct, before which all st_select_lex have to be marked as dependent NOTE 'last' should be reachable from this st_select_lex_node */ -bool st_select_lex::mark_as_dependent(THD *thd, st_select_lex *last, Item *dependency) +bool st_select_lex::mark_as_dependent(THD *thd, st_select_lex *last, + Item *dependency) { DBUG_ASSERT(this != last); @@ -2320,7 +2321,10 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num) If we need a bigger array, we must allocate a new one. */ if (ref_pointer_array_size >= n_elems) + { + DBUG_PRINT("info", ("reusing old ref_array")); return false; + } } ref_pointer_array= static_cast<Item**>(arena->alloc(sizeof(Item*) * n_elems)); if (ref_pointer_array != NULL) @@ -2586,7 +2590,9 @@ bool LEX::can_be_merged() // TODO: do not forget implement case when select_lex.table_list.elements==0 /* find non VIEW subqueries/unions */ - bool selects_allow_merge= select_lex.next_select() == 0; + bool selects_allow_merge= (select_lex.next_select() == 0 && + !(select_lex.uncacheable & + UNCACHEABLE_RAND)); if (selects_allow_merge) { for (SELECT_LEX_UNIT *tmp_unit= select_lex.first_inner_unit(); @@ -3078,7 +3084,7 @@ TABLE_LIST *LEX::unlink_first_table(bool *link_to_local) /* and from local list if it is not empty */ - if ((*link_to_local= test(select_lex.table_list.first))) + if ((*link_to_local= MY_TEST(select_lex.table_list.first))) { select_lex.context.table_list= select_lex.context.first_name_resolution_table= first->next_local; @@ -3323,6 +3329,7 @@ static void fix_prepare_info_in_table_list(THD *thd, TABLE_LIST *tbl) void st_select_lex::fix_prepare_information(THD *thd, Item **conds, Item **having_conds) { + DBUG_ENTER("st_select_lex::fix_prepare_information"); if (!thd->stmt_arena->is_conventional() && first_execution) { first_execution= 0; @@ -3351,6 +3358,7 @@ void st_select_lex::fix_prepare_information(THD *thd, Item **conds, } fix_prepare_info_in_table_list(thd, table_list.first); } + DBUG_VOID_RETURN; } @@ -3827,7 +3835,7 @@ void SELECT_LEX::update_used_tables() do { bool maybe_null; - if ((maybe_null= test(embedding->outer_join))) + if ((maybe_null= MY_TEST(embedding->outer_join))) { tl->table->maybe_null= maybe_null; break; @@ -3904,37 +3912,40 @@ void st_select_lex::update_correlated_cache() while ((tl= ti++)) { if (tl->on_expr) - is_correlated|= test(tl->on_expr->used_tables() & OUTER_REF_TABLE_BIT); + is_correlated|= MY_TEST(tl->on_expr->used_tables() & OUTER_REF_TABLE_BIT); for (TABLE_LIST *embedding= tl->embedding ; embedding ; embedding= embedding->embedding) { if (embedding->on_expr) - is_correlated|= test(embedding->on_expr->used_tables() & - OUTER_REF_TABLE_BIT); + is_correlated|= MY_TEST(embedding->on_expr->used_tables() & + OUTER_REF_TABLE_BIT); } } if (join->conds) - is_correlated|= test(join->conds->used_tables() & OUTER_REF_TABLE_BIT); + is_correlated|= MY_TEST(join->conds->used_tables() & OUTER_REF_TABLE_BIT); if (join->having) - is_correlated|= test(join->having->used_tables() & OUTER_REF_TABLE_BIT); + is_correlated|= MY_TEST(join->having->used_tables() & OUTER_REF_TABLE_BIT); if (join->tmp_having) - is_correlated|= test(join->tmp_having->used_tables() & OUTER_REF_TABLE_BIT); + is_correlated|= MY_TEST(join->tmp_having->used_tables() & + OUTER_REF_TABLE_BIT); Item *item; List_iterator_fast<Item> it(join->fields_list); while ((item= it++)) - is_correlated|= test(item->used_tables() & OUTER_REF_TABLE_BIT); + is_correlated|= MY_TEST(item->used_tables() & OUTER_REF_TABLE_BIT); for (ORDER *order= group_list.first; order; order= order->next) - is_correlated|= test((*order->item)->used_tables() & OUTER_REF_TABLE_BIT); + is_correlated|= MY_TEST((*order->item)->used_tables() & + OUTER_REF_TABLE_BIT); if (!master_unit()->is_union()) { for (ORDER *order= order_list.first; order; order= order->next) - is_correlated|= test((*order->item)->used_tables() & OUTER_REF_TABLE_BIT); + is_correlated|= MY_TEST((*order->item)->used_tables() & + OUTER_REF_TABLE_BIT); } if (!is_correlated) @@ -4088,11 +4099,8 @@ void SELECT_LEX::mark_const_derived(bool empty) bool st_select_lex::save_leaf_tables(THD *thd) { - Query_arena *arena= thd->stmt_arena, backup; - if (arena->is_conventional()) - arena= 0; - else - thd->set_n_backup_active_arena(arena, &backup); + Query_arena *arena, backup; + arena= thd->activate_stmt_arena_if_needed(&backup); List_iterator_fast<TABLE_LIST> li(leaf_tables); TABLE_LIST *table; @@ -4120,10 +4128,7 @@ bool st_select_lex::save_prep_leaf_tables(THD *thd) return 0; Query_arena *arena= thd->stmt_arena, backup; - if (arena->is_conventional()) - arena= 0; - else - thd->set_n_backup_active_arena(arena, &backup); + arena= thd->activate_stmt_arena_if_needed(&backup); List_iterator_fast<TABLE_LIST> li(leaf_tables); TABLE_LIST *table; @@ -4229,7 +4234,7 @@ int st_select_lex_unit::save_union_explain(Explain_query *output) eu->add_select(sl->select_number); eu->fake_select_type= "UNION RESULT"; - eu->using_filesort= test(global_parameters->order_list.first); + eu->using_filesort= MY_TEST(global_parameters->order_list.first); // Save the UNION node output->add_node(eu); diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 479fa81edd7..13cbcdd9f08 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1152,7 +1152,7 @@ public: } bool requires_prelocking() { - return test(query_tables_own_last); + return MY_TEST(query_tables_own_last); } void mark_as_requiring_prelocking(TABLE_LIST **tables_own_last) { @@ -2641,6 +2641,7 @@ struct LEX: public Query_tables_list sl->uncacheable|= cause; un->uncacheable|= cause; } + select_lex.uncacheable|= cause; } void set_trg_event_type_for_tables(); diff --git a/sql/sql_lifo_buffer.h b/sql/sql_lifo_buffer.h index 5b7ddf35474..feec4aeb4c2 100644 --- a/sql/sql_lifo_buffer.h +++ b/sql/sql_lifo_buffer.h @@ -83,7 +83,8 @@ public: { start= start_arg; end= end_arg; - TRASH(start, end - start); + if (end != start) + TRASH(start, end - start); reset(); } diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 281d1de7877..d112b3e689a 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -258,7 +258,8 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, */ if (unique_table(thd, table_list, table_list->next_global, 0)) { - my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->table_name); + my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->table_name, + "LOAD DATA"); DBUG_RETURN(TRUE); } @@ -461,7 +462,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, } thd_proc_info(thd, "reading file"); - if (!(error=test(read_info.error))) + if (!(error= MY_TEST(read_info.error))) { table->next_number_field=table->found_next_number_field; if (ignore || @@ -904,7 +905,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, thd->get_stmt_da()->inc_current_row_for_warning(); continue_loop:; } - DBUG_RETURN(test(read_info.error)); + DBUG_RETURN(MY_TEST(read_info.error)); } @@ -1129,7 +1130,7 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, thd->get_stmt_da()->inc_current_row_for_warning(); continue_loop:; } - DBUG_RETURN(test(read_info.error)); + DBUG_RETURN(MY_TEST(read_info.error)); } @@ -1297,7 +1298,7 @@ read_xml_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, thd->get_stmt_da()->inc_current_row_for_warning(); continue_loop:; } - DBUG_RETURN(test(read_info.error) || thd->is_error()); + DBUG_RETURN(MY_TEST(read_info.error) || thd->is_error()); } /* load xml end */ diff --git a/sql/sql_manager.cc b/sql/sql_manager.cc index 0771f569f35..f13448ca46e 100644 --- a/sql/sql_manager.cc +++ b/sql/sql_manager.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 863658f7878..04b20a7d40f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -201,6 +201,8 @@ static bool some_non_temp_table_to_be_updated(THD *thd, TABLE_LIST *tables) @param thd Thread handle. @param mask Bitmask used for the SQL command match. + @return 0 No implicit commit + @return 1 Do a commit */ static bool stmt_causes_implicit_commit(THD *thd, uint mask) { @@ -213,12 +215,22 @@ static bool stmt_causes_implicit_commit(THD *thd, uint mask) switch (lex->sql_command) { case SQLCOM_DROP_TABLE: - skip= lex->drop_temporary; + skip= (lex->drop_temporary || + (thd->variables.option_bits & OPTION_GTID_BEGIN)); break; case SQLCOM_ALTER_TABLE: + /* If ALTER TABLE of non-temporary table, do implicit commit */ + skip= (lex->create_info.tmp_table()); + break; case SQLCOM_CREATE_TABLE: - /* If CREATE TABLE of non-temporary table, do implicit commit */ - skip= lex->create_info.tmp_table(); + /* + If CREATE TABLE of non-temporary table and the table is not part + if a BEGIN GTID ... COMMIT group, do a implicit commit. + This ensures that CREATE ... SELECT will in the same GTID group on the + master and slave. + */ + skip= (lex->create_info.tmp_table() || + (thd->variables.option_bits & OPTION_GTID_BEGIN)); break; case SQLCOM_SET_OPTION: skip= lex->autocommit ? FALSE : TRUE; @@ -2440,6 +2452,7 @@ mysql_execute_command(THD *thd) Rpl_filter *rpl_filter= thd->rpl_filter; #endif DBUG_ENTER("mysql_execute_command"); + #ifdef WITH_PARTITION_STORAGE_ENGINE thd->work_part_info= 0; #endif @@ -2681,8 +2694,8 @@ mysql_execute_command(THD *thd) } #endif /* WITH_WSREP */ status_var_increment(thd->status_var.com_stat[lex->sql_command]); - thd->progress.report_to_client= test(sql_command_flags[lex->sql_command] & - CF_REPORT_PROGRESS); + thd->progress.report_to_client= MY_TEST(sql_command_flags[lex->sql_command] & + CF_REPORT_PROGRESS); DBUG_ASSERT(thd->transaction.stmt.modified_non_trans_table == FALSE); @@ -2717,15 +2730,18 @@ mysql_execute_command(THD *thd) DBUG_ASSERT(! thd->in_sub_stmt); /* Statement transaction still should not be started. */ DBUG_ASSERT(thd->transaction.stmt.is_empty()); - /* Commit the normal transaction if one is active. */ - if (trans_commit_implicit(thd)) + if (!(thd->variables.option_bits & OPTION_GTID_BEGIN)) { + /* Commit the normal transaction if one is active. */ + if (trans_commit_implicit(thd)) + { + thd->mdl_context.release_transactional_locks(); + WSREP_DEBUG("implicit commit failed, MDL released: %lu", thd->thread_id); + goto error; + } + /* Release metadata locks acquired in this transaction. */ thd->mdl_context.release_transactional_locks(); - WSREP_DEBUG("implicit commit failed, MDL released: %lu", thd->thread_id); - goto error; } - /* Release metadata locks acquired in this transaction. */ - thd->mdl_context.release_transactional_locks(); } #ifndef DBUG_OFF @@ -3124,6 +3140,7 @@ case SQLCOM_PREPARE: goto end_with_restore_list; } + /* Check privileges */ if ((res= create_table_precheck(thd, select_tables, create_table))) goto end_with_restore_list; @@ -3158,6 +3175,23 @@ case SQLCOM_PREPARE: create_info.table_charset= 0; } + /* + For CREATE TABLE we should not open the table even if it exists. + If the table exists, we should either not create it or replace it + */ + lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB; + + /* + If we are a slave, we should add OR REPLACE if we don't have + IF EXISTS. This will help a slave to recover from + CREATE TABLE OR EXISTS failures by dropping the table and + retrying the create. + */ + if (thd->slave_thread && + slave_ddl_exec_mode_options == SLAVE_EXEC_MODE_IDEMPOTENT && + !(lex->create_info.options & HA_LEX_CREATE_IF_NOT_EXISTS)) + create_info.options|= HA_LEX_CREATE_REPLACE; + #ifdef WITH_PARTITION_STORAGE_ENGINE { partition_info *part_info= thd->lex->part_info; @@ -3246,28 +3280,25 @@ case SQLCOM_PREPARE: /* Got error or warning. Set res to 1 if error */ if (!(res= thd->is_error())) my_ok(thd); // CREATE ... IF NOT EXISTS + goto end_with_restore_list; } - else + + /* Ensure we don't try to create something from which we select from */ + if ((create_info.options & HA_LEX_CREATE_REPLACE) && + !create_info.tmp_table()) { - /* The table already exists */ - if (create_table->table) + TABLE_LIST *duplicate; + if ((duplicate= unique_table(thd, lex->query_tables, + lex->query_tables->next_global, + 0))) { - if (create_info.options & HA_LEX_CREATE_IF_NOT_EXISTS) - { - push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, - ER_TABLE_EXISTS_ERROR, - ER(ER_TABLE_EXISTS_ERROR), - create_info.alias); - my_ok(thd); - } - else - { - my_error(ER_TABLE_EXISTS_ERROR, MYF(0), create_info.alias); - res= 1; - } + update_non_unique_table_error(lex->query_tables, "CREATE", + duplicate); + res= TRUE; goto end_with_restore_list; } - + } + { /* Remove target table from main select and name resolution context. This can't be done earlier as it will break view merging in @@ -3275,9 +3306,8 @@ case SQLCOM_PREPARE: */ lex->unlink_first_table(&link_to_local); - /* So that CREATE TEMPORARY TABLE gets to binlog at commit/rollback */ - if (create_info.tmp_table()) - thd->variables.option_bits|= OPTION_KEEP_LOG; + /* Store reference to table in case of LOCK TABLES */ + create_info.table= create_table->table; /* select_create is currently not re-execution friendly and @@ -3295,18 +3325,18 @@ case SQLCOM_PREPARE: CREATE from SELECT give its SELECT_LEX for SELECT, and item_list belong to SELECT */ - res= handle_select(thd, lex, result, 0); + if (!(res= handle_select(thd, lex, result, 0))) + { + if (create_info.tmp_table()) + thd->variables.option_bits|= OPTION_KEEP_LOG; + } delete result; } - lex->link_first_table_back(create_table, link_to_local); } } else { - /* So that CREATE TEMPORARY TABLE gets to binlog at commit/rollback */ - if (create_info.tmp_table()) - thd->variables.option_bits|= OPTION_KEEP_LOG; /* regular create */ if (create_info.options & HA_LEX_CREATE_TABLE_LIKE) { @@ -3330,7 +3360,12 @@ case SQLCOM_PREPARE: &create_info, &alter_info); } if (!res) + { + /* So that CREATE TEMPORARY TABLE gets to binlog at commit/rollback */ + if (create_info.tmp_table()) + thd->variables.option_bits|= OPTION_KEEP_LOG; my_ok(thd); + } } end_with_restore_list: @@ -3780,7 +3815,7 @@ end_with_restore_list: case SQLCOM_INSERT_SELECT: { select_result *sel_result; - bool explain= test(lex->describe); + bool explain= MY_TEST(lex->describe); DBUG_ASSERT(first_table == all_tables && first_table != 0); if ((res= insert_precheck(thd, all_tables))) break; @@ -3903,7 +3938,7 @@ end_with_restore_list: { DBUG_ASSERT(first_table == all_tables && first_table != 0); TABLE_LIST *aux_tables= thd->lex->auxiliary_table_list.first; - bool explain= test(lex->describe); + bool explain= MY_TEST(lex->describe); multi_delete *result; if ((res= multi_delete_precheck(thd, all_tables))) @@ -3987,6 +4022,16 @@ end_with_restore_list: } } #endif /* WITH_WSREP */ + /* + If we are a slave, we should add IF EXISTS if the query executed + on the master without an error. This will help a slave to + recover from multi-table DROP TABLE that was aborted in the + middle. + */ + if (thd->slave_thread && !thd->slave_expected_error && + slave_ddl_exec_mode_options == SLAVE_EXEC_MODE_IDEMPOTENT) + lex->check_exists= 1; + /* DDL and binlog write order are protected by metadata locks. */ res= mysql_rm_table(thd, first_table, lex->check_exists, lex->drop_temporary); @@ -4570,14 +4615,16 @@ end_with_restore_list: if (check_global_access(thd,RELOAD_ACL)) goto error; - if (first_table && lex->type & REFRESH_READ_LOCK) + if (first_table && lex->type & (REFRESH_READ_LOCK|REFRESH_FOR_EXPORT)) { /* Check table-level privileges. */ if (check_table_access(thd, LOCK_TABLES_ACL | SELECT_ACL, all_tables, FALSE, UINT_MAX, FALSE)) goto error; + if (flush_tables_with_read_lock(thd, all_tables)) goto error; + my_ok(thd); break; } @@ -4777,6 +4824,7 @@ end_with_restore_list: bool tx_release= (lex->tx_release == TVL_YES || (thd->variables.completion_type == 2 && lex->tx_release != TVL_NO)); + if (trans_rollback(thd)) { thd->mdl_context.release_transactional_locks(); @@ -5498,6 +5546,7 @@ finish: DBUG_ASSERT(!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()); + lex->unit.cleanup(); if (! thd->in_sub_stmt) { @@ -5529,7 +5578,6 @@ finish: ha_maria::implicit_commit(thd, FALSE); #endif } - lex->unit.cleanup(); /* Free tables */ THD_STAGE_INFO(thd, stage_closing_tables); @@ -5562,12 +5610,15 @@ finish: { /* No transaction control allowed in sub-statements. */ DBUG_ASSERT(! thd->in_sub_stmt); - /* If commit fails, we should be able to reset the OK status. */ - thd->get_stmt_da()->set_overwrite_status(true); - /* Commit the normal transaction if one is active. */ - trans_commit_implicit(thd); - thd->get_stmt_da()->set_overwrite_status(false); - thd->mdl_context.release_transactional_locks(); + if (!(thd->variables.option_bits & OPTION_GTID_BEGIN)) + { + /* If commit fails, we should be able to reset the OK status. */ + thd->get_stmt_da()->set_overwrite_status(true); + /* Commit the normal transaction if one is active. */ + trans_commit_implicit(thd); + thd->get_stmt_da()->set_overwrite_status(false); + thd->mdl_context.release_transactional_locks(); + } } else if (! thd->in_sub_stmt && ! thd->in_multi_stmt_transaction_mode()) { @@ -6549,6 +6600,8 @@ void THD::reset_for_next_command() thd->query_start_used= 0; thd->query_start_sec_part_used= 0; thd->is_fatal_error= thd->time_zone_used= 0; + thd->log_current_statement= 0; + /* Clear the status flag that are expected to be cleared at the beginning of each SQL statement. @@ -7165,6 +7218,7 @@ bool add_to_list(THD *thd, SQL_I_List<ORDER> &list, Item *item,bool asc) order->free_me=0; order->used=0; order->counter_used= 0; + order->fast_field_copier_setup= 0; list.link_in_list(order, &order->next); DBUG_RETURN(0); } @@ -7210,7 +7264,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, if (!table) DBUG_RETURN(0); // End of memory alias_str= alias ? alias->str : table->table.str; - if (!test(table_options & TL_OPTION_ALIAS) && + if (!MY_TEST(table_options & TL_OPTION_ALIAS) && check_table_name(table->table.str, table->table.length, FALSE)) { my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str); @@ -7255,10 +7309,10 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, ptr->table_name=table->table.str; ptr->table_name_length=table->table.length; ptr->lock_type= lock_type; - ptr->updating= test(table_options & TL_OPTION_UPDATING); + ptr->updating= MY_TEST(table_options & TL_OPTION_UPDATING); /* TODO: remove TL_OPTION_FORCE_INDEX as it looks like it's not used */ - ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX); - ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES); + ptr->force_index= MY_TEST(table_options & TL_OPTION_FORCE_INDEX); + ptr->ignore_leaves= MY_TEST(table_options & TL_OPTION_IGNORE_LEAVES); ptr->derived= table->sel; if (!ptr->derived && is_infoschema_db(ptr->db, ptr->db_length)) { @@ -7292,7 +7346,11 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, ptr->schema_table= schema_table; } ptr->select_lex= lex->current_select; - ptr->cacheable_table= 1; + /* + We can't cache internal temporary tables between prepares as the + table may be deleted before next exection. + */ + ptr->cacheable_table= !table->is_derived_table(); ptr->index_hints= index_hints_arg; ptr->option= option ? option->str : 0; /* check that used name is unique */ @@ -7349,7 +7407,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, lex->add_to_query_tables(ptr); // Pure table aliases do not need to be locked: - if (!test(table_options & TL_OPTION_ALIAS)) + if (!MY_TEST(table_options & TL_OPTION_ALIAS)) { ptr->mdl_request.init(MDL_key::TABLE, ptr->db, ptr->table_name, mdl_type, MDL_TRANSACTION); @@ -8515,6 +8573,11 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables, want_priv= lex->create_info.tmp_table() ? CREATE_TMP_ACL : (CREATE_ACL | (select_lex->item_list.elements ? INSERT_ACL : 0)); + /* CREATE OR REPLACE on not temporary tables require DROP_ACL */ + if ((lex->create_info.options & HA_LEX_CREATE_REPLACE) && + !lex->create_info.tmp_table()) + want_priv|= DROP_ACL; + if (check_access(thd, want_priv, create_table->db, &create_table->grant.privilege, &create_table->grant.m_internal, @@ -8551,8 +8614,8 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables, - For temporary MERGE tables we do not track if their child tables are base or temporary. As result we can't guarantee that privilege check - which was done in presence of temporary child will stay relevant later - as this temporary table might be removed. + which was done in presence of temporary child will stay relevant + later as this temporary table might be removed. If SELECT_ACL | UPDATE_ACL | DELETE_ACL privileges were not checked for the underlying *base* tables, it would create a security breach as in @@ -8583,6 +8646,12 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables, } error= FALSE; + /* + For CREATE TABLE we should not open the table even if it exists. + If the table exists, we should either not create it or replace it + */ + lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB; + err: DBUG_RETURN(error); } diff --git a/sql/sql_parse.h b/sql/sql_parse.h index c2a7a184c20..773ede9edee 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -200,7 +200,7 @@ bool check_global_access(THD *thd, ulong want_access, bool no_errors= false); inline bool is_supported_parser_charset(CHARSET_INFO *cs) { - return test(cs->mbminlen == 1); + return MY_TEST(cs->mbminlen == 1); } #ifdef WITH_WSREP diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 3e19a33ee32..a9846df3b02 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -651,7 +651,7 @@ static bool create_full_part_field_array(THD *thd, TABLE *table, result= TRUE; goto end; } - if (bitmap_init(&part_info->full_part_field_set, bitmap_buf, + if (my_bitmap_init(&part_info->full_part_field_set, bitmap_buf, table->s->fields, FALSE)) { mem_alloc_error(table->s->fields); @@ -1230,9 +1230,9 @@ static bool set_up_partition_bitmaps(THD *thd, partition_info *part_info) mem_alloc_error(bitmap_bytes * 2); DBUG_RETURN(TRUE); } - bitmap_init(&part_info->read_partitions, bitmap_buf, bitmap_bits, FALSE); + my_bitmap_init(&part_info->read_partitions, bitmap_buf, bitmap_bits, FALSE); /* Use the second half of the allocated buffer for lock_partitions */ - bitmap_init(&part_info->lock_partitions, bitmap_buf + (bitmap_bytes / 4), + my_bitmap_init(&part_info->lock_partitions, bitmap_buf + (bitmap_bytes / 4), bitmap_bits, FALSE); part_info->bitmaps_are_initialized= TRUE; part_info->set_partition_bitmaps(NULL); @@ -3308,7 +3308,7 @@ uint32 get_list_array_idx_for_endpoint(partition_info *part_info, } else { - DBUG_RETURN(list_index + test(left_endpoint ^ include_endpoint)); + DBUG_RETURN(list_index + MY_TEST(left_endpoint ^ include_endpoint)); } } while (max_list_index >= min_list_index); notfound: @@ -5225,6 +5225,8 @@ that are reorganised. } else if (alter_info->flags & Alter_info::ALTER_REBUILD_PARTITION) { + set_engine_all_partitions(tab_part_info, + tab_part_info->default_engine_type); if (set_part_state(alter_info, tab_part_info, PART_CHANGED)) { my_error(ER_DROP_PARTITION_NON_EXISTENT, MYF(0), "REBUILD"); @@ -5781,7 +5783,7 @@ static bool mysql_change_partitions(ALTER_PARTITION_PARAM_TYPE *lpt) if (mysql_trans_commit_alter_copy_data(thd)) error= 1; /* The error has been reported */ - DBUG_RETURN(test(error)); + DBUG_RETURN(MY_TEST(error)); } @@ -7890,7 +7892,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info, index-in-ordered-array-of-list-constants (for LIST) space. */ store_key_image_to_rec(field, min_value, field_len); - bool include_endp= !test(flags & NEAR_MIN); + bool include_endp= !MY_TEST(flags & NEAR_MIN); part_iter->part_nums.start= get_endpoint(part_info, 1, include_endp); if (!can_match_multiple_values && part_info->part_expr->null_value) { @@ -7925,7 +7927,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info, else { store_key_image_to_rec(field, max_value, field_len); - bool include_endp= !test(flags & NEAR_MAX); + bool include_endp= !MY_TEST(flags & NEAR_MAX); part_iter->part_nums.end= get_endpoint(part_info, 0, include_endp); if (check_zero_dates && !zero_in_start_date && @@ -8092,8 +8094,8 @@ int get_part_iter_for_interval_via_walking(partition_info *part_info, if ((ulonglong)b - (ulonglong)a == ~0ULL) DBUG_RETURN(-1); - a += test(flags & NEAR_MIN); - b += test(!(flags & NEAR_MAX)); + a+= MY_TEST(flags & NEAR_MIN); + b+= MY_TEST(!(flags & NEAR_MAX)); ulonglong n_values= b - a; /* diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index 29ca86fa274..8c59febeb77 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2013, 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 @@ -506,13 +506,8 @@ bool Sql_cmd_alter_table_exchange_partition:: /* Don't allow to exchange with log table */ swap_table_list= table_list->next_local; - if (check_if_log_table(swap_table_list->db_length, swap_table_list->db, - swap_table_list->table_name_length, - swap_table_list->table_name, 0)) - { - my_error(ER_WRONG_USAGE, MYF(0), "PARTITION", "log table"); + if (check_if_log_table(swap_table_list, FALSE, "ALTER PARTITION")) DBUG_RETURN(TRUE); - } /* Currently no MDL lock that allows both read and write and is upgradeable diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 8508a0d7c60..df76c9f6417 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. - Copyright (c) 2010, 2013, Monty Program Ab + Copyright (c) 2005, 2013, Oracle and/or its affiliates. + Copyright (c) 2010, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -192,6 +192,7 @@ mysql_mutex_t LOCK_plugin; static DYNAMIC_ARRAY plugin_dl_array; static DYNAMIC_ARRAY plugin_array; static HASH plugin_hash[MYSQL_MAX_PLUGIN_TYPE_NUM]; +static MEM_ROOT plugin_mem_root; static bool reap_needed= false; static int plugin_array_version=0; @@ -203,7 +204,7 @@ ulong dlopen_count; write-lock on LOCK_system_variables_hash is required before modifying the following variables/structures */ -static MEM_ROOT plugin_mem_root; +static MEM_ROOT plugin_vars_mem_root; static uint global_variables_dynamic_size= 0; static HASH bookmark_hash; @@ -290,8 +291,8 @@ public: /* prototypes */ -static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv); -static bool plugin_load_list(MEM_ROOT *, int *, char **, const char *); +static void plugin_load(MEM_ROOT *tmp_root); +static bool plugin_load_list(MEM_ROOT *, const char *); static int test_plugin_options(MEM_ROOT *, struct st_plugin_int *, int *, char **); static bool register_builtin(struct st_maria_plugin *, struct st_plugin_int *, @@ -1037,8 +1038,7 @@ static st_plugin_int *plugin_insert_or_reuse(struct st_plugin_int *plugin) Requires that a write-lock is held on LOCK_system_variables_hash */ static bool plugin_add(MEM_ROOT *tmp_root, - const LEX_STRING *name, LEX_STRING *dl, - int *argc, char **argv, int report) + const LEX_STRING *name, LEX_STRING *dl, int report) { struct st_plugin_int tmp; struct st_maria_plugin *plugin; @@ -1075,7 +1075,6 @@ static bool plugin_add(MEM_ROOT *tmp_root, dupes++; continue; // already installed } - struct st_plugin_int *tmp_plugin_ptr; if (*(int*)plugin->info < min_plugin_info_interface_version[plugin->type] || @@ -1106,14 +1105,9 @@ static bool plugin_add(MEM_ROOT *tmp_root, tmp.ref_count= 0; tmp.state= PLUGIN_IS_UNINITIALIZED; tmp.load_option= PLUGIN_ON; - if (test_plugin_options(tmp_root, &tmp, argc, argv)) - tmp.state= PLUGIN_IS_DISABLED; if (!(tmp_plugin_ptr= plugin_insert_or_reuse(&tmp))) - { - mysql_del_sys_var_chain(tmp.system_vars); goto err; - } plugin_array_version++; if (my_hash_insert(&plugin_hash[plugin->type], (uchar*)tmp_plugin_ptr)) tmp_plugin_ptr->state= PLUGIN_IS_FREED; @@ -1128,8 +1122,6 @@ static bool plugin_add(MEM_ROOT *tmp_root, err: errs++; - if (tmp.nbackups) - restore_ptr_backup(tmp.nbackups, tmp.ptr_backup); if (name->str) break; } @@ -1198,6 +1190,8 @@ static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check) if (ref_check && plugin->ref_count) sql_print_error("Plugin '%s' has ref_count=%d after deinitialization.", plugin->name.str, plugin->ref_count); + + mysql_del_sys_var_chain(plugin->system_vars); } static void plugin_del(struct st_plugin_int *plugin) @@ -1205,11 +1199,8 @@ static void plugin_del(struct st_plugin_int *plugin) DBUG_ENTER("plugin_del"); mysql_mutex_assert_owner(&LOCK_plugin); /* Free allocated strings before deleting the plugin. */ - mysql_rwlock_wrlock(&LOCK_system_variables_hash); - mysql_del_sys_var_chain(plugin->system_vars); - mysql_rwlock_unlock(&LOCK_system_variables_hash); - restore_ptr_backup(plugin->nbackups, plugin->ptr_backup); plugin_vars_free_values(plugin->system_vars); + restore_ptr_backup(plugin->nbackups, plugin->ptr_backup); my_hash_delete(&plugin_hash[plugin->plugin->type], (uchar*)plugin); plugin_dl_del(plugin->plugin_dl); plugin->state= PLUGIN_IS_FREED; @@ -1343,7 +1334,8 @@ void plugin_unlock_list(THD *thd, plugin_ref *list, uint count) } -static int plugin_initialize(struct st_plugin_int *plugin) +static int plugin_initialize(MEM_ROOT *tmp_root, struct st_plugin_int *plugin, + int *argc, char **argv, bool options_only) { int ret= 1; DBUG_ENTER("plugin_initialize"); @@ -1353,6 +1345,28 @@ static int plugin_initialize(struct st_plugin_int *plugin) DBUG_ASSERT(state == PLUGIN_IS_UNINITIALIZED); mysql_mutex_unlock(&LOCK_plugin); + + mysql_rwlock_wrlock(&LOCK_system_variables_hash); + if (test_plugin_options(tmp_root, plugin, argc, argv)) + state= PLUGIN_IS_DISABLED; + mysql_rwlock_unlock(&LOCK_system_variables_hash); + + if (options_only || state == PLUGIN_IS_DISABLED) + { + ret= 0; + goto err; + } + + if (plugin->plugin_dl && global_system_variables.log_warnings >= 9) + { + void *sym= dlsym(plugin->plugin_dl->handle, + plugin->plugin_dl->mariaversion ? + maria_plugin_declarations_sym : plugin_declarations_sym); + DBUG_ASSERT(sym); + sql_print_information("Plugin %s loaded at %p", + plugin->name.str, sym); + } + if (plugin_type_initialize[plugin->plugin->type]) { if ((*plugin_type_initialize[plugin->plugin->type])(plugin)) @@ -1412,6 +1426,9 @@ static int plugin_initialize(struct st_plugin_int *plugin) ret= 0; err: + if (ret) + mysql_del_sys_var_chain(plugin->system_vars); + mysql_mutex_lock(&LOCK_plugin); plugin->state= state; @@ -1504,6 +1521,7 @@ int plugin_init(int *argc, char **argv, int flags) #endif init_alloc_root(&plugin_mem_root, 4096, 4096, MYF(0)); + init_alloc_root(&plugin_vars_mem_root, 4096, 4096, MYF(0)); init_alloc_root(&tmp_root, 4096, 4096, MYF(0)); if (my_hash_init(&bookmark_hash, &my_charset_bin, 16, 0, 0, @@ -1571,10 +1589,7 @@ int plugin_init(int *argc, char **argv, int flags) } free_root(&tmp_root, MYF(MY_MARK_BLOCKS_FREE)); - if (test_plugin_options(&tmp_root, &tmp, argc, argv)) - tmp.state= PLUGIN_IS_DISABLED; - else - tmp.state= PLUGIN_IS_UNINITIALIZED; + tmp.state= PLUGIN_IS_UNINITIALIZED; if (register_builtin(plugin, &tmp, &plugin_ptr)) goto err_unlock; @@ -1589,15 +1604,12 @@ int plugin_init(int *argc, char **argv, int flags) mysqld --help for all other users, we will only initialize MyISAM here. */ - if (!(flags & PLUGIN_INIT_SKIP_INITIALIZATION) || is_myisam) + if (plugin_initialize(&tmp_root, plugin_ptr, argc, argv, !is_myisam && + (flags & PLUGIN_INIT_SKIP_INITIALIZATION))) { - if (plugin_ptr->state == PLUGIN_IS_UNINITIALIZED && - plugin_initialize(plugin_ptr)) - { - if (mandatory) - goto err_unlock; - plugin_ptr->state= PLUGIN_IS_DISABLED; - } + if (mandatory) + goto err_unlock; + plugin_ptr->state= PLUGIN_IS_DISABLED; } /* @@ -1625,15 +1637,12 @@ int plugin_init(int *argc, char **argv, int flags) I_List_iterator<i_string> iter(opt_plugin_load_list); i_string *item; while (NULL != (item= iter++)) - plugin_load_list(&tmp_root, argc, argv, item->ptr); + plugin_load_list(&tmp_root, item->ptr); if (!(flags & PLUGIN_INIT_SKIP_PLUGIN_TABLE)) - plugin_load(&tmp_root, argc, argv); + plugin_load(&tmp_root); } - if (flags & PLUGIN_INIT_SKIP_INITIALIZATION) - goto end; - /* Now we initialize all remaining plugins */ @@ -1645,9 +1654,10 @@ int plugin_init(int *argc, char **argv, int flags) for (i= 0; i < plugin_array.elements; i++) { plugin_ptr= *dynamic_element(&plugin_array, i, struct st_plugin_int **); - if (plugin_ptr->state == PLUGIN_IS_UNINITIALIZED) + if (plugin_ptr->plugin_dl && plugin_ptr->state == PLUGIN_IS_UNINITIALIZED) { - if (plugin_initialize(plugin_ptr)) + if (plugin_initialize(&tmp_root, plugin_ptr, argc, argv, + (flags & PLUGIN_INIT_SKIP_INITIALIZATION))) { plugin_ptr->state= PLUGIN_IS_DYING; *(reap++)= plugin_ptr; @@ -1674,7 +1684,6 @@ int plugin_init(int *argc, char **argv, int flags) if (reaped_mandatory_plugin) goto err; -end: free_root(&tmp_root, MYF(0)); DBUG_RETURN(0); @@ -1713,7 +1722,7 @@ static bool register_builtin(struct st_maria_plugin *plugin, /* called only by plugin_init() */ -static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv) +static void plugin_load(MEM_ROOT *tmp_root) { TABLE_LIST tables; TABLE *table; @@ -1772,7 +1781,7 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv) the mutex here to satisfy the assert */ mysql_mutex_lock(&LOCK_plugin); - if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) + if (plugin_add(tmp_root, &name, &dl, REPORT_TO_LOG)) sql_print_warning("Couldn't load plugin named '%s' with soname '%s'.", str_name.c_ptr(), str_dl.c_ptr()); free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); @@ -1794,8 +1803,7 @@ end: /* called only by plugin_init() */ -static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, - const char *list) +static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list) { char buffer[FN_REFLEN]; LEX_STRING name= {buffer, 0}, dl= {NULL, 0}, *str= &name; @@ -1830,14 +1838,14 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, mysql_mutex_lock(&LOCK_plugin); free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); name.str= 0; // load everything - if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) + if (plugin_add(tmp_root, &name, &dl, REPORT_TO_LOG)) goto error; } else { free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); mysql_mutex_lock(&LOCK_plugin); - if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) + if (plugin_add(tmp_root, &name, &dl, REPORT_TO_LOG)) goto error; } mysql_mutex_unlock(&LOCK_plugin); @@ -1995,6 +2003,7 @@ void plugin_shutdown(void) my_hash_free(&bookmark_hash); free_root(&plugin_mem_root, MYF(0)); + free_root(&plugin_vars_mem_root, MYF(0)); global_variables_dynamic_size= 0; @@ -2006,28 +2015,22 @@ void plugin_shutdown(void) That is, initialize it, and update mysql.plugin table */ -static bool finalize_install(THD *thd, TABLE *table, const LEX_STRING *name) +static bool finalize_install(THD *thd, TABLE *table, const LEX_STRING *name, + int *argc, char **argv) { struct st_plugin_int *tmp= plugin_find_internal(name, MYSQL_ANY_PLUGIN); int error; DBUG_ASSERT(tmp); mysql_mutex_assert_owner(&LOCK_plugin); // because of tmp->state - if (tmp->state == PLUGIN_IS_DISABLED) - { - if (global_system_variables.log_warnings) - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_CANT_INITIALIZE_UDF, ER(ER_CANT_INITIALIZE_UDF), - name->str, "Plugin is disabled"); - } - else if (tmp->state != PLUGIN_IS_UNINITIALIZED) + if (tmp->state != PLUGIN_IS_UNINITIALIZED) { /* already installed */ return 0; } else { - if (plugin_initialize(tmp)) + if (plugin_initialize(thd->mem_root, tmp, argc, argv, false)) { report_error(REPORT_TO_USER, ER_CANT_INITIALIZE_UDF, name->str, "Plugin initialization function failed."); @@ -2035,6 +2038,13 @@ static bool finalize_install(THD *thd, TABLE *table, const LEX_STRING *name) return 1; } } + if (tmp->state == PLUGIN_IS_DISABLED) + { + if (global_system_variables.log_warnings) + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, + ER_CANT_INITIALIZE_UDF, ER(ER_CANT_INITIALIZE_UDF), + name->str, "Plugin is disabled"); + } /* We do not replicate the INSTALL PLUGIN statement. Disable binlogging @@ -2084,6 +2094,12 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, MYSQL_LOCK_IGNORE_TIMEOUT))) DBUG_RETURN(TRUE); + if (my_load_defaults(MYSQL_CONFIG_NAME, load_default_groups, &argc, &argv, NULL)) + { + report_error(REPORT_TO_USER, ER_PLUGIN_IS_NOT_LOADED, name->str); + DBUG_RETURN(TRUE); + } + /* Pre-acquire audit plugins for events that may potentially occur during [UN]INSTALL PLUGIN. @@ -2110,23 +2126,12 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, mysql_audit_acquire_plugins(thd, event_class_mask); mysql_mutex_lock(&LOCK_plugin); - mysql_rwlock_wrlock(&LOCK_system_variables_hash); - - if (my_load_defaults(MYSQL_CONFIG_NAME, load_default_groups, &argc, &argv, NULL)) - { - report_error(REPORT_TO_USER, ER_PLUGIN_IS_NOT_LOADED, name->str); - goto err; - } - error= plugin_add(thd->mem_root, name, &dl, &argc, argv, REPORT_TO_USER); - if (argv) - free_defaults(argv); - mysql_rwlock_unlock(&LOCK_system_variables_hash); - + error= plugin_add(thd->mem_root, name, &dl, REPORT_TO_USER); if (error) goto err; if (name->str) - error= finalize_install(thd, table, name); + error= finalize_install(thd, table, name, &argc, argv); else { st_plugin_dl *plugin_dl= plugin_dl_find(&dl); @@ -2134,22 +2139,20 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, for (plugin= plugin_dl->plugins; plugin->info; plugin++) { LEX_STRING str= { const_cast<char*>(plugin->name), strlen(plugin->name) }; - error|= finalize_install(thd, table, &str); + error|= finalize_install(thd, table, &str, &argc, argv); } } if (error) - goto deinit; - - mysql_mutex_unlock(&LOCK_plugin); - DBUG_RETURN(FALSE); - -deinit: - reap_needed= true; - reap_plugins(); + { + reap_needed= true; + reap_plugins(); + } err: mysql_mutex_unlock(&LOCK_plugin); - DBUG_RETURN(TRUE); + if (argv) + free_defaults(argv); + DBUG_RETURN(error); } @@ -2872,7 +2875,7 @@ static st_bookmark *register_var(const char *plugin, const char *name, if (!(result= find_bookmark(NULL, varname + 1, flags))) { - result= (st_bookmark*) alloc_root(&plugin_mem_root, + result= (st_bookmark*) alloc_root(&plugin_vars_mem_root, sizeof(struct st_bookmark) + length-1); varname[0]= plugin_var_bookmark_key(flags); memcpy(result->key, varname, length); @@ -3846,7 +3849,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, enum_plugin_load_option plugin_load_option= tmp->load_option; MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ? - &tmp->mem_root : &plugin_mem_root; + &tmp->mem_root : &plugin_vars_mem_root; st_mysql_sys_var **opt; my_option *opts= NULL; LEX_STRING plugin_name; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index a9cc26cfb61..3456a7b381f 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -881,7 +881,7 @@ static bool insert_params_with_log(Prepared_statement *stmt, uchar *null_array, if (param->state == Item_param::NO_VALUE) DBUG_RETURN(1); - if (param->limit_clause_param) + if (param->limit_clause_param && param->state != Item_param::INT_VALUE) { param->set_int(param->val_int(), MY_INT64_NUM_DECIMAL_DIGITS); param->item_type= Item::INT_ITEM; @@ -978,7 +978,7 @@ static bool setup_conversion_functions(Prepared_statement *stmt, typecode= sint2korr(read_pos); read_pos+= 2; - (**it).unsigned_flag= test(typecode & signed_bit); + (**it).unsigned_flag= MY_TEST(typecode & signed_bit); setup_one_conversion_function(thd, *it, (uchar) (typecode & ~signed_bit)); } } @@ -2716,7 +2716,7 @@ void mysqld_stmt_execute(THD *thd, char *packet_arg, uint packet_length) DBUG_PRINT("exec_query", ("%s", stmt->query())); DBUG_PRINT("info",("stmt: 0x%lx", (long) stmt)); - open_cursor= test(flags & (ulong) CURSOR_TYPE_READ_ONLY); + open_cursor= MY_TEST(flags & (ulong) CURSOR_TYPE_READ_ONLY); thd->protocol= &thd->protocol_binary; stmt->execute_loop(&expanded_query, open_cursor, packet, packet_end); diff --git a/sql/sql_prepare.h b/sql/sql_prepare.h index ea5ebddb561..b468ac1bf9b 100644 --- a/sql/sql_prepare.h +++ b/sql/sql_prepare.h @@ -290,7 +290,7 @@ public: one. Never fails. */ - bool has_next_result() const { return test(m_current_rset->m_next_rset); } + bool has_next_result() const { return MY_TEST(m_current_rset->m_next_rset); } /** Only valid to call if has_next_result() returned true. Otherwise the result is undefined. @@ -298,7 +298,7 @@ public: bool move_to_next_result() { m_current_rset= m_current_rset->m_next_rset; - return test(m_current_rset); + return MY_TEST(m_current_rset); } ~Ed_connection() { free_old_result(); } diff --git a/sql/sql_priv.h b/sql/sql_priv.h index 383888bac30..0676fca8fdc 100644 --- a/sql/sql_priv.h +++ b/sql/sql_priv.h @@ -110,6 +110,8 @@ /* The following is used to detect a conflict with DISTINCT */ #define SELECT_ALL (1ULL << 24) // SELECT, user, parser +#define OPTION_GTID_BEGIN (1ULL << 25) // GTID BEGIN found in log + /** The following can be set when importing tables in a 'wrong order' to suppress foreign key checks */ #define OPTION_NO_FOREIGN_KEY_CHECKS (1ULL << 26) // THD, user, binlog @@ -238,6 +240,7 @@ template <class T> bool valid_buffer_range(T jump, OPTIMIZER_SWITCH_DERIVED_MERGE | \ OPTIMIZER_SWITCH_DERIVED_WITH_KEYS | \ OPTIMIZER_SWITCH_TABLE_ELIMINATION | \ + OPTIMIZER_SWITCH_EXTENDED_KEYS | \ OPTIMIZER_SWITCH_IN_TO_EXISTS | \ OPTIMIZER_SWITCH_MATERIALIZATION | \ OPTIMIZER_SWITCH_PARTIAL_MATCH_ROWID_MERGE|\ diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index a229c861116..f1f9ba9452f 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -418,7 +418,8 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, /** - Implementation of FLUSH TABLES <table_list> WITH READ LOCK. + Implementation of FLUSH TABLES <table_list> WITH READ LOCK + and FLUSH TABLES <table_list> FOR EXPORT In brief: take exclusive locks, expel tables from the table cache, reopen the tables, enter the 'LOCKED TABLES' mode, @@ -507,33 +508,36 @@ bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables) goto error; } - /* - Acquire SNW locks on tables to be flushed. Don't acquire global - IX and database-scope IX locks on the tables as this will make - this statement incompatible with FLUSH TABLES WITH READ LOCK. - */ - if (lock_table_names(thd, all_tables, NULL, - thd->variables.lock_wait_timeout, - MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK)) - goto error; + if (thd->lex->type & REFRESH_READ_LOCK) + { + /* + Acquire SNW locks on tables to be flushed. Don't acquire global + IX and database-scope IX locks on the tables as this will make + this statement incompatible with FLUSH TABLES WITH READ LOCK. + */ + if (lock_table_names(thd, all_tables, NULL, + thd->variables.lock_wait_timeout, + MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK)) + goto error; - DEBUG_SYNC(thd,"flush_tables_with_read_lock_after_acquire_locks"); + DEBUG_SYNC(thd,"flush_tables_with_read_lock_after_acquire_locks"); - for (table_list= all_tables; table_list; - table_list= table_list->next_global) - { - /* Request removal of table from cache. */ - tdc_remove_table(thd, TDC_RT_REMOVE_UNUSED, - table_list->db, - table_list->table_name, FALSE); - /* Reset ticket to satisfy asserts in open_tables(). */ - table_list->mdl_request.ticket= NULL; + for (table_list= all_tables; table_list; + table_list= table_list->next_global) + { + /* Request removal of table from cache. */ + tdc_remove_table(thd, TDC_RT_REMOVE_UNUSED, + table_list->db, + table_list->table_name, FALSE); + /* Reset ticket to satisfy asserts in open_tables(). */ + table_list->mdl_request.ticket= NULL; + } } /* Before opening and locking tables the below call also waits for old shares to go away, so the fact that we don't pass - MYSQL_LOCK_IGNORE_FLUSH flag to it is important. + MYSQL_OPEN_IGNORE_FLUSH flag to it is important. Also we don't pass MYSQL_OPEN_HAS_MDL_LOCK flag as we want to open underlying tables if merge table is flushed. For underlying tables of the merge the below call has to @@ -542,11 +546,27 @@ bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables) */ if (open_and_lock_tables(thd, all_tables, FALSE, MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK, - &lock_tables_prelocking_strategy) || - thd->locked_tables_list.init_locked_tables(thd)) - { + &lock_tables_prelocking_strategy)) goto error; + + if (thd->lex->type & REFRESH_FOR_EXPORT) + { + // Check if all storage engines support FOR EXPORT. + for (TABLE_LIST *table_list= all_tables; table_list; + table_list= table_list->next_global) + { + if (!(table_list->table->file->ha_table_flags() & HA_CAN_EXPORT)) + { + my_error(ER_ILLEGAL_HA, MYF(0),table_list->table->file->table_type(), + table_list->db, table_list->table_name); + return true; + } + } } + + if (thd->locked_tables_list.init_locked_tables(thd)) + goto error; + thd->variables.option_bits|= OPTION_TABLE_LOCK; /* diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index 6babdd7c636..897aa183b60 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -84,12 +84,8 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent) for (to_table= 0, ren_table= table_list; ren_table; to_table= 1 - to_table, ren_table= ren_table->next_local) { - int log_table_rename= 0; - - if ((log_table_rename= - check_if_log_table(ren_table->db_length, ren_table->db, - ren_table->table_name_length, - ren_table->table_name, 1))) + int log_table_rename; + if ((log_table_rename= check_if_log_table(ren_table, TRUE, NullS))) { /* as we use log_table_rename as an array index, we need it to start diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index e4116759c13..9e99b7292d0 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1960,8 +1960,8 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, }); if (global_system_variables.log_warnings > 1) - sql_print_information("Start binlog_dump to slave_server(%d), pos(%s, %lu)", - (int)thd->variables.server_id, log_ident, (ulong)pos); + sql_print_information("Start binlog_dump to slave_server(%lu), pos(%s, %lu)", + thd->variables.server_id, log_ident, (ulong)pos); if (RUN_HOOK(binlog_transmit, transmit_start, (thd, flags, log_ident, pos))) { errmsg= "Failed to run hook 'transmit_start'"; @@ -3453,7 +3453,6 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added) } if (need_relay_log_purge) { - relay_log_purge= 1; THD_STAGE_INFO(thd, stage_purging_old_relay_logs); if (purge_relay_logs(&mi->rli, thd, 0 /* not only reset, but also reinit */, @@ -3467,7 +3466,6 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added) else { const char* msg; - relay_log_purge= 0; /* Relay log is already initialized */ if (init_relay_log_pos(&mi->rli, mi->rli.group_relay_log_name, @@ -3977,6 +3975,20 @@ rpl_deinit_gtid_slave_state() } +void +rpl_init_gtid_waiting() +{ + rpl_global_gtid_waiting.init(); +} + + +void +rpl_deinit_gtid_waiting() +{ + rpl_global_gtid_waiting.destroy(); +} + + /* Format the current GTID state as a string, for returning the value of @@global.gtid_slave_pos. diff --git a/sql/sql_repl.h b/sql/sql_repl.h index 018b23673ee..7f7751b8f44 100644 --- a/sql/sql_repl.h +++ b/sql/sql_repl.h @@ -72,6 +72,8 @@ extern PSI_mutex_key key_LOCK_slave_state, key_LOCK_binlog_state; #endif void rpl_init_gtid_slave_state(); void rpl_deinit_gtid_slave_state(); +void rpl_init_gtid_waiting(); +void rpl_deinit_gtid_waiting(); int gtid_state_from_binlog_pos(const char *name, uint32 pos, String *out_str); int rpl_append_gtid_state(String *dest, bool use_binlog); int rpl_load_gtid_state(slave_connection_state *state, bool use_binlog); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index c109ee10877..cfef5eafa27 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -725,7 +725,7 @@ JOIN::prepare(Item ***rref_pointer_array, aggregate functions in the SELECT list is a MySQL exptenstion that is allowed only if the ONLY_FULL_GROUP_BY sql mode is not set. */ - bool mixed_implicit_grouping= false; + mixed_implicit_grouping= false; if ((~thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) && select_lex->with_sum_func && !group_list) { @@ -764,7 +764,7 @@ JOIN::prepare(Item ***rref_pointer_array, Note: this loop doesn't touch tables inside merged semi-joins, because subquery-to-semijoin conversion has not been done yet. This is intended. */ - if (mixed_implicit_grouping) + if (mixed_implicit_grouping && tbl->table) tbl->table->maybe_null= 1; } @@ -1078,8 +1078,10 @@ JOIN::optimize_inner() if (select_lex->handle_derived(thd->lex, DT_MERGE)) DBUG_RETURN(TRUE); table_count= select_lex->leaf_tables.elements; - select_lex->update_used_tables(); } + // Update used tables after all handling derived table procedures + select_lex->update_used_tables(); + /* In fact we transform underlying subqueries after their 'prepare' phase and before 'optimize' from upper query 'optimize' to allow semijoin @@ -1158,11 +1160,8 @@ TODO: make view to decide if it is possible to write to WHERE directly or make S MEMROOT for prepared statements and stored procedures. */ - Query_arena *arena= thd->stmt_arena, backup; - if (arena->is_conventional()) - arena= 0; // For easier test - else - thd->set_n_backup_active_arena(arena, &backup); + Query_arena *arena, backup; + arena= thd->activate_stmt_arena_if_needed(&backup); sel->first_cond_optimization= 0; @@ -1767,7 +1766,7 @@ TODO: make view to decide if it is possible to write to WHERE directly or make S /* Perform FULLTEXT search before all regular searches */ if (!(select_options & SELECT_DESCRIBE)) - init_ftfuncs(thd, select_lex, test(order)); + init_ftfuncs(thd, select_lex, MY_TEST(order)); if (optimize_unflattened_subqueries()) DBUG_RETURN(1); @@ -2280,7 +2279,7 @@ JOIN::reinit() } if (!(select_options & SELECT_DESCRIBE)) - init_ftfuncs(thd, select_lex, test(order)); + init_ftfuncs(thd, select_lex, MY_TEST(order)); DBUG_RETURN(0); } @@ -2431,6 +2430,7 @@ void JOIN::exec_inner() In this case JOIN::exec must check for JOIN::having_value, in the same way it checks for JOIN::cond_value. */ + DBUG_ASSERT(error == 0); if (cond_value != Item::COND_FALSE && having_value != Item::COND_FALSE && (!conds || conds->val_int()) && @@ -2441,16 +2441,15 @@ void JOIN::exec_inner() procedure->end_of_records()) : result->send_data(fields_list)> 0)) error= 1; else - { - error= (int) result->send_eof(); send_records= ((select_options & OPTION_FOUND_ROWS) ? 1 : thd->get_sent_row_count()); - } } else - { - error=(int) result->send_eof(); send_records= 0; + if (!error) + { + join_free(); // Unlock all cursors + error= (int) result->send_eof(); } } /* Single select (without union) always returns 0 or 1 row */ @@ -2603,7 +2602,7 @@ void JOIN::exec_inner() curr_join->const_tables != curr_join->table_count) { JOIN_TAB *first_tab= curr_join->join_tab + curr_join->const_tables; - first_tab->sorted= test(first_tab->loosescan_match_tab); + first_tab->sorted= MY_TEST(first_tab->loosescan_match_tab); } Procedure *save_proc= curr_join->procedure; @@ -2783,7 +2782,7 @@ void JOIN::exec_inner() curr_join->const_tables != curr_join->table_count) { JOIN_TAB *first_tab= curr_join->join_tab + curr_join->const_tables; - first_tab->sorted= test(first_tab->loosescan_match_tab); + first_tab->sorted= MY_TEST(first_tab->loosescan_match_tab); } tmp_error= -1; if (setup_sum_funcs(curr_join->thd, curr_join->sum_funcs) || @@ -3065,8 +3064,7 @@ void JOIN::exec_inner() Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF); error= do_select(curr_join, curr_fields_list, NULL, procedure); thd->limit_found_rows= curr_join->send_records; - if (curr_join->order && - curr_join->sortorder) + if (curr_join->order && curr_join->filesort_found_rows) { /* Use info provided by filesort. */ DBUG_ASSERT(curr_join->table_count > curr_join->const_tables); @@ -3392,7 +3390,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list, stat_ref=(JOIN_TAB**) join->thd->alloc(sizeof(JOIN_TAB*)* (MAX_TABLES + table_count + 1)); stat_vector= stat_ref + MAX_TABLES; - table_vector=(TABLE**) join->thd->alloc(sizeof(TABLE*)*(table_count*2)); + table_vector=(TABLE**) join->thd->calloc(sizeof(TABLE*)*(table_count*2)); join->positions= new (join->thd->mem_root) POSITION[(table_count+1)]; /* best_positions is ok to allocate with alloc() as we copy things to it with @@ -3431,13 +3429,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list, #endif DBUG_EXECUTE_IF("bug11747970_raise_error", - { - if (!error) - { - my_error(ER_UNKNOWN_ERROR, MYF(0)); - goto error; - } - }); + { join->thd->killed= KILL_QUERY_HARD; }); if (error) { table->file->print_error(error, MYF(0)); @@ -3826,7 +3818,9 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list, join->impossible_where= false; if (conds && const_count) { + conds->update_used_tables(); conds= remove_eq_conds(join->thd, conds, &join->cond_value); + join->select_lex->where= conds; if (join->cond_value == Item::COND_FALSE) { join->impossible_where= true; @@ -4984,8 +4978,8 @@ sort_keyuse(KEYUSE *a,KEYUSE *b) if (a->keypart != b->keypart) return (int) (a->keypart - b->keypart); // Place const values before other ones - if ((res= test((a->used_tables & ~OUTER_REF_TABLE_BIT)) - - test((b->used_tables & ~OUTER_REF_TABLE_BIT)))) + if ((res= MY_TEST((a->used_tables & ~OUTER_REF_TABLE_BIT)) - + MY_TEST((b->used_tables & ~OUTER_REF_TABLE_BIT)))) return res; /* Place rows that are not 'OPTIMIZE_REF_OR_NULL' first */ return (int) ((a->optimize & KEY_OPTIMIZE_REF_OR_NULL) - @@ -5768,7 +5762,7 @@ best_access_path(JOIN *join, } else { - found_constraint= test(found_part); + found_constraint= MY_TEST(found_part); loose_scan_opt.check_ref_access_part1(s, key, start_key, found_part); /* Check if we found full key */ @@ -5777,7 +5771,7 @@ best_access_path(JOIN *join, { /* use eq key */ max_key_part= (uint) ~0; if ((key_flags & (HA_NOSAME | HA_NULL_PART_KEY)) == HA_NOSAME || - test(key_flags & HA_EXT_NOSAME)) + MY_TEST(key_flags & HA_EXT_NOSAME)) { tmp = prev_record_reads(join->positions, idx, found_ref); records=1.0; @@ -5908,7 +5902,7 @@ best_access_path(JOIN *join, */ if (table->quick_keys.is_set(key) && !found_ref && //(C1) table->quick_key_parts[key] == max_key_part && //(C2) - table->quick_n_ranges[key] == 1+test(ref_or_null_part)) //(C3) + table->quick_n_ranges[key] == 1 + MY_TEST(ref_or_null_part)) //(C3) { tmp= records= (double) table->quick_rows[key]; } @@ -6002,8 +5996,8 @@ best_access_path(JOIN *join, table->quick_key_parts[key] <= max_key_part && const_part & ((key_part_map)1 << table->quick_key_parts[key]) && - table->quick_n_ranges[key] == 1 + test(ref_or_null_part & - const_part) && + table->quick_n_ranges[key] == 1 + MY_TEST(ref_or_null_part & + const_part) && records > (double) table->quick_rows[key]) { tmp= records= (double) table->quick_rows[key]; @@ -6194,8 +6188,8 @@ best_access_path(JOIN *join, best_key= 0; /* range/index_merge/ALL/index access method are "independent", so: */ best_ref_depends_map= 0; - best_uses_jbuf= test(!disable_jbuf && !((s->table->map & - join->outer_join))); + best_uses_jbuf= MY_TEST(!disable_jbuf && !((s->table->map & + join->outer_join))); } } @@ -6360,7 +6354,7 @@ choose_plan(JOIN *join, table_map join_tables) uint prune_level= join->thd->variables.optimizer_prune_level; uint use_cond_selectivity= join->thd->variables.optimizer_use_condition_selectivity; - bool straight_join= test(join->select_options & SELECT_STRAIGHT_JOIN); + bool straight_join= MY_TEST(join->select_options & SELECT_STRAIGHT_JOIN); DBUG_ENTER("choose_plan"); join->cur_embedding_map= 0; @@ -8254,7 +8248,8 @@ get_best_combination(JOIN *join) sub-order */ SJ_MATERIALIZATION_INFO *sjm= cur_pos->table->emb_sj_nest->sj_mat_info; - j->records= j->records_read= (ha_rows)(sjm->is_sj_scan? sjm->rows : 1); + j->records_read= (sjm->is_sj_scan? sjm->rows : 1); + j->records= (ha_rows) j->records_read; j->cond_selectivity= 1.0; JOIN_TAB *jt; JOIN_TAB_RANGE *jt_range; @@ -8483,7 +8478,7 @@ static bool are_tables_local(JOIN_TAB *jtab, table_map used_tables) table_map local_tables= jtab->emb_sj_nest->nested_join->used_tables | jtab->join->const_table_map | OUTER_REF_TABLE_BIT; - return !test(used_tables & ~local_tables); + return !MY_TEST(used_tables & ~local_tables); } /* @@ -8620,7 +8615,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, !are_tables_local(j, keyuse->val->used_tables())) keyuse++; /* Skip other parts */ - uint maybe_null= test(keyinfo->key_part[i].null_bit); + uint maybe_null= MY_TEST(keyinfo->key_part[i].null_bit); j->ref.items[i]=keyuse->val; // Save for cond removal j->ref.cond_guards[i]= keyuse->cond_guard; if (keyuse->null_rejecting) @@ -8674,7 +8669,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, else if (!((keyparts == keyinfo->user_defined_key_parts && ((key_flags & (HA_NOSAME | HA_NULL_PART_KEY)) == HA_NOSAME)) || (keyparts > keyinfo->user_defined_key_parts && // true only for extended keys - test(key_flags & HA_EXT_NOSAME) && + MY_TEST(key_flags & HA_EXT_NOSAME) && keyparts == keyinfo->ext_key_parts)) || null_ref_key) { @@ -8797,7 +8792,7 @@ JOIN::make_simple_join(JOIN *parent, TABLE *temp_table) functions are handled. */ // the temporary table was explicitly requested - DBUG_ASSERT(test(select_options & OPTION_BUFFER_RESULT)); + DBUG_ASSERT(MY_TEST(select_options & OPTION_BUFFER_RESULT)); // the temporary table does not have a grouping expression DBUG_ASSERT(!temp_table->group); } @@ -10404,7 +10399,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, ((options & SELECT_DESCRIBE) || !tab->cache->init())) { tab->icp_other_tables_ok= FALSE; - return (2-test(!prev_cache)); + return (2 - MY_TEST(!prev_cache)); } goto no_join_cache; case JT_SYSTEM: @@ -10439,7 +10434,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, ((options & SELECT_DESCRIBE) || !tab->cache->init())) { tab->icp_other_tables_ok= FALSE; - return (4-test(!prev_cache)); + return (4 - MY_TEST(!prev_cache)); } goto no_join_cache; } @@ -10458,7 +10453,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, prev_cache= 0; if ((tab->cache= new JOIN_CACHE_BKA(join, tab, flags, prev_cache)) && ((options & SELECT_DESCRIBE) || !tab->cache->init())) - return (6-test(!prev_cache)); + return (6 - MY_TEST(!prev_cache)); goto no_join_cache; } else @@ -10469,7 +10464,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, ((options & SELECT_DESCRIBE) || !tab->cache->init())) { tab->idx_cond_fact_out= FALSE; - return (8-test(!prev_cache)); + return (8 - MY_TEST(!prev_cache)); } goto no_join_cache; } @@ -10564,7 +10559,7 @@ restart: no_jbuf_after, idx, prev_tab); - tab->use_join_cache= test(tab->used_join_cache_level); + tab->use_join_cache= MY_TEST(tab->used_join_cache_level); /* psergey-merge: todo: raise the question that this is really stupid that we can first allocate a join buffer, then decide not to use it and free @@ -10694,7 +10689,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after) uint i; DBUG_ENTER("make_join_readinfo"); - bool statistics= test(!(join->select_options & SELECT_DESCRIBE)); + bool statistics= MY_TEST(!(join->select_options & SELECT_DESCRIBE)); bool sorted= 1; join->complex_firstmatch_tables= table_map(0); @@ -11154,7 +11149,7 @@ ha_rows JOIN_TAB::get_examined_rows() else examined_rows= records_read; - return examined_rows; + return (ha_rows) examined_rows; } @@ -11192,7 +11187,7 @@ bool JOIN_TAB::preread_init() /* init ftfuns for just initialized derived table */ if (table->fulltext_searched) - init_ftfuncs(join->thd, join->select_lex, test(join->order)); + init_ftfuncs(join->thd, join->select_lex, MY_TEST(join->order)); return FALSE; } @@ -11248,12 +11243,12 @@ bool TABLE_REF::tmp_table_index_lookup_init(THD *thd, Item *item= it.next(); DBUG_ASSERT(item); items[i]= item; - int null_count= test(cur_key_part->field->real_maybe_null()); + int null_count= MY_TEST(cur_key_part->field->real_maybe_null()); *ref_key= new store_key_item(thd, cur_key_part->field, /* TIMOUR: the NULL byte is taken into account in cur_key_part->store_length, so instead of - cur_ref_buff + test(maybe_null), we could + cur_ref_buff + MY_TEST(maybe_null), we could use that information instead. */ cur_ref_buff + null_count, @@ -11453,6 +11448,16 @@ void JOIN::cleanup(bool full) { tab->cleanup(); } + + if (tabs_kind == WALK_OPTIMIZATION_TABS && + first_breadth_first_tab(this, WALK_OPTIMIZATION_TABS) != + first_breadth_first_tab(this, WALK_EXECUTION_TABS)) + { + JOIN_TAB *jt= first_breadth_first_tab(this, WALK_EXECUTION_TABS); + /* We've walked optimization tabs. do execution ones too */ + if (jt) + jt->cleanup(); + } } cleaned= true; @@ -11475,7 +11480,7 @@ void JOIN::cleanup(bool full) } if (full) { - cleanup_empty_jtbm_semi_joins(this); + cleanup_empty_jtbm_semi_joins(this, join_list); /* Ensure that the following delete_elements() would not be called twice for the same list. @@ -11673,6 +11678,8 @@ static void update_depend_map_for_order(JOIN *join, ORDER *order) Remove all constants and check if ORDER only contains simple expressions. + We also remove all duplicate expressions, keeping only the first one. + simple_order is set to 1 if sort_order only uses fields from head table and the head table is not a LEFT JOIN table. @@ -11680,9 +11687,10 @@ static void update_depend_map_for_order(JOIN *join, ORDER *order) @param first_order List of SORT or GROUP order @param cond WHERE statement @param change_list Set to 1 if we should remove things from list. - If this is not set, then only simple_order is - calculated. - @param simple_order Set to 1 if we are only using simple expressions + If this is not set, then only simple_order is + calculated. + @param simple_order Set to 1 if we are only using simple + expressions. @return Returns new sort order @@ -11695,7 +11703,7 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond, if (join->table_count == join->const_tables) return change_list ? 0 : first_order; // No need to sort - ORDER *order,**prev_ptr; + ORDER *order,**prev_ptr, *tmp_order; table_map first_table; table_map not_const_tables= ~join->const_table_map; table_map ref; @@ -11709,7 +11717,6 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond, first_is_base_table= TRUE; } - /* Cleanup to avoid interference of calls of this function for ORDER BY and GROUP BY @@ -11778,6 +11785,17 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond, } } } + /* Remove ORDER BY entries that we have seen before */ + for (tmp_order= first_order; + tmp_order != order; + tmp_order= tmp_order->next) + { + if (tmp_order->item[0]->eq(order->item[0],1)) + break; + } + if (tmp_order != order) + continue; // Duplicate order by. Remove + if (change_list) *prev_ptr= order; // use this entry prev_ptr= &order->next; @@ -12961,7 +12979,7 @@ Item *eliminate_item_equal(COND *cond, COND_EQUAL *upper_levels, item= NULL; /* Don't produce equality */ } - bool produce_equality= test(item == field_item); + bool produce_equality= MY_TEST(item == field_item); if (!item_const && field_sjm && field_sjm != current_sjm) { /* Entering an SJM nest */ @@ -13579,7 +13597,7 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top, NESTED_JOIN *nested_join; TABLE_LIST *prev_table= 0; List_iterator<TABLE_LIST> li(*join_list); - bool straight_join= test(join->select_options & SELECT_STRAIGHT_JOIN); + bool straight_join= MY_TEST(join->select_options & SELECT_STRAIGHT_JOIN); DBUG_ENTER("simplify_joins"); /* @@ -14202,7 +14220,7 @@ optimize_cond(JOIN *join, COND *conds, DBUG_EXECUTE("where", print_where(conds, "original", QT_ORDINARY);); conds= build_equal_items(join, conds, NULL, join_list, ignore_on_conds, cond_equal, - test(flags & OPT_LINK_EQUAL_FIELDS)); + MY_TEST(flags & OPT_LINK_EQUAL_FIELDS)); DBUG_EXECUTE("where",print_where(conds,"after equal_items", QT_ORDINARY);); /* change field = field to field = const for each found field = const */ @@ -15333,18 +15351,18 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, void setup_tmp_table_column_bitmaps(TABLE *table, uchar *bitmaps) { uint field_count= table->s->fields; - bitmap_init(&table->def_read_set, (my_bitmap_map*) bitmaps, field_count, + my_bitmap_init(&table->def_read_set, (my_bitmap_map*) bitmaps, field_count, FALSE); - bitmap_init(&table->def_vcol_set, + my_bitmap_init(&table->def_vcol_set, (my_bitmap_map*) (bitmaps+ bitmap_buffer_size(field_count)), field_count, FALSE); - bitmap_init(&table->tmp_set, + my_bitmap_init(&table->tmp_set, (my_bitmap_map*) (bitmaps+ 2*bitmap_buffer_size(field_count)), field_count, FALSE); - bitmap_init(&table->eq_join_set, + my_bitmap_init(&table->eq_join_set, (my_bitmap_map*) (bitmaps+ 3*bitmap_buffer_size(field_count)), field_count, FALSE); - bitmap_init(&table->cond_set, + my_bitmap_init(&table->cond_set, (my_bitmap_map*) (bitmaps+ 4*bitmap_buffer_size(field_count)), field_count, FALSE); /* write_set and all_set are copies of read_set */ @@ -15421,9 +15439,10 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields, save_sum_fields|= param->precomputed_group_by; DBUG_ENTER("create_tmp_table"); DBUG_PRINT("enter", - ("distinct: %d save_sum_fields: %d rows_limit: %lu group: %d", + ("table_alias: '%s' distinct: %d save_sum_fields: %d " + "rows_limit: %lu group: %d", table_alias, (int) distinct, (int) save_sum_fields, - (ulong) rows_limit,test(group))); + (ulong) rows_limit, MY_TEST(group))); thd->inc_status_created_tmp_tables(); thd->query_plan_flags|= QPLAN_TMP_TABLE; @@ -15869,23 +15888,8 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields, if (!(field->flags & NOT_NULL_FLAG)) { - if (field->flags & GROUP_FLAG && !using_unique_constraint) - { - /* - We have to reserve one byte here for NULL bits, - as this is updated by 'end_update()' - */ - *pos++=0; // Null is stored here - recinfo->length=1; - recinfo->type=FIELD_NORMAL; - recinfo++; - bzero((uchar*) recinfo,sizeof(*recinfo)); - } - else - { - recinfo->null_bit= (uint8)1 << (null_count & 7); - recinfo->null_pos= null_count/8; - } + recinfo->null_bit= (uint8)1 << (null_count & 7); + recinfo->null_pos= null_count/8; field->move_field(pos,null_flags+null_count/8, (uint8)1 << (null_count & 7)); null_count++; @@ -15984,7 +15988,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields, table->group=group; /* Table is grouped by key */ param->group_buff=group_buff; share->keys=1; - share->uniques= test(using_unique_constraint); + share->uniques= MY_TEST(using_unique_constraint); table->key_info= table->s->key_info= keyinfo; table->keys_in_use_for_query.set_bit(0); share->keys_in_use.set_bit(0); @@ -16038,7 +16042,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields, if (!(cur_group->field= field->new_key_field(thd->mem_root,table, group_buff + - test(maybe_null), + MY_TEST(maybe_null), field->null_ptr, field->null_bit))) goto err; /* purecov: inspected */ @@ -16094,7 +16098,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields, null_pack_length-=hidden_null_pack_length; keyinfo->user_defined_key_parts= ((field_count-param->hidden_field_count)+ - (share->uniques ? test(null_pack_length) : 0)); + (share->uniques ? MY_TEST(null_pack_length) : 0)); keyinfo->ext_key_parts= keyinfo->user_defined_key_parts; table->distinct= 1; share->keys= 1; @@ -16856,7 +16860,8 @@ free_tmp_table(THD *thd, TABLE *entry) MEM_ROOT own_root= entry->mem_root; const char *save_proc_info; DBUG_ENTER("free_tmp_table"); - DBUG_PRINT("enter",("table: %s",entry->alias.c_ptr())); + DBUG_PRINT("enter",("table: %s alias: %s",entry->s->table_name.str, + entry->alias.c_ptr())); save_proc_info=thd->proc_info; THD_STAGE_INFO(thd, stage_removing_tmp_table); @@ -17505,7 +17510,7 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, if (select_cond) { - select_cond_result= test(select_cond->val_int()); + select_cond_result= MY_TEST(select_cond->val_int()); /* check for errors evaluating the condition */ if (join->thd->is_error()) @@ -17890,7 +17895,7 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos) (*tab->on_expr_ref)->update_used_tables(); DBUG_ASSERT((*tab->on_expr_ref)->const_item()); #endif - if ((table->null_row= test((*tab->on_expr_ref)->val_int() == 0))) + if ((table->null_row= MY_TEST((*tab->on_expr_ref)->val_int() == 0))) mark_as_null_row(table); } if (!table->null_row) @@ -18535,8 +18540,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), records are read. Because of optimization in some cases it can provide only select_limit_cnt+1 records. */ - if (join->order && - join->sortorder && + if (join->order && join->filesort_found_rows && join->select_options & OPTION_FOUND_ROWS) { DBUG_PRINT("info", ("filesort NESTED_LOOP_QUERY_LIMIT")); @@ -18796,7 +18800,16 @@ end_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), for (group=table->group ; group ; group=group->next) { Item *item= *group->item; - item->save_org_in_field(group->field); + if (group->fast_field_copier_setup != group->field) + { + DBUG_PRINT("info", ("new setup 0x%lx -> 0x%lx", + (ulong)group->fast_field_copier_setup, + (ulong)group->field)); + group->fast_field_copier_setup= group->field; + group->fast_field_copier_func= + item->setup_fast_field_copier(group->field); + } + item->save_org_in_field(group->field, group->fast_field_copier_func); /* Store in the used key if the field was 0 */ if (item->maybe_null) group->buff[-1]= (char) group->field->is_null(); @@ -18817,19 +18830,6 @@ end_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), goto end; } - /* - Copy null bits from group key to table - We can't copy all data as the key may have different format - as the row data (for example as with VARCHAR keys) - */ - KEY_PART_INFO *key_part; - for (group=table->group,key_part=table->key_info[0].key_part; - group ; - group=group->next,key_part++) - { - if (key_part->null_bit) - memcpy(table->record[0]+key_part->offset, group->buff, 1); - } init_tmptable_sum_functions(join->sum_funcs); if (copy_funcs(join->tmp_table_param.items_to_copy, join->thd)) DBUG_RETURN(NESTED_LOOP_ERROR); /* purecov: inspected */ @@ -19476,14 +19476,14 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, for (; const_key_parts & 1 ; const_key_parts>>= 1) key_part++; - if (key_part == key_part_end) + if (key_part >= key_part_end) { /* We are at the end of the key. Check if the engine has the primary key as a suffix to the secondary keys. If it has continue to check the primary key as a suffix. */ - if (!on_pk_suffix && + if (!on_pk_suffix && (table->key_info[idx].ext_key_part_map & 1) && (table->file->ha_table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) && table->s->primary_key != MAX_KEY && table->s->primary_key != idx) @@ -19507,11 +19507,12 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, (((key_part_map) 1) << pk_part_idx))) break; } + /* Adjust const_key_parts */ const_key_parts&= (((key_part_map) 1) << pk_part_idx) -1; - for (; const_key_parts & 1 ; const_key_parts>>= 1) - key_part++; + for (; const_key_parts & 1 ; const_key_parts>>= 1) + key_part++; /* Test if the primary key parts were all const (i.e. there's one row). The sorting doesn't matter. @@ -19520,7 +19521,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, reverse == 0) { key_parts= 0; - reverse= 1; + reverse= 1; // Key is ok to use goto ok; } } @@ -20105,7 +20106,7 @@ check_reverse_order: table->disable_keyread(); } } - else if (tab->type != JT_ALL) + else if (tab->type != JT_ALL || tab->select->quick) { /* We're about to use a quick access to the table. @@ -20394,7 +20395,11 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order, select, filesort_limit, 0, &examined_rows, &found_rows); table->sort.found_records= filesort_retval; - tab->records= found_rows; // For SQL_CALC_ROWS + if (found_rows != HA_POS_ERROR) + { + tab->records= found_rows; // For SQL_CALC_ROWS + join->filesort_found_rows= true; + } if (quick_created) { @@ -21007,7 +21012,7 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables, if (!order_item->fixed && (order_item->fix_fields(thd, order->item) || (order_item= *order->item)->check_cols(1) || - thd->is_fatal_error)) + thd->is_error())) return TRUE; /* Wrong field. */ uint el= all_fields.elements; @@ -21353,7 +21358,7 @@ test_if_subpart(ORDER *a,ORDER *b) else return 0; } - return test(!b); + return MY_TEST(!b); } /** @@ -23307,7 +23312,7 @@ int JOIN::save_explain_data_intern(Explain_query *output, bool need_tmp_table, double examined_rows= tab->get_examined_rows(); eta->rows_set= true; - eta->rows= examined_rows; + eta->rows= (ha_rows) examined_rows; /* "filtered" */ float f= 0.0; diff --git a/sql/sql_select.h b/sql/sql_select.h index c413d0ca023..ea60e815c07 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -524,7 +524,7 @@ typedef struct st_join_table { ha_rows get_examined_rows(); bool preread_init(); - bool is_sjm_nest() { return test(bush_children); } + bool is_sjm_nest() { return MY_TEST(bush_children); } bool access_from_tables_is_allowed(table_map used_tables, table_map sjm_lookup_tables) @@ -1119,6 +1119,12 @@ public: restore_no_rows_in_result() in ::reinit() */ bool no_rows_in_result_called; + + /** + This is set if SQL_CALC_ROWS was calculated by filesort() + and should be taken from the appropriate JOIN_TAB + */ + bool filesort_found_rows; /** Copy of this JOIN to be used with temporary tables. @@ -1141,7 +1147,8 @@ public: */ JOIN *tmp_join; ROLLUP rollup; ///< Used with rollup - + + bool mixed_implicit_grouping; bool select_distinct; ///< Set if SELECT DISTINCT /** If we have the GROUP BY statement in the query, @@ -1293,7 +1300,7 @@ public: lock= thd_arg->lock; select_lex= 0; //for safety tmp_join= 0; - select_distinct= test(select_options & SELECT_DISTINCT); + select_distinct= MY_TEST(select_options & SELECT_DISTINCT); no_order= 0; simple_order= 0; simple_group= 0; @@ -1334,6 +1341,7 @@ public: emb_sjm_nest= NULL; sjm_lookup_tables= 0; + filesort_found_rows= false; exec_saved_explain= false; /* The following is needed because JOIN::cleanup(true) may be called for @@ -1436,7 +1444,7 @@ public: void set_allowed_join_cache_types(); bool is_allowed_hash_join_access() { - return test(allowed_join_cache_types & JOIN_CACHE_HASHED_BIT) && + return MY_TEST(allowed_join_cache_types & JOIN_CACHE_HASHED_BIT) && max_allowed_join_cache_level > JOIN_CACHE_HASHED_BIT; } /* @@ -1455,7 +1463,7 @@ public: return ((const_tables != table_count && ((select_distinct || !simple_order || !simple_group) || (group_list && order) || - test(select_options & OPTION_BUFFER_RESULT))) || + MY_TEST(select_options & OPTION_BUFFER_RESULT))) || (rollup.state != ROLLUP::STATE_NONE && select_distinct)); } bool choose_subquery_plan(table_map join_tables); diff --git a/sql/sql_show.cc b/sql/sql_show.cc index eb986f16d73..475b7124a3a 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -889,7 +889,7 @@ public: m_view_access_denied_message_ptr(NULL) { - m_sctx = test(m_top_view->security_ctx) ? + m_sctx= MY_TEST(m_top_view->security_ctx) ? m_top_view->security_ctx : thd->security_ctx; } @@ -1045,7 +1045,7 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list) if ((table_list->view ? view_store_create_info(thd, table_list, &buffer) : store_create_info(thd, table_list, &buffer, NULL, - FALSE /* show_database */))) + FALSE /* show_database */, FALSE))) goto exit; if (table_list->view) @@ -1530,6 +1530,8 @@ static void append_create_options(THD *thd, String *packet, to tailor the format of the statement. Can be NULL, in which case only SQL_MODE is considered when building the statement. + show_database Add database name to table name + create_or_replace Use CREATE OR REPLACE syntax NOTE Currently always return 0, but might return error code in the @@ -1540,7 +1542,8 @@ static void append_create_options(THD *thd, String *packet, */ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, - HA_CREATE_INFO *create_info_arg, bool show_database) + HA_CREATE_INFO *create_info_arg, bool show_database, + bool create_or_replace) { List<Item> field_list; char tmp[MAX_FIELD_WIDTH], *for_str, buff[128], def_value_buf[MAX_FIELD_WIDTH]; @@ -1573,10 +1576,12 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, restore_record(table, s->default_values); // Get empty record + packet->append(STRING_WITH_LEN("CREATE ")); + if (create_or_replace) + packet->append(STRING_WITH_LEN("OR REPLACE ")); if (share->tmp_table) - packet->append(STRING_WITH_LEN("CREATE TEMPORARY TABLE ")); - else - packet->append(STRING_WITH_LEN("CREATE TABLE ")); + packet->append(STRING_WITH_LEN("TEMPORARY ")); + packet->append(STRING_WITH_LEN("TABLE ")); if (create_info_arg && (create_info_arg->options & HA_LEX_CREATE_IF_NOT_EXISTS)) packet->append(STRING_WITH_LEN("IF NOT EXISTS ")); @@ -2010,7 +2015,7 @@ static void store_key_options(THD *thd, String *packet, TABLE *table, end= longlong10_to_str(key_info->block_size, buff, 10); packet->append(buff, (uint) (end - buff)); } - DBUG_ASSERT(test(key_info->flags & HA_USES_COMMENT) == + DBUG_ASSERT(MY_TEST(key_info->flags & HA_USES_COMMENT) == (key_info->comment.length > 0)); if (key_info->flags & HA_USES_COMMENT) { @@ -2224,7 +2229,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) field->maybe_null=1; field_list.push_back(field=new Item_empty_string("Info",max_query_length)); field->maybe_null=1; - if (!thd->variables.old_mode) + if (!thd->variables.old_mode && + !(thd->variables.old_behavior & OLD_MODE_NO_PROGRESS_INFO)) { field_list.push_back(field= new Item_float("Progress", 0.0, 3, 7)); field->maybe_null= 0; @@ -2296,6 +2302,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) (double) tmp->progress.max_counter) / (double) max_stage)) * 100.0); + set_if_smaller(thd_info->progress, 100); } else thd_info->progress= 0.0; @@ -2330,7 +2337,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) protocol->store(thd_info->state_info, system_charset_info); protocol->store(thd_info->query_string.str(), thd_info->query_string.charset()); - if (!thd->variables.old_mode) + if (!thd->variables.old_mode && + !(thd->variables.old_behavior & OLD_MODE_NO_PROGRESS_INFO)) protocol->store(thd_info->progress, 3, &store_buffer); if (protocol->write()) break; /* purecov: inspected */ @@ -2394,7 +2402,7 @@ int select_result_explain_buffer::send_data(List<Item> &items) fill_record(thd, dst_table, dst_table->field, items, TRUE, FALSE); res= dst_table->file->ha_write_tmp_row(dst_table->record[0]); set_current_thd(cur_thd); - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } bool select_result_text_buffer::send_result_set_metadata(List<Item> &fields, uint flag) @@ -4831,6 +4839,11 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) if (fill_schema_table_names(thd, tables, db_name, table_name)) continue; } + else if (schema_table_idx == SCH_TRIGGERS && + db_name == &INFORMATION_SCHEMA_NAME) + { + continue; + } else { if (!(table_open_method & ~OPEN_FRM_ONLY) && @@ -5429,7 +5442,7 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables, #ifndef NO_EMBEDDED_ACCESS_CHECKS uint col_access; check_access(thd,SELECT_ACL, db_name->str, - &tables->grant.privilege, 0, 0, test(tables->schema_table)); + &tables->grant.privilege, 0, 0, MY_TEST(tables->schema_table)); col_access= get_column_grant(thd, &tables->grant, db_name->str, table_name->str, field->field_name) & COL_ACLS; @@ -5568,13 +5581,13 @@ static my_bool iter_schema_engines(THD *thd, plugin_ref plugin, table->field[1]->store(option_name, strlen(option_name), scs); table->field[2]->store(plugin_decl(plugin)->descr, strlen(plugin_decl(plugin)->descr), scs); - tmp= &yesno[test(hton->commit)]; + tmp= &yesno[MY_TEST(hton->commit)]; table->field[3]->store(tmp->str, tmp->length, scs); table->field[3]->set_notnull(); - tmp= &yesno[test(hton->prepare)]; + tmp= &yesno[MY_TEST(hton->prepare)]; table->field[4]->store(tmp->str, tmp->length, scs); table->field[4]->set_notnull(); - tmp= &yesno[test(hton->savepoint_set)]; + tmp= &yesno[MY_TEST(hton->savepoint_set)]; table->field[5]->store(tmp->str, tmp->length, scs); table->field[5]->set_notnull(); @@ -6141,7 +6154,7 @@ static int get_schema_stat_record(THD *thd, TABLE_LIST *tables, else table->field[14]->store("", 0, cs); table->field[14]->set_notnull(); - DBUG_ASSERT(test(key_info->flags & HA_USES_COMMENT) == + DBUG_ASSERT(MY_TEST(key_info->flags & HA_USES_COMMENT) == (key_info->comment.length > 0)); if (key_info->flags & HA_USES_COMMENT) table->field[15]->store(key_info->comment.str, @@ -7682,7 +7695,7 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) DBUG_RETURN(0); my_bitmap_map* bitmaps= (my_bitmap_map*) thd->alloc(bitmap_buffer_size(field_count)); - bitmap_init(&table->def_read_set, (my_bitmap_map*) bitmaps, field_count, + my_bitmap_init(&table->def_read_set, (my_bitmap_map*) bitmaps, field_count, FALSE); table->read_set= &table->def_read_set; bitmap_clear_all(table->read_set); @@ -8053,8 +8066,20 @@ static bool do_fill_table(THD *thd, da->push_warning_info(&wi_tmp); - bool res= table_list->schema_table->fill_table( - thd, table_list, join_table->select_cond); + Item *item= join_table->select_cond; + if (join_table->cache_select && + join_table->cache_select->cond) + { + /* + If join buffering is used, we should use the condition that is attached + to the join cache. Cache condition has a part of WHERE that can be + checked when we're populating this table. + join_tab->select_cond is of no interest, because it only has conditions + that depend on both this table and previous tables in the join order. + */ + item= join_table->cache_select->cond; + } + bool res= table_list->schema_table->fill_table(thd, table_list, item); da->pop_warning_info(); diff --git a/sql/sql_show.h b/sql/sql_show.h index 10276e8b65e..0416f2fdaba 100644 --- a/sql/sql_show.h +++ b/sql/sql_show.h @@ -75,7 +75,8 @@ typedef struct system_status_var STATUS_VAR; #define IS_FILES_EXTRA 37 int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, - HA_CREATE_INFO *create_info_arg, bool show_database); + HA_CREATE_INFO *create_info_arg, bool show_database, + bool create_or_replace); int view_store_create_info(THD *thd, TABLE_LIST *table, String *buff); int copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table); diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h index c1c80921861..68aacd69d98 100644 --- a/sql/sql_statistics.h +++ b/sql/sql_statistics.h @@ -354,7 +354,7 @@ public: bool is_null(uint stat_field_no) { - return test(column_stat_nulls & (1 << stat_field_no)); + return MY_TEST(column_stat_nulls & (1 << stat_field_no)); } double get_nulls_ratio() diff --git a/sql/sql_string.cc b/sql/sql_string.cc index ddac315f80f..a2d4349f747 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -1,5 +1,4 @@ -/* - Copyright (c) 2000, 2011, Oracle and/or its affiliates. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_table.cc b/sql/sql_table.cc index ff389a96a8d..ff2e7939fb8 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2031,33 +2031,29 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists, bool error; Drop_table_error_handler err_handler; TABLE_LIST *table; - DBUG_ENTER("mysql_rm_table"); /* Disable drop of enabled log tables, must be done before name locking */ for (table= tables; table; table= table->next_local) { - if (check_if_log_table(table->db_length, table->db, - table->table_name_length, table->table_name, true)) - { - my_error(ER_BAD_LOG_STATEMENT, MYF(0), "DROP"); + if (check_if_log_table(table, TRUE, "DROP")) DBUG_RETURN(true); - } } - if (!in_bootstrap) + if (!drop_temporary) { - for (table= tables; table; table= table->next_local) + if (!in_bootstrap) { - LEX_STRING db_name= { table->db, table->db_length }; - LEX_STRING table_name= { table->table_name, table->table_name_length }; - if (table->open_type == OT_BASE_ONLY || !find_temporary_table(thd, table)) - (void) delete_statistics_for_table(thd, &db_name, &table_name); + for (table= tables; table; table= table->next_local) + { + LEX_STRING db_name= { table->db, table->db_length }; + LEX_STRING table_name= { table->table_name, table->table_name_length }; + if (table->open_type == OT_BASE_ONLY || + !find_temporary_table(thd, table)) + (void) delete_statistics_for_table(thd, &db_name, &table_name); + } } - } - if (!drop_temporary) - { if (!thd->locked_tables_mode) { if (lock_table_names(thd, tables, NULL, @@ -2107,7 +2103,7 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists, /* mark for close and remove all cached entries */ thd->push_internal_handler(&err_handler); error= mysql_rm_table_no_locks(thd, tables, if_exists, drop_temporary, - false, false); + false, false, false); thd->pop_internal_handler(); if (error) @@ -2172,6 +2168,8 @@ static uint32 comment_length(THD *thd, uint32 comment_pos, @param drop_view Allow to delete VIEW .frm @param dont_log_query Don't write query to log files. This will also not generate warnings if the handler files doesn't exists + @param dont_free_locks Don't do automatic UNLOCK TABLE if no more locked + tables @retval 0 ok @retval 1 Error @@ -2194,7 +2192,8 @@ static uint32 comment_length(THD *thd, uint32 comment_pos, int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, bool drop_temporary, bool drop_view, - bool dont_log_query) + bool dont_log_query, + bool dont_free_locks) { TABLE_LIST *table; char path[FN_REFLEN + 1], wrong_tables_buff[160], *alias= NULL; @@ -2208,6 +2207,8 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, bool trans_tmp_table_deleted= 0, non_trans_tmp_table_deleted= 0; bool non_tmp_table_deleted= 0; bool is_drop_tmp_if_exists_added= 0; + bool one_table= tables->next_local == 0; + bool was_view= 0; String built_query; String built_trans_tmp_query, built_non_trans_tmp_query; DBUG_ENTER("mysql_rm_table_no_locks"); @@ -2286,7 +2287,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, for (table= tables; table; table= table->next_local) { - bool is_trans; + bool is_trans= 0; char *db=table->db; size_t db_length= table->db_length; handlerton *table_type= 0; @@ -2311,12 +2312,16 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, . 1 - a temporary table was not found. . -1 - a temporary table is used by an outer statement. */ - if (table->open_type == OT_BASE_ONLY) + if (table->open_type == OT_BASE_ONLY || !is_temporary_table(table)) error= 1; - else if ((error= drop_temporary_table(thd, table, &is_trans)) == -1) + else { - DBUG_ASSERT(thd->in_sub_stmt); - goto err; + if ((error= drop_temporary_table(thd, table->table, &is_trans)) == -1) + { + DBUG_ASSERT(thd->in_sub_stmt); + goto err; + } + table->table= 0; } if ((drop_temporary && if_exists) || !error) @@ -2384,7 +2389,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, This handles the case where a "DROP" was executed and a regular table "may be" dropped as drop_temporary is FALSE and error is TRUE. If the error was FALSE a temporary table was dropped and - regardless of the status of drop_tempoary a "DROP TEMPORARY" + regardless of the status of drop_temporary a "DROP TEMPORARY" must be used. */ if (!dont_log_query) @@ -2412,15 +2417,15 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, } DEBUG_SYNC(thd, "rm_table_no_locks_before_delete_table"); error= 0; - if ((drop_temporary || !ha_table_exists(thd, db, alias, &table_type) || - (!drop_view && table_type == view_pseudo_hton))) + if (drop_temporary || + (ha_table_exists(thd, db, alias, &table_type) == 0 && table_type == 0) || + (!drop_view && (was_view= (table_type == view_pseudo_hton)))) { /* One of the following cases happened: . "DROP TEMPORARY" but a temporary table was not found. - . "DROP" but table was not found on disk and table can't be - created from engine. - . ./sql/datadict.cc +32 /Alfranio - TODO: We need to test this. + . "DROP" but table was not found + . "DROP TABLE" statement, but it's a view. */ if (if_exists) { @@ -2544,7 +2549,10 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, err: if (wrong_tables.length()) { - if (!foreign_key_error) + if (one_table && was_view) + my_printf_error(ER_IT_IS_A_VIEW, ER(ER_IT_IS_A_VIEW), MYF(0), + wrong_tables.c_ptr_safe()); + else if (!foreign_key_error) my_printf_error(ER_BAD_TABLE_ERROR, ER(ER_BAD_TABLE_ERROR), MYF(0), wrong_tables.c_ptr_safe()); else @@ -2610,7 +2618,8 @@ err: */ if (thd->locked_tables_mode) { - if (thd->lock && thd->lock->table_count == 0 && non_temp_tables_count > 0) + if (thd->lock && thd->lock->table_count == 0 && + non_temp_tables_count > 0 && !dont_free_locks) { thd->locked_tables_list.unlock_locked_tables(thd); goto end; @@ -3793,7 +3802,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, with length (unlike blobs, where ft code takes data length from a data prefix, ignoring column->length). */ - column->length=test(f_is_blob(sql_field->pack_flag)); + column->length= MY_TEST(f_is_blob(sql_field->pack_flag)); } else { @@ -4517,12 +4526,13 @@ err: way to ensure that concurrent operations won't intervene. mysql_create_table() is a wrapper that can be used for this. - @retval false OK - @retval true error + @retval 0 OK + @retval 1 error + @retval -1 table existed but IF EXISTS was used */ static -bool create_table_impl(THD *thd, +int create_table_impl(THD *thd, const char *db, const char *table_name, const char *path, HA_CREATE_INFO *create_info, @@ -4535,7 +4545,7 @@ bool create_table_impl(THD *thd, { const char *alias; handler *file= 0; - bool error= TRUE; + int error= 1; bool frm_only= create_table_mode == C_ALTER_TABLE_FRM_ONLY; bool internal_tmp_table= create_table_mode == C_ALTER_TABLE || frm_only; DBUG_ENTER("mysql_create_table_no_lock"); @@ -4565,22 +4575,74 @@ bool create_table_impl(THD *thd, /* Check if table exists */ if (create_info->tmp_table()) { - if (find_temporary_table(thd, db, table_name)) + TABLE *tmp_table; + if ((tmp_table= find_temporary_table(thd, db, table_name))) { - if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) + if (create_info->options & HA_LEX_CREATE_REPLACE) + { + bool is_trans; + /* + We are using CREATE OR REPLACE on an existing temporary table + Remove the old table so that we can re-create it. + */ + if (drop_temporary_table(thd, tmp_table, &is_trans)) + goto err; + } + else if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) goto warn; - my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias); - goto err; + else + { + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias); + goto err; + } } } - else + else { if (!internal_tmp_table && ha_table_exists(thd, db, table_name)) { - if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) + if (create_info->options & HA_LEX_CREATE_REPLACE) + { + TABLE_LIST table_list; + table_list.init_one_table(db, strlen(db), table_name, + strlen(table_name), table_name, + TL_WRITE_ALLOW_WRITE); + table_list.table= create_info->table; + + if (check_if_log_table(&table_list, TRUE, "CREATE OR REPLACE")) + goto err; + + /* + Rollback the empty transaction started in mysql_create_table() + call to open_and_lock_tables() when we are using LOCK TABLES. + */ + (void) trans_rollback_stmt(thd); + /* Remove normal table without logging. Keep tables locked */ + if (mysql_rm_table_no_locks(thd, &table_list, 0, 0, 0, 1, 1)) + goto err; + + /* + We have to log this query, even if it failed later to ensure the + drop is done. + */ + thd->variables.option_bits|= OPTION_KEEP_LOG; + thd->log_current_statement= 1; + + /* + The test of query_tables is to ensure we have any tables in the + select part + */ + if (thd->lex->query_tables && + restart_trans_for_tables(thd, thd->lex->query_tables->next_global)) + goto err; + } + else if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) goto warn; - my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name); - goto err; + else + { + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name); + goto err; + } } } @@ -4702,14 +4764,14 @@ bool create_table_impl(THD *thd, } #endif - error= FALSE; + error= 0; err: THD_STAGE_INFO(thd, stage_after_create); delete file; DBUG_RETURN(error); warn: - error= FALSE; + error= -1; push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR), alias); @@ -4720,7 +4782,8 @@ warn: Simple wrapper around create_table_impl() to be used in various version of CREATE TABLE statement. */ -bool mysql_create_table_no_lock(THD *thd, + +int mysql_create_table_no_lock(THD *thd, const char *db, const char *table_name, HA_CREATE_INFO *create_info, Alter_info *alter_info, bool *is_trans, @@ -4728,6 +4791,7 @@ bool mysql_create_table_no_lock(THD *thd, { KEY *not_used_1; uint not_used_2; + int res; char path[FN_REFLEN + 1]; LEX_CUSTRING frm= {0,0}; @@ -4747,9 +4811,9 @@ bool mysql_create_table_no_lock(THD *thd, } } - bool res= create_table_impl(thd, db, table_name, path, create_info, - alter_info, create_table_mode, is_trans, - ¬_used_1, ¬_used_2, &frm); + res= create_table_impl(thd, db, table_name, path, create_info, + alter_info, create_table_mode, is_trans, + ¬_used_1, ¬_used_2, &frm); my_free(const_cast<uchar*>(frm.str)); return res; } @@ -4771,16 +4835,23 @@ bool mysql_create_table(THD *thd, TABLE_LIST *create_table, const char *db= create_table->db; const char *table_name= create_table->table_name; bool is_trans= FALSE; + bool result= 0; int create_table_mode; + TABLE_LIST *pos_in_locked_tables= 0; DBUG_ENTER("mysql_create_table"); + DBUG_ASSERT(create_table == thd->lex->query_tables); + /* Open or obtain an exclusive metadata lock on table being created */ if (open_and_lock_tables(thd, thd->lex->query_tables, FALSE, 0)) { /* is_error() may be 0 if table existed and we generated a warning */ DBUG_RETURN(thd->is_error()); } - + /* The following is needed only in case of lock tables */ + if ((create_info->table= thd->lex->query_tables->table)) + pos_in_locked_tables= create_info->table->pos_in_locked_tables; + /* Got lock. */ DEBUG_SYNC(thd, "locked_table_name"); @@ -4791,15 +4862,42 @@ bool mysql_create_table(THD *thd, TABLE_LIST *create_table, promote_first_timestamp_column(&alter_info->create_list); if (mysql_create_table_no_lock(thd, db, table_name, create_info, alter_info, - &is_trans, create_table_mode)) - DBUG_RETURN(1); + &is_trans, create_table_mode) > 0) + { + result= 1; + goto err; + } + + /* + Check if we are doing CREATE OR REPLACE TABLE under LOCK TABLES + on a non temporary table + */ + if (thd->locked_tables_mode && pos_in_locked_tables && + (create_info->options & HA_LEX_CREATE_REPLACE)) + { + /* + Add back the deleted table and re-created table as a locked table + This should always work as we have a meta lock on the table. + */ + thd->locked_tables_list.add_back_last_deleted_lock(pos_in_locked_tables); + if (thd->locked_tables_list.reopen_tables(thd)) + thd->locked_tables_list.unlink_all_closed_tables(thd, NULL, 0); + else + { + TABLE *table= pos_in_locked_tables->table; + table->mdl_ticket->downgrade_lock(MDL_SHARED_NO_READ_WRITE); + } + } +err: /* In RBR we don't need to log CREATE TEMPORARY TABLE */ if (thd->is_current_stmt_binlog_format_row() && create_info->tmp_table()) - DBUG_RETURN(0); - - bool result; - result= write_bin_log(thd, TRUE, thd->query(), thd->query_length(), is_trans); + DBUG_RETURN(result); + /* Write log if no error or if we already deleted a table */ + if (!result || thd->log_current_statement) + if (write_bin_log(thd, result ? FALSE : TRUE, thd->query(), + thd->query_length(), is_trans)) + result= 1; DBUG_RETURN(result); } @@ -4986,15 +5084,19 @@ mysql_rename_table(handlerton *base, const char *old_db, TRUE error */ -bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, +bool mysql_create_like_table(THD* thd, TABLE_LIST* table, + TABLE_LIST* src_table, HA_CREATE_INFO *create_info) { HA_CREATE_INFO local_create_info; + TABLE_LIST *pos_in_locked_tables= 0; Alter_info local_alter_info; Alter_table_ctx local_alter_ctx; // Not used bool res= TRUE; bool is_trans= FALSE; + bool do_logging= FALSE; uint not_used; + int create_res; DBUG_ENTER("mysql_create_like_table"); #ifdef WITH_WSREP @@ -5038,7 +5140,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, String query(buf, sizeof(buf), system_charset_info); query.length(0); // Have to zero it since constructor doesn't - (void) store_create_info(thd, &tbl, &query, NULL, TRUE); + (void) store_create_info(thd, &tbl, &query, NULL, TRUE, FALSE); WSREP_DEBUG("TMP TABLE: %s", query.ptr()); thd->wsrep_TOI_pre_query= query.ptr(); @@ -5068,6 +5170,18 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, res= thd->is_error(); goto err; } + /* Ensure we don't try to create something from which we select from */ + if ((create_info->options & HA_LEX_CREATE_REPLACE) && + !create_info->tmp_table()) + { + TABLE_LIST *duplicate; + if ((duplicate= unique_table(thd, table, src_table, 0))) + { + update_non_unique_table_error(src_table, "CREATE", duplicate); + goto err; + } + } + src_table->table->use_all_columns(); DEBUG_SYNC(thd, "create_table_like_after_open"); @@ -5095,7 +5209,9 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, if (src_table->schema_table) local_create_info.max_rows= 0; /* Set IF NOT EXISTS option as in the CREATE TABLE LIKE statement. */ - local_create_info.options|= create_info->options&HA_LEX_CREATE_IF_NOT_EXISTS; + local_create_info.options|= (create_info->options & + (HA_LEX_CREATE_IF_NOT_EXISTS | + HA_LEX_CREATE_REPLACE)); /* Replace type of source table with one specified in the statement. */ local_create_info.options&= ~HA_LEX_CREATE_TMP_TABLE; local_create_info.options|= create_info->tmp_table(); @@ -5107,19 +5223,54 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, */ local_create_info.data_file_name= local_create_info.index_file_name= NULL; - if ((res= mysql_create_table_no_lock(thd, table->db, table->table_name, - &local_create_info, &local_alter_info, - &is_trans, C_ORDINARY_CREATE))) + /* The following is needed only in case of lock tables */ + if ((local_create_info.table= thd->lex->query_tables->table)) + pos_in_locked_tables= local_create_info.table->pos_in_locked_tables; + + res= ((create_res= + mysql_create_table_no_lock(thd, table->db, table->table_name, + &local_create_info, &local_alter_info, + &is_trans, C_ORDINARY_CREATE)) > 0); + /* Remember to log if we deleted something */ + do_logging= thd->log_current_statement; + if (res) goto err; /* - Ensure that we have an exclusive lock on target table if we are creating - non-temporary table. + Check if we are doing CREATE OR REPLACE TABLE under LOCK TABLES + on a non temporary table */ - DBUG_ASSERT((create_info->tmp_table()) || - thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db, - table->table_name, - MDL_EXCLUSIVE)); + if (thd->locked_tables_mode && pos_in_locked_tables && + (create_info->options & HA_LEX_CREATE_REPLACE)) + { + /* + Add back the deleted table and re-created table as a locked table + This should always work as we have a meta lock on the table. + */ + thd->locked_tables_list.add_back_last_deleted_lock(pos_in_locked_tables); + if (thd->locked_tables_list.reopen_tables(thd)) + thd->locked_tables_list.unlink_all_closed_tables(thd, NULL, 0); + else + { + /* + Get pointer to the newly opened table. We need this to ensure we + don't reopen the table when doing statment logging below. + */ + table->table= pos_in_locked_tables->table; + table->table->mdl_ticket->downgrade_lock(MDL_SHARED_NO_READ_WRITE); + } + } + else + { + /* + Ensure that we have an exclusive lock on target table if we are creating + non-temporary table. + */ + DBUG_ASSERT((create_info->tmp_table()) || + thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db, + table->table_name, + MDL_EXCLUSIVE)); + } DEBUG_SYNC(thd, "create_table_like_before_binlog"); @@ -5138,7 +5289,8 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, Case Target Source Write to binary log ==== ========= ========= ============================== 1 normal normal Original statement - 2 normal temporary Generated statement + 2 normal temporary Generated statement if the table + was created. 3 temporary normal Nothing 4 temporary temporary Nothing ==== ========= ========= ============================== @@ -5153,36 +5305,59 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, Open_table_context ot_ctx(thd, MYSQL_OPEN_REOPEN); bool new_table= FALSE; // Whether newly created table is open. + if (create_res != 0) + { + /* + Table or view with same name already existed and we where using + IF EXISTS. Continue without logging anything. + */ + goto err; + } + if (!table->table) + { + TABLE_LIST::enum_open_strategy save_open_strategy; + int open_res; + /* Force the newly created table to be opened */ + save_open_strategy= table->open_strategy; + table->open_strategy= TABLE_LIST::OPEN_NORMAL; + + /* + In order for store_create_info() to work we need to open + destination table if it is not already open (i.e. if it + has not existed before). We don't need acquire metadata + lock in order to do this as we already hold exclusive + lock on this table. The table will be closed by + close_thread_table() at the end of this branch. + */ + open_res= open_table(thd, table, thd->mem_root, &ot_ctx); + /* Restore */ + table->open_strategy= save_open_strategy; + if (open_res) + { + res= 1; + goto err; + } + new_table= TRUE; + } /* - The condition avoids a crash as described in BUG#48506. Other - binlogging problems related to CREATE TABLE IF NOT EXISTS LIKE - when the existing object is a view will be solved by BUG 47442. + We have to re-test if the table was a view as the view may not + have been opened until just above. */ if (!table->view) { - if (!table->table) - { - - /* - In order for store_create_info() to work we need to open - destination table if it is not already open (i.e. if it - has not existed before). We don't need acquire metadata - lock in order to do this as we already hold exclusive - lock on this table. The table will be closed by - close_thread_table() at the end of this branch. - */ - if (open_table(thd, table, thd->mem_root, &ot_ctx)) - goto err; - new_table= TRUE; - } - int result __attribute__((unused))= store_create_info(thd, table, &query, - create_info, FALSE /* show_database */); + create_info, FALSE /* show_database */, + MY_TEST(create_info->options & + HA_LEX_CREATE_REPLACE)); DBUG_ASSERT(result == 0); // store_create_info() always return 0 + do_logging= FALSE; if (write_bin_log(thd, TRUE, query.ptr(), query.length())) + { + res= 1; goto err; + } if (new_table) { @@ -5197,17 +5372,20 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, } } else // Case 1 - if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) - goto err; + do_logging= TRUE; } /* Case 3 and 4 does nothing under RBR */ } - else if (write_bin_log(thd, TRUE, thd->query(), thd->query_length(), is_trans)) - goto err; + else + do_logging= TRUE; err: + if (do_logging && + write_bin_log(thd, res ? FALSE : TRUE, thd->query(), + thd->query_length(), is_trans)) + res= 1; DBUG_RETURN(res); #ifdef WITH_WSREP @@ -5365,7 +5543,8 @@ handle_if_exists_options(THD *thd, TABLE *table, Alter_info *alter_info) { alter_info->flags&= ~Alter_info::ALTER_ADD_COLUMN; if (alter_info->key_list.is_empty()) - alter_info->flags&= ~Alter_info::ALTER_ADD_INDEX; + alter_info->flags&= ~(Alter_info::ALTER_ADD_INDEX | + Alter_info::ADD_FOREIGN_KEY); } break; } @@ -5440,13 +5619,32 @@ handle_if_exists_options(THD *thd, TABLE *table, Alter_info *alter_info) else /* Alter_drop::KEY */ { uint n_key; - for (n_key=0; n_key < table->s->keys; n_key++) + if (drop->type != Alter_drop::FOREIGN_KEY) { - if (my_strcasecmp(system_charset_info, - drop->name, table->key_info[n_key].name) == 0) + for (n_key=0; n_key < table->s->keys; n_key++) { - remove_drop= FALSE; - break; + if (my_strcasecmp(system_charset_info, + drop->name, table->key_info[n_key].name) == 0) + { + remove_drop= FALSE; + break; + } + } + } + else + { + List <FOREIGN_KEY_INFO> fk_child_key_list; + FOREIGN_KEY_INFO *f_key; + table->file->get_foreign_key_list(thd, &fk_child_key_list); + List_iterator<FOREIGN_KEY_INFO> fk_key_it(fk_child_key_list); + while ((f_key= fk_key_it++)) + { + if (my_strcasecmp(system_charset_info, f_key->foreign_id->str, + drop->name) == 0) + { + remove_drop= FALSE; + break; + } } } } @@ -5458,7 +5656,8 @@ handle_if_exists_options(THD *thd, TABLE *table, Alter_info *alter_info) drop_it.remove(); if (alter_info->drop_list.is_empty()) alter_info->flags&= ~(Alter_info::ALTER_DROP_COLUMN | - Alter_info::ALTER_DROP_INDEX); + Alter_info::ALTER_DROP_INDEX | + Alter_info::DROP_FOREIGN_KEY); } } } @@ -5469,6 +5668,7 @@ handle_if_exists_options(THD *thd, TABLE *table, Alter_info *alter_info) Key *key; List_iterator<Key> key_it(alter_info->key_list); uint n_key; + bool remove_key; const char *keyname; while ((key=key_it++)) { @@ -5485,24 +5685,48 @@ handle_if_exists_options(THD *thd, TABLE *table, Alter_info *alter_info) if (keyname == NULL) continue; } - for (n_key=0; n_key < table->s->keys; n_key++) + remove_key= FALSE; + if (key->type != Key::FOREIGN_KEY) { - if (my_strcasecmp(system_charset_info, - keyname, table->key_info[n_key].name) == 0) + for (n_key=0; n_key < table->s->keys; n_key++) { - push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, - ER_DUP_KEYNAME, ER(ER_DUP_KEYNAME), keyname); - key_it.remove(); - if (key->type == Key::FOREIGN_KEY) + if (my_strcasecmp(system_charset_info, + keyname, table->key_info[n_key].name) == 0) { - /* ADD FOREIGN KEY appends two items. */ - key_it.remove(); + remove_key= TRUE; + break; } - if (alter_info->key_list.is_empty()) - alter_info->flags&= ~Alter_info::ALTER_ADD_INDEX; - break; } } + else + { + List <FOREIGN_KEY_INFO> fk_child_key_list; + FOREIGN_KEY_INFO *f_key; + table->file->get_foreign_key_list(thd, &fk_child_key_list); + List_iterator<FOREIGN_KEY_INFO> fk_key_it(fk_child_key_list); + while ((f_key= fk_key_it++)) + { + if (my_strcasecmp(system_charset_info, f_key->foreign_id->str, + key->name.str) == 0) + remove_key= TRUE; + break; + } + } + if (remove_key) + { + push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, + ER_DUP_KEYNAME, ER(ER_DUP_KEYNAME), keyname); + key_it.remove(); + if (key->type == Key::FOREIGN_KEY) + { + /* ADD FOREIGN KEY appends two items. */ + key_it.remove(); + } + if (alter_info->key_list.is_empty()) + alter_info->flags&= ~(Alter_info::ALTER_ADD_INDEX | + Alter_info::ADD_FOREIGN_KEY); + break; + } } } @@ -5732,9 +5956,6 @@ static bool fill_alter_inplace_info(THD *thd, if (new_field) { - ha_alter_info->create_info->fields_option_struct[f_ptr - table->field]= - new_field->option_struct; - /* Field is not dropped. Evaluate changes bitmap for it. */ /* @@ -5846,6 +6067,15 @@ static bool fill_alter_inplace_info(THD *thd, if (new_field->column_format() != field->column_format()) ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_COLUMN_FORMAT; + + if (engine_options_differ(field->option_struct, new_field->option_struct, + table->file->ht->field_options)) + { + ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_OPTION; + ha_alter_info->create_info->fields_option_struct[f_ptr - table->field]= + new_field->option_struct; + } + } else { @@ -7226,7 +7456,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, key= new Key(key_type, key_name, strlen(key_name), &key_create_info, - test(key_info->flags & HA_GENERATED_KEY), + MY_TEST(key_info->flags & HA_GENERATED_KEY), key_parts, key_info->option_list, FALSE); new_key_list.push_back(key); } @@ -7798,9 +8028,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, it is the case. TODO: this design is obsolete and will be removed. */ - int table_kind= check_if_log_table(table_list->db_length, table_list->db, - table_list->table_name_length, - table_list->table_name, false); + int table_kind= check_if_log_table(table_list, FALSE, NullS); if (table_kind) { @@ -8841,7 +9069,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, DBUG_ENTER("copy_data_between_tables"); /* Two or 3 stages; Sorting, copying data and update indexes */ - thd_progress_init(thd, 2 + test(order)); + thd_progress_init(thd, 2 + MY_TEST(order)); if (mysql_trans_prepare_alter_copy_data(thd)) DBUG_RETURN(-1); @@ -9342,7 +9570,7 @@ static bool check_engine(THD *thd, const char *db_name, handlerton **new_engine= &create_info->db_type; handlerton *req_engine= *new_engine; bool no_substitution= - test(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION); + MY_TEST(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION); if (!(*new_engine= ha_checktype(thd, ha_legacy_type(req_engine), no_substitution, 1))) DBUG_RETURN(true); diff --git a/sql/sql_table.h b/sql/sql_table.h index c42f8aaa39e..7255ce68743 100644 --- a/sql/sql_table.h +++ b/sql/sql_table.h @@ -19,6 +19,7 @@ #include "my_global.h" /* my_bool */ #include "my_sys.h" // pthread_mutex_t +#include "m_string.h" // LEX_CUSTRING class Alter_info; class Alter_table_ctx; @@ -187,11 +188,11 @@ bool mysql_create_table(THD *thd, TABLE_LIST *create_table, #define C_ALTER_TABLE_FRM_ONLY -2 #define C_ASSISTED_DISCOVERY -3 -bool mysql_create_table_no_lock(THD *thd, const char *db, - const char *table_name, - HA_CREATE_INFO *create_info, - Alter_info *alter_info, bool *is_trans, - int create_table_mode); +int mysql_create_table_no_lock(THD *thd, const char *db, + const char *table_name, + HA_CREATE_INFO *create_info, + Alter_info *alter_info, bool *is_trans, + int create_table_mode); handler *mysql_create_frm_image(THD *thd, const char *db, const char *table_name, @@ -238,7 +239,7 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists, my_bool drop_temporary); int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, bool drop_temporary, bool drop_view, - bool log_query); + bool log_query, bool dont_free_locks); bool quick_rm_table(THD *thd, handlerton *base, const char *db, const char *table_name, uint flags); void close_cached_table(THD *thd, TABLE *table); diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 922423bef26..8588d6564ca 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -94,12 +94,13 @@ static void print_cached_tables(void) TABLE_SHARE::All_share_tables_list::Iterator it(share->tdc.all_tables); while ((entry= it++)) { + THD *in_use= entry->in_use; printf("%-14.14s %-32s%6ld%8ld%6d %s\n", - entry->s->db.str, entry->s->table_name.str, entry->s->version, - entry->in_use ? entry->in_use->thread_id : 0, + entry->s->db.str, entry->s->table_name.str, entry->s->tdc.version, + in_use ? in_use->thread_id : 0, entry->db_stat ? 1 : 0, - entry->in_use ? lock_descriptions[(int)entry->reginfo.lock_type] : - "Not in use"); + in_use ? lock_descriptions[(int)entry->reginfo.lock_type] : + "Not in use"); } } mysql_mutex_unlock(&LOCK_open); diff --git a/sql/sql_time.cc b/sql/sql_time.cc index b194d46643e..2c4998fdf5e 100644 --- a/sql/sql_time.cc +++ b/sql/sql_time.cc @@ -106,9 +106,9 @@ uint calc_week(MYSQL_TIME *l_time, uint week_behaviour, uint *year) uint days; ulong daynr=calc_daynr(l_time->year,l_time->month,l_time->day); ulong first_daynr=calc_daynr(l_time->year,1,1); - bool monday_first= test(week_behaviour & WEEK_MONDAY_FIRST); - bool week_year= test(week_behaviour & WEEK_YEAR); - bool first_weekday= test(week_behaviour & WEEK_FIRST_WEEKDAY); + bool monday_first= MY_TEST(week_behaviour & WEEK_MONDAY_FIRST); + bool week_year= MY_TEST(week_behaviour & WEEK_YEAR); + bool first_weekday= MY_TEST(week_behaviour & WEEK_FIRST_WEEKDAY); uint weekday=calc_weekday(first_daynr, !monday_first); *year=l_time->year; @@ -230,6 +230,20 @@ check_date_with_warn(const MYSQL_TIME *ltime, ulonglong fuzzy_date, } +bool +adjust_time_range_with_warn(MYSQL_TIME *ltime, uint dec) +{ + MYSQL_TIME copy= *ltime; + ErrConvTime str(©); + int warnings= 0; + if (check_time_range(ltime, dec, &warnings)) + return true; + if (warnings) + make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, + &str, MYSQL_TIMESTAMP_TIME, NullS); + return false; +} + /* Convert a string to 8-bit representation, for use in str_to_time/str_to_date/str_to_date. @@ -1022,8 +1036,8 @@ null_date: */ bool -calc_time_diff(MYSQL_TIME *l_time1, MYSQL_TIME *l_time2, int l_sign, longlong *seconds_out, - long *microseconds_out) +calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2, + int l_sign, longlong *seconds_out, long *microseconds_out) { long days; bool neg; @@ -1049,7 +1063,7 @@ calc_time_diff(MYSQL_TIME *l_time1, MYSQL_TIME *l_time2, int l_sign, longlong *s (uint) l_time2->day); } - microseconds= ((longlong)days*86400LL + + microseconds= ((longlong)days * SECONDS_IN_24H + (longlong)(l_time1->hour*3600L + l_time1->minute*60L + l_time1->second) - @@ -1119,3 +1133,146 @@ void time_to_daytime_interval(MYSQL_TIME *ltime) ltime->hour%= 24; ltime->time_type= MYSQL_TIMESTAMP_NONE; } + + +/*** Conversion from TIME to DATETIME ***/ + +/* + Simple case: TIME is within normal 24 hours internal. + Mix DATE part of ldate and TIME part of ltime together. +*/ +static void +mix_date_and_time_simple(MYSQL_TIME *ldate, const MYSQL_TIME *ltime) +{ + DBUG_ASSERT(ldate->time_type == MYSQL_TIMESTAMP_DATE || + ldate->time_type == MYSQL_TIMESTAMP_DATETIME); + ldate->hour= ltime->hour; + ldate->minute= ltime->minute; + ldate->second= ltime->second; + ldate->second_part= ltime->second_part; + ldate->time_type= MYSQL_TIMESTAMP_DATETIME; +} + + +/* + Complex case: TIME is negative or outside of the 24 hour interval. +*/ +static void +mix_date_and_time_complex(MYSQL_TIME *ldate, const MYSQL_TIME *ltime) +{ + DBUG_ASSERT(ldate->time_type == MYSQL_TIMESTAMP_DATE || + ldate->time_type == MYSQL_TIMESTAMP_DATETIME); + longlong seconds; + long days, useconds; + int sign= ltime->neg ? 1 : -1; + ldate->neg= calc_time_diff(ldate, ltime, sign, &seconds, &useconds); + + DBUG_ASSERT(!ldate->neg); + DBUG_ASSERT(ldate->year > 0); + + days= (long) (seconds / SECONDS_IN_24H); + calc_time_from_sec(ldate, seconds % SECONDS_IN_24H, useconds); + get_date_from_daynr(days, &ldate->year, &ldate->month, &ldate->day); + ldate->time_type= MYSQL_TIMESTAMP_DATETIME; +} + + +/** + Mix a date value and a time value. + + @param IN/OUT ldate Date value. + @param ltime Time value. +*/ +static void +mix_date_and_time(MYSQL_TIME *to, const MYSQL_TIME *from) +{ + if (!from->neg && from->hour < 24) + mix_date_and_time_simple(to, from); + else + mix_date_and_time_complex(to, from); +} + + +/** + Get current date in DATE format +*/ +static void +set_current_date(THD *thd, MYSQL_TIME *to) +{ + thd->variables.time_zone->gmt_sec_to_TIME(to, thd->query_start()); + thd->time_zone_used= 1; + datetime_to_date(to); +} + + +/** + 5.5 compatible conversion from TIME to DATETIME +*/ +static bool +time_to_datetime_old(THD *thd, const MYSQL_TIME *from, MYSQL_TIME *to) +{ + DBUG_ASSERT(from->time_type == MYSQL_TIMESTAMP_TIME); + + if (from->neg) + return true; + + /* Set the date part */ + uint day= from->hour / 24; + to->day= day % 31; + to->month= day / 31; + to->year= 0; + /* Set the time part */ + to->hour= from->hour % 24; + to->minute= from->minute; + to->second= from->second; + to->second_part= from->second_part; + /* set sign and type */ + to->neg= 0; + to->time_type= MYSQL_TIMESTAMP_DATETIME; + return false; +} + + +/** + Convert time to datetime. + + The time value is added to the current datetime value. + @param IN ltime Time value to convert from. + @param OUT ltime2 Datetime value to convert to. +*/ +bool +time_to_datetime(THD *thd, const MYSQL_TIME *from, MYSQL_TIME *to) +{ + if (thd->variables.old_behavior & OLD_MODE_ZERO_DATE_TIME_CAST) + return time_to_datetime_old(thd, from, to); + set_current_date(thd, to); + mix_date_and_time(to, from); + return false; +} + + +bool +time_to_datetime_with_warn(THD *thd, + const MYSQL_TIME *from, MYSQL_TIME *to, + ulonglong fuzzydate) +{ + int warn= 0; + DBUG_ASSERT(from->time_type == MYSQL_TIMESTAMP_TIME); + /* + After time_to_datetime() we need to do check_date(), as + the caller may want TIME_NO_ZERO_DATE or TIME_NO_ZERO_IN_DATE. + Note, the SQL standard time->datetime conversion mode always returns + a valid date based on CURRENT_DATE. So we need to do check_date() + only in the old mode. + */ + if (time_to_datetime(thd, from, to) || + ((thd->variables.old_behavior && OLD_MODE_ZERO_DATE_TIME_CAST) && + check_date(to, fuzzydate, &warn))) + { + ErrConvTime str(from); + make_truncated_value_warning(thd, Sql_condition::WARN_LEVEL_WARN, + &str, MYSQL_TIMESTAMP_DATETIME, 0); + return true; + } + return false; +} diff --git a/sql/sql_time.h b/sql/sql_time.h index 6a8c78ecd5e..7513ca7c00a 100644 --- a/sql/sql_time.h +++ b/sql/sql_time.h @@ -49,6 +49,33 @@ bool int_to_datetime_with_warn(longlong value, MYSQL_TIME *ltime, ulonglong fuzzydate, const char *name); +bool time_to_datetime(THD *thd, const MYSQL_TIME *tm, MYSQL_TIME *dt); +bool time_to_datetime_with_warn(THD *thd, + const MYSQL_TIME *tm, MYSQL_TIME *dt, + ulonglong fuzzydate); +inline void datetime_to_time(MYSQL_TIME *ltime) +{ + DBUG_ASSERT(ltime->time_type == MYSQL_TIMESTAMP_DATE || + ltime->time_type == MYSQL_TIMESTAMP_DATETIME); + DBUG_ASSERT(ltime->neg == 0); + ltime->year= ltime->month= ltime->day= 0; + ltime->time_type= MYSQL_TIMESTAMP_TIME; +} +inline void datetime_to_date(MYSQL_TIME *ltime) +{ + DBUG_ASSERT(ltime->time_type == MYSQL_TIMESTAMP_DATE || + ltime->time_type == MYSQL_TIMESTAMP_DATETIME); + DBUG_ASSERT(ltime->neg == 0); + ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0; + ltime->time_type= MYSQL_TIMESTAMP_DATE; +} +inline void date_to_datetime(MYSQL_TIME *ltime) +{ + DBUG_ASSERT(ltime->time_type == MYSQL_TIMESTAMP_DATE || + ltime->time_type == MYSQL_TIMESTAMP_DATETIME); + DBUG_ASSERT(ltime->neg == 0); + ltime->time_type= MYSQL_TIMESTAMP_DATETIME; +} void make_truncated_value_warning(THD *thd, Sql_condition::enum_warning_level level, const ErrConv *str_val, @@ -76,8 +103,8 @@ bool my_TIME_to_str(const MYSQL_TIME *ltime, String *str, uint dec); /* MYSQL_TIME operations */ bool date_add_interval(MYSQL_TIME *ltime, interval_type int_type, INTERVAL interval); -bool calc_time_diff(MYSQL_TIME *l_time1, MYSQL_TIME *l_time2, int l_sign, - longlong *seconds_out, long *microseconds_out); +bool calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2, + int l_sign, longlong *seconds_out, long *microseconds_out); int my_time_compare(const MYSQL_TIME *a, const MYSQL_TIME *b); void localtime_to_TIME(MYSQL_TIME *to, struct tm *from); void calc_time_from_sec(MYSQL_TIME *to, long seconds, long microseconds); @@ -127,5 +154,6 @@ check_date(const MYSQL_TIME *ltime, ulonglong flags, int *was_cut) } bool check_date_with_warn(const MYSQL_TIME *ltime, ulonglong fuzzy_date, timestamp_type ts_type); +bool adjust_time_range_with_warn(MYSQL_TIME *ltime, uint dec); #endif /* SQL_TIME_INCLUDED */ diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 682528f9766..d137c2ab7aa 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2004, 2011, Oracle and/or its affiliates. + Copyright (c) 2004, 2012, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index c792dca873c..fdc932957b2 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -352,6 +352,7 @@ udf_func *find_udf(const char *name,uint length,bool mark_used) if (!initialized) DBUG_RETURN(NULL); + DEBUG_SYNC(current_thd, "find_udf_before_lock"); /* TODO: This should be changed to reader locks someday! */ if (mark_used) mysql_rwlock_wrlock(&THR_LOCK_udf); /* Called during fix_fields */ @@ -458,7 +459,12 @@ int mysql_create_function(THD *thd,udf_func *udf) DBUG_RETURN(1); } + tables.init_one_table(STRING_WITH_LEN("mysql"), STRING_WITH_LEN("func"), + "func", TL_WRITE); + table= open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT); + mysql_rwlock_wrlock(&THR_LOCK_udf); + DEBUG_SYNC(current_thd, "mysql_create_function_after_lock"); if ((my_hash_search(&udf_hash,(uchar*) udf->name.str, udf->name.length))) { my_error(ER_UDF_EXISTS, MYF(0), udf->name.str); @@ -502,9 +508,8 @@ int mysql_create_function(THD *thd,udf_func *udf) /* create entry in mysql.func table */ - tables.init_one_table("mysql", 5, "func", 4, "func", TL_WRITE); /* Allow creation of functions even if we can't open func table */ - if (!(table = open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT))) + if (!table) goto err; table->use_all_columns(); restore_record(table, s->default_values); // Default values for fields @@ -555,7 +560,12 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) DBUG_RETURN(1); } + tables.init_one_table(STRING_WITH_LEN("mysql"), STRING_WITH_LEN("func"), + "func", TL_WRITE); + table= open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT); + mysql_rwlock_wrlock(&THR_LOCK_udf); + DEBUG_SYNC(current_thd, "mysql_drop_function_after_lock"); if (!(udf=(udf_func*) my_hash_search(&udf_hash,(uchar*) udf_name->str, (uint) udf_name->length))) { @@ -572,9 +582,7 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) if (udf->dlhandle && !find_udf_dl(udf->dl)) dlclose(udf->dlhandle); - tables.init_one_table("mysql", 5, "func", 4, "func", TL_WRITE); - - if (!(table = open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT))) + if (!table) goto err; table->use_all_columns(); table->field[0]->store(exact_name_str, exact_name_len, &my_charset_bin); diff --git a/sql/sql_union.cc b/sql/sql_union.cc index d143930908d..9d068e464f5 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -243,7 +243,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, bool is_union_select; DBUG_ENTER("st_select_lex_unit::prepare"); - describe= test(additional_options & SELECT_DESCRIBE); + describe= MY_TEST(additional_options & SELECT_DESCRIBE); /* result object should be reassigned even if preparing already done for @@ -450,7 +450,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, if (global_parameters->ftfunc_list->elements) create_options= create_options | TMP_TABLE_FORCE_MYISAM; - if (union_result->create_result_table(thd, &types, test(union_distinct), + if (union_result->create_result_table(thd, &types, MY_TEST(union_distinct), create_options, "", FALSE, TRUE)) goto err; if (fake_select_lex && !fake_select_lex->first_cond_optimization) @@ -647,13 +647,19 @@ bool st_select_lex_unit::exec() if (!saved_error && !was_executed) save_union_explain(thd->lex->explain); + if (saved_error) + DBUG_RETURN(saved_error); + if (uncacheable || !item || !item->assigned() || describe) { for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select()) { ha_rows records_at_start= 0; thd->lex->current_select= sl; - fake_select_lex->uncacheable|= sl->uncacheable; + if (sl != &thd->lex->select_lex) + fake_select_lex->uncacheable|= sl->uncacheable; + else + fake_select_lex->uncacheable= 0; { set_limit(sl); @@ -985,7 +991,7 @@ bool st_select_lex_unit::change_result(select_result_interceptor *new_result, List<Item> *st_select_lex_unit::get_unit_column_types() { SELECT_LEX *sl= first_select(); - bool is_procedure= test(sl->join->procedure); + bool is_procedure= MY_TEST(sl->join->procedure); if (is_procedure) { diff --git a/sql/sql_update.cc b/sql/sql_update.cc index b85f5b90cd7..528e76d8d32 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -191,7 +191,7 @@ static void prepare_record_for_error_message(int error, TABLE *table) DBUG_VOID_RETURN; /* Create unique_map with all fields used by that index. */ - bitmap_init(&unique_map, unique_map_buf, table->s->fields, FALSE); + my_bitmap_init(&unique_map, unique_map_buf, table->s->fields, FALSE); table->mark_columns_used_by_index_no_reset(keynr, &unique_map); /* Subtract read_set and write_set. */ @@ -255,7 +255,7 @@ int mysql_update(THD *thd, ha_rows *found_return, ha_rows *updated_return) { bool using_limit= limit != HA_POS_ERROR; - bool safe_update= test(thd->variables.option_bits & OPTION_SAFE_UPDATES); + bool safe_update= MY_TEST(thd->variables.option_bits & OPTION_SAFE_UPDATES); bool used_key_is_modified= FALSE, transactional_table, will_batch; bool can_compare_record; int res; @@ -314,7 +314,7 @@ int mysql_update(THD *thd, my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "UPDATE"); DBUG_RETURN(1); } - query_plan.updating_a_view= test(table_list->view); + query_plan.updating_a_view= MY_TEST(table_list->view); /* Calculate "table->covering_keys" based on the WHERE */ table->covering_keys= table->s->keys_in_use; diff --git a/sql/sql_view.cc b/sql/sql_view.cc index e1c92a81604..4ca165a6d19 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. - Copyright (c) 2011, 2013, Monty Program Ab +/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. + Copyright (c) 2011, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1093,11 +1093,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, will be TRUE as far as we make new table cache). */ old_lex= thd->lex; - arena= thd->stmt_arena; - if (arena->is_conventional()) - arena= 0; - else - thd->set_n_backup_active_arena(arena, &backup); + arena= thd->activate_stmt_arena_if_needed(&backup); /* init timestamp */ if (!table->timestamp.str) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 7514b7bec63..ceb4e247848 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -344,7 +344,7 @@ int case_stmt_action_when(LEX *lex, Item *when, bool simple) (jump_if_not from instruction 2 to 5, 5 to 8 ... in the example) */ - return !test(i) || + return !MY_TEST(i) || sp->push_backpatch(i, ctx->push_label(current_thd, empty_lex_str, 0)) || sp->add_cont_backpatch(i) || sp->add_instr(i); @@ -362,7 +362,7 @@ int case_stmt_action_then(LEX *lex) sp_pcontext *ctx= lex->spcont; uint ip= sp->instructions(); sp_instr_jump *i = new sp_instr_jump(ip, ctx); - if (!test(i) || sp->add_instr(i)) + if (!MY_TEST(i) || sp->add_instr(i)) return 1; /* @@ -1155,6 +1155,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token EXISTS /* SQL-2003-R */ %token EXIT_SYM %token EXPANSION_SYM +%token EXPORT_SYM %token EXTENDED_SYM %token EXTENT_SIZE_SYM %token EXTRACT_SYM /* SQL-2003-N */ @@ -1664,7 +1665,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %type <num> type type_with_opt_collate int_type real_type order_dir lock_option udf_type opt_if_exists opt_local opt_table_options table_options - table_option opt_if_not_exists opt_no_write_to_binlog + table_option opt_if_not_exists create_or_replace opt_no_write_to_binlog opt_temporary all_or_any opt_distinct opt_ignore_leaves fulltext_options spatial_type union_option field_def @@ -1771,7 +1772,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %type <symbol> keyword keyword_sp %type <lex_user> user grant_user grant_role user_or_role current_role - admin_option_for_role + admin_option_for_role user_maybe_role %type <charset> opt_collate @@ -1828,7 +1829,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); object_privilege object_privilege_list user_list user_and_role_list rename_list clear_privileges flush_options flush_option - opt_with_read_lock flush_options_list + opt_flush_lock flush_lock flush_options_list equal optional_braces opt_mi_check_type opt_to mi_check_types table_to_table_list table_to_table opt_table_list opt_as @@ -1843,7 +1844,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); statement sp_suid sp_c_chistics sp_a_chistics sp_chistic sp_c_chistic xa opt_field_or_var_spec fields_or_vars opt_load_data_set_spec - view_replace_or_algorithm view_replace view_algorithm view_or_trigger_or_sp_or_event definer_tail no_definer_tail view_suid view_tail view_list_opt view_list view_select @@ -2341,25 +2341,29 @@ connection_name: /* create a table */ create: - CREATE opt_table_options TABLE_SYM opt_if_not_exists table_ident + create_or_replace opt_table_options TABLE_SYM opt_if_not_exists table_ident { LEX *lex= thd->lex; lex->sql_command= SQLCOM_CREATE_TABLE; + if ($1 && $4) + { + my_error(ER_WRONG_USAGE, MYF(0), "OR REPLACE", "IF NOT EXISTS"); + MYSQL_YYABORT; + } if (!lex->select_lex.add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING, TL_WRITE, MDL_EXCLUSIVE)) MYSQL_YYABORT; - /* - For CREATE TABLE, an non-existing table is not an error. - Instruct open_tables() to just take an MDL lock if the - table does not exist. - */ - lex->query_tables->open_strategy= TABLE_LIST::OPEN_IF_EXISTS; lex->alter_info.reset(); lex->col_list.empty(); lex->change=NullS; bzero((char*) &lex->create_info,sizeof(lex->create_info)); - lex->create_info.options=$2 | $4; + /* + For CREATE TABLE we should not open the table even if it exists. + If the table exists, we should either not create it or replace it + */ + lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB; + lex->create_info.options= ($1 | $2 | $4); lex->create_info.default_table_charset= NULL; lex->name.str= 0; lex->name.length= 0; @@ -2428,14 +2432,22 @@ create: lex->name= $4; lex->create_info.options=$3; } - | CREATE + | create_or_replace { - Lex->create_view_mode= VIEW_CREATE_NEW; + Lex->create_view_mode= ($1 == 0 ? VIEW_CREATE_NEW : + VIEW_CREATE_OR_REPLACE); Lex->create_view_algorithm= DTYPE_ALGORITHM_UNDEFINED; Lex->create_view_suid= TRUE; } view_or_trigger_or_sp_or_event - {} + { + if ($1 && Lex->sql_command != SQLCOM_CREATE_VIEW) + { + my_error(ER_WRONG_USAGE, MYF(0), "OR REPLACE", + "TRIGGERS / SP / EVENT"); + MYSQL_YYABORT; + } + } | CREATE USER clear_privileges grant_list { Lex->sql_command = SQLCOM_CREATE_USER; @@ -5515,6 +5527,17 @@ opt_if_not_exists: } ; +create_or_replace: + CREATE /* empty */ + { + $$= 0; + } + | CREATE OR_SYM REPLACE + { + $$= HA_LEX_CREATE_REPLACE; + } + ; + opt_create_table_options: /* empty */ | create_table_options @@ -10262,7 +10285,7 @@ variable_aux: if ($$ == NULL) MYSQL_YYABORT; LEX *lex= Lex; - lex->uncacheable(UNCACHEABLE_RAND); + lex->uncacheable(UNCACHEABLE_SIDEEFFECT); lex->set_var_list.push_back(item); } | ident_or_text @@ -10271,7 +10294,7 @@ variable_aux: if ($$ == NULL) MYSQL_YYABORT; LEX *lex= Lex; - lex->uncacheable(UNCACHEABLE_RAND); + lex->uncacheable(UNCACHEABLE_SIDEEFFECT); } | '@' opt_var_ident_type ident_or_text opt_component { @@ -12778,24 +12801,36 @@ flush_options: YYPS->m_lock_type= TL_READ_NO_INSERT; YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO; } - opt_table_list {} - opt_with_read_lock {} + opt_table_list opt_flush_lock | flush_options_list ; -opt_with_read_lock: +opt_flush_lock: /* empty */ {} - | WITH READ_SYM LOCK_SYM optional_flush_tables_arguments + | flush_lock + { + TABLE_LIST *tables= Lex->query_tables; + for (; tables; tables= tables->next_global) { - TABLE_LIST *tables= Lex->query_tables; - Lex->type|= REFRESH_READ_LOCK | $4; - for (; tables; tables= tables->next_global) - { - tables->mdl_request.set_type(MDL_SHARED_NO_WRITE); - tables->required_type= FRMTYPE_TABLE; /* Don't try to flush views. */ - tables->open_type= OT_BASE_ONLY; /* Ignore temporary tables. */ - } + tables->mdl_request.set_type(MDL_SHARED_NO_WRITE); + tables->required_type= FRMTYPE_TABLE; /* Don't try to flush views. */ + tables->open_type= OT_BASE_ONLY; /* Ignore temporary tables. */ } + } + ; + +flush_lock: + WITH READ_SYM LOCK_SYM optional_flush_tables_arguments + { Lex->type|= REFRESH_READ_LOCK | $4; } + | FOR_SYM + { + if (Lex->query_tables == NULL) // Table list can't be empty + { + my_parse_error(ER(ER_NO_TABLES_USED)); + MYSQL_YYABORT; + } + Lex->type|= REFRESH_FOR_EXPORT; + } EXPORT_SYM ; flush_options_list: @@ -13916,7 +13951,7 @@ ident_or_text: | LEX_HOSTNAME { $$=$1;} ; -user: +user_maybe_role: ident_or_text { if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) @@ -13974,7 +14009,15 @@ user: } ; -user_or_role: user | current_role; +user_or_role: user_maybe_role | current_role; + +user: user_maybe_role + { + if ($1->user.str != current_user.str && $1->host.str == 0) + $1->host= host_not_specified; + $$= $1; + } + ; /* Keyword that we allow for identifiers (except SP labels) */ keyword: @@ -14131,6 +14174,7 @@ keyword_sp: | EVERY_SYM {} | EXCHANGE_SYM {} | EXPANSION_SYM {} + | EXPORT_SYM {} | EXTENDED_SYM {} | EXTENT_SIZE_SYM {} | FAULTS_SYM {} @@ -15148,6 +15192,11 @@ current_role: grant_role: ident_or_text { + if ($1.length == 0) + { + my_error(ER_INVALID_ROLE, MYF(0), ""); + MYSQL_YYABORT; + } if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; $$->user = $1; @@ -15799,7 +15848,7 @@ view_or_trigger_or_sp_or_event: {} | no_definer no_definer_tail {} - | view_replace_or_algorithm definer_opt view_tail + | view_algorithm definer_opt view_tail {} ; @@ -15858,20 +15907,6 @@ definer: **************************************************************************/ -view_replace_or_algorithm: - view_replace - {} - | view_replace view_algorithm - {} - | view_algorithm - {} - ; - -view_replace: - OR_SYM REPLACE - { Lex->create_view_mode= VIEW_CREATE_OR_REPLACE; } - ; - view_algorithm: ALGORITHM_SYM EQ UNDEFINED_SYM { Lex->create_view_algorithm= DTYPE_ALGORITHM_UNDEFINED; } diff --git a/sql/strfunc.cc b/sql/strfunc.cc index a5a64c065ce..b8100e05ce5 100644 --- a/sql/strfunc.cc +++ b/sql/strfunc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2003, 2012, 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 diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index f7b44af4e8b..415afa49cb2 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2002, 2012, Oracle and/or its affiliates. - Copyright (c) 2012, Monty Program Ab +/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. + Copyright (c) 2012, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -364,7 +364,7 @@ static Sys_var_ulong Sys_back_log( "MySQL can have. This comes into play when the main MySQL thread " "gets very many connection requests in a very short time", READ_ONLY GLOBAL_VAR(back_log), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1, 65535), DEFAULT(50), BLOCK_SIZE(1)); + VALID_RANGE(1, 65535), DEFAULT(150), BLOCK_SIZE(1)); static Sys_var_charptr Sys_basedir( "basedir", "Path to installation directory. All paths are " @@ -613,7 +613,7 @@ static bool check_charset_db(sys_var *self, THD *thd, set_var *var) } static Sys_var_struct Sys_character_set_database( "character_set_database", - " The character set used by the default database", + "The character set used by the default database", SESSION_VAR(collation_database), NO_CMD_LINE, offsetof(CHARSET_INFO, csname), DEFAULT(&default_charset_info), NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(check_charset_db)); @@ -1082,7 +1082,7 @@ static Sys_var_keycache Sys_key_cache_age_threshold( static Sys_var_mybool Sys_large_files_support( "large_files_support", "Whether mysqld was compiled with options for large file support", - READ_ONLY GLOBAL_VAR(opt_large_files), + READ_ONLY SHOW_VALUE_IN_HELP GLOBAL_VAR(opt_large_files), NO_CMD_LINE, DEFAULT(sizeof(my_off_t) > 4)); static Sys_var_uint Sys_large_page_size( @@ -1204,7 +1204,8 @@ static Sys_var_mybool Sys_lower_case_file_system( "lower_case_file_system", "Case sensitivity of file names on the file system where the " "data directory is located", - READ_ONLY GLOBAL_VAR(lower_case_file_system), NO_CMD_LINE, + READ_ONLY SHOW_VALUE_IN_HELP GLOBAL_VAR(lower_case_file_system), + NO_CMD_LINE, DEFAULT(FALSE)); static Sys_var_uint Sys_lower_case_table_names( @@ -1715,6 +1716,33 @@ static Sys_var_gtid_binlog_state Sys_gtid_binlog_state( GLOBAL_VAR(opt_gtid_binlog_state_dummy), NO_CMD_LINE); +static Sys_var_last_gtid Sys_last_gtid( + "last_gtid", "The GTID of the last commit (if binlogging was enabled), " + "or the empty string if none.", + READ_ONLY sys_var::ONLY_SESSION, NO_CMD_LINE); + + +uchar * +Sys_var_last_gtid::session_value_ptr(THD *thd, LEX_STRING *base) +{ + char buf[10+1+10+1+20+1]; + String str(buf, sizeof(buf), system_charset_info); + char *p; + bool first= true; + + str.length(0); + if ((thd->last_commit_gtid.seq_no > 0 && + rpl_slave_state_tostring_helper(&str, &thd->last_commit_gtid, &first)) || + !(p= thd->strmake(str.ptr(), str.length()))) + { + my_error(ER_OUT_OF_RESOURCES, MYF(0)); + return NULL; + } + + return (uchar *)p; +} + + static bool check_slave_parallel_threads(sys_var *self, THD *thd, set_var *var) { @@ -1760,6 +1788,49 @@ static Sys_var_ulong Sys_slave_parallel_threads( ON_UPDATE(fix_slave_parallel_threads)); +static bool +check_slave_domain_parallel_threads(sys_var *self, THD *thd, set_var *var) +{ + bool running; + + mysql_mutex_lock(&LOCK_active_mi); + running= master_info_index->give_error_if_slave_running(); + mysql_mutex_unlock(&LOCK_active_mi); + if (running) + return true; + + return false; +} + +static bool +fix_slave_domain_parallel_threads(sys_var *self, THD *thd, enum_var_type type) +{ + bool running; + + mysql_mutex_unlock(&LOCK_global_system_variables); + mysql_mutex_lock(&LOCK_active_mi); + running= master_info_index->give_error_if_slave_running(); + mysql_mutex_unlock(&LOCK_active_mi); + mysql_mutex_lock(&LOCK_global_system_variables); + + return running ? true : false; +} + + +static Sys_var_ulong Sys_slave_domain_parallel_threads( + "slave_domain_parallel_threads", + "Maximum number of parallel threads to use on slave for events in a " + "single replication domain. When using multiple domains, this can be " + "used to limit a single domain from grabbing all threads and thus " + "stalling other domains. The default of 0 means to allow a domain to " + "grab as many threads as it wants, up to the value of " + "slave_parallel_threads.", + GLOBAL_VAR(opt_slave_domain_parallel_threads), CMD_LINE(REQUIRED_ARG), + VALID_RANGE(0,16383), DEFAULT(0), BLOCK_SIZE(1), NO_MUTEX_GUARD, + NOT_IN_BINLOG, ON_CHECK(check_slave_domain_parallel_threads), + ON_UPDATE(fix_slave_domain_parallel_threads)); + + static Sys_var_ulong Sys_slave_parallel_max_queued( "slave_parallel_max_queued", "Limit on how much memory SQL threads should use per parallel " @@ -1971,7 +2042,7 @@ static Sys_var_ulong Sys_net_retry_count( ON_UPDATE(fix_net_retry_count)); static Sys_var_mybool Sys_old_mode( - "old", "Use compatible behavior", + "old", "Use compatible behavior from previous MariaDB version. See also --old-mode", SESSION_VAR(old_mode), CMD_LINE(OPT_ARG), DEFAULT(FALSE)); static Sys_var_mybool Sys_old_alter_table( @@ -2094,7 +2165,7 @@ static bool fix_optimizer_switch(sys_var *self, THD *thd, { SV *sv= (type == OPT_GLOBAL) ? &global_system_variables : &thd->variables; sv->engine_condition_pushdown= - test(sv->optimizer_switch & OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); + MY_TEST(sv->optimizer_switch & OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); return false; } static Sys_var_flagset Sys_optimizer_switch( @@ -2165,7 +2236,7 @@ static Sys_var_ulong Sys_preload_buff_size( static Sys_var_uint Sys_protocol_version( "protocol_version", "The version of the client/server protocol used by the MySQL server", - READ_ONLY GLOBAL_VAR(protocol_version), NO_CMD_LINE, + READ_ONLY SHOW_VALUE_IN_HELP GLOBAL_VAR(protocol_version), NO_CMD_LINE, VALID_RANGE(0, ~0), DEFAULT(PROTOCOL_VERSION), BLOCK_SIZE(1)); static Sys_var_proxy_user Sys_proxy_user( @@ -2381,9 +2452,13 @@ static Sys_var_charptr Sys_socket( static Sys_var_ulong Sys_thread_concurrency( "thread_concurrency", "Permits the application to give the threads system a hint for " - "the desired number of threads that should be run at the same time", + "the desired number of threads that should be run at the same time." + "This variable has no effect, and is deprecated. " + "It will be removed in a future release.", READ_ONLY GLOBAL_VAR(concurrency), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1, 512), DEFAULT(DEFAULT_CONCURRENCY), BLOCK_SIZE(1)); + VALID_RANGE(1, 512), DEFAULT(DEFAULT_CONCURRENCY), BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), + DEPRECATED("")); static Sys_var_ulonglong Sys_thread_stack( "thread_stack", "The stack size for each thread", @@ -2620,11 +2695,23 @@ static Sys_var_enum Slave_exec_mode( "Modes for how replication events should be executed. Legal values " "are STRICT (default) and IDEMPOTENT. In IDEMPOTENT mode, " "replication will not stop for operations that are idempotent. " + "For example, in row based replication attempts to delete rows that " + "doesn't exist will be ignored." "In STRICT mode, replication will stop on any unexpected difference " "between the master and the slave", GLOBAL_VAR(slave_exec_mode_options), CMD_LINE(REQUIRED_ARG), slave_exec_mode_names, DEFAULT(SLAVE_EXEC_MODE_STRICT)); +static Sys_var_enum Slave_ddl_exec_mode( + "slave_ddl_exec_mode", + "Modes for how replication events should be executed. Legal values " + "are STRICT and IDEMPOTENT (default). In IDEMPOTENT mode, " + "replication will not stop for DDL operations that are idempotent. " + "This means that CREATE TABLE is treated CREATE TABLE OR REPLACE and " + "DROP TABLE is threated as DROP TABLE IF EXISTS. ", + GLOBAL_VAR(slave_ddl_exec_mode_options), CMD_LINE(REQUIRED_ARG), + slave_exec_mode_names, DEFAULT(SLAVE_EXEC_MODE_IDEMPOTENT)); + static const char *slave_type_conversions_name[]= {"ALL_LOSSY", "ALL_NON_LOSSY", 0}; static Sys_var_set Slave_type_conversions( "slave_type_conversions", @@ -2807,6 +2894,32 @@ static Sys_var_set Sys_sql_mode( sql_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_sql_mode), ON_UPDATE(fix_sql_mode)); +static const char *old_mode_names[]= +{ + "NO_DUP_KEY_WARNINGS_WITH_IGNORE", + "NO_PROGRESS_INFO", + "ZERO_DATE_TIME_CAST", + 0 +}; + +export bool old_mode_string_representation(THD *thd, ulonglong sql_mode, + LEX_STRING *ls) +{ + set_to_string(thd, ls, sql_mode, old_mode_names); + return ls->str == 0; +} +/* + sql_mode should *not* be IN_BINLOG as the slave can't remember this + anyway on restart. +*/ +static Sys_var_set Sys_old_behavior( + "old_mode", + "Used to emulate old behavior from earlier MariaDB or MySQL versions. " + "Syntax: old_mode=mode[,mode[,mode...]]. " + "See the manual for the complete list of valid old modes", + SESSION_VAR(old_behavior), CMD_LINE(REQUIRED_ARG), + old_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG); + #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) #define SSL_OPT(X) CMD_LINE(REQUIRED_ARG,X) #else @@ -2873,7 +2986,8 @@ static Sys_var_mybool Sys_sync_frm( static char *system_time_zone_ptr; static Sys_var_charptr Sys_system_time_zone( "system_time_zone", "The server system time zone", - READ_ONLY GLOBAL_VAR(system_time_zone_ptr), NO_CMD_LINE, + READ_ONLY SHOW_VALUE_IN_HELP GLOBAL_VAR(system_time_zone_ptr), + NO_CMD_LINE, IN_SYSTEM_CHARSET, DEFAULT(system_time_zone)); static Sys_var_ulong Sys_table_def_size( @@ -3083,27 +3197,37 @@ static Sys_var_mybool Sys_timed_mutexes( static char *server_version_ptr; static Sys_var_charptr Sys_version( "version", "Server version", - READ_ONLY GLOBAL_VAR(server_version_ptr), NO_CMD_LINE, + READ_ONLY SHOW_VALUE_IN_HELP GLOBAL_VAR(server_version_ptr), + NO_CMD_LINE, IN_SYSTEM_CHARSET, DEFAULT(server_version)); static char *server_version_comment_ptr; static Sys_var_charptr Sys_version_comment( "version_comment", "version_comment", - READ_ONLY GLOBAL_VAR(server_version_comment_ptr), NO_CMD_LINE, + READ_ONLY SHOW_VALUE_IN_HELP GLOBAL_VAR(server_version_comment_ptr), + NO_CMD_LINE, IN_SYSTEM_CHARSET, DEFAULT(MYSQL_COMPILATION_COMMENT)); static char *server_version_compile_machine_ptr; static Sys_var_charptr Sys_version_compile_machine( "version_compile_machine", "version_compile_machine", - READ_ONLY GLOBAL_VAR(server_version_compile_machine_ptr), NO_CMD_LINE, + READ_ONLY SHOW_VALUE_IN_HELP + GLOBAL_VAR(server_version_compile_machine_ptr), NO_CMD_LINE, IN_SYSTEM_CHARSET, DEFAULT(MACHINE_TYPE)); static char *server_version_compile_os_ptr; static Sys_var_charptr Sys_version_compile_os( "version_compile_os", "version_compile_os", - READ_ONLY GLOBAL_VAR(server_version_compile_os_ptr), NO_CMD_LINE, + READ_ONLY SHOW_VALUE_IN_HELP GLOBAL_VAR(server_version_compile_os_ptr), + NO_CMD_LINE, IN_SYSTEM_CHARSET, DEFAULT(SYSTEM_TYPE)); +static char *malloc_library; +static Sys_var_charptr Sys_malloc_library( + "version_malloc_library", "Version of the used malloc library", + READ_ONLY SHOW_VALUE_IN_HELP GLOBAL_VAR(malloc_library), NO_CMD_LINE, + IN_SYSTEM_CHARSET, DEFAULT(MALLOC_LIBRARY)); + static Sys_var_ulong Sys_net_wait_timeout( "wait_timeout", "The number of seconds the server waits for activity on a " @@ -3182,10 +3306,10 @@ static bool fix_autocommit(sys_var *self, THD *thd, enum_var_type type) return false; } - if (thd->variables.option_bits & OPTION_AUTOCOMMIT && - thd->variables.option_bits & OPTION_NOT_AUTOCOMMIT) - { // activating autocommit - + if (test_all_bits(thd->variables.option_bits, + (OPTION_AUTOCOMMIT | OPTION_NOT_AUTOCOMMIT))) + { + // activating autocommit if (trans_commit_stmt(thd) || trans_commit(thd)) { thd->variables.option_bits&= ~OPTION_AUTOCOMMIT; @@ -3204,16 +3328,17 @@ static bool fix_autocommit(sys_var *self, THD *thd, enum_var_type type) transaction implicitly at the end (@sa stmt_causes_implicitcommit()). */ thd->variables.option_bits&= - ~(OPTION_BEGIN | OPTION_KEEP_LOG | OPTION_NOT_AUTOCOMMIT); + ~(OPTION_BEGIN | OPTION_KEEP_LOG | OPTION_NOT_AUTOCOMMIT | + OPTION_GTID_BEGIN); thd->transaction.all.modified_non_trans_table= false; thd->server_status|= SERVER_STATUS_AUTOCOMMIT; return false; } - if (!(thd->variables.option_bits & OPTION_AUTOCOMMIT) && - !(thd->variables.option_bits & OPTION_NOT_AUTOCOMMIT)) - { // disabling autocommit - + if ((thd->variables.option_bits & + (OPTION_AUTOCOMMIT |OPTION_NOT_AUTOCOMMIT)) == 0) + { + // disabling autocommit thd->transaction.all.modified_non_trans_table= false; thd->server_status&= ~SERVER_STATUS_AUTOCOMMIT; thd->variables.option_bits|= OPTION_NOT_AUTOCOMMIT; @@ -3222,6 +3347,7 @@ static bool fix_autocommit(sys_var *self, THD *thd, enum_var_type type) return false; // autocommit value wasn't changed } + static Sys_var_bit Sys_autocommit( "autocommit", "autocommit", SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_AUTOCOMMIT, DEFAULT(TRUE), @@ -4120,13 +4246,18 @@ bool update_multi_source_variable(sys_var *self_var, THD *thd, static bool update_slave_skip_counter(sys_var *self, THD *thd, Master_info *mi) { + if (mi->using_gtid != Master_info::USE_GTID_NO) + { + my_error(ER_SLAVE_SKIP_NOT_IN_GTID, MYF(0)); + return true; + } if (mi->rli.slave_running) { my_error(ER_SLAVE_MUST_STOP, MYF(0), mi->connection_name.length, mi->connection_name.str); return true; } - /* The value was stored temporarly in thd */ + /* The value was stored temporarily in thd */ mi->rli.slave_skip_counter= thd->variables.slave_skip_counter; return false; } @@ -4707,7 +4838,7 @@ static Sys_var_ulong Sys_progress_report_time( "Seconds between sending progress reports to the client for " "time-consuming statements. Set to 0 to disable progress reporting.", SESSION_VAR(progress_report_time), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(0, UINT_MAX), DEFAULT(56), BLOCK_SIZE(1)); + VALID_RANGE(0, UINT_MAX), DEFAULT(5), BLOCK_SIZE(1)); const char *use_stat_tables_modes[] = {"NEVER", "COMPLEMENTARY", "PREFERABLY", 0}; @@ -4751,7 +4882,7 @@ static Sys_var_mybool Sys_query_cache_strip_comments( static ulonglong in_transaction(THD *thd) { - return test(thd->in_active_multi_stmt_transaction()); + return MY_TEST(thd->in_active_multi_stmt_transaction()); } static Sys_var_session_special Sys_in_transaction( "in_transaction", "Whether there is an active transaction", diff --git a/sql/sys_vars.h b/sql/sys_vars.h index bef5fbdd126..495099b9c59 100644 --- a/sql/sys_vars.h +++ b/sql/sys_vars.h @@ -56,6 +56,7 @@ // this means that Sys_var_charptr initial value was malloc()ed #define PREALLOCATED sys_var::ALLOCATED+ #define PARSED_EARLY sys_var::PARSE_EARLY+ +#define SHOW_VALUE_IN_HELP sys_var::SHOW_VALUE_IN_HELP+ /* Sys_var_bit meaning is reversed, like in @@ -2238,3 +2239,53 @@ public: } uchar *global_value_ptr(THD *thd, LEX_STRING *base); }; + + +/** + Class for @@session.last_gtid. +*/ +class Sys_var_last_gtid: public sys_var +{ +public: + Sys_var_last_gtid(const char *name_arg, + const char *comment, int flag_args, CMD_LINE getopt) + : sys_var(&all_sys_vars, name_arg, comment, flag_args, 0, getopt.id, + getopt.arg_type, SHOW_CHAR, 0, NULL, VARIABLE_NOT_IN_BINLOG, + NULL, NULL, NULL) + { + option.var_type= GET_STR; + } + bool do_check(THD *thd, set_var *var) + { + DBUG_ASSERT(false); + return true; + } + bool session_update(THD *thd, set_var *var) + { + DBUG_ASSERT(false); + return true; + } + bool global_update(THD *thd, set_var *var) + { + DBUG_ASSERT(false); + return true; + } + bool check_update_type(Item_result type) { + DBUG_ASSERT(false); + return false; + } + void session_save_default(THD *thd, set_var *var) + { + DBUG_ASSERT(false); + } + void global_save_default(THD *thd, set_var *var) + { + DBUG_ASSERT(false); + } + uchar *session_value_ptr(THD *thd, LEX_STRING *base); + uchar *global_value_ptr(THD *thd, LEX_STRING *base) + { + DBUG_ASSERT(false); + return NULL; + } +}; diff --git a/sql/table.cc b/sql/table.cc index 385de6547db..0548796a424 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1,6 +1,5 @@ -/* - Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2008, 2013, Monty Program Ab. +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2008, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -318,8 +317,6 @@ TABLE_SHARE *alloc_table_share(const char *db, const char *table_name, strmov(share->path.str, path); share->normalized_path.str= share->path.str; share->normalized_path.length= path_length; - /* TEMPORARY FIX: if true, this means this is mysql.gtid_slave_pos table */ - share->is_gtid_slave_pos= FALSE; share->table_category= get_table_category(& share->db, & share->table_name); share->open_errno= ENOENT; share->cached_row_logging_check= -1; @@ -778,7 +775,6 @@ static bool create_key_infos(const uchar *strpos, const uchar *frm_image_end, keyinfo->ext_key_part_map= 0; if (share->use_ext_keys && i && !(keyinfo->flags & HA_NOSAME)) { - keyinfo->ext_key_part_map= 0; for (j= 0; j < first_key_parts && keyinfo->ext_key_parts < MAX_REF_PARTS; j++) @@ -825,8 +821,8 @@ static bool create_key_infos(const uchar *strpos, const uchar *frm_image_end, keyinfo->comment.length); strpos+= keyinfo->comment.length; } - DBUG_ASSERT(test(keyinfo->flags & HA_USES_COMMENT) == - (keyinfo->comment.length > 0)); + DBUG_ASSERT(MY_TEST(keyinfo->flags & HA_USES_COMMENT) == + (keyinfo->comment.length > 0)); } share->keys= keys; // do it *after* all key_info's are initialized @@ -2016,7 +2012,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, if (!(bitmaps= (my_bitmap_map*) alloc_root(&share->mem_root, share->column_bitmap_size))) goto err; - bitmap_init(&share->all_set, bitmaps, share->fields, FALSE); + my_bitmap_init(&share->all_set, bitmaps, share->fields, FALSE); bitmap_set_all(&share->all_set); delete handler_file; @@ -2824,17 +2820,17 @@ partititon_err: bitmap_size= share->column_bitmap_size; if (!(bitmaps= (uchar*) alloc_root(&outparam->mem_root, bitmap_size*6))) goto err; - bitmap_init(&outparam->def_read_set, + my_bitmap_init(&outparam->def_read_set, (my_bitmap_map*) bitmaps, share->fields, FALSE); - bitmap_init(&outparam->def_write_set, + my_bitmap_init(&outparam->def_write_set, (my_bitmap_map*) (bitmaps+bitmap_size), share->fields, FALSE); - bitmap_init(&outparam->def_vcol_set, + my_bitmap_init(&outparam->def_vcol_set, (my_bitmap_map*) (bitmaps+bitmap_size*2), share->fields, FALSE); - bitmap_init(&outparam->tmp_set, + my_bitmap_init(&outparam->tmp_set, (my_bitmap_map*) (bitmaps+bitmap_size*3), share->fields, FALSE); - bitmap_init(&outparam->eq_join_set, + my_bitmap_init(&outparam->eq_join_set, (my_bitmap_map*) (bitmaps+bitmap_size*4), share->fields, FALSE); - bitmap_init(&outparam->cond_set, + my_bitmap_init(&outparam->cond_set, (my_bitmap_map*) (bitmaps+bitmap_size*5), share->fields, FALSE); outparam->default_column_bitmaps(); @@ -2895,9 +2891,9 @@ partititon_err: else if (outparam->file) { handler::Table_flags flags= outparam->file->ha_table_flags(); - outparam->no_replicate= ! test(flags & (HA_BINLOG_STMT_CAPABLE - | HA_BINLOG_ROW_CAPABLE)) - || test(flags & HA_HAS_OWN_BINLOGGING); + outparam->no_replicate= ! MY_TEST(flags & (HA_BINLOG_STMT_CAPABLE + | HA_BINLOG_ROW_CAPABLE)) + || MY_TEST(flags & HA_HAS_OWN_BINLOGGING); } else { @@ -3259,7 +3255,7 @@ void prepare_frm_header(THD *thd, uint reclength, uchar *fileinfo, /* header */ fileinfo[0]=(uchar) 254; fileinfo[1]= 1; - fileinfo[2]= FRM_VER+3+ test(create_info->varchar); + fileinfo[2]= FRM_VER + 3 + MY_TEST(create_info->varchar); fileinfo[3]= (uchar) ha_legacy_type( ha_checktype(thd,ha_legacy_type(create_info->db_type),0,0)); @@ -3278,8 +3274,8 @@ void prepare_frm_header(THD *thd, uint reclength, uchar *fileinfo, */ for (i= 0; i < keys; i++) { - DBUG_ASSERT(test(key_info[i].flags & HA_USES_COMMENT) == - (key_info[i].comment.length > 0)); + DBUG_ASSERT(MY_TEST(key_info[i].flags & HA_USES_COMMENT) == + (key_info[i].comment.length > 0)); if (key_info[i].flags & HA_USES_COMMENT) key_comment_total_bytes += 2 + key_info[i].comment.length; } @@ -3811,7 +3807,7 @@ bool TABLE_SHARE::visit_subgraph(Wait_for_flush *wait_for_flush, bool result= TRUE; /* - To protect used_tables list from being concurrently modified + To protect all_tables list from being concurrently modified while we are iterating through it we acquire LOCK_open. This does not introduce deadlocks in the deadlock detector because we won't try to acquire LOCK_open while @@ -3838,7 +3834,8 @@ bool TABLE_SHARE::visit_subgraph(Wait_for_flush *wait_for_flush, while ((table= tables_it++)) { - if (table->in_use && gvisitor->inspect_edge(&table->in_use->mdl_context)) + DBUG_ASSERT(table->in_use && tdc.flushed); + if (gvisitor->inspect_edge(&table->in_use->mdl_context)) { goto end_leave_node; } @@ -3847,7 +3844,8 @@ bool TABLE_SHARE::visit_subgraph(Wait_for_flush *wait_for_flush, tables_it.rewind(); while ((table= tables_it++)) { - if (table->in_use && table->in_use->mdl_context.visit_subgraph(gvisitor)) + DBUG_ASSERT(table->in_use && tdc.flushed); + if (table->in_use->mdl_context.visit_subgraph(gvisitor)) { goto end_leave_node; } @@ -3896,7 +3894,7 @@ bool TABLE_SHARE::wait_for_old_version(THD *thd, struct timespec *abstime, MDL_wait::enum_wait_status wait_status; mysql_mutex_assert_owner(&tdc.LOCK_table_share); - DBUG_ASSERT(has_old_version()); + DBUG_ASSERT(tdc.flushed); tdc.m_flush_tickets.push_front(&ticket); @@ -4137,8 +4135,9 @@ bool TABLE_LIST::create_field_translation(THD *thd) SELECT_LEX *select= get_single_select(); List_iterator_fast<Item> it(select->item_list); uint field_count= 0; - Query_arena *arena= thd->stmt_arena, backup; + Query_arena *arena, backup; bool res= FALSE; + DBUG_ENTER("TABLE_LIST::create_field_translation"); if (thd->stmt_arena->is_conventional() || thd->stmt_arena->is_stmt_prepare_or_first_sp_execute()) @@ -4159,7 +4158,7 @@ bool TABLE_LIST::create_field_translation(THD *thd) if (field_translation) { /* - Update items in the field translation aftet view have been prepared. + Update items in the field translation after view have been prepared. It's needed because some items in the select list, like IN subselects, might be substituted for optimized ones. */ @@ -4172,13 +4171,10 @@ bool TABLE_LIST::create_field_translation(THD *thd) field_translation_updated= TRUE; } - return FALSE; + DBUG_RETURN(FALSE); } - if (arena->is_conventional()) - arena= 0; // For easier test - else - thd->set_n_backup_active_arena(arena, &backup); + arena= thd->activate_stmt_arena_if_needed(&backup); /* Create view fields translation table */ @@ -4198,12 +4194,14 @@ bool TABLE_LIST::create_field_translation(THD *thd) } field_translation= transl; field_translation_end= transl + field_count; + /* It's safe to cache this table for prepared statements */ + cacheable_table= 1; exit: if (arena) thd->restore_active_arena(arena, &backup); - return res; + DBUG_RETURN(res); } @@ -6193,9 +6191,9 @@ bool TABLE::is_filled_at_execution() do not have a corresponding table reference. Such tables are filled during execution. */ - return test(!pos_in_table_list || - pos_in_table_list->jtbm_subselect || - pos_in_table_list->is_active_sjm()); + return MY_TEST(!pos_in_table_list || + pos_in_table_list->jtbm_subselect || + pos_in_table_list->is_active_sjm()); } diff --git a/sql/table.h b/sql/table.h index c25e2c8a83a..6f16bc55c9e 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1,7 +1,7 @@ #ifndef TABLE_INCLUDED #define TABLE_INCLUDED -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2009, 2011 Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -194,10 +194,20 @@ private: /* Order clause list element */ +typedef int (*fast_field_copier)(Field *to, Field *from); + + typedef struct st_order { struct st_order *next; Item **item; /* Point at item in select fields */ Item *item_ptr; /* Storage for initial item */ + /* + Reference to the function we are trying to optimize copy to + a temporary table + */ + fast_field_copier fast_field_copier_func; + /* Field for which above optimizer function setup */ + Field *fast_field_copier_setup; int counter; /* position in SELECT list, correct only if counter_used is true*/ bool asc; /* true if ascending */ @@ -481,8 +491,6 @@ TABLE_CATEGORY get_table_category(const LEX_STRING *db, struct TABLE_share; struct All_share_tables; -extern ulong tdc_refresh_version(void); - typedef struct st_table_field_type { LEX_STRING name; @@ -611,6 +619,7 @@ struct TABLE_SHARE Protects ref_count and m_flush_tickets. */ mysql_mutex_t LOCK_table_share; + mysql_cond_t COND_release; TABLE_SHARE *next, **prev; /* Link to unused shares */ uint ref_count; /* How many TABLE objects uses this */ /** @@ -623,6 +632,8 @@ struct TABLE_SHARE */ All_share_tables_list all_tables; TABLE_list free_tables; + ulong version; + bool flushed; } tdc; LEX_CUSTRING tabledef_version; @@ -660,8 +671,6 @@ struct TABLE_SHARE LEX_STRING normalized_path; /* unpack_filename(path) */ LEX_STRING connect_string; - bool is_gtid_slave_pos; - /* Set of keys in use, implemented as a Bitmap. Excludes keys disabled by ALTER TABLE ... DISABLE KEYS. @@ -670,7 +679,6 @@ struct TABLE_SHARE key_map keys_for_keyread; ha_rows min_rows, max_rows; /* create information */ ulong avg_row_length; /* create information */ - ulong version; ulong mysql_version; /* 0 if .frm is created before 5.0 */ ulong reclength; /* Recordlength */ /* Stored record length. No generated-only virtual fields are included */ @@ -734,6 +742,7 @@ struct TABLE_SHARE bool is_view; bool deleting; /* going to delete this table */ bool can_cmp_whole_record; + bool table_creation_was_logged; ulong table_map_id; /* for row-based replication */ /* @@ -849,12 +858,6 @@ struct TABLE_SHARE return table_map_id; } - /** Is this table share being expelled from the table definition cache? */ - inline bool has_old_version() const - { - return version != tdc_refresh_version(); - } - /** Convert unrelated members of TABLE_SHARE to one enum representing its type. @@ -1067,7 +1070,6 @@ public: ORDER *group; String alias; /* alias or table name */ uchar *null_flags; - my_bitmap_map *bitmap_init_value; MY_BITMAP def_read_set, def_write_set, def_vcol_set, tmp_set; MY_BITMAP eq_join_set; /* used to mark equi-joined fields */ MY_BITMAP cond_set; /* used to mark fields from sargable conditions*/ @@ -1952,7 +1954,7 @@ struct TABLE_LIST Indicates that if TABLE_LIST object corresponds to the table/view which requires special handling. */ - enum + enum enum_open_strategy { /* Normal open. */ OPEN_NORMAL= 0, @@ -2203,7 +2205,7 @@ struct TABLE_LIST */ char *get_table_name() const { return view != NULL ? view_name.str : table_name; } bool is_active_sjm(); - bool is_jtbm() { return test(jtbm_subselect!=NULL); } + bool is_jtbm() { return MY_TEST(jtbm_subselect != NULL); } st_select_lex_unit *get_unit(); st_select_lex *get_single_select(); void wrap_into_nested_join(List<TABLE_LIST> &join_list); diff --git a/sql/table_cache.cc b/sql/table_cache.cc index 6f51ac8276c..fbafd8e0c9f 100644 --- a/sql/table_cache.cc +++ b/sql/table_cache.cc @@ -44,6 +44,8 @@ Table cache invariants: - TABLE_SHARE::free_tables shall not contain objects with TABLE::in_use != 0 + - TABLE_SHARE::free_tables shall not receive new objects if + TABLE_SHARE::tdc.flushed is true */ #include "my_global.h" @@ -64,12 +66,11 @@ static int64 tdc_version; /* Increments on each reload */ static int64 last_table_id; static bool tdc_inited; -static uint tc_count; /**< Number of TABLE objects in table cache. */ +static int32 tc_count; /**< Number of TABLE objects in table cache. */ /** - Protects tc_count, TABLE_SHARE::tdc.free_tables, TABLE_SHARE::tdc.all_tables, - TABLE::in_use. + Protects TABLE_SHARE::tdc.free_tables, TABLE_SHARE::tdc.all_tables. */ mysql_mutex_t LOCK_open; @@ -86,7 +87,6 @@ mysql_mutex_t LOCK_open; static mysql_mutex_t LOCK_unused_shares; static mysql_rwlock_t LOCK_tdc; /**< Protects tdc_hash. */ -static mysql_rwlock_t LOCK_flush; /**< Sync tc_purge() and tdc_remove_table(). */ my_atomic_rwlock_t LOCK_tdc_atomics; /**< Protects tdc_version. */ #ifdef HAVE_PSI_INTERFACE @@ -99,11 +99,17 @@ static PSI_mutex_info all_tc_mutexes[]= { &key_TABLE_SHARE_LOCK_table_share, "TABLE_SHARE::tdc.LOCK_table_share", 0 } }; -static PSI_rwlock_key key_rwlock_LOCK_tdc, key_rwlock_LOCK_flush; +static PSI_rwlock_key key_rwlock_LOCK_tdc; static PSI_rwlock_info all_tc_rwlocks[]= { - { &key_rwlock_LOCK_tdc, "LOCK_tdc", PSI_FLAG_GLOBAL }, - { &key_rwlock_LOCK_flush, "LOCK_flush", PSI_FLAG_GLOBAL } + { &key_rwlock_LOCK_tdc, "LOCK_tdc", PSI_FLAG_GLOBAL } +}; + + +static PSI_cond_key key_TABLE_SHARE_COND_release; +static PSI_cond_info all_tc_conds[]= +{ + { &key_TABLE_SHARE_COND_release, "TABLE_SHARE::tdc.COND_release", 0 } }; @@ -117,13 +123,16 @@ static void init_tc_psi_keys(void) count= array_elements(all_tc_rwlocks); mysql_rwlock_register(category, all_tc_rwlocks, count); + + count= array_elements(all_tc_conds); + mysql_cond_register(category, all_tc_conds, count); } #endif /* - Auxiliary routines for manipulating with per-share used/unused and - global unused lists of TABLE objects and tc_count counter. + Auxiliary routines for manipulating with per-share all/unused lists + and tc_count counter. Responsible for preserving invariants between those lists, counter and TABLE::in_use member. In fact those routines implement sort of implicit table cache as @@ -133,13 +142,31 @@ static void init_tc_psi_keys(void) /** Get number of TABLE objects (used and unused) in table cache. - - @todo Protect tc_count so it is read atomically. */ uint tc_records(void) { - return tc_count; + uint count; + my_atomic_rwlock_rdlock(&LOCK_tdc_atomics); + count= my_atomic_load32(&tc_count); + my_atomic_rwlock_rdunlock(&LOCK_tdc_atomics); + return count; +} + + +/** + Remove TABLE object from table cache. + + - decrement tc_count + - remove object from TABLE_SHARE::tdc.all_tables +*/ + +static void tc_remove_table(TABLE *table) +{ + my_atomic_rwlock_wrlock(&LOCK_tdc_atomics); + my_atomic_add32(&tc_count, -1); + my_atomic_rwlock_wrunlock(&LOCK_tdc_atomics); + table->s->tdc.all_tables.remove(table); } @@ -158,7 +185,7 @@ uint tc_records(void) periodicly flush all not used tables. */ -void tc_purge(void) +void tc_purge(bool mark_flushed) { TABLE_SHARE *share; TABLE *table; @@ -169,65 +196,23 @@ void tc_purge(void) mysql_mutex_lock(&LOCK_open); while ((share= tdc_it.next())) { + if (mark_flushed) + share->tdc.flushed= true; while ((table= share->tdc.free_tables.pop_front())) { - share->tdc.all_tables.remove(table); + tc_remove_table(table); purge_tables.push_front(table); - tc_count--; } } tdc_it.deinit(); - mysql_rwlock_rdlock(&LOCK_flush); mysql_mutex_unlock(&LOCK_open); while ((table= purge_tables.pop_front())) intern_close_table(table); - mysql_rwlock_unlock(&LOCK_flush); } /** - Verify consistency of used/unused lists (for debugging). -*/ - -#ifdef EXTRA_DEBUG -static void check_unused(THD *thd) -{ - TABLE *entry; - TABLE_SHARE *share; - TDC_iterator tdc_it; - - tdc_it.init(); - mysql_mutex_lock(&LOCK_open); - while ((share= tdc_it.next())) - { - TABLE_SHARE::TABLE_list::Iterator it(share->tdc.free_tables); - while ((entry= it++)) - { - /* - We must not have TABLEs in the free list that have their file closed. - */ - DBUG_ASSERT(entry->db_stat && entry->file); - /* Merge children should be detached from a merge parent */ - if (entry->in_use) - { - DBUG_PRINT("error",("Used table is in share's list of unused tables")); /* purecov: inspected */ - } - /* extra() may assume that in_use is set */ - entry->in_use= thd; - DBUG_ASSERT(!thd || !entry->file->extra(HA_EXTRA_IS_ATTACHED_CHILDREN)); - entry->in_use= 0; - } - } - mysql_mutex_unlock(&LOCK_open); - tdc_it.deinit(); -} -#else -#define check_unused(A) -#endif - - -/** Add new TABLE object to table cache. @pre TABLE object is used by caller. @@ -245,47 +230,45 @@ static void check_unused(THD *thd) void tc_add_table(THD *thd, TABLE *table) { + bool need_purge; DBUG_ASSERT(table->in_use == thd); mysql_mutex_lock(&LOCK_open); table->s->tdc.all_tables.push_front(table); + mysql_mutex_unlock(&LOCK_open); + /* If we have too many TABLE instances around, try to get rid of them */ - if (tc_count == tc_size) + my_atomic_rwlock_wrlock(&LOCK_tdc_atomics); + need_purge= my_atomic_add32(&tc_count, 1) >= (int32) tc_size; + my_atomic_rwlock_wrunlock(&LOCK_tdc_atomics); + + if (need_purge) { + TABLE *purge_table= 0; + TABLE_SHARE *share; TDC_iterator tdc_it; - mysql_mutex_unlock(&LOCK_open); tdc_it.init(); mysql_mutex_lock(&LOCK_open); - if (tc_count == tc_size) + while ((share= tdc_it.next())) { - TABLE *purge_table= 0; - TABLE_SHARE *share; - while ((share= tdc_it.next())) - { - TABLE_SHARE::TABLE_list::Iterator it(share->tdc.free_tables); - TABLE *entry; - while ((entry= it++)) - if (!purge_table || entry->tc_time < purge_table->tc_time) - purge_table= entry; - } - if (purge_table) - { - tdc_it.deinit(); - purge_table->s->tdc.free_tables.remove(purge_table); - purge_table->s->tdc.all_tables.remove(purge_table); - mysql_rwlock_rdlock(&LOCK_flush); - mysql_mutex_unlock(&LOCK_open); - intern_close_table(purge_table); - mysql_rwlock_unlock(&LOCK_flush); - check_unused(thd); - return; - } + TABLE_SHARE::TABLE_list::Iterator it(share->tdc.free_tables); + TABLE *entry; + while ((entry= it++)) + if (!purge_table || entry->tc_time < purge_table->tc_time) + purge_table= entry; } tdc_it.deinit(); + + if (purge_table) + { + purge_table->s->tdc.free_tables.remove(purge_table); + tc_remove_table(purge_table); + mysql_mutex_unlock(&LOCK_open); + intern_close_table(purge_table); + } + else + mysql_mutex_unlock(&LOCK_open); } - /* Nothing to evict, increment tc_count. */ - tc_count++; - mysql_mutex_unlock(&LOCK_open); } @@ -297,7 +280,9 @@ void tc_add_table(THD *thd, TABLE *table) Acquired object cannot be evicted or acquired again. While locked: - - pop object from TABLE_SHARE::tdc.free_tables() + - pop object from TABLE_SHARE::tdc.free_tables + + While unlocked: - mark object used by thd @return TABLE object, or NULL if no unused objects. @@ -308,19 +293,18 @@ static TABLE *tc_acquire_table(THD *thd, TABLE_SHARE *share) TABLE *table; mysql_mutex_lock(&LOCK_open); - if (!(table= share->tdc.free_tables.pop_front())) - { - mysql_mutex_unlock(&LOCK_open); - return 0; - } - DBUG_ASSERT(!table->in_use); - table->in_use= thd; + table= share->tdc.free_tables.pop_front(); mysql_mutex_unlock(&LOCK_open); - /* The ex-unused table must be fully functional. */ - DBUG_ASSERT(table->db_stat && table->file); - /* The children must be detached from the table. */ - DBUG_ASSERT(! table->file->extra(HA_EXTRA_IS_ATTACHED_CHILDREN)); + if (table) + { + DBUG_ASSERT(!table->in_use); + table->in_use= thd; + /* The ex-unused table must be fully functional. */ + DBUG_ASSERT(table->db_stat && table->file); + /* The children must be detached from the table. */ + DBUG_ASSERT(!table->file->extra(HA_EXTRA_IS_ATTACHED_CHILDREN)); + } return table; } @@ -333,12 +317,12 @@ static TABLE *tc_acquire_table(THD *thd, TABLE_SHARE *share) Released object may be evicted or acquired again. While locked: - - mark object not in use by any thread - if object is marked for purge, decrement tc_count - add object to TABLE_SHARE::tdc.free_tables - evict LRU object from table cache if we reached threshold While unlocked: + - mark object not in use by any thread - free evicted/purged object @note Another thread may mark share for purge any moment (even @@ -353,29 +337,38 @@ static TABLE *tc_acquire_table(THD *thd, TABLE_SHARE *share) bool tc_release_table(TABLE *table) { - THD *thd __attribute__((unused))= table->in_use; DBUG_ASSERT(table->in_use); DBUG_ASSERT(table->file); + if (table->needs_reopen() || tc_records() > tc_size) + { + mysql_mutex_lock(&LOCK_open); + goto purge; + } + table->tc_time= my_interval_timer(); mysql_mutex_lock(&LOCK_open); + if (table->s->tdc.flushed) + goto purge; + /* + in_use doesn't really need protection of LOCK_open, but must be reset after + checking tdc.flushed and before this table appears in free_tables. + Resetting in_use is needed only for print_cached_tables() and + list_open_tables(). + */ table->in_use= 0; - if (table->s->has_old_version() || table->needs_reopen() || tc_count > tc_size) - { - tc_count--; - table->s->tdc.all_tables.remove(table); - mysql_rwlock_rdlock(&LOCK_flush); - mysql_mutex_unlock(&LOCK_open); - intern_close_table(table); - mysql_rwlock_unlock(&LOCK_flush); - return true; - } /* Add table to the list of unused TABLE objects for this share. */ table->s->tdc.free_tables.push_front(table); mysql_mutex_unlock(&LOCK_open); - check_unused(thd); return false; + +purge: + tc_remove_table(table); + mysql_mutex_unlock(&LOCK_open); + table->in_use= 0; + intern_close_table(table); + return true; } @@ -403,6 +396,7 @@ static int tdc_delete_share_from_hash(TABLE_SHARE *share) mysql_mutex_lock(&share->tdc.LOCK_table_share); if (--share->tdc.ref_count) { + mysql_cond_broadcast(&share->tdc.COND_release); mysql_mutex_unlock(&share->tdc.LOCK_table_share); mysql_rwlock_unlock(&LOCK_tdc); DBUG_RETURN(1); @@ -462,7 +456,6 @@ int tdc_init(void) mysql_mutex_init(key_LOCK_unused_shares, &LOCK_unused_shares, MY_MUTEX_INIT_FAST); mysql_rwlock_init(key_rwlock_LOCK_tdc, &LOCK_tdc); - mysql_rwlock_init(key_rwlock_LOCK_flush, &LOCK_flush); my_atomic_rwlock_init(&LOCK_tdc_atomics); oldest_unused_share= &end_of_unused_share; end_of_unused_share.tdc.prev= &oldest_unused_share; @@ -510,7 +503,6 @@ void tdc_deinit(void) tdc_inited= false; my_hash_free(&tdc_hash); my_atomic_rwlock_destroy(&LOCK_tdc_atomics); - mysql_rwlock_destroy(&LOCK_flush); mysql_rwlock_destroy(&LOCK_tdc); mysql_mutex_destroy(&LOCK_unused_shares); mysql_mutex_destroy(&LOCK_open); @@ -576,11 +568,13 @@ void tdc_init_share(TABLE_SHARE *share) DBUG_ENTER("tdc_init_share"); mysql_mutex_init(key_TABLE_SHARE_LOCK_table_share, &share->tdc.LOCK_table_share, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_TABLE_SHARE_COND_release, &share->tdc.COND_release, 0); share->tdc.m_flush_tickets.empty(); share->tdc.all_tables.empty(); share->tdc.free_tables.empty(); tdc_assign_new_table_id(share); - share->version= tdc_refresh_version(); + share->tdc.version= tdc_refresh_version(); + share->tdc.flushed= false; DBUG_VOID_RETURN; } @@ -596,6 +590,7 @@ void tdc_deinit_share(TABLE_SHARE *share) DBUG_ASSERT(share->tdc.m_flush_tickets.is_empty()); DBUG_ASSERT(share->tdc.all_tables.is_empty()); DBUG_ASSERT(share->tdc.free_tables.is_empty()); + mysql_cond_destroy(&share->tdc.COND_release); mysql_mutex_destroy(&share->tdc.LOCK_table_share); DBUG_VOID_RETURN; } @@ -669,16 +664,14 @@ void tdc_unlock_share(TABLE_SHARE *share) */ TABLE_SHARE *tdc_acquire_share(THD *thd, const char *db, const char *table_name, - const char *key, uint key_length, uint flags, + const char *key, uint key_length, + my_hash_value_type hash_value, uint flags, TABLE **out_table) { TABLE_SHARE *share; bool was_unused; - my_hash_value_type hash_value; DBUG_ENTER("tdc_acquire_share"); - hash_value= my_calc_hash(&tdc_hash, (uchar*) key, key_length); - mysql_rwlock_rdlock(&LOCK_tdc); share= (TABLE_SHARE*) my_hash_search_using_hash_value(&tdc_hash, hash_value, (uchar*) key, @@ -740,7 +733,6 @@ TABLE_SHARE *tdc_acquire_share(THD *thd, const char *db, const char *table_name, if ((*out_table= tc_acquire_table(thd, share))) { mysql_rwlock_unlock(&LOCK_tdc); - check_unused(thd); DBUG_ASSERT(!(flags & GTS_NOLOCK)); DBUG_ASSERT(!share->error); DBUG_ASSERT(!share->is_view); @@ -828,12 +820,13 @@ void tdc_release_share(TABLE_SHARE *share) DBUG_PRINT("enter", ("share: 0x%lx table: %s.%s ref_count: %u version: %lu", (ulong) share, share->db.str, share->table_name.str, - share->tdc.ref_count, share->version)); + share->tdc.ref_count, share->tdc.version)); DBUG_ASSERT(share->tdc.ref_count); if (share->tdc.ref_count > 1) { share->tdc.ref_count--; + mysql_cond_broadcast(&share->tdc.COND_release); mysql_mutex_unlock(&share->tdc.LOCK_table_share); DBUG_VOID_RETURN; } @@ -841,7 +834,7 @@ void tdc_release_share(TABLE_SHARE *share) mysql_mutex_lock(&LOCK_unused_shares); mysql_mutex_lock(&share->tdc.LOCK_table_share); - if (share->has_old_version()) + if (share->tdc.flushed) { mysql_mutex_unlock(&share->tdc.LOCK_table_share); mysql_mutex_unlock(&LOCK_unused_shares); @@ -959,19 +952,9 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type, if ((share= tdc_delete_share(db, table_name))) { I_P_List <TABLE, TABLE_share> purge_tables; + uint my_refs= 1; mysql_mutex_lock(&LOCK_open); - if (kill_delayed_threads) - kill_delayed_threads_for_table(share); - -#ifndef DBUG_OFF - if (remove_type == TDC_RT_REMOVE_NOT_OWN) - { - TABLE_SHARE::All_share_tables_list::Iterator it2(share->tdc.all_tables); - while ((table= it2++)) - DBUG_ASSERT(!table->in_use || table->in_use == thd); - } -#endif /* Set share's version to zero in order to ensure that it gets automatically deleted once it is no longer referenced. @@ -981,28 +964,62 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type, shares. */ if (remove_type != TDC_RT_REMOVE_NOT_OWN_KEEP_SHARE) - share->version= 0; + share->tdc.flushed= true; while ((table= share->tdc.free_tables.pop_front())) { - share->tdc.all_tables.remove(table); - tc_count--; + tc_remove_table(table); purge_tables.push_front(table); } - mysql_rwlock_rdlock(&LOCK_flush); + if (kill_delayed_threads) + kill_delayed_threads_for_table(share); + + if (remove_type == TDC_RT_REMOVE_NOT_OWN || + remove_type == TDC_RT_REMOVE_NOT_OWN_KEEP_SHARE) + { + TABLE_SHARE::All_share_tables_list::Iterator it(share->tdc.all_tables); + while ((table= it++)) + { + my_refs++; + DBUG_ASSERT(table->in_use == thd); + } + } + DBUG_ASSERT(share->tdc.all_tables.is_empty() || remove_type != TDC_RT_REMOVE_ALL); mysql_mutex_unlock(&LOCK_open); while ((table= purge_tables.pop_front())) intern_close_table(table); - mysql_rwlock_unlock(&LOCK_flush); - check_unused(thd); - DBUG_ASSERT(share->tdc.all_tables.is_empty() || remove_type != TDC_RT_REMOVE_ALL); - tdc_release_share(share); + if (remove_type != TDC_RT_REMOVE_UNUSED) + { + /* + Even though current thread holds exclusive metadata lock on this share + (asserted above), concurrent FLUSH TABLES threads may be in process of + closing unused table instances belonging to this share. E.g.: + thr1 (FLUSH TABLES): table= share->tdc.free_tables.pop_front(); + thr1 (FLUSH TABLES): share->tdc.all_tables.remove(table); + thr2 (ALTER TABLE): tdc_remove_table(); + thr1 (FLUSH TABLES): intern_close_table(table); + + Current remove type assumes that all table instances (except for those + that are owned by current thread) must be closed before + thd_remove_table() returns. Wait for such tables now. + + intern_close_table() decrements ref_count and signals COND_release. When + ref_count drops down to number of references owned by current thread + waiting is completed. + + Unfortunately TABLE_SHARE::wait_for_old_version() cannot be used here + because it waits for all table instances, whereas we have to wait only + for those that are not owned by current thread. + */ + mysql_mutex_lock(&share->tdc.LOCK_table_share); + while (share->tdc.ref_count > my_refs) + mysql_cond_wait(&share->tdc.COND_release, &share->tdc.LOCK_table_share); + mysql_mutex_unlock(&share->tdc.LOCK_table_share); + } - /* Wait for concurrent threads to free unused objects. */ - mysql_rwlock_wrlock(&LOCK_flush); - mysql_rwlock_unlock(&LOCK_flush); + tdc_release_share(share); found= true; } @@ -1026,14 +1043,15 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type, */ int tdc_wait_for_old_version(THD *thd, const char *db, const char *table_name, - ulong wait_timeout, uint deadlock_weight) + ulong wait_timeout, uint deadlock_weight, + ulong refresh_version) { TABLE_SHARE *share; int res= FALSE; if ((share= tdc_lock_share(db, table_name))) { - if (share->has_old_version()) + if (share->tdc.flushed && refresh_version > share->tdc.version) { struct timespec abstime; set_timespec(abstime, wait_timeout); @@ -1050,21 +1068,18 @@ ulong tdc_refresh_version(void) { my_atomic_rwlock_rdlock(&LOCK_tdc_atomics); ulong v= my_atomic_load64(&tdc_version); - my_atomic_rwlock_wrunlock(&LOCK_tdc_atomics); + my_atomic_rwlock_rdunlock(&LOCK_tdc_atomics); return v; } -void tdc_increment_refresh_version(void) +ulong tdc_increment_refresh_version(void) { my_atomic_rwlock_wrlock(&LOCK_tdc_atomics); -#ifndef DBUG_OFF ulong v= my_atomic_add64(&tdc_version, 1); -#else - my_atomic_add64(&tdc_version, 1); -#endif my_atomic_rwlock_wrunlock(&LOCK_tdc_atomics); DBUG_PRINT("tcache", ("incremented global refresh_version to: %lu", v)); + return v + 1; } diff --git a/sql/table_cache.h b/sql/table_cache.h index 7b7fb239131..6da6a667792 100644 --- a/sql/table_cache.h +++ b/sql/table_cache.h @@ -40,6 +40,7 @@ extern void tdc_unlock_share(TABLE_SHARE *share); extern TABLE_SHARE *tdc_acquire_share(THD *thd, const char *db, const char *table_name, const char *key, uint key_length, + my_hash_value_type hash_value, uint flags, TABLE **out_table); extern void tdc_release_share(TABLE_SHARE *share); extern bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type, @@ -47,13 +48,14 @@ extern bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type, bool kill_delayed_threads); extern int tdc_wait_for_old_version(THD *thd, const char *db, const char *table_name, - ulong wait_timeout, uint deadlock_weight); + ulong wait_timeout, uint deadlock_weight, + ulong refresh_version= ULONG_MAX); extern ulong tdc_refresh_version(void); -extern void tdc_increment_refresh_version(void); +extern ulong tdc_increment_refresh_version(void); extern void tdc_assign_new_table_id(TABLE_SHARE *share); extern uint tc_records(void); -extern void tc_purge(void); +extern void tc_purge(bool mark_flushed= false); extern void tc_add_table(THD *thd, TABLE *table); extern bool tc_release_table(TABLE *table); @@ -87,7 +89,9 @@ static inline TABLE_SHARE *tdc_acquire_share(THD *thd, const char *db, const char *key, uint key_length, uint flags) { - return tdc_acquire_share(thd, db, table_name, key, key_length, flags, 0); + return tdc_acquire_share(thd, db, table_name, key, key_length, + my_hash_sort(&my_charset_bin, (uchar*) key, + key_length), flags, 0); } @@ -119,7 +123,8 @@ static inline TABLE_SHARE *tdc_acquire_share_shortlived(THD *thd, TABLE_LIST *tl { const char *key; uint key_length= get_table_def_key(tl, &key); - return tdc_acquire_share(thd, tl->db, tl->table_name, key, key_length, flags); + return tdc_acquire_share(thd, tl->db, tl->table_name, key, key_length, + tl->mdl_request.key.tc_hash_value(), flags, 0); } diff --git a/sql/threadpool_unix.cc b/sql/threadpool_unix.cc index f0454cfedb0..68c032fb67b 100644 --- a/sql/threadpool_unix.cc +++ b/sql/threadpool_unix.cc @@ -19,6 +19,9 @@ #include <sql_class.h> #include <my_pthread.h> #include <scheduler.h> + +#ifdef HAVE_POOL_OF_THREADS + #include <sql_connect.h> #include <mysqld.h> #include <debug_sync.h> @@ -1678,3 +1681,5 @@ static void print_pool_blocked_message(bool max_threads_reached) msg_written= true; } } + +#endif /* HAVE_POOL_OF_THREADS */ diff --git a/sql/transaction.cc b/sql/transaction.cc index 54d36a771a9..8770f729b88 100644 --- a/sql/transaction.cc +++ b/sql/transaction.cc @@ -144,7 +144,7 @@ bool trans_begin(THD *thd, uint flags) thd->server_status&= ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY); DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS")); - res= test(ha_commit_trans(thd, TRUE)); + res= MY_TEST(ha_commit_trans(thd, TRUE)); #ifdef WITH_WSREP wsrep_post_commit(thd, TRUE); #endif /* WITH_WSREP */ @@ -181,7 +181,7 @@ bool trans_begin(THD *thd, uint flags) compatibility. */ const bool user_is_super= - test(thd->security_ctx->master_access & SUPER_ACL); + MY_TEST(thd->security_ctx->master_access & SUPER_ACL); if (opt_readonly && !user_is_super) { my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only"); @@ -206,7 +206,7 @@ bool trans_begin(THD *thd, uint flags) if (flags & MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT) res= ha_start_consistent_snapshot(thd); - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -249,7 +249,7 @@ bool trans_commit(THD *thd) thd->transaction.all.modified_non_trans_table= FALSE; thd->lex->start_transaction_opt= 0; - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -272,6 +272,10 @@ bool trans_commit_implicit(THD *thd) if (trans_check(thd)) DBUG_RETURN(TRUE); + if (thd->variables.option_bits & OPTION_GTID_BEGIN) + DBUG_PRINT("error", ("OPTION_GTID_BEGIN is set. " + "Master and slave will have different GTID values")); + if (thd->in_multi_stmt_transaction_mode() || (thd->variables.option_bits & OPTION_TABLE_LOCK)) { @@ -284,7 +288,7 @@ bool trans_commit_implicit(THD *thd) thd->server_status&= ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY); DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS")); - res= test(ha_commit_trans(thd, TRUE)); + res= MY_TEST(ha_commit_trans(thd, TRUE)); #ifdef WITH_WSREP wsrep_post_commit(thd, TRUE); #endif /* WITH_WSREP */ @@ -335,10 +339,12 @@ bool trans_rollback(THD *thd) res= ha_rollback_trans(thd, TRUE); (void) RUN_HOOK(transaction, after_rollback, (thd, FALSE)); thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); + /* Reset the binlog transaction marker */ + thd->variables.option_bits&= ~OPTION_GTID_BEGIN; thd->transaction.all.modified_non_trans_table= FALSE; thd->lex->start_transaction_opt= 0; - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -384,7 +390,7 @@ bool trans_rollback_implicit(THD *thd) /* Rollback should clear transaction_rollback_request flag. */ DBUG_ASSERT(! thd->transaction_rollback_request); - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -442,7 +448,7 @@ bool trans_commit_stmt(THD *thd) thd->transaction.stmt.reset(); - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -631,7 +637,7 @@ bool trans_rollback_to_savepoint(THD *thd, LEX_STRING name) if (!res && !binlog_on) thd->mdl_context.rollback_to_savepoint(sv->mdl_savepoint); - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -666,7 +672,7 @@ bool trans_release_savepoint(THD *thd, LEX_STRING name) thd->transaction.savepoints= sv->prev; - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -833,7 +839,7 @@ bool trans_xa_commit(THD *thd) wsrep_register_hton(thd, TRUE); #endif /* WITH_WSREP */ int r= ha_commit_trans(thd, TRUE); - if ((res= test(r))) + if ((res= MY_TEST(r))) my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0)); #ifdef WITH_WSREP wsrep_post_commit(thd, TRUE); @@ -866,7 +872,7 @@ bool trans_xa_commit(THD *thd) { DEBUG_SYNC(thd, "trans_xa_commit_after_acquire_commit_lock"); - res= test(ha_commit_one_phase(thd, 1)); + res= MY_TEST(ha_commit_one_phase(thd, 1)); if (res) my_error(ER_XAER_RMERR, MYF(0)); } diff --git a/sql/transaction.h b/sql/transaction.h index abe7823cf9b..54b25f1de2a 100644 --- a/sql/transaction.h +++ b/sql/transaction.h @@ -1,5 +1,4 @@ -/* Copyright (c) 2008 MySQL AB, 2009 Sun Microsystems, Inc. - Use is subject to license terms. +/* Copyright (c) 2008, 2013, 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 diff --git a/sql/tztime.cc b/sql/tztime.cc index b0607293296..857039eb1e8 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -41,6 +41,8 @@ #include <my_time.h> #include "tztime.h" #include <my_sys.h> +#include <mysql_version.h> +#include <my_getopt.h> #endif #include "tzfile.h" @@ -63,6 +65,8 @@ #endif /* !defined(DBUG_OFF) */ #endif /* defined(TZINFO2SQL) || defined(TESTTIME) */ +#define PROGRAM_VERSION "1.1" + /* Structure describing local time type (e.g. Moscow summer time (MSD)) */ typedef struct ttinfo { @@ -2387,7 +2391,6 @@ void Time_zone::adjust_leap_second(MYSQL_TIME *t) tables. */ - /* Print info about time zone described by TIME_ZONE_INFO struct as SQL statements populating mysql.time_zone* tables. @@ -2472,6 +2475,15 @@ MEM_ROOT tz_storage; char fullname[FN_REFLEN + 1]; char *root_name_end; +/* + known file types that exist in the zoneinfo directory that are safe to + silently skip +*/ +const char *known_extensions[]= { + ".tab", + NullS +}; + /* Recursively scan zoneinfo directory and print all found time zone @@ -2480,6 +2492,8 @@ char *root_name_end; SYNOPSIS scan_tz_dir() name_end - pointer to end of path to directory to be searched. + symlink_recursion_level How many symlink directory levels are used + verbose >0 if we should print warnings DESCRIPTION This auxiliary recursive function also uses several global @@ -2495,7 +2509,7 @@ char *root_name_end; */ my_bool -scan_tz_dir(char * name_end, uint symlink_recursion_level) +scan_tz_dir(char * name_end, uint symlink_recursion_level, uint verbose) { MY_DIR *cur_dir; char *name_end_tmp; @@ -2536,12 +2550,21 @@ scan_tz_dir(char * name_end, uint symlink_recursion_level) following such symlinks infinitely: /usr/share/zoneinfo/posix/posix/posix/.../posix/ */ - fflush(stdout); - fprintf(stderr, "Warning: Skipping directory '%s': " - "to avoid infinite symlink recursion.\n", fullname); + + /* + This is a normal case and not critical. only print warning if + verbose mode is choosen. + */ + if (verbose > 0) + { + fflush(stdout); + fprintf(stderr, "Warning: Skipping directory '%s': " + "to avoid infinite symlink recursion.\n", fullname); + } continue; } - if (scan_tz_dir(name_end_tmp, symlink_recursion_level + is_symlink)) + if (scan_tz_dir(name_end_tmp, symlink_recursion_level + is_symlink, + verbose)) { my_dirend(cur_dir); return 1; @@ -2554,10 +2577,28 @@ scan_tz_dir(char * name_end, uint symlink_recursion_level) print_tz_as_sql(root_name_end + 1, &tz_info); else { - fflush(stdout); - fprintf(stderr, - "Warning: Unable to load '%s' as time zone. Skipping it.\n", - fullname); + /* + Some systems (like debian, opensuse etc) have description + files (.tab). We skip these silently if verbose is > 0 + */ + const char *current_ext= fn_ext(fullname); + my_bool known_ext= 0; + + for (const char **ext= known_extensions ; *ext ; ext++) + { + if (!strcmp(*ext, current_ext)) + { + known_ext= 1; + break; + } + } + if (verbose > 0 || !known_ext) + { + fflush(stdout); + fprintf(stderr, + "Warning: Unable to load '%s' as time zone. Skipping it.\n", + fullname); + } } free_root(&tz_storage, MYF(0)); } @@ -2576,37 +2617,118 @@ scan_tz_dir(char * name_end, uint symlink_recursion_level) } +my_bool opt_leap, opt_verbose; + +static const char *load_default_groups[]= +{ "mysql_tzinfo_to_sql", 0}; + +static struct my_option my_long_options[] = +{ + {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, + 0, 0, 0, 0, 0, 0}, +#ifdef DBUG_OFF + {"debug", '#', "This is a non-debug version. Catch this and exit", + 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, +#else + {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", + 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, +#endif + {"leap", 'l', "Print the leap second information from the given time zone file. By convention, when --leap is used the next argument is the timezonefile", + &opt_leap, &opt_leap, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"verbose", 'v', "Write non critical warnings", + &opt_verbose, &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"version", 'V', "Output version information and exit.", + 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} +}; + + +C_MODE_START +static my_bool get_one_option(int optid, const struct my_option *, + char *argument); +C_MODE_END + +static void print_version(void) +{ + printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname, PROGRAM_VERSION, + MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); +} + +static void print_usage(void) +{ + fprintf(stderr, "Usage:\n"); + fprintf(stderr, " %s [options] timezonedir\n", my_progname); + fprintf(stderr, " %s [options] timezonefile timezonename\n", my_progname); + print_defaults("my",load_default_groups); + puts(""); + my_print_help(my_long_options); + my_print_variables(my_long_options); +} + + +static my_bool +get_one_option(int optid, const struct my_option *opt, char *argument) +{ + switch(optid) { + case '#': +#ifndef DBUG_OFF + DBUG_PUSH(argument ? argument : "d:t:S:i:O,/tmp/mysq_tzinfo_to_sql.trace"); +#endif + break; + case '?': + print_version(); + puts(""); + print_usage(); + exit(0); + case 'V': + print_version(); + exit(0); + } + return 0; +} + + int main(int argc, char **argv) { + char **default_argv; MY_INIT(argv[0]); - if (argc != 2 && argc != 3) + if (load_defaults("my",load_default_groups,&argc,&argv)) + exit(1); + + default_argv= argv; + + if ((handle_options(&argc, &argv, my_long_options, get_one_option))) + exit(1); + + if ((argc != 1 && argc != 2) || (opt_leap && argc != 1)) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " %s timezonedir\n", argv[0]); - fprintf(stderr, " %s timezonefile timezonename\n", argv[0]); - fprintf(stderr, " %s --leap timezonefile\n", argv[0]); + print_usage(); + free_defaults(default_argv); return 1; } // Replicate MyISAM DDL for this session, cf. lp:1161432 printf("SET SESSION wsrep_replicate_myisam=ON;\n"); - if (argc == 2) + if (argc == 1 && !opt_leap) { - root_name_end= strmake_buf(fullname, argv[1]); + /* Argument is timezonedir */ + + root_name_end= strmake_buf(fullname, argv[0]); printf("TRUNCATE TABLE time_zone;\n"); printf("TRUNCATE TABLE time_zone_name;\n"); printf("TRUNCATE TABLE time_zone_transition;\n"); printf("TRUNCATE TABLE time_zone_transition_type;\n"); - if (scan_tz_dir(root_name_end, 0)) + if (scan_tz_dir(root_name_end, 0, opt_verbose)) { fflush(stdout); - fprintf(stderr, "There were fatal errors during processing " - "of zoneinfo directory\n"); + fprintf(stderr, + "There were fatal errors during processing " + "of zoneinfo directory '%s'\n", fullname); return 1; } @@ -2617,32 +2739,27 @@ main(int argc, char **argv) } else { + /* + First argument is timezonefile. + The second is timezonename if opt_leap is not given + */ init_alloc_root(&tz_storage, 32768, 0, MYF(0)); - if (strcmp(argv[1], "--leap") == 0) + if (tz_load(argv[0], &tz_info, &tz_storage)) { - if (tz_load(argv[2], &tz_info, &tz_storage)) - { - fflush(stdout); - fprintf(stderr, "Problems with zoneinfo file '%s'\n", argv[2]); - return 1; - } - print_tz_leaps_as_sql(&tz_info); + fflush(stdout); + fprintf(stderr, "Problems with zoneinfo file '%s'\n", argv[0]); + return 1; } + if (opt_leap) + print_tz_leaps_as_sql(&tz_info); else - { - if (tz_load(argv[1], &tz_info, &tz_storage)) - { - fflush(stdout); - fprintf(stderr, "Problems with zoneinfo file '%s'\n", argv[2]); - return 1; - } - print_tz_as_sql(argv[2], &tz_info); - } + print_tz_as_sql(argv[1], &tz_info); free_root(&tz_storage, MYF(0)); } + free_defaults(default_argv); my_end(0); return 0; } @@ -2709,7 +2826,7 @@ main(int argc, char **argv) if (TYPE_SIGNED(time_t)) { t= -100; - localtime_negative= test(localtime_r(&t, &tmp) != 0); + localtime_negative= MY_TEST(localtime_r(&t, &tmp) != 0); printf("localtime_r %s negative params \ (time_t=%d is %d-%d-%d %d:%d:%d)\n", (localtime_negative ? "supports" : "doesn't support"), (int)t, diff --git a/sql/uniques.cc b/sql/uniques.cc index 0c1c34d495b..0990182dbdb 100644 --- a/sql/uniques.cc +++ b/sql/uniques.cc @@ -86,7 +86,7 @@ Unique::Unique(qsort_cmp2 comp_func, void * comp_func_fixed_arg, full_size= size; if (min_dupl_count_arg) full_size+= sizeof(element_count); - with_counters= test(min_dupl_count_arg); + with_counters= MY_TEST(min_dupl_count_arg); my_b_clear(&file); init_tree(&tree, (ulong) (max_in_memory_size / 16), 0, size, comp_func, NULL, comp_func_fixed_arg, MYF(MY_THREAD_SPECIFIC)); diff --git a/sql/unireg.cc b/sql/unireg.cc index 7bb943dc9b0..ad2d711be99 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -280,8 +280,8 @@ LEX_CUSTRING build_frm_image(THD *thd, const char *table, int2store(forminfo+2, frm.length - filepos); int4store(fileinfo+10, frm.length); - fileinfo[26]= (uchar) test((create_info->max_rows == 1) && - (create_info->min_rows == 1) && (keys == 0)); + fileinfo[26]= (uchar) MY_TEST((create_info->max_rows == 1) && + (create_info->min_rows == 1) && (keys == 0)); int2store(fileinfo+28,key_info_length); if (part_info) @@ -898,7 +898,7 @@ static bool pack_fields(uchar *buff, List<Create_field> &create_fields, */ if (field->vcol_info && field->vcol_info->expr_str.length) { - *buff++= (uchar)(1 + test(field->interval)); + *buff++= (uchar) (1 + MY_TEST(field->interval)); *buff++= (uchar) field->sql_type; *buff++= (uchar) field->stored_in_db; if (field->interval) diff --git a/storage/archive/ha_archive.h b/storage/archive/ha_archive.h index 47ee89198e6..56ff566db8c 100644 --- a/storage/archive/ha_archive.h +++ b/storage/archive/ha_archive.h @@ -107,7 +107,7 @@ public: { return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_CAN_BIT_FIELD | HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | - HA_STATS_RECORDS_IS_EXACT | + HA_STATS_RECORDS_IS_EXACT | HA_CAN_EXPORT | HA_HAS_RECORDS | HA_CAN_REPAIR | HA_FILE_BASED | HA_CAN_INSERT_DELAYED | HA_CAN_GEOMETRY); } diff --git a/storage/connect/catalog.h b/storage/connect/catalog.h index 3a06aea7a30..a61b1a53653 100644 --- a/storage/connect/catalog.h +++ b/storage/connect/catalog.h @@ -41,7 +41,8 @@ typedef struct _colinfo { int Offset; int Length; int Key; - int Prec; + int Precision; + int Scale; int Opt; char *Remark; char *Datefmt; diff --git a/storage/connect/colblk.cpp b/storage/connect/colblk.cpp index 6b2921e1737..bce26e25387 100644 --- a/storage/connect/colblk.cpp +++ b/storage/connect/colblk.cpp @@ -38,6 +38,7 @@ COLBLK::COLBLK(PCOLDEF cdp, PTDB tdbp, int i) Format = cdp->F; Opt = cdp->Opt; Long = cdp->Long; + Precision = cdp->Precision; Buf_Type = cdp->Buf_Type; ColUse |= cdp->Flags; // Used by CONNECT Nullable = !!(cdp->Flags & U_NULLS); @@ -47,6 +48,7 @@ COLBLK::COLBLK(PCOLDEF cdp, PTDB tdbp, int i) memset(&Format, 0, sizeof(FORMAT)); Opt = 0; Long = 0; + Precision = 0; Buf_Type = TYPE_ERROR; Nullable = false; Unsigned = false; @@ -165,7 +167,7 @@ bool COLBLK::CheckSort(PTDB tdbp) /* InitValue: prepare a column block for read operation. */ /* Now we use Format.Length for the len parameter to avoid strings */ /* to be truncated when converting from string to coded string. */ -/* Added in version 1.5 is the arguments GetPrecision() and Domain */ +/* Added in version 1.5 is the arguments GetScale() and Domain */ /* in calling AllocateValue. Domain is used for TYPE_DATE only. */ /***********************************************************************/ bool COLBLK::InitValue(PGLOBAL g) @@ -173,12 +175,9 @@ bool COLBLK::InitValue(PGLOBAL g) if (Value) return false; // Already done - // Unsigned can be set only for valid value types - int prec = (Unsigned) ? 1 : GetPrecision(); - // Allocate a Value object - if (!(Value = AllocateValue(g, Buf_Type, Format.Length, - prec, GetDomain()))) + if (!(Value = AllocateValue(g, Buf_Type, Precision, + GetScale(), Unsigned, GetDomain()))) return true; AddStatus(BUF_READY); @@ -270,7 +269,7 @@ SPCBLK::SPCBLK(PCOLUMN cp) : COLBLK((PCOLDEF)NULL, cp->GetTo_Table()->GetTo_Tdb(), 0) { Name = (char*)cp->GetName(); - Long = 0; + Precision = Long = 0; Buf_Type = TYPE_ERROR; } // end of SPCBLK constructor @@ -290,7 +289,7 @@ void SPCBLK::WriteColumn(PGLOBAL g) /***********************************************************************/ RIDBLK::RIDBLK(PCOLUMN cp, bool rnm) : SPCBLK(cp) { - Long = 10; + Precision = Long = 10; Buf_Type = TYPE_INT; Rnm = rnm; *Format.Type = 'N'; @@ -313,7 +312,7 @@ void RIDBLK::ReadColumn(PGLOBAL g) FIDBLK::FIDBLK(PCOLUMN cp) : SPCBLK(cp) { //Is_Key = 2; for when the MUL table indexed reading will be implemented. - Long = _MAX_PATH; + Precision = Long = _MAX_PATH; Buf_Type = TYPE_STRING; *Format.Type = 'C'; Format.Length = Long; @@ -348,7 +347,7 @@ void FIDBLK::ReadColumn(PGLOBAL g) TIDBLK::TIDBLK(PCOLUMN cp) : SPCBLK(cp) { //Is_Key = 2; for when the MUL table indexed reading will be implemented. - Long = 64; + Precision = Long = 64; Buf_Type = TYPE_STRING; *Format.Type = 'C'; Format.Length = Long; @@ -375,7 +374,7 @@ void TIDBLK::ReadColumn(PGLOBAL g) SIDBLK::SIDBLK(PCOLUMN cp) : SPCBLK(cp) { //Is_Key = 2; for when the MUL table indexed reading will be implemented. - Long = 64; + Precision = Long = 64; Buf_Type = TYPE_STRING; *Format.Type = 'C'; Format.Length = Long; diff --git a/storage/connect/colblk.h b/storage/connect/colblk.h index 7b5fe0cad0f..11fca3e4fb7 100644 --- a/storage/connect/colblk.h +++ b/storage/connect/colblk.h @@ -1,7 +1,7 @@ /*************** Colblk H Declares Source Code File (.H) ***************/ -/* Name: COLBLK.H Version 1.6 */ +/* Name: COLBLK.H Version 1.7 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2013 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ /* */ /* This file contains the COLBLK and derived classes declares. */ /***********************************************************************/ @@ -29,7 +29,8 @@ class DllExport COLBLK : public XOBJECT { // Implementation virtual int GetType(void) {return TYPE_COLBLK;} virtual int GetResultType(void) {return Buf_Type;} - virtual int GetPrecision(void) {return Format.Prec;} + virtual int GetScale(void) {return Format.Prec;} + virtual int GetPrecision(void) {return Precision;} virtual int GetLength(void) {return Long;} virtual int GetLengthEx(void); virtual int GetAmType() {return TYPE_AM_ERROR;} @@ -53,6 +54,7 @@ class DllExport COLBLK : public XOBJECT { PSZ GetDomain(void) {return (Cdp) ? Cdp->Decode : NULL;} PSZ GetDesc(void) {return (Cdp) ? Cdp->Desc : NULL;} PSZ GetFmt(void) {return (Cdp) ? Cdp->Fmt : NULL;} + bool IsUnsigned(void) {return Unsigned;} bool IsNullable(void) {return Nullable;} void SetNullable(bool b) {Nullable = b;} @@ -88,6 +90,7 @@ class DllExport COLBLK : public XOBJECT { int Opt; // Cluster/sort information int Buf_Type; // Data type int Long; // Internal length in table + int Precision; // Column length (as for ODBC) FORMAT Format; // Output format ushort ColUse; // Column usage ushort Status; // Column read status @@ -96,7 +99,7 @@ class DllExport COLBLK : public XOBJECT { /***********************************************************************/ /* Class SPCBLK: Base class for special column descriptors. */ /***********************************************************************/ -class SPCBLK : public COLBLK { +class DllExport SPCBLK : public COLBLK { public: // Constructor SPCBLK(PCOLUMN cp); @@ -118,7 +121,7 @@ class SPCBLK : public COLBLK { /***********************************************************************/ /* Class RIDBLK: ROWID special column descriptor. */ /***********************************************************************/ -class RIDBLK : public SPCBLK { +class DllExport RIDBLK : public SPCBLK { public: // Constructor RIDBLK(PCOLUMN cp, bool rnm); @@ -137,7 +140,7 @@ class RIDBLK : public SPCBLK { /***********************************************************************/ /* Class FIDBLK: FILEID special column descriptor. */ /***********************************************************************/ -class FIDBLK : public SPCBLK { +class DllExport FIDBLK : public SPCBLK { public: // Constructor FIDBLK(PCOLUMN cp); @@ -158,7 +161,7 @@ class FIDBLK : public SPCBLK { /***********************************************************************/ /* Class TIDBLK: TABID special column descriptor. */ /***********************************************************************/ -class TIDBLK : public SPCBLK { +class DllExport TIDBLK : public SPCBLK { public: // Constructor TIDBLK(PCOLUMN cp); @@ -183,7 +186,7 @@ class TIDBLK : public SPCBLK { /***********************************************************************/ /* Class SIDBLK: SERVID special column descriptor. */ /***********************************************************************/ -class SIDBLK : public SPCBLK { +class DllExport SIDBLK : public SPCBLK { public: // Constructor SIDBLK(PCOLUMN cp); diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc index f3c2559f13e..9340ae97258 100644 --- a/storage/connect/connect.cc +++ b/storage/connect/connect.cc @@ -347,7 +347,7 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2, if (xtrace) printf("About to open the table: tdbp=%p\n", tdbp); - if (mode != MODE_ANY) { + if (mode != MODE_ANY && mode != MODE_ALTER) { if (tdbp->OpenDB(g)) { printf("%s\n", g->Message); return true; diff --git a/storage/connect/filamdbf.cpp b/storage/connect/filamdbf.cpp index c7f389b3ac5..2b56e5c3d2f 100644 --- a/storage/connect/filamdbf.cpp +++ b/storage/connect/filamdbf.cpp @@ -178,18 +178,18 @@ static int dbfhead(PGLOBAL g, FILE *file, PSZ fn, DBFHEADER *buf) /****************************************************************************/ PQRYRES DBFColumns(PGLOBAL g, const char *fn, BOOL info) { - static int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING, - TYPE_INT, TYPE_INT, TYPE_SHORT}; - static XFLD fldtyp[] = {FLD_NAME, FLD_TYPE, FLD_TYPENAME, - FLD_PREC, FLD_LENGTH, FLD_SCALE}; - static unsigned int length[] = {11, 6, 8, 10, 10, 6}; + int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING, + TYPE_INT, TYPE_INT, TYPE_SHORT}; + XFLD fldtyp[] = {FLD_NAME, FLD_TYPE, FLD_TYPENAME, + FLD_PREC, FLD_LENGTH, FLD_SCALE}; + unsigned int length[] = {11, 6, 8, 10, 10, 6}; char buf[2], filename[_MAX_PATH]; int ncol = sizeof(buftyp) / sizeof(int); int rc, type, len, field, fields; BOOL bad; DBFHEADER mainhead; DESCRIPTOR thisfield; - FILE *infile; + FILE *infile = NULL; PQRYRES qrp; PCOLRES crp; @@ -228,8 +228,12 @@ PQRYRES DBFColumns(PGLOBAL g, const char *fn, BOOL info) qrp = PlgAllocResult(g, ncol, fields, IDS_COLUMNS + 3, buftyp, fldtyp, length, true, false); - if (info || !qrp) + if (info || !qrp) { + if (infile) + fclose(infile); + return qrp; + } // endif info if (trace) { htrc("Structure of %s\n", filename); @@ -271,11 +275,11 @@ PQRYRES DBFColumns(PGLOBAL g, const char *fn, BOOL info) type = TYPE_STRING; break; case 'N': - type = (thisfield.Decimals) ? TYPE_FLOAT + type = (thisfield.Decimals) ? TYPE_DOUBLE : (len > 10) ? TYPE_BIGINT : TYPE_INT; break; case 'F': - type = TYPE_FLOAT; + type = TYPE_DOUBLE; break; case 'D': type = TYPE_DATE; // Is this correct ??? diff --git a/storage/connect/filamtxt.cpp b/storage/connect/filamtxt.cpp index 2291f2c2b00..1d3f17e2228 100644 --- a/storage/connect/filamtxt.cpp +++ b/storage/connect/filamtxt.cpp @@ -535,7 +535,7 @@ int DOSFAM::ReadBuffer(PGLOBAL g) if (!Stream) return RC_EF; - if (trace) + if (trace > 1) htrc("ReadBuffer: Tdbp=%p To_Line=%p Placed=%d\n", Tdbp, Tdbp->To_Line, Placed); @@ -548,20 +548,20 @@ int DOSFAM::ReadBuffer(PGLOBAL g) CurBlk = (int)Rows++; - if (trace) + if (trace > 1) htrc("ReadBuffer: CurBlk=%d\n", CurBlk); } else Placed = false; - if (trace) + if (trace > 1) htrc(" About to read: stream=%p To_Buf=%p Buflen=%d\n", Stream, To_Buf, Buflen); if (fgets(To_Buf, Buflen, Stream)) { p = To_Buf + strlen(To_Buf) - 1; - if (trace) + if (trace > 1) htrc(" Read: To_Buf=%p p=%c\n", To_Buf, To_Buf, p); #if defined(UNIX) @@ -589,7 +589,7 @@ int DOSFAM::ReadBuffer(PGLOBAL g) } else if (*p == '\n') *p = '\0'; // Eliminate ending new-line character - if (trace) + if (trace > 1) htrc(" To_Buf='%s'\n", To_Buf); strcpy(Tdbp->To_Line, To_Buf); @@ -610,7 +610,7 @@ int DOSFAM::ReadBuffer(PGLOBAL g) rc = RC_FX; } // endif's fgets - if (trace) + if (trace > 1) htrc("ReadBuffer: rc=%d\n", rc); IsRead = true; diff --git a/storage/connect/global.h b/storage/connect/global.h index 3702f050501..8bccd742a64 100644 --- a/storage/connect/global.h +++ b/storage/connect/global.h @@ -77,12 +77,13 @@ #define TYPE_SEMX 0 /* Initial semantic function type? */ #define TYPE_ERROR 0 #define TYPE_STRING 1 -#define TYPE_FLOAT 2 +#define TYPE_DOUBLE 2 #define TYPE_SHORT 3 #define TYPE_TINY 4 #define TYPE_BIGINT 5 #define TYPE_LIST 6 #define TYPE_INT 7 +#define TYPE_DECIM 9 #if defined(OS32) #define SYS_STAMP "OS32" @@ -218,9 +219,10 @@ typedef struct _global { /* Global structure */ uint Sarea_Size; /* Work area size */ PACTIVITY Activityp, ActivityStart; char Message[MAX_STR]; - short Trace; int Createas; /* To pass info to created table */ void *Xchk; /* indexes in create/alter */ + short Alchecked; /* Checked for ALTER */ + short Trace; int jump_level; jmp_buf jumper[MAX_JUMP + 2]; } GLOBAL; diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 706f29175d6..3d4ec2dbc13 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -1,4 +1,4 @@ -/* Copyright (C) Olivier Bertrand 2004 - 2013 +/* Copyright (C) Olivier Bertrand 2004 - 2014 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 @@ -107,6 +107,7 @@ #include "field.h" #include "sql_parse.h" #include "sql_base.h" +#include <sys/stat.h> #if defined(NEW_WAY) #include "sql_table.h" #endif // NEW_WAY @@ -164,8 +165,13 @@ extern "C" char plgini[]; extern "C" char nmfile[]; extern "C" char pdebug[]; +/***********************************************************************/ +/* Initialize the ha_connect static members. */ +/***********************************************************************/ +#define CONNECT_INI "connect.ini" extern "C" { - char version[]= "Version 1.01.0011 December 15, 2013"; + char connectini[_MAX_PATH]= CONNECT_INI; + char version[]= "Version 1.02.0001 February 03, 2014"; #if defined(XMSG) char msglang[]; // Default message language @@ -173,17 +179,17 @@ extern "C" { int trace= 0; // The general trace value } // extern "C" -/****************************************************************************/ -/* Initialize the ha_connect static members. */ -/****************************************************************************/ -#define CONNECT_INI "connect.ini" -char connectini[_MAX_PATH]= CONNECT_INI; int xtrace= 0; ulong ha_connect::num= 0; //int DTVAL::Shift= 0; +/***********************************************************************/ +/* Utility functions. */ +/***********************************************************************/ +PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); + static PCONNECT GetUser(THD *thd, PCONNECT xp); -static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp); +static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp); static handler *connect_create_handler(handlerton *hton, TABLE_SHARE *table, @@ -474,6 +480,7 @@ ha_connect::ha_connect(handlerton *hton, TABLE_SHARE *table_arg) valid_query_id= 0; creat_query_id= (table && table->in_use) ? table->in_use->query_id : 0; stop= false; + alter= false; indexing= -1; locked= 0; data_file_name= NULL; @@ -491,6 +498,11 @@ ha_connect::ha_connect(handlerton *hton, TABLE_SHARE *table_arg) /****************************************************************************/ ha_connect::~ha_connect(void) { + if (xtrace) + printf("Delete CONNECT %p, table: %s, xp=%p count=%d\n", this, + table ? table->s->table_name.str : "<null>", + xp, xp ? xp->count : 0); + if (xp) { PCONNECT p; @@ -562,12 +574,55 @@ static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp) return (lxp) ? lxp->g : NULL; } // end of GetPlug +/****************************************************************************/ +/* Get the implied table type. */ +/****************************************************************************/ +TABTYPE ha_connect::GetRealType(PTOS pos) +{ + TABTYPE type= GetTypeID(pos->type); + + if (type == TAB_UNDEF) + type= pos->srcdef ? TAB_MYSQL : pos->tabname ? TAB_PRX : TAB_DOS; + + return type; +} // end of GetRealType + +/** @brief + This is a list of flags that indicate what functionality the storage + engine implements. The current table flags are documented in handler.h +*/ +ulonglong ha_connect::table_flags() const +{ + ulonglong flags= HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | + HA_NO_AUTO_INCREMENT | HA_NO_PREFIX_CHAR_KEYS | + HA_HAS_RECORDS | HA_CAN_VIRTUAL_COLUMNS | + HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | +// HA_NULL_IN_KEY | not implemented yet + HA_DUPLICATE_KEY_NOT_IN_ORDER | + HA_MUST_USE_TABLE_CONDITION_PUSHDOWN; + ha_connect *hp= (ha_connect*)this; + PTOS pos= hp->GetTableOptionStruct(table); + + if (pos) { + TABTYPE type= hp->GetRealType(pos); + + if (IsFileType(type)) + flags|= HA_FILE_BASED; + + // No data change on ALTER for outward tables + if (!IsFileType(type) || hp->FileExists(pos->filename)) + flags|= HA_NO_COPY_ON_ALTER; + + } // endif pos + + return flags; +} // end of table_flags /****************************************************************************/ /* Return the value of an option specified in the option list. */ /****************************************************************************/ -static char *GetListOption(PGLOBAL g, const char *opname, - const char *oplist, const char *def=NULL) +char *GetListOption(PGLOBAL g, const char *opname, + const char *oplist, const char *def) { char key[16], val[256]; char *pk, *pv, *pn; @@ -619,7 +674,8 @@ static char *GetListOption(PGLOBAL g, const char *opname, /****************************************************************************/ PTOS ha_connect::GetTableOptionStruct(TABLE *tab) { - return (tshp) ? tshp->option_struct : tab->s->option_struct; + return (tshp) ? tshp->option_struct : + (tab) ? tab->s->option_struct : NULL; } // end of GetTableOptionStruct /****************************************************************************/ @@ -862,12 +918,14 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf) return fldp; } // endif special - pcf->Prec= 0; + pcf->Scale= 0; pcf->Opt= (fop) ? (int)fop->opt : 0; if ((pcf->Length= fp->field_length) < 0) pcf->Length= 256; // BLOB? + pcf->Precision= pcf->Length; + if (fop) { pcf->Offset= (int)fop->offset; // pcf->Freq= fop->freq; @@ -898,13 +956,17 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf) // Find if collation name ends by _ci if (!strcmp(cp + strlen(cp) - 3, "_ci")) { - pcf->Prec= 1; // Case insensitive + pcf->Scale= 1; // Case insensitive pcf->Opt= 0; // Prevent index opt until it is safe } // endif ci break; - case TYPE_FLOAT: - pcf->Prec= max(min(fp->decimals(), ((unsigned)pcf->Length - 2)), 0); + case TYPE_DOUBLE: + pcf->Scale= max(min(fp->decimals(), ((unsigned)pcf->Length - 2)), 0); + break; + case TYPE_DECIM: + pcf->Precision= ((Field_new_decimal*)fp)->precision; + pcf->Scale= fp->decimals(); break; case TYPE_DATE: // Field_length is only used for DATE columns @@ -966,24 +1028,27 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf) /****************************************************************************/ /* Returns the index description structure used to make the index. */ /****************************************************************************/ -PIXDEF ha_connect::GetIndexInfo(void) +PIXDEF ha_connect::GetIndexInfo(TABLE_SHARE *s) { char *name, *pn; bool unique; PIXDEF xdp, pxd=NULL, toidx= NULL; PKPDEF kpp, pkp; - PGLOBAL& g= xp->g; KEY kp; + PGLOBAL& g= xp->g; + + if (!s) + s= table->s; - for (int n= 0; (unsigned)n < table->s->keynames.count; n++) { + for (int n= 0; (unsigned)n < s->keynames.count; n++) { if (xtrace) printf("Getting created index %d info\n", n + 1); // Find the index to describe - kp= table->s->key_info[n]; + kp= s->key_info[n]; // Now get index information - pn= (char*)table->s->keynames.type_names[n]; + pn= (char*)s->keynames.type_names[n]; name= (char*)PlugSubAlloc(g, NULL, strlen(pn) + 1); strcpy(name, pn); // This is probably unuseful unique= (kp.flags & 1) != 0; @@ -1109,12 +1174,12 @@ PTDB ha_connect::GetTDB(PGLOBAL g) || tdbp->GetAmType() == TYPE_AM_XML)) { tp= tdbp; // tp->SetMode(xmod); - } else if ((tp= CntGetTDB(g, table_name, xmod, this))) + } else if ((tp= CntGetTDB(g, table_name, xmod, this))) { valid_query_id= xp->last_query_id; - else + tp->SetMode(xmod); + } else printf("GetTDB: %s\n", g->Message); - tp->SetMode(xmod); return tp; } // end of GetTDB @@ -1286,7 +1351,7 @@ int ha_connect::MakeRecord(char *buf) if (fp->vcol_info && !fp->stored_in_db) continue; // This is a virtual column - if (bitmap_is_set(map, fp->field_index)) { + if (bitmap_is_set(map, fp->field_index) || alter) { // This is a used field, fill the buffer with value for (colp= tdbp->GetColumns(); colp; colp= colp->GetNext()) if (!stricmp(colp->GetName(), (char*)fp->field_name)) @@ -1326,7 +1391,7 @@ int ha_connect::MakeRecord(char *buf) value->FormatValue(sdvalout, fmt); p= sdvalout->GetCharValue(); break; - case TYPE_FLOAT: + case TYPE_DOUBLE: p= NULL; break; case TYPE_STRING: @@ -1422,7 +1487,7 @@ int ha_connect::ScanRecord(PGLOBAL g, uchar *buf) value->Reset(); } else switch (value->GetType()) { - case TYPE_FLOAT: + case TYPE_DOUBLE: value->SetValue(fp->val_real()); break; case TYPE_DATE: @@ -1451,18 +1516,17 @@ int ha_connect::ScanRecord(PGLOBAL g, uchar *buf) break; default: fp->val_str(&attribute); - if (charset == &my_charset_bin) - { - value->SetValue_psz(attribute.c_ptr_safe()); - } - else - { + + if (charset != &my_charset_bin) { // Convert from SQL field charset to DATA_CHARSET uint cnv_errors; + data_charset_value.copy(attribute.ptr(), attribute.length(), attribute.charset(), charset, &cnv_errors); value->SetValue_psz(data_charset_value.c_ptr_safe()); - } + } else + value->SetValue_psz(attribute.c_ptr_safe()); + break; } // endswitch Type @@ -1592,7 +1656,7 @@ PFIL ha_connect::CheckCond(PGLOBAL g, PFIL filp, AMT tty, Item *cond) if (!cond) return NULL; - if (xtrace > 1) + if (xtrace) printf("Cond type=%d\n", cond->type()); if (cond->type() == COND::COND_ITEM) { @@ -1602,7 +1666,7 @@ PFIL ha_connect::CheckCond(PGLOBAL g, PFIL filp, AMT tty, Item *cond) if (x) return NULL; - if (xtrace > 1) + if (xtrace) printf("Cond: Ftype=%d name=%s\n", cond_item->functype(), cond_item->func_name()); @@ -1649,7 +1713,7 @@ PFIL ha_connect::CheckCond(PGLOBAL g, PFIL filp, AMT tty, Item *cond) Item_func *condf= (Item_func *)cond; Item* *args= condf->arguments(); - if (xtrace > 1) + if (xtrace) printf("Func type=%d argnum=%d\n", condf->functype(), condf->argument_count()); @@ -1678,11 +1742,11 @@ PFIL ha_connect::CheckCond(PGLOBAL g, PFIL filp, AMT tty, Item *cond) return NULL; for (i= 0; i < condf->argument_count(); i++) { - if (xtrace > 1) + if (xtrace) printf("Argtype(%d)=%d\n", i, args[i]->type()); if (i >= 2 && !ismul) { - if (xtrace > 1) + if (xtrace) printf("Unexpected arg for vop=%d\n", vop); continue; @@ -1704,6 +1768,8 @@ PFIL ha_connect::CheckCond(PGLOBAL g, PFIL filp, AMT tty, Item *cond) if (fop && fop->special) { if (tty == TYPE_AM_TBL && !stricmp(fop->special, "TABID")) fnm= "TABID"; + else if (tty == TYPE_AM_PLG) + fnm= fop->special; else return NULL; @@ -1712,7 +1778,7 @@ PFIL ha_connect::CheckCond(PGLOBAL g, PFIL filp, AMT tty, Item *cond) else fnm= pField->field->field_name; - if (xtrace > 1) { + if (xtrace) { printf("Field index=%d\n", pField->field->field_index); printf("Field name=%s\n", pField->field->field_name); } // endif xtrace @@ -1722,15 +1788,36 @@ PFIL ha_connect::CheckCond(PGLOBAL g, PFIL filp, AMT tty, Item *cond) return NULL; strcat(body, fnm); + } else if (args[i]->type() == COND::FUNC_ITEM) { + if (tty == TYPE_AM_MYSQL) { + if (!CheckCond(g, filp, tty, args[i])) + return NULL; + + } else + return NULL; + } else { char buff[256]; String *res, tmp(buff, sizeof(buff), &my_charset_bin); Item_basic_constant *pval= (Item_basic_constant *)args[i]; + switch (args[i]->type()) { + case COND::STRING_ITEM: + case COND::INT_ITEM: + case COND::REAL_ITEM: + case COND::NULL_ITEM: + case COND::DECIMAL_ITEM: + case COND::DATE_ITEM: + case COND::CACHE_ITEM: + break; + default: + return NULL; + } // endswitch type + if ((res= pval->val_str(&tmp)) == NULL) return NULL; // To be clarified - if (xtrace > 1) + if (xtrace) printf("Value=%.*s\n", res->length(), res->ptr()); // IN and BETWEEN clauses should be col VOP list @@ -1775,7 +1862,7 @@ PFIL ha_connect::CheckCond(PGLOBAL g, PFIL filp, AMT tty, Item *cond) filp->Op= vop; } else { - if (xtrace > 1) + if (xtrace) printf("Unsupported condition\n"); return NULL; @@ -1813,7 +1900,8 @@ const COND *ha_connect::cond_push(const COND *cond) bool x= (tty == TYPE_AM_MYX || tty == TYPE_AM_XDBC); if (tty == TYPE_AM_WMI || tty == TYPE_AM_ODBC || - tty == TYPE_AM_TBL || tty == TYPE_AM_MYSQL || x) { + tty == TYPE_AM_TBL || tty == TYPE_AM_MYSQL || + tty == TYPE_AM_PLG || x) { PGLOBAL& g= xp->g; PFIL filp= (PFIL)PlugSubAlloc(g, NULL, sizeof(FILTER)); @@ -1824,7 +1912,7 @@ const COND *ha_connect::cond_push(const COND *cond) if (CheckCond(g, filp, tty, (Item *)cond)) { if (xtrace) - puts(filp->Body); + printf("cond_push: %s\n", filp->Body); if (!x) PlugSubAlloc(g, NULL, strlen(filp->Body) + 1); @@ -1873,9 +1961,19 @@ bool ha_connect::get_error_message(int error, String* buf) { DBUG_ENTER("ha_connect::get_error_message"); - if (xp && xp->g) - buf->copy(xp->g->Message, (uint)strlen(xp->g->Message), - system_charset_info); + if (xp && xp->g) { + PGLOBAL g= xp->g; + char *msg= (char*)PlugSubAlloc(g, NULL, strlen(g->Message) * 3); + uint dummy_errors; + uint32 len= copy_and_convert(msg, strlen(g->Message) * 3, + system_charset_info, + g->Message, strlen(g->Message), + &my_charset_latin1, + &dummy_errors); + msg[len]= '\0'; + buf->copy(msg, (uint)strlen(msg), system_charset_info); + } else + buf->copy("Cannot retrieve msg", 19, system_charset_info); DBUG_RETURN(false); } // end of get_error_message @@ -2024,6 +2122,10 @@ int ha_connect::write_row(uchar *buf) PGLOBAL& g= xp->g; DBUG_ENTER("ha_connect::write_row"); + // This is not tested yet + if (xmod == MODE_ALTER) + xmod= MODE_INSERT; + // Open the table if it was not opened yet (locked) if (!IsOpened() || xmod != tdbp->GetMode()) { if (IsOpened()) @@ -2149,6 +2251,9 @@ int ha_connect::index_init(uint idx, bool sorted) PGLOBAL& g= xp->g; DBUG_ENTER("index_init"); + if (xtrace) + printf("index_init: this=%p idx=%u sorted=%d\n", this, idx, sorted); + if ((rc= rnd_init(0))) return rc; @@ -2178,6 +2283,10 @@ int ha_connect::index_init(uint idx, bool sorted) rc= 0; } // endif indexing + if (xtrace) + printf("index_init: rc=%d indexing=%d active_index=%d\n", + rc, indexing, active_index); + DBUG_RETURN(rc); } // end of index_init @@ -2400,8 +2509,15 @@ int ha_connect::rnd_init(bool scan) (xp) ? xp->g : NULL); DBUG_ENTER("ha_connect::rnd_init"); + // This is not tested yet + if (xmod == MODE_ALTER) { + xmod= MODE_READ; + alter= 1; + } // endif xmod + if (xtrace) - printf("%p in rnd_init: scan=%d\n", this, scan); + printf("rnd_init: this=%p scan=%d xmod=%d alter=%d\n", + this, scan, xmod, alter); if (!g || !table || xmod == MODE_INSERT) DBUG_RETURN(HA_ERR_INITIALIZATION); @@ -2626,7 +2742,8 @@ int ha_connect::info(uint flag) if (!valid_info) { // tdbp must be available to get updated info if (xp->CheckQuery(valid_query_id) || !tdbp) { - if (xmod == MODE_ANY) { // Pure info, not a query + if (xmod == MODE_ANY || xmod == MODE_ALTER) { + // Pure info, not a query pure= true; xp->CheckCleanup(); } // endif xmod @@ -2649,8 +2766,8 @@ int ha_connect::info(uint flag) if (flag & HA_STATUS_CONST) { // This is imported from the previous handler and must be reconsidered - stats.max_data_file_length= 4294967295; - stats.max_index_file_length= 4398046510080; + stats.max_data_file_length= 4294967295LL; + stats.max_index_file_length= 4398046510080LL; stats.create_time= 0; data_file_name= xinfo.data_file_name; index_file_name= NULL; @@ -2743,20 +2860,12 @@ int ha_connect::delete_all_rows() } // end of delete_all_rows -bool ha_connect::check_privileges(THD *thd, PTOS options) +bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn) { - if (!options->type) { - if (options->srcdef) - options->type= "MYSQL"; - else if (options->tabname) - options->type= "PROXY"; - else - options->type= "DOS"; - - } // endif type + const char *db= (dbn && *dbn) ? dbn : NULL; + TABTYPE type=GetRealType(options); - switch (GetTypeID(options->type)) - { + switch (type) { case TAB_UNDEF: // case TAB_CATLG: case TAB_PLG: @@ -2776,25 +2885,37 @@ bool ha_connect::check_privileges(THD *thd, PTOS options) case TAB_XML: case TAB_INI: case TAB_VEC: - if (!options->filename) + if (options->filename && *options->filename) { + char *s, path[FN_REFLEN], dbpath[FN_REFLEN]; +#if defined(WIN32) + s= "\\"; +#else // !WIN32 + s= "/"; +#endif // !WIN32 + strcpy(dbpath, mysql_real_data_home); + + if (db) + strcat(strcat(dbpath, db), s); + + (void) fn_format(path, options->filename, dbpath, "", + MY_RELATIVE_PATH | MY_UNPACK_FILENAME); + + if (!is_secure_file_path(path)) { + my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv"); + return true; + } // endif path + + } else return false; - char path[FN_REFLEN]; - (void) fn_format(path, options->filename, mysql_real_data_home, "", - MY_RELATIVE_PATH | MY_UNPACK_FILENAME); - if (!is_secure_file_path(path)) - { - my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv"); - return true; - } - /* Fall through to check FILE_ACL */ + /* Fall through to check FILE_ACL */ case TAB_ODBC: case TAB_MYSQL: case TAB_DIR: case TAB_MAC: case TAB_WMI: case TAB_OEM: - return check_access(thd, FILE_ACL, NULL, NULL, NULL, 0, 0); + return check_access(thd, FILE_ACL, db, NULL, NULL, 0, 0); // This is temporary until a solution is found case TAB_TBL: @@ -2803,7 +2924,7 @@ bool ha_connect::check_privileges(THD *thd, PTOS options) case TAB_OCCUR: case TAB_PIVOT: return false; - } + } // endswitch type my_printf_error(ER_UNKNOWN_ERROR, "check_privileges failed", MYF(0)); return true; @@ -2875,7 +2996,6 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, break; case SQLCOM_DROP_TABLE: case SQLCOM_RENAME_TABLE: - case SQLCOM_ALTER_TABLE: newmode= MODE_ANY; break; case SQLCOM_DROP_INDEX: @@ -2887,6 +3007,9 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, case SQLCOM_DROP_VIEW: newmode= MODE_ANY; break; + case SQLCOM_ALTER_TABLE: + newmode= MODE_ALTER; + break; default: printf("Unsupported sql_command=%d", thd_sql_command(thd)); strcpy(g->Message, "CONNECT Unsupported command"); @@ -2918,7 +3041,6 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, break; case SQLCOM_DROP_INDEX: case SQLCOM_CREATE_INDEX: - case SQLCOM_ALTER_TABLE: *chk= true; // stop= true; case SQLCOM_DROP_TABLE: @@ -2929,6 +3051,10 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, case SQLCOM_DROP_VIEW: newmode= MODE_ANY; break; + case SQLCOM_ALTER_TABLE: + *chk= true; + newmode= MODE_ALTER; + break; default: printf("Unsupported sql_command=%d", thd_sql_command(thd)); strcpy(g->Message, "CONNECT Unsupported command"); @@ -3015,17 +3141,12 @@ int ha_connect::external_lock(THD *thd, int lock_type) DBUG_ASSERT(thd == current_thd); if (xtrace) - printf("%p external_lock: lock_type=%d\n", this, lock_type); + printf("external_lock: this=%p thd=%p xp=%p g=%p lock_type=%d\n", + this, thd, xp, g, lock_type); if (!g) DBUG_RETURN(HA_ERR_INTERNAL_ERROR); - if (lock_type != F_UNLCK && check_privileges(thd, options)) { - strcpy(g->Message, "This operation requires the FILE privilege"); - printf("%s\n", g->Message); - DBUG_RETURN(HA_ERR_INTERNAL_ERROR); - } // endif check_privileges - // Action will depend on lock_type switch (lock_type) { case F_WRLCK: @@ -3041,13 +3162,17 @@ int ha_connect::external_lock(THD *thd, int lock_type) } // endswitch mode if (newmode == MODE_ANY) { + int sqlcom= thd_sql_command(thd); + // This is unlocking, do it by closing the table - if (xp->CheckQueryID() && thd_sql_command(thd) != SQLCOM_UNLOCK_TABLES - && thd_sql_command(thd) != SQLCOM_LOCK_TABLES) + if (xp->CheckQueryID() && sqlcom != SQLCOM_UNLOCK_TABLES + && sqlcom != SQLCOM_LOCK_TABLES) rc= 2; // Logical error ??? - else if (g->Xchk) { - if (!tdbp || *tdbp->GetName() == '#') { - if (!tdbp && !(tdbp= GetTDB(g))) +// else if (g->Xchk && (sqlcom == SQLCOM_CREATE_INDEX || +// sqlcom == SQLCOM_DROP_INDEX)) { + else if (g->Xchk) { + if (!tdbp) { + if (!(tdbp= GetTDB(g))) DBUG_RETURN(HA_ERR_INTERNAL_ERROR); else if (!((PTDBASE)tdbp)->GetDef()->Indexable()) { sprintf(g->Message, "external_lock: Table %s is not indexable", tdbp->GetName()); @@ -3129,28 +3254,36 @@ int ha_connect::external_lock(THD *thd, int lock_type) if (adp) // Here we do make the new indexes - tdp->MakeIndex(g, adp, true); + if (tdp->MakeIndex(g, adp, true) == RC_FX) { + // Make it a warning to avoid crash + push_warning(thd, Sql_condition::WARN_LEVEL_WARN, + 0, g->Message); + rc= 0; + } // endif MakeIndex - } // endif Mode + } // endif Tdbp } // endelse Xchk if (CloseTable(g)) { // This is an error while builing index -//#if defined(_DEBUG) - // Make it a warning to avoid crash on debug + // Make it a warning to avoid crash push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message); rc= 0; -//#else // !_DEBUG -// my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); -// rc= HA_ERR_INTERNAL_ERROR; -//#endif // !DEBUG } // endif Close locked= 0; DBUG_RETURN(rc); } // endif MODE_ANY + DBUG_ASSERT(table && table->s); + + if (check_privileges(thd, options, table->s->db.str)) { + strcpy(g->Message, "This operation requires the FILE privilege"); + printf("%s\n", g->Message); + DBUG_RETURN(HA_ERR_INTERNAL_ERROR); + } // endif check_privileges + // Table mode depends on the query type newmode= CheckMode(g, thd, newmode, &xcheck, &cras); @@ -3163,19 +3296,32 @@ int ha_connect::external_lock(THD *thd, int lock_type) valid_info= false; } // endif CheckCleanup +#if 0 if (xcheck) { // This must occur after CheckCleanup - g->Xchk= new(g) XCHK; - ((PCHK)g->Xchk)->oldsep= GetBooleanOption("Sepindex", false); - ((PCHK)g->Xchk)->oldpix= GetIndexInfo(); + if (!g->Xchk) { + g->Xchk= new(g) XCHK; + ((PCHK)g->Xchk)->oldsep= GetBooleanOption("Sepindex", false); + ((PCHK)g->Xchk)->oldpix= GetIndexInfo(); + } // endif Xchk + } else g->Xchk= NULL; +#endif // 0 if (cras) g->Createas= 1; // To tell created table to ignore FLAG - if (xtrace) - printf("Calling CntCheckDB db=%s\n", GetDBName(NULL)); + if (xtrace) { +#if 0 + printf("xcheck=%d cras=%d\n", xcheck, cras); + + if (xcheck) + printf("oldsep=%d oldpix=%p\n", + ((PCHK)g->Xchk)->oldsep, ((PCHK)g->Xchk)->oldpix); +#endif // 0 + printf("Calling CntCheckDB db=%s cras=%d\n", GetDBName(NULL), cras); + } // endif xtrace // Set or reset the good database environment if (CntCheckDB(g, this, GetDBName(NULL))) { @@ -3192,13 +3338,10 @@ int ha_connect::external_lock(THD *thd, int lock_type) else tdbp= NULL; - }// endif tdbp + } // endif tdbp xmod= newmode; - if (!table) - rc= 3; // Logical error - // Delay open until used fields are known } // endif tdbp @@ -3311,8 +3454,7 @@ filename_to_dbname_and_tablename(const char *filename, memcpy(database, d.str, d.length); database[d.length]= '\0'; return false; -} - +} // end of filename_to_dbname_and_tablename /** @brief @@ -3338,55 +3480,86 @@ filename_to_dbname_and_tablename(const char *filename, int ha_connect::delete_or_rename_table(const char *name, const char *to) { DBUG_ENTER("ha_connect::delete_or_rename_table"); - /* We have to retrieve the information about this table options. */ - ha_table_option_struct *pos; - char key[MAX_DBKEY_LENGTH], db[128], tabname[128]; - int rc= 0; - uint key_length; - TABLE_SHARE *share; - THD *thd= current_thd; + char db[128], tabname[128]; + int rc= 0; + bool ok= false; + THD *thd= current_thd; + int sqlcom= thd_sql_command(thd); + + if (xtrace) { + if (to) + printf("rename_table: this=%p thd=%p sqlcom=%d from=%s to=%s\n", + this, thd, sqlcom, name, to); + else + printf("delete_table: this=%p thd=%p sqlcom=%d name=%s\n", + this, thd, sqlcom, name); + + } // endif xtrace if (to && (filename_to_dbname_and_tablename(to, db, sizeof(db), - tabname, sizeof(tabname)) || - *tabname == '#')) - goto fin; + tabname, sizeof(tabname)) + || (*tabname == '#' && sqlcom == SQLCOM_CREATE_INDEX))) + DBUG_RETURN(0); if (filename_to_dbname_and_tablename(name, db, sizeof(db), - tabname, sizeof(tabname)) || - *tabname == '#') - goto fin; + tabname, sizeof(tabname)) + || (*tabname == '#' && sqlcom == SQLCOM_CREATE_INDEX)) + DBUG_RETURN(0); - key_length= tdc_create_key(key, db, tabname); + // If a temporary file exists, all the tests below were passed + // successfully when making it, so they are not needed anymore + // in particular because they sometimes cause DBUG_ASSERT crash. + if (*tabname != '#') { + // We have to retrieve the information about this table options. + ha_table_option_struct *pos; + char key[MAX_DBKEY_LENGTH]; + uint key_length; + TABLE_SHARE *share; - // share contains the option struct that we need - if (!(share= alloc_table_share(db, tabname, key, key_length))) - goto fin; + key_length= tdc_create_key(key, db, tabname); + + // share contains the option struct that we need + if (!(share= alloc_table_share(db, tabname, key, key_length))) + DBUG_RETURN(rc); + +#if 0 + if (*tabname == '#') { + // These are in ???? charset after renaming + char *p= strchr(share->path.str, '@'); + strcpy(p, share->table_name.str); + share->path.length= strlen(share->path.str); + share->normalized_path.length= share->path.length; + } // endif tabname +#endif // 0 - // Get the share info from the .frm file - if (open_table_def(thd, share)) - goto err; + // Get the share info from the .frm file + if (!open_table_def(thd, share)) { + // Now we can work + if ((pos= share->option_struct)) { + if (check_privileges(thd, pos, db)) + rc= HA_ERR_INTERNAL_ERROR; // ??? + else + if (IsFileType(GetRealType(pos)) && !pos->filename) + ok= true; + + } // endif pos - // Now we can work - pos= share->option_struct; + } else // Avoid infamous DBUG_ASSERT + thd->get_stmt_da()->reset_diagnostics_area(); - if (check_privileges(thd, pos)) - { free_table_share(share); - DBUG_RETURN(HA_ERR_INTERNAL_ERROR); - } + } else // Temporary file + ok= true; - if (IsFileType(GetTypeID(pos->type)) && !pos->filename) { + if (ok) { // Let the base handler do the job if (to) rc= handler::rename_table(name, to); - else - rc= handler::delete_table(name); - } // endif filename + else if ((rc= handler::delete_table(name)) == ENOENT) + rc= 0; // No files is not an error for CONNECT + + } // endif ok - // Done no more need for this - err: - free_table_share(share); - fin: DBUG_RETURN(rc); } // end of delete_or_rename_table @@ -3508,7 +3681,7 @@ static bool add_fields(PGLOBAL g, length= (char*)PlugSubAlloc(g, NULL, 8); sprintf(length, "%d", len); - if (typ == TYPE_FLOAT) { + if (typ == TYPE_DOUBLE) { decimals= (char*)PlugSubAlloc(g, NULL, 8); sprintf(decimals, "%d", min(dec, (min(len, 31) - 1))); } // endif dec @@ -3574,7 +3747,11 @@ static bool add_field(String *sql, const char *field_name, int typ, error|= sql->append(','); // dec must be < len and < 31 error|= sql->append_ulonglong(min(dec, (min(len, 31) - 1))); - } // endif dec + } else if (dec > 0 && !strcmp(type, "DECIMAL")) { + error|= sql->append(','); + // dec must be < len + error|= sql->append_ulonglong(min(dec, len - 1)); + } // endif dec error|= sql->append(')'); } // endif len @@ -3590,7 +3767,7 @@ static bool add_field(String *sql, const char *field_name, int typ, if (dft && *dft) { error|= sql->append(" DEFAULT "); - if (IsTypeChar(typ)) { + if (!IsTypeNum(typ)) { error|= sql->append("'"); error|= sql->append_for_single_quote(dft, strlen(dft)); error|= sql->append("'"); @@ -3874,7 +4051,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, TABLE_SHARE *table_s, HA_CREATE_INFO *create_info) { - char v, spc= ',', qch= 0; + char v=0, spc= ',', qch= 0; const char *fncn= "?"; const char *user, *fn, *db, *host, *pwd, *sep, *tbl, *src; const char *col, *ocl, *rnk, *pic, *fcl; @@ -3882,7 +4059,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, #if defined(WIN32) char *nsp= NULL, *cls= NULL; #endif // WIN32 - int port= 0, hdr= 0, mxr= 0, mxe= 0, rc= 0; + int port= 0, hdr= 0, mxr __attribute__((unused))= 0, mxe= 0, rc= 0; int cop __attribute__((unused)) = 0; uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL); bool bif, ok= false, dbf= false; @@ -3938,7 +4115,9 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, cls= GetListOption(g, "class", topt->oplist); #endif // WIN32 port= atoi(GetListOption(g, "port", topt->oplist, "0")); +#if defined(ODBC_SUPPORT) mxr= atoi(GetListOption(g,"maxres", topt->oplist, "0")); +#endif mxe= atoi(GetListOption(g,"maxerr", topt->oplist, "0")); #if defined(PROMPT_OK) cop= atoi(GetListOption(g, "checkdsn", topt->oplist, "0")); @@ -4086,13 +4265,20 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, case TAB_TBL: case TAB_XCL: case TAB_OCCUR: - if (!stricmp(tab, create_info->alias) && + if (!src && !stricmp(tab, create_info->alias) && (!db || !stricmp(db, table_s->db.str))) sprintf(g->Message, "A %s table cannot refer to itself", topt->type); else ok= true; break; + case TAB_OEM: + if (topt->module && topt->subtype) + ok= true; + else + strcpy(g->Message, "Missing OEM module or subtype"); + + break; default: sprintf(g->Message, "Cannot get column info for table type %s", topt->type); break; @@ -4196,6 +4382,9 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, case TAB_PIVOT: qrp= PivotColumns(g, tab, src, pic, fcl, host, db, user, pwd, port); break; + case TAB_OEM: + qrp= OEMColumns(g, topt, tab, (char*)db, fnc == FNC_COL); + break; default: strcpy(g->Message, "System error during assisted discovery"); break; @@ -4215,6 +4404,9 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, dec= crp->Prec; flg= crp->Flag; + if (!len && typ == TYPE_STRING) + len= 256; // STRBLK's have 0 length + #if defined(NEW_WAY) // Now add the field rc= add_fields(g, thd, &alter_info, cnm, typ, len, dec, @@ -4295,11 +4487,15 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, } else typ= plgtyp; - // Some data sources do not count dec in length (prec) - if (typ == TYPE_FLOAT) - prec += (dec + 2); // To be safe - else - dec= 0; + switch (typ) { + case TYPE_DOUBLE: + // Some data sources do not count dec in length (prec) + prec += (dec + 2); // To be safe + case TYPE_DECIM: + break; + default: + dec= 0; + } // endswitch typ } // endif ttp #endif // ODBC_SUPPORT @@ -4307,7 +4503,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, // Make the arguments as required by add_fields if (typ == TYPE_DATE) prec= 0; - else if (typ == TYPE_FLOAT) + else if (typ == TYPE_DOUBLE) prec= len; // Now add the field @@ -4337,6 +4533,28 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, } // end of connect_assisted_discovery /** + Get the database name from a qualified table name. +*/ +char *ha_connect::GetDBfromName(const char *name) +{ + char *db, dbname[128], tbname[128]; + + if (filename_to_dbname_and_tablename(name, dbname, sizeof(dbname), + tbname, sizeof(tbname))) + *dbname= 0; + + if (*dbname) { + assert(xp && xp->g); + db= (char*)PlugSubAlloc(xp->g, NULL, strlen(dbname + 1)); + strcpy(db, dbname); + } else + db= NULL; + + return db; +} // end of GetDBfromName + + +/** @brief create() is called to create a database. The variable name will have the name of the table. @@ -4375,8 +4593,15 @@ int ha_connect::create(const char *name, TABLE *table_arg, PGLOBAL g= xp->g; DBUG_ENTER("ha_connect::create"); + int sqlcom= thd_sql_command(table_arg->in_use); PTOS options= GetTableOptionStruct(table_arg); + table= table_arg; // Used by called functions + + if (xtrace) + printf("create: this=%p thd=%p xp=%p g=%p sqlcom=%d name=%s\n", + this, thd, xp, g, sqlcom, GetTableName()); + // CONNECT engine specific table options: DBUG_ASSERT(options); type= GetTypeID(options->type); @@ -4394,7 +4619,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, DBUG_RETURN(HA_ERR_INTERNAL_ERROR); } // endif ttp - if (check_privileges(thd, options)) + if (check_privileges(thd, options, GetDBfromName(name))) DBUG_RETURN(HA_ERR_INTERNAL_ERROR); if (options->data_charset) { @@ -4635,83 +4860,89 @@ int ha_connect::create(const char *name, TABLE *table_arg, } // endfor field - table= table_arg; // Used by called functions - - if (IsFileType(type)) { - if (!options->filename) { - // The file name is not specified, create a default file in - // the database directory named table_name.table_type. - // (temporarily not done for XML because a void file causes - // the XML parsers to report an error on the first Insert) - char buf[256], fn[_MAX_PATH], dbpath[128], lwt[12]; - int h; - - strcpy(buf, GetTableName()); - - if (*buf != '#') { - // Check for incompatible options - if (options->sepindex) { - my_message(ER_UNKNOWN_ERROR, - "SEPINDEX is incompatible with unspecified file name", - MYF(0)); - DBUG_RETURN(HA_ERR_UNSUPPORTED); - } else if (GetTypeID(options->type) == TAB_VEC) - if (!table->s->max_rows || options->split) { - my_printf_error(ER_UNKNOWN_ERROR, - "%s tables whose file name is unspecified cannot be split", - MYF(0), options->type); - DBUG_RETURN(HA_ERR_UNSUPPORTED); - } else if (options->header == 2) { - my_printf_error(ER_UNKNOWN_ERROR, - "header=2 is not allowed for %s tables whose file name is unspecified", - MYF(0), options->type); - DBUG_RETURN(HA_ERR_UNSUPPORTED); - } // endif's - - // Fold type to lower case - for (int i= 0; i < 12; i++) - if (!options->type[i]) { - lwt[i]= 0; - break; - } else - lwt[i]= tolower(options->type[i]); - - strcat(strcat(buf, "."), lwt); - sprintf(g->Message, "No file name. Table will use %s", buf); - push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message); - strcat(strcat(strcpy(dbpath, "./"), table->s->db.str), "/"); - PlugSetPath(fn, buf, dbpath); + if ((sqlcom == SQLCOM_CREATE_TABLE || *GetTableName() == '#') + && IsFileType(type) && !options->filename) { + // The file name is not specified, create a default file in + // the database directory named table_name.table_type. + // (temporarily not done for XML because a void file causes + // the XML parsers to report an error on the first Insert) + char buf[256], fn[_MAX_PATH], dbpath[128], lwt[12]; + int h; + + strcpy(buf, GetTableName()); + + // Check for incompatible options + if (options->sepindex) { + my_message(ER_UNKNOWN_ERROR, + "SEPINDEX is incompatible with unspecified file name", + MYF(0)); + DBUG_RETURN(HA_ERR_UNSUPPORTED); + } else if (GetTypeID(options->type) == TAB_VEC) + if (!table->s->max_rows || options->split) { + my_printf_error(ER_UNKNOWN_ERROR, + "%s tables whose file name is unspecified cannot be split", + MYF(0), options->type); + DBUG_RETURN(HA_ERR_UNSUPPORTED); + } else if (options->header == 2) { + my_printf_error(ER_UNKNOWN_ERROR, + "header=2 is not allowed for %s tables whose file name is unspecified", + MYF(0), options->type); + DBUG_RETURN(HA_ERR_UNSUPPORTED); + } // endif's + + // Fold type to lower case + for (int i= 0; i < 12; i++) + if (!options->type[i]) { + lwt[i]= 0; + break; + } else + lwt[i]= tolower(options->type[i]); - if ((h= ::open(fn, O_CREAT | O_EXCL, 0666)) == -1) { - if (errno == EEXIST) - sprintf(g->Message, "Default file %s already exists", fn); - else - sprintf(g->Message, "Error %d creating file %s", errno, fn); - - push_warning(table->in_use, - Sql_condition::WARN_LEVEL_WARN, 0, g->Message); - } else - ::close(h); + strcat(strcat(buf, "."), lwt); + sprintf(g->Message, "No file name. Table will use %s", buf); + push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message); + strcat(strcat(strcpy(dbpath, "./"), table->s->db.str), "/"); + PlugSetPath(fn, buf, dbpath); - if (type == TAB_FMT || options->readonly) - push_warning(table->in_use, Sql_condition::WARN_LEVEL_WARN, 0, - "Congratulation, you just created a read-only void table!"); + if ((h= ::open(fn, O_CREAT | O_EXCL, 0666)) == -1) { + if (errno == EEXIST) + sprintf(g->Message, "Default file %s already exists", fn); + else + sprintf(g->Message, "Error %d creating file %s", errno, fn); - } // endif buf + push_warning(table->in_use, + Sql_condition::WARN_LEVEL_WARN, 0, g->Message); + } else + ::close(h); + + if (type == TAB_FMT || options->readonly) + push_warning(table->in_use, Sql_condition::WARN_LEVEL_WARN, 0, + "Congratulation, you just created a read-only void table!"); - } // endif filename + } // endif - } // endif type + if (xtrace) + printf("xchk=%p createas=%d\n", g->Xchk, g->Createas); - // To check whether indexes have to be made or remade + // To check whether indices have to be made or remade if (!g->Xchk) { PIXDEF xdp; - // We should be in CREATE TABLE - if (thd_sql_command(table->in_use) != SQLCOM_CREATE_TABLE) + // We should be in CREATE TABLE or ALTER_TABLE + if (sqlcom != SQLCOM_CREATE_TABLE && sqlcom != SQLCOM_ALTER_TABLE) push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, "Wrong command in create, please contact CONNECT team"); + if (sqlcom == SQLCOM_ALTER_TABLE && g->Alchecked == 0 && + (!IsFileType(type) || FileExists(options->filename))) { + // This is an ALTER to CONNECT from another engine. + // It cannot be accepted because the table data would be lost + // except when the target file does not exist. + strcpy(g->Message, "Operation denied. Table data would be lost."); + my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); + DBUG_RETURN(HA_ERR_INTERNAL_ERROR); + } // endif outward + // Get the index definitions if (xdp= GetIndexInfo()) { if (IsTypeIndexable(type)) { @@ -4739,7 +4970,13 @@ int ha_connect::create(const char *name, TABLE *table_arg, } // endif xdp } else { + // This should not happen anymore with indexing new way + my_message(ER_UNKNOWN_ERROR, + "CONNECT index modification should be in-place", MYF(0)); + DBUG_RETURN(HA_ERR_UNSUPPORTED); +#if 0 PIXDEF xdp= GetIndexInfo(); + PCHK xcp= (PCHK)g->Xchk; if (xdp) { if (!IsTypeIndexable(type)) { @@ -4748,19 +4985,356 @@ int ha_connect::create(const char *name, TABLE *table_arg, my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); rc= HA_ERR_INTERNAL_ERROR; } else { - ((PCHK)g->Xchk)->newpix= xdp; - ((PCHK)g->Xchk)->newsep= GetBooleanOption("Sepindex", false); + xcp->newpix= xdp; + xcp->newsep= GetBooleanOption("Sepindex", false); } // endif Indexable - } else if (!((PCHK)g->Xchk)->oldpix) + } else if (!xcp->oldpix) g->Xchk= NULL; + if (xtrace && g->Xchk) + printf("oldsep=%d newsep=%d oldpix=%p newpix=%p\n", + xcp->oldsep, xcp->newsep, xcp->oldpix, xcp->newpix); + +// if (g->Xchk && +// (sqlcom != SQLCOM_CREATE_INDEX && sqlcom != SQLCOM_DROP_INDEX)) { + if (g->Xchk) { + PIXDEF xp1, xp2; + bool b= false; // true if index changes + + if (xcp->oldsep == xcp->newsep) { + for (xp1= xcp->newpix, xp2= xcp->oldpix; + xp1 || xp2; + xp1= xp1->Next, xp2= xp2->Next) + if (!xp1 || !xp2 || !IsSameIndex(xp1, xp2)) { + b= true; + break; + } // endif xp1 + + } else + b= true; + + if (!b) + g->Xchk= NULL; + +#if 0 + if (b) { + // CONNECT does not support indexing via ALTER TABLE + my_message(ER_UNKNOWN_ERROR, + "CONNECT does not support index modification via ALTER TABLE", + MYF(0)); + DBUG_RETURN(HA_ERR_UNSUPPORTED); + } // endif b +#endif // 0 + + } // endif Xchk + +#endif // 0 } // endif Xchk table= st; DBUG_RETURN(rc); } // end of create +/** + Used to check whether a file based outward table can be populated by + an ALTER TABLE command. The conditions are: + - file does not exist or is void + - user has file privilege +*/ +bool ha_connect::FileExists(const char *fn) +{ + if (!fn || !*fn) + return false; + + if (table) { + char *s, filename[_MAX_PATH], path[128]; + int n; + struct stat info; + + if (check_access(ha_thd(), FILE_ACL, table->s->db.str, + NULL, NULL, 0, 0)) + return true; + +#if defined(WIN32) + s= "\\"; +#else // !WIN32 + s= "/"; +#endif // !WIN32 + + strcat(strcat(strcat(strcpy(path, "."), s), table->s->db.str), s); + PlugSetPath(filename, fn, path); + n= stat(filename, &info); + + if (n < 0) { + if (errno != ENOENT) { + char buf[_MAX_PATH + 20]; + + sprintf(buf, "Error %d for file %s", errno, filename); + push_warning(table->in_use, Sql_condition::WARN_LEVEL_WARN, 0, buf); + return true; + } else + return false; + + } else + return (info.st_size) ? true : false; + + } // endif table + + return true; +} // end of FileExists + +/** + check whether a string option have changed + */ +bool ha_connect::SameChar(TABLE *tab, char *opn) +{ + char *str1, *str2; + bool b1, b2; + + tshp= tab->s; // The altered table + str1= GetStringOption(opn); + tshp= NULL; + str2= GetStringOption(opn); + b1= (!str1 || !*str1); + b2= (!str2 || !*str2); + + if (b1 && b2) + return true; + else if ((b1 && !b2) || (!b1 && b2) || stricmp(str1, str2)) + return false; + + return true; +} // end of SameChar + +/** + check whether a Boolean option have changed + */ +bool ha_connect::SameBool(TABLE *tab, char *opn) +{ + bool b1, b2; + + tshp= tab->s; // The altered table + b1= GetBooleanOption(opn, false); + tshp= NULL; + b2= GetBooleanOption(opn, false); + return (b1 == b2); +} // end of SameBool + +/** + check whether an integer option have changed + */ +bool ha_connect::SameInt(TABLE *tab, char *opn) +{ + int i1, i2; + + tshp= tab->s; // The altered table + i1= GetIntegerOption(opn); + tshp= NULL; + i2= GetIntegerOption(opn); + + if (!stricmp(opn, "lrecl")) + return (i1 == i2 || !i1 || !i2); + else if (!stricmp(opn, "ending")) + return (i1 == i2 || i1 <= 0 || i2 <= 0); + else + return (i1 == i2); + +} // end of SameInt + + + /** + Check if a storage engine supports a particular alter table in-place + + @param altered_table TABLE object for new version of table. + @param ha_alter_info Structure describing changes to be done + by ALTER TABLE and holding data used + during in-place alter. + + @retval HA_ALTER_ERROR Unexpected error. + @retval HA_ALTER_INPLACE_NOT_SUPPORTED Not supported, must use copy. + @retval HA_ALTER_INPLACE_EXCLUSIVE_LOCK Supported, but requires X lock. + @retval HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE + Supported, but requires SNW lock + during main phase. Prepare phase + requires X lock. + @retval HA_ALTER_INPLACE_SHARED_LOCK Supported, but requires SNW lock. + @retval HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE + Supported, concurrent reads/writes + allowed. However, prepare phase + requires X lock. + @retval HA_ALTER_INPLACE_NO_LOCK Supported, concurrent + reads/writes allowed. + + @note The default implementation uses the old in-place ALTER API + to determine if the storage engine supports in-place ALTER or not. + + @note Called without holding thr_lock.c lock. + */ +enum_alter_inplace_result +ha_connect::check_if_supported_inplace_alter(TABLE *altered_table, + Alter_inplace_info *ha_alter_info) +{ + DBUG_ENTER("check_if_supported_alter"); + + bool idx= false, outward= false; + THD *thd= ha_thd(); + int sqlcom= thd_sql_command(thd); + TABTYPE newtyp, type= TAB_UNDEF; + HA_CREATE_INFO *create_info= ha_alter_info->create_info; +//PTOS pos= GetTableOptionStruct(table); + PTOS newopt, oldopt; + xp= GetUser(thd, xp); + PGLOBAL g= xp->g; + + if (!g || !table) { + my_message(ER_UNKNOWN_ERROR, "Cannot check ALTER operations", MYF(0)); + DBUG_RETURN(HA_ALTER_ERROR); + } // endif Xchk + + newopt= altered_table->s->option_struct; + oldopt= table->s->option_struct; + + // If this is the start of a new query, cleanup the previous one + if (xp->CheckCleanup()) { + tdbp= NULL; + valid_info= false; + } // endif CheckCleanup + + g->Alchecked= 1; // Tested in create + g->Xchk= NULL; + type= GetRealType(oldopt); + newtyp= GetRealType(newopt); + + // No copy algorithm for outward tables + outward= (!IsFileType(type) || (oldopt->filename && *oldopt->filename)); + + // Index operations + Alter_inplace_info::HA_ALTER_FLAGS index_operations= + Alter_inplace_info::ADD_INDEX | + Alter_inplace_info::DROP_INDEX | + Alter_inplace_info::ADD_UNIQUE_INDEX | + Alter_inplace_info::DROP_UNIQUE_INDEX | + Alter_inplace_info::ADD_PK_INDEX | + Alter_inplace_info::DROP_PK_INDEX; + + Alter_inplace_info::HA_ALTER_FLAGS inplace_offline_operations= + Alter_inplace_info::ALTER_COLUMN_EQUAL_PACK_LENGTH | + Alter_inplace_info::ALTER_COLUMN_NAME | + Alter_inplace_info::ALTER_COLUMN_DEFAULT | + Alter_inplace_info::CHANGE_CREATE_OPTION | + Alter_inplace_info::ALTER_RENAME | index_operations; + + if (ha_alter_info->handler_flags & index_operations || + !SameChar(altered_table, "optname") || + !SameBool(altered_table, "sepindex")) { + if (!IsTypeIndexable(type)) { + sprintf(g->Message, "Table type %s is not indexable", oldopt->type); + my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); + DBUG_RETURN(HA_ALTER_ERROR); + } // endif Indexable + + g->Xchk= new(g) XCHK; + PCHK xcp= (PCHK)g->Xchk; + + xcp->oldpix= GetIndexInfo(table->s); + xcp->newpix= GetIndexInfo(altered_table->s); + xcp->oldsep= GetBooleanOption("sepindex", false); + xcp->oldsep= xcp->SetName(g, GetStringOption("optname")); + tshp= altered_table->s; + xcp->newsep= GetBooleanOption("sepindex", false); + xcp->newsep= xcp->SetName(g, GetStringOption("optname")); + tshp= NULL; + + if (xtrace && g->Xchk) + printf( + "oldsep=%d newsep=%d oldopn=%s newopn=%s oldpix=%p newpix=%p\n", + xcp->oldsep, xcp->newsep, + SVP(xcp->oldopn), SVP(xcp->newopn), + xcp->oldpix, xcp->newpix); + + if (sqlcom == SQLCOM_ALTER_TABLE) + idx= true; + else + DBUG_RETURN(HA_ALTER_INPLACE_EXCLUSIVE_LOCK); + + } // endif index operation + + if (!SameChar(altered_table, "filename")) { + if (!outward) { + // Conversion to outward table is only allowed for file based + // tables whose file does not exist. + tshp= altered_table->s; + char *fn= GetStringOption("filename"); + tshp= NULL; + + if (FileExists(fn)) { + strcpy(g->Message, "Operation denied. Table data would be lost."); + my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); + DBUG_RETURN(HA_ALTER_ERROR); + } else + goto fin; + + } else + goto fin; + + } // endif filename + + /* Is there at least one operation that requires copy algorithm? */ + if (ha_alter_info->handler_flags & ~inplace_offline_operations) + goto fin; + + /* + ALTER TABLE tbl_name CONVERT TO CHARACTER SET .. and + ALTER TABLE table_name DEFAULT CHARSET = .. most likely + change column charsets and so not supported in-place through + old API. + + Changing of PACK_KEYS, MAX_ROWS and ROW_FORMAT options were + not supported as in-place operations in old API either. + */ + if (create_info->used_fields & (HA_CREATE_USED_CHARSET | + HA_CREATE_USED_DEFAULT_CHARSET | + HA_CREATE_USED_PACK_KEYS | + HA_CREATE_USED_MAX_ROWS) || + (table->s->row_type != create_info->row_type)) + goto fin; + +#if 0 + uint table_changes= (ha_alter_info->handler_flags & + Alter_inplace_info::ALTER_COLUMN_EQUAL_PACK_LENGTH) ? + IS_EQUAL_PACK_LENGTH : IS_EQUAL_YES; + + if (table->file->check_if_incompatible_data(create_info, table_changes) + == COMPATIBLE_DATA_YES) + DBUG_RETURN(HA_ALTER_INPLACE_EXCLUSIVE_LOCK); +#endif // 0 + + // This was in check_if_incompatible_data + if (type == newtyp && + SameInt(altered_table, "lrecl") && + SameInt(altered_table, "elements") && + SameInt(altered_table, "header") && + SameInt(altered_table, "quoted") && + SameInt(altered_table, "ending") && + SameInt(altered_table, "compressed")) + DBUG_RETURN(HA_ALTER_INPLACE_EXCLUSIVE_LOCK); + +fin: + if (idx) { + // Indexing is only supported inplace + my_message(ER_UNKNOWN_ERROR, + "Alter operations not supported together by CONNECT", MYF(0)); + DBUG_RETURN(HA_ALTER_ERROR); + } else if (outward) { + push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, + "This is an outward table, table data were not modified."); + DBUG_RETURN(HA_ALTER_INPLACE_EXCLUSIVE_LOCK); + } else + DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); + +} // end of check_if_supported_inplace_alter + /** check_if_incompatible_data() called if ALTER TABLE can't detect otherwise @@ -4771,46 +5345,17 @@ int ha_connect::create(const char *name, TABLE *table_arg, (sql/sql_tables.cc) to decide should we rewrite whole table or only .frm file. + @note: This function is no more called by check_if_supported_inplace_alter */ bool ha_connect::check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes) { -//ha_table_option_struct *param_old, *param_new; DBUG_ENTER("ha_connect::check_if_incompatible_data"); // TO DO: really implement and check it. - THD *thd= current_thd; - - push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, - "The current version of CONNECT did not check what you changed in ALTER. Use at your own risk"); - - if (table) { - PTOS newopt= info->option_struct; - PTOS oldopt= table->s->option_struct; - -#if 0 - if (newopt->sepindex != oldopt->sepindex) { - // All indexes to be remade - PGLOBAL g= GetPlug(thd); - - if (!g) - push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, - "Execute OPTIMIZE TABLE to remake the indexes"); - else - g->Xchk= new(g) XCHK; - - } // endif sepindex -#endif // 0 - - if (oldopt->type != newopt->type) - DBUG_RETURN(COMPATIBLE_DATA_NO); - - if (newopt->filename) - DBUG_RETURN(COMPATIBLE_DATA_NO); - - } // endif table - - DBUG_RETURN(COMPATIBLE_DATA_YES); + push_warning(ha_thd(), Sql_condition::WARN_LEVEL_WARN, 0, + "Unexpected call to check_if_incompatible_data."); + DBUG_RETURN(COMPATIBLE_DATA_NO); } // end of check_if_incompatible_data diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h index dd67773efc0..908c26fefdc 100644 --- a/storage/connect/ha_connect.h +++ b/storage/connect/ha_connect.h @@ -50,9 +50,20 @@ typedef struct _xinfo { class XCHK : public BLOCK { public: - XCHK(void) {oldsep= newsep= false; oldpix= newpix= NULL;} + XCHK(void) {oldsep= newsep= false; + oldopn= newopn= NULL; + oldpix= newpix= NULL;} + + inline char *SetName(PGLOBAL g, char *name) { + char *nm= NULL; + if (name) {nm= (char*)PlugSubAlloc(g, NULL, strlen(name) + 1); + strcpy(nm, name);} + return nm;} + bool oldsep; // Sepindex before create/alter bool newsep; // Sepindex after create/alter + char *oldopn; // Optname before create/alter + char *newopn; // Optname after create/alter PIXDEF oldpix; // The indexes before create/alter PIXDEF newpix; // The indexes after create/alter }; // end of class XCHK @@ -156,15 +167,20 @@ public: // CONNECT Implementation static bool connect_init(void); static bool connect_end(void); + TABTYPE GetRealType(PTOS pos); char *GetStringOption(char *opname, char *sdef= NULL); PTOS GetTableOptionStruct(TABLE *table_arg); bool GetBooleanOption(char *opname, bool bdef); bool SetBooleanOption(char *opname, bool b); int GetIntegerOption(char *opname); bool SetIntegerOption(char *opname, int n); + bool SameChar(TABLE *tab, char *opn); + bool SameInt(TABLE *tab, char *opn); + bool SameBool(TABLE *tab, char *opn); + bool FileExists(const char *fn); PFOS GetFieldOptionStruct(Field *fp); void *GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf); - PIXDEF GetIndexInfo(void); + PIXDEF GetIndexInfo(TABLE_SHARE *s= NULL); const char *GetDBName(const char *name); const char *GetTableName(void); //int GetColNameLen(Field *fp); @@ -199,18 +215,19 @@ public: */ const char **bas_ext() const; + /** + Check if a storage engine supports a particular alter table in-place + @note Called without holding thr_lock.c lock. + */ + virtual enum_alter_inplace_result + check_if_supported_inplace_alter(TABLE *altered_table, + Alter_inplace_info *ha_alter_info); + /** @brief This is a list of flags that indicate what functionality the storage engine implements. The current table flags are documented in handler.h */ - ulonglong table_flags() const - { - return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_HAS_RECORDS | - HA_NO_AUTO_INCREMENT | HA_NO_PREFIX_CHAR_KEYS | - HA_NO_COPY_ON_ALTER | HA_CAN_VIRTUAL_COLUMNS | - HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | - /*HA_NULL_IN_KEY |*/ HA_MUST_USE_TABLE_CONDITION_PUSHDOWN); - } + ulonglong table_flags() const; /** @brief This is a bitmap of flags that indicates how the storage engine @@ -445,8 +462,9 @@ const char *GetValStr(OPVAL vop, bool neg); int optimize(THD* thd, HA_CHECK_OPT* check_opt); protected: - bool check_privileges(THD *thd, PTOS options); + bool check_privileges(THD *thd, PTOS options, char *dbn); MODE CheckMode(PGLOBAL g, THD *thd, MODE newmode, bool *chk, bool *cras); + char *GetDBfromName(const char *name); // Members static ulong num; // Tracable handler number @@ -463,6 +481,7 @@ protected: XINFO xinfo; // The table info structure bool valid_info; // True if xinfo is valid bool stop; // Used when creating index + bool alter; // True when converting to other engine int indexing; // Type of indexing for CONNECT int locked; // Table lock THR_LOCK_DATA lock_data; diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index 092d38a142a..5b5bf4d3000 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -98,6 +98,8 @@ extern "C" HINSTANCE s_hModule; // Saved module handle extern int xtrace; +PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); + /***********************************************************************/ /* Get a unique enum table type ID. */ /***********************************************************************/ @@ -259,6 +261,89 @@ uint GetFuncID(const char *func) return fnc; } // end of GetFuncID +/***********************************************************************/ +/* OEMColumn: Get table column info for an OEM table. */ +/***********************************************************************/ +PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info) + { + typedef PQRYRES (__stdcall *XCOLDEF) (PGLOBAL, void*, char*, char*, bool); + const char *module, *subtype; + char c, getname[40] = "Col"; +#if defined(WIN32) + HANDLE hdll; /* Handle to the external DLL */ +#else // !WIN32 + void *hdll; /* Handle for the loaded shared library */ +#endif // !WIN32 + XCOLDEF coldef = NULL; + PQRYRES qrp = NULL; + + module = topt->module; + subtype = topt->subtype; + + if (!module || !subtype) + return NULL; + + // The exported name is always in uppercase + for (int i = 0; ; i++) { + c = subtype[i]; + getname[i + 3] = toupper(c); + if (!c) break; + } // endfor i + +#if defined(WIN32) + // Load the Dll implementing the table + if (!(hdll = LoadLibrary(module))) { + char buf[256]; + DWORD rc = GetLastError(); + + sprintf(g->Message, MSG(DLL_LOAD_ERROR), rc, module); + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0, + (LPTSTR)buf, sizeof(buf), NULL); + strcat(strcat(g->Message, ": "), buf); + return NULL; + } // endif hDll + + // Get the function returning an instance of the external DEF class + if (!(coldef = (XCOLDEF)GetProcAddress((HINSTANCE)hdll, getname))) { + sprintf(g->Message, MSG(PROCADD_ERROR), GetLastError(), getname); + FreeLibrary((HMODULE)hdll); + return NULL; + } // endif coldef +#else // !WIN32 + const char *error = NULL; + + // Load the desired shared library + if (!(hdll = dlopen(module, RTLD_LAZY))) { + error = dlerror(); + sprintf(g->Message, MSG(SHARED_LIB_ERR), module, SVP(error)); + return NULL; + } // endif Hdll + + // Get the function returning an instance of the external DEF class + if (!(coldef = (XCOLDEF)dlsym(hdll, getname))) { + error = dlerror(); + sprintf(g->Message, MSG(GET_FUNC_ERR), getname, SVP(error)); + dlclose(hdll); + return NULL; + } // endif coldef +#endif // !WIN32 + + // Just in case the external Get function does not set error messages + sprintf(g->Message, "Error getting column info from %s", subtype); + + // Get the table column definition + qrp = coldef(g, topt, tab, db, info); + +#if defined(WIN32) + FreeLibrary((HMODULE)hdll); +#else // !WIN32 + dlclose(hdll); +#endif // !WIN32 + + return qrp; + } // end of OEMColumns + /* ------------------------- Class CATALOG --------------------------- */ /***********************************************************************/ diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp index 08410793792..769aa5a581c 100644 --- a/storage/connect/myconn.cpp +++ b/storage/connect/myconn.cpp @@ -723,7 +723,8 @@ PQRYRES MYSQLC::GetResult(PGLOBAL g, bool pdb) // For direct MySQL connection, display the MySQL date string crp->Type = TYPE_STRING; - crp->Prec = (crp->Type == TYPE_FLOAT) ? fld->decimals : 0; + crp->Prec = (crp->Type == TYPE_DOUBLE || crp->Type == TYPE_DECIM) + ? fld->decimals : 0; crp->Length = fld->max_length; crp->Clen = GetTypeSize(crp->Type, crp->Length); uns = (fld->flags & (UNSIGNED_FLAG | ZEROFILL_FLAG)) ? true : false; diff --git a/storage/connect/mysql-test/connect/r/bin.result b/storage/connect/mysql-test/connect/r/bin.result index 10deb54cb2e..bbf5614b555 100644 --- a/storage/connect/mysql-test/connect/r/bin.result +++ b/storage/connect/mysql-test/connect/r/bin.result @@ -50,8 +50,6 @@ dept INT(4) NOT NULL FIELD_FORMAT='S' INSERT INTO t1 VALUES (7777,'BILL','1973-06-30',4444,5555.555,777); ERROR HY000: Table 't1' is read only ALTER TABLE t1 READONLY=NO; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -71,8 +69,6 @@ fig name birth id salary dept 5555 RONALD 1980-02-26 3333 4444.44 555 7777 BILL 1973-06-30 4444 5555.56 777 ALTER TABLE t1 READONLY=YES; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/storage/connect/mysql-test/connect/r/csv.result b/storage/connect/mysql-test/connect/r/csv.result index 94fd95a5d83..3f424964881 100644 --- a/storage/connect/mysql-test/connect/r/csv.result +++ b/storage/connect/mysql-test/connect/r/csv.result @@ -63,8 +63,6 @@ Archibald 2001-05-17 3 Nabucho 2003-08-12 2 RONALD 1980-02-26 4 ALTER TABLE t1 READONLY=no; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -80,8 +78,6 @@ Nabucho 2003-08-12 2 RONALD 1980-02-26 4 BILL 1973-06-30 5 ALTER TABLE t1 READONLY=1; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/storage/connect/mysql-test/connect/r/dbf.result b/storage/connect/mysql-test/connect/r/dbf.result index c7bb5739e75..bc09f85a631 100644 --- a/storage/connect/mysql-test/connect/r/dbf.result +++ b/storage/connect/mysql-test/connect/r/dbf.result @@ -69,8 +69,6 @@ a 10 20 ALTER TABLE t1 READONLY=Yes; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -85,8 +83,6 @@ ERROR HY000: Table 't1' is read only TRUNCATE TABLE t1; ERROR HY000: Table 't1' is read only ALTER TABLE t1 READONLY=NO; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -508,12 +504,12 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( a VARCHAR(10) NOT NULL -) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf'; +) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1c.dbf'; INSERT INTO t1 VALUES ('10'); SELECT * FROM t1; a 10 -CALL dbf_header('MYSQLD_DATADIR/test/t1.dbf'); +CALL dbf_header('MYSQLD_DATADIR/test/t1c.dbf'); -------- -------- FileSize 77 DBF_Version 03 @@ -532,17 +528,15 @@ Dec 0 Flags 00 -------- -------- ALTER TABLE t1 MODIFY a VARCHAR(10) NOT NULL; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(10) NOT NULL -) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=DBF `FILE_NAME`='t1.dbf' +) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=DBF `FILE_NAME`='t1c.dbf' SELECT * FROM t1; a 10 -CALL dbf_header('MYSQLD_DATADIR/test/t1.dbf'); +CALL dbf_header('MYSQLD_DATADIR/test/t1c.dbf'); -------- -------- FileSize 77 DBF_Version 03 @@ -561,15 +555,17 @@ Dec 0 Flags 00 -------- -------- ALTER TABLE t1 MODIFY a INT(10) NOT NULL; +Warnings: +Warning 1105 This is an outward table, table data were not modified. SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(10) NOT NULL -) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=DBF `FILE_NAME`='t1.dbf' +) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=DBF `FILE_NAME`='t1c.dbf' SELECT * FROM t1; a 10 -CALL dbf_header('MYSQLD_DATADIR/test/t1.dbf'); +CALL dbf_header('MYSQLD_DATADIR/test/t1c.dbf'); -------- -------- FileSize 77 DBF_Version 03 diff --git a/storage/connect/mysql-test/connect/r/dir.result b/storage/connect/mysql-test/connect/r/dir.result index f4feb5fa960..34a591fb26c 100644 --- a/storage/connect/mysql-test/connect/r/dir.result +++ b/storage/connect/mysql-test/connect/r/dir.result @@ -13,8 +13,6 @@ boys .txt 282 boys2 .txt 282 boyswin .txt 288 ALTER TABLE t1 OPTION_LIST='subdir=0'; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/storage/connect/mysql-test/connect/r/fix.result b/storage/connect/mysql-test/connect/r/fix.result index c218561c3aa..96ba3f84a0d 100644 --- a/storage/connect/mysql-test/connect/r/fix.result +++ b/storage/connect/mysql-test/connect/r/fix.result @@ -22,8 +22,6 @@ SELECT * FROM t1; id 10 ALTER TABLE t1 READONLY=1; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -38,8 +36,6 @@ ERROR HY000: Table 't1' is read only TRUNCATE TABLE t1; ERROR HY000: Table 't1' is read only ALTER TABLE t1 READONLY=0; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/storage/connect/mysql-test/connect/r/index.result b/storage/connect/mysql-test/connect/r/index.result index b365046a55d..bffaaecc785 100644 --- a/storage/connect/mysql-test/connect/r/index.result +++ b/storage/connect/mysql-test/connect/r/index.result @@ -37,8 +37,6 @@ SUM(brut) # Testing file mapping # ALTER TABLE t1 MAPPED=yes; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SELECT * FROM t1 LIMIT 10; matricule nom prenom sexe aanais mmnais ddentree ddnom brut net service sitmat formation 5745 ESCOURCHE BENEDICTE 2 1935 7 1962-12-01 1994-05-01 18345 14275.50 0 M TECHN diff --git a/storage/connect/mysql-test/connect/r/ini.result b/storage/connect/mysql-test/connect/r/ini.result index fa03435323e..79996eb8525 100644 --- a/storage/connect/mysql-test/connect/r/ini.result +++ b/storage/connect/mysql-test/connect/r/ini.result @@ -185,8 +185,6 @@ UK 10 FR 20 RU 30 ALTER TABLE t1 READONLY=1; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -202,8 +200,6 @@ ERROR HY000: Table 't1' is read only TRUNCATE TABLE t1; ERROR HY000: Table 't1' is read only ALTER TABLE t1 READONLY=0; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/storage/connect/mysql-test/connect/r/mysql_new.result b/storage/connect/mysql-test/connect/r/mysql_new.result index 152d963efa7..327afa34446 100644 --- a/storage/connect/mysql-test/connect/r/mysql_new.result +++ b/storage/connect/mysql-test/connect/r/mysql_new.result @@ -141,7 +141,7 @@ t1 CREATE TABLE `t1` ( `e` bigint(20) DEFAULT NULL, `f` double DEFAULT NULL, `g` double DEFAULT NULL, - `h` double(20,5) DEFAULT NULL + `h` decimal(20,5) DEFAULT NULL ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='MYSQL' `OPTION_LIST`='host=127.0.0.1,user=root,port=SLAVE_PORT' SELECT * FROM t1; a b c d e f g h diff --git a/storage/connect/mysql-test/connect/r/occur.result b/storage/connect/mysql-test/connect/r/occur.result index a497dfc9942..fbcda4660be 100644 --- a/storage/connect/mysql-test/connect/r/occur.result +++ b/storage/connect/mysql-test/connect/r/occur.result @@ -193,6 +193,8 @@ Kevin 8 Lisbeth 2 Mary 2 ALTER TABLE xpet MODIFY number INT NOT NULL; +Warnings: +Warning 1105 This is an outward table, table data were not modified. SELECT * FROM xpet; name race number John dog 2 diff --git a/storage/connect/mysql-test/connect/r/odbc_oracle.result b/storage/connect/mysql-test/connect/r/odbc_oracle.result new file mode 100644 index 00000000000..fff2f192184 --- /dev/null +++ b/storage/connect/mysql-test/connect/r/odbc_oracle.result @@ -0,0 +1,237 @@ +Table Create Table +t1 CREATE TABLE `t1` ( + `Name` varchar(256) NOT NULL, + `Description` varchar(256) NOT NULL +) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Sources' +SET NAMES utf8; +# +# Checking CATFUNC=Tables +# + +# All tables in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Table_Type Remark + MTR T1 TABLE + MTR T2 TABLE + MTR V1 VIEW +DROP TABLE t1; +# All tables in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='%.%'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Table_Type Remark + MTR T1 TABLE + MTR T2 TABLE + MTR V1 VIEW +DROP TABLE t1; +# All tables "T1" in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='%.T1'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Table_Type Remark + MTR T1 TABLE +DROP TABLE t1; +# All tables "T1" in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='T1'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Table_Type Remark + MTR T1 TABLE +DROP TABLE t1; +# Table "T1" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='MTR.T1'; +SELECT * FROM t1 ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Table_Type Remark + MTR T1 TABLE +DROP TABLE t1; +# All tables in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='MTR.%'; +SELECT * FROM t1 ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Table_Type Remark + MTR T1 TABLE + MTR T2 TABLE + MTR V1 VIEW +DROP TABLE t1; +# +# Checking CATFUNC=Columns +# + +# All columns in all schemas (limited with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Columns; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks + MTR T1 A 3 DECIMAL 38 40 0 10 1 + MTR T1 B 6 NUMBER 38 40 0 0 1 + MTR T2 A 12 VARCHAR2 64 64 0 0 1 + MTR V1 A 3 DECIMAL 38 40 0 10 1 + MTR V1 B 6 NUMBER 38 40 0 0 1 +DROP TABLE t1; +# All columns in all schemas (limited with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Columns TABNAME='%.%'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks + MTR T1 A 3 DECIMAL 38 40 0 10 1 + MTR T1 B 6 NUMBER 38 40 0 0 1 + MTR T2 A 12 VARCHAR2 64 64 0 0 1 + MTR V1 A 3 DECIMAL 38 40 0 10 1 + MTR V1 B 6 NUMBER 38 40 0 0 1 +DROP TABLE t1; +# All tables "T1" in all schemas (limited with WHERE) +CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.T1'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks + MTR T1 A 3 DECIMAL 38 40 0 10 1 + MTR T1 B 6 NUMBER 38 40 0 0 1 +DROP TABLE t1; +# Table "T1" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Columns TABNAME='MTR.T1'; +SELECT * FROM t1 ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks + MTR T1 A 3 DECIMAL 38 40 0 10 1 + MTR T1 B 6 NUMBER 38 40 0 0 1 +DROP TABLE t1; +# All tables "T1" in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Columns TABNAME='%.T1'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks + MTR T1 A 3 DECIMAL 38 40 0 10 1 + MTR T1 B 6 NUMBER 38 40 0 0 1 +DROP TABLE t1; +# +# Checking tables +# + +# Table "T1" in the default schema ("MTR") +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +TABNAME='T1'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `A` decimal(38,0) DEFAULT NULL, + `B` double(40,0) DEFAULT NULL +) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='T1' +SELECT * FROM t1 ORDER BY A; +A B +10 1000000000 +20 1000000000000 +30 1000000000000000 +CREATE TABLE t2 AS SELECT * FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `A` decimal(38,0) DEFAULT NULL, + `B` double(40,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t2; +A B +10 1000000000 +20 1000000000000 +30 1000000000000000 +DROP TABLE t2; +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT * FROM v1; +A B +10 1000000000 +20 1000000000000 +30 1000000000000000 +DROP VIEW v1; +DROP TABLE t1; +# Table "T1" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +TABNAME='MTR.T1'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `A` decimal(38,0) DEFAULT NULL, + `B` double(40,0) DEFAULT NULL +) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.T1' +SELECT * FROM t1; +A B +10 1000000000 +20 1000000000000 +30 1000000000000000 +DROP TABLE t1; +# View "V1" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +TABNAME='MTR.V1'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `A` decimal(38,0) DEFAULT NULL, + `B` double(40,0) DEFAULT NULL +) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.V1' +SELECT * FROM t1; +A B +10 1000000000 +20 1000000000000 +30 1000000000000000 +CREATE TABLE t2 AS SELECT * FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `A` decimal(38,0) DEFAULT NULL, + `B` double(40,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t2; +A B +10 1000000000 +20 1000000000000 +30 1000000000000000 +DROP TABLE t2; +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT * FROM v1; +A B +10 1000000000 +20 1000000000000 +30 1000000000000000 +DROP VIEW v1; +DROP TABLE t1; +# Table "T2" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +TABNAME='MTR.T2'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `A` varchar(64) DEFAULT NULL +) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.T2' +SELECT * FROM t1; +A +test +CREATE TABLE t2 AS SELECT * FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `A` varchar(64) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t2; +A +test +DROP TABLE t2; +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT * FROM v1; +A +test +DROP VIEW v1; +DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/r/pivot.result b/storage/connect/mysql-test/connect/r/pivot.result index 11eee6233a4..2e4a924c8c3 100644 --- a/storage/connect/mysql-test/connect/r/pivot.result +++ b/storage/connect/mysql-test/connect/r/pivot.result @@ -44,8 +44,6 @@ Car DOUBLE(8,2) FLAG=1, Food DOUBLE(8,2) FLAG=1) ENGINE=CONNECT TABLE_TYPE=PIVOT TABNAME=expenses; ALTER TABLE pivex OPTION_LIST='port=PORT'; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SELECT * FROM pivex; Who Week Beer Car Food Beth 3 16.00 0.00 0.00 @@ -61,6 +59,8 @@ Joe 5 14.00 0.00 12.00 # Restricting the columns in a Pivot Table # ALTER TABLE pivex DROP COLUMN week; +Warnings: +Warning 1105 This is an outward table, table data were not modified. SELECT * FROM pivex; Who Beer Car Food Beth 51.00 0.00 29.00 @@ -81,8 +81,6 @@ SRCDEF='select who, week, what, sum(amount) as amount from expenses where week i Warnings: Warning 1105 Cannot check looping reference ALTER TABLE pivex OPTION_LIST='PivotCol=what,FncCol=amount,port=PORT'; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SELECT * FROM pivex; Who Week Beer Car Food Beth 4 15.00 0.00 17.00 @@ -103,8 +101,6 @@ What CHAR(12) NOT NULL, `5` DOUBLE(8,2) FLAG=1) ENGINE=CONNECT TABLE_TYPE=PIVOT TABNAME=expenses; ALTER TABLE pivex OPTION_LIST='PivotCol=Week,port=PORT'; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SELECT * FROM pivex; Who What 3 4 5 Beth Beer 16.00 15.00 20.00 @@ -130,8 +126,6 @@ SRCDEF='select who, what, case when week=3 then ''First'' when week=5 then ''Las Warnings: Warning 1105 Cannot check looping reference ALTER TABLE pivex OPTION_LIST='PivotCol=wk,FncCol=amnt,port=PORT'; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SELECT * FROM pivex; Who What First Middle Last Beth Beer 104.96 98.40 131.20 @@ -202,8 +196,6 @@ ENGINE=CONNECT TABLE_TYPE=PIVOT TABNAME=pets OPTION_LIST='PivotCol=race,groupby= SELECT * FROM pivet; ERROR HY000: Got error 122 'Cannot find matching column' from CONNECT ALTER TABLE pivet OPTION_LIST='PivotCol=race,groupby=1,accept=1'; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SELECT * FROM pivet; name dog cat John 2 0 diff --git a/storage/connect/mysql-test/connect/r/vec.result b/storage/connect/mysql-test/connect/r/vec.result index 926c0f2f4c6..e93305fb07a 100644 --- a/storage/connect/mysql-test/connect/r/vec.result +++ b/storage/connect/mysql-test/connect/r/vec.result @@ -94,8 +94,6 @@ t1vec .blk 8 # Testing READONLY # ALTER TABLE t1 READONLY=yes; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -111,8 +109,6 @@ ERROR HY000: Table 't1' is read only TRUNCATE TABLE t1; ERROR HY000: Table 't1' is read only ALTER TABLE t1 READONLY=no; -Warnings: -Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/storage/connect/mysql-test/connect/r/xml.result b/storage/connect/mysql-test/connect/r/xml.result index e412e44a9ba..aeb1f5edbcd 100644 --- a/storage/connect/mysql-test/connect/r/xml.result +++ b/storage/connect/mysql-test/connect/r/xml.result @@ -413,7 +413,7 @@ DROP TABLE t1; SET @a=LOAD_FILE('MYSQLD_DATADIR/test/t1.xml'); SELECT CAST(@a AS CHAR CHARACTER SET latin1); CAST(@a AS CHAR CHARACTER SET latin1) <?xml version="1.0" encoding="iso-8859-1"?> -<!-- Created by CONNECT Version 1.01.0011 December 15, 2013 --> +<!-- Created by CONNECT Version 1.02.0001 February 03, 2014 --> <t1> <line> <node>ÀÃÂÃ</node> diff --git a/storage/connect/mysql-test/connect/t/dbf.test b/storage/connect/mysql-test/connect/t/dbf.test index 3fd30f98f20..7b364e9b921 100644 --- a/storage/connect/mysql-test/connect/t/dbf.test +++ b/storage/connect/mysql-test/connect/t/dbf.test @@ -442,30 +442,32 @@ DROP TABLE IF EXISTS t1; --echo #
--echo # Testing ALTER
--echo #
+# Temporarily change the file name because ALTER that are not executed not in place
+# delete the data file when it has the same path/name than the default file name.
CREATE TABLE t1
(
a VARCHAR(10) NOT NULL
-) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
+) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1c.dbf';
INSERT INTO t1 VALUES ('10');
SELECT * FROM t1;
---chmod 0777 $MYSQLD_DATADIR/test/t1.dbf
+--chmod 0777 $MYSQLD_DATADIR/test/t1c.dbf
--vertical_results
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval CALL dbf_header('$MYSQLD_DATADIR/test/t1.dbf');
+eval CALL dbf_header('$MYSQLD_DATADIR/test/t1c.dbf');
--horizontal_results
ALTER TABLE t1 MODIFY a VARCHAR(10) NOT NULL;
SHOW CREATE TABLE t1;
SELECT * FROM t1;
--vertical_results
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval CALL dbf_header('$MYSQLD_DATADIR/test/t1.dbf');
+eval CALL dbf_header('$MYSQLD_DATADIR/test/t1c.dbf');
--horizontal_results
ALTER TABLE t1 MODIFY a INT(10) NOT NULL;
SHOW CREATE TABLE t1;
SELECT * FROM t1;
--vertical_results
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval CALL dbf_header('$MYSQLD_DATADIR/test/t1.dbf');
+eval CALL dbf_header('$MYSQLD_DATADIR/test/t1c.dbf');
--horizontal_results
# TODO: this does not work on Windows
@@ -478,7 +480,7 @@ eval CALL dbf_header('$MYSQLD_DATADIR/test/t1.dbf'); #eval CALL dbf_header('$MYSQLD_DATADIR/test/t1.dbf');
#--horizontal_results
DROP TABLE IF EXISTS t1;
---remove_file $MYSQLD_DATADIR/test/t1.dbf
+--remove_file $MYSQLD_DATADIR/test/t1c.dbf
--echo #
diff --git a/storage/connect/mysql-test/connect/t/have_odbc_oracle.inc b/storage/connect/mysql-test/connect/t/have_odbc_oracle.inc new file mode 100644 index 00000000000..b89522ef2cc --- /dev/null +++ b/storage/connect/mysql-test/connect/t/have_odbc_oracle.inc @@ -0,0 +1,15 @@ +--disable_query_log +--error 0,ER_UNKNOWN_ERROR +CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Sources; +if ($mysql_errno) +{ + Skip No ODBC support; +} +if (!`SELECT count(*) FROM t1 WHERE Name='ConnectEngineOracle'`) +{ + DROP TABLE t1; + Skip Need ODBC data source ConnectEngineOracle; +} +SHOW CREATE TABLE t1; +DROP TABLE t1; +--enable_query_log diff --git a/storage/connect/mysql-test/connect/t/odbc_oracle.sql b/storage/connect/mysql-test/connect/t/odbc_oracle.sql new file mode 100644 index 00000000000..50ba824bc04 --- /dev/null +++ b/storage/connect/mysql-test/connect/t/odbc_oracle.sql @@ -0,0 +1,16 @@ +DROP USER mtr CASCADE; +CREATE USER mtr IDENTIFIED BY mtr +DEFAULT TABLESPACE users +TEMPORARY TABLESPACE temp; +GRANT CREATE SESSION TO mtr; +GRANT CREATE TABLE TO mtr; +GRANT CREATE VIEW TO mtr; +ALTER USER mtr QUOTA UNLIMITED ON USERS; +CONNECT mtr/mtr; +CREATE TABLE t1 (a INT,b NUMBER); +INSERT INTO t1 VALUES (10,1000*1000*1000); +INSERT INTO t1 VALUES (20,1000*1000*1000*1000); +INSERT INTO t1 VALUES (30,1000*1000*1000*1000*1000); +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE TABLE t2 (a VARCHAR(64)); +INSERT INTO t2 VALUES ('test'); diff --git a/storage/connect/mysql-test/connect/t/odbc_oracle.test b/storage/connect/mysql-test/connect/t/odbc_oracle.test new file mode 100644 index 00000000000..9de742a2647 --- /dev/null +++ b/storage/connect/mysql-test/connect/t/odbc_oracle.test @@ -0,0 +1,230 @@ +--source have_odbc_oracle.inc + +# +# To configure your system to be able to run this test, +# follow through the following steps: +# +# 1. Install and configure Oracle database to start on the system startup. +# +# 2. Create user, database, schema and tables to be used by mtr: +# sqlplus system/manager < odbc_oracle.sql +# +# 3. Configure Oracle ODBC Driver for unixODBC (skip this step on Windows): +# Add these lines into /etc/odbcinst.ini: +# (the exact paths can vary) +# +#[Oracle11g] +#Description=Oracle ODBC driver for Oracle 11g +#Driver=/u01/app/oracle/product/11.2.0/xe/lib/libsqora.so.11.1 +#Setup= +#FileUsage= +#CPTimeout= +#CPReuse= +# +# 4. Create a data source with the name "ConnectEngineOracle" +# - On Windows: use odbcadm.exe +# - On Linux: put these lines into /etc/odbc.ini +# +#[ConnectEngineOracle] +#Application Attributes=T +#Attributes=W +#BatchAutocommitMode=IfAllSuccessful +#CloseCursor=F +#DisableDPM=F +#DisableMTS=T +#Driver=Oracle11g +#DSN=ConnectEngineOracle +#EXECSchemaOpt= +#EXECSyntax=T +#Failover=T +#FailoverDelay=10 +#FailoverRetryCount=10 +#FetchBufferSize=64000 +#ForceWCHAR=F +#Lobs=T +#Longs=T +#MetadataIdDefault=F +#QueryTimeout=T +#ResultSets=T +#ServerName= +#SQLGetData extensions=F +#Translation DLL= +#Translation Option=0 +#UserID= + + +SET NAMES utf8; + +# +# Oracle does not support the third (catalog) level +# in SQLTables() and SQLColumns(), e.g.: CATFUNC=Tables TABNAME='%.%.%'. +# It returns a "Driver not capable" error on attept to use non-NULL catalog. +# +# But it works fine with the second (schema) level: +# CATFUNC=Tables TABNAME='%.%' +# Note, if schema level is not specified, or schema level is '%', +# tables for *all* schemas are returned +# (not only for the schema associated with the user. +# +# Note, schema and table names must be in upper case. +# + + + +--echo # +--echo # Checking CATFUNC=Tables +--echo # +--echo + +--echo # All tables in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +DROP TABLE t1; + +--echo # All tables in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='%.%'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +DROP TABLE t1; + +--echo # All tables "T1" in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='%.T1'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +DROP TABLE t1; + +--echo # All tables "T1" in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='T1'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +DROP TABLE t1; + +--echo # Table "T1" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='MTR.T1'; +SELECT * FROM t1 ORDER BY Table_Schema, Table_Name; +DROP TABLE t1; + +--echo # All tables in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Tables TABNAME='MTR.%'; +SELECT * FROM t1 ORDER BY Table_Schema, Table_Name; +DROP TABLE t1; + + +--echo # +--echo # Checking CATFUNC=Columns +--echo # +--echo + + +--echo # All columns in all schemas (limited with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Columns; +# Disable warnings to avoid "Result limited to 20000 lines" +--disable_warnings +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +--enable_warnings +DROP TABLE t1; + +--echo # All columns in all schemas (limited with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Columns TABNAME='%.%'; +# Disable warnings to avoid "Result limited to 20000 lines" +--disable_warnings +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +--enable_warnings +DROP TABLE t1; + +--echo # All tables "T1" in all schemas (limited with WHERE) +CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.T1'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +DROP TABLE t1; + +--echo # Table "T1" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Columns TABNAME='MTR.T1'; +SELECT * FROM t1 ORDER BY Table_Schema, Table_Name; +DROP TABLE t1; + +--echo # All tables "T1" in all schemas (filtered with WHERE) +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +CATFUNC=Columns TABNAME='%.T1'; +SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name; +DROP TABLE t1; + + +--echo # +--echo # Checking tables +--echo # +--echo + +--echo # Table "T1" in the default schema ("MTR") +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +TABNAME='T1'; +SHOW CREATE TABLE t1; +SELECT * FROM t1 ORDER BY A; + +CREATE TABLE t2 AS SELECT * FROM t1; +SHOW CREATE TABLE t2; +SELECT * FROM t2; +DROP TABLE t2; + +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; + +--echo # Table "T1" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +TABNAME='MTR.T1'; +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + +--echo # View "V1" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +TABNAME='MTR.V1'; +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +CREATE TABLE t2 AS SELECT * FROM t1; +SHOW CREATE TABLE t2; +SELECT * FROM t2; +DROP TABLE t2; + +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; + +--echo # Table "T2" in the schema "MTR" +CREATE TABLE t1 ENGINE=CONNECT +TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtr' +TABNAME='MTR.T2'; +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +CREATE TABLE t2 AS SELECT * FROM t1; +SHOW CREATE TABLE t2; +SELECT * FROM t2; +DROP TABLE t2; + +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; diff --git a/storage/connect/myutil.cpp b/storage/connect/myutil.cpp index 4bfdc1a03ec..1594afb1b3d 100644 --- a/storage/connect/myutil.cpp +++ b/storage/connect/myutil.cpp @@ -42,9 +42,10 @@ int MYSQLtoPLG(char *typname, char *var) !stricmp(typname, "text") || !stricmp(typname, "blob")) type = TYPE_STRING; else if (!stricmp(typname, "double") || !stricmp(typname, "float") || - !stricmp(typname, "real") || - !stricmp(typname, "decimal") || !stricmp(typname, "numeric")) - type = TYPE_FLOAT; + !stricmp(typname, "real")) + type = TYPE_DOUBLE; + else if (!stricmp(typname, "decimal") || !stricmp(typname, "numeric")) + type = TYPE_DECIM; else if (!stricmp(typname, "date") || !stricmp(typname, "datetime") || !stricmp(typname, "time") || !stricmp(typname, "timestamp") || !stricmp(typname, "year")) @@ -95,7 +96,7 @@ enum enum_field_types PLGtoMYSQL(int type, bool dbf, char v) case TYPE_SHORT: mytype = MYSQL_TYPE_SHORT; break; - case TYPE_FLOAT: + case TYPE_DOUBLE: mytype = MYSQL_TYPE_DOUBLE; break; case TYPE_DATE: @@ -114,6 +115,13 @@ enum enum_field_types PLGtoMYSQL(int type, bool dbf, char v) case TYPE_TINY: mytype = MYSQL_TYPE_TINY; break; + case TYPE_DECIM: +#if !defined(ALPHA) + mytype = MYSQL_TYPE_NEWDECIMAL; +#else // ALPHA + mytype = MYSQL_TYPE_DECIMAL; +#endif // ALPHA + break; default: mytype = MYSQL_TYPE_NULL; } // endswitch mytype @@ -129,7 +137,7 @@ const char *PLGtoMYSQLtype(int type, bool dbf, char v) switch (type) { case TYPE_INT: return "INT"; case TYPE_SHORT: return "SMALLINT"; - case TYPE_FLOAT: return "DOUBLE"; + case TYPE_DOUBLE: return "DOUBLE"; case TYPE_DATE: return dbf ? "DATE" : (v == 'S') ? "TIMESTAMP" : (v == 'D') ? "DATE" : @@ -138,6 +146,7 @@ const char *PLGtoMYSQLtype(int type, bool dbf, char v) case TYPE_STRING: return v ? "VARCHAR" : "CHAR"; case TYPE_BIGINT: return "BIGINT"; case TYPE_TINY: return "TINYINT"; + case TYPE_DECIM: return "DECIMAL"; default: return "CHAR(0)"; } // endswitch mytype @@ -170,9 +179,11 @@ int MYSQLtoPLG(int mytype, char *var) #if !defined(ALPHA) case MYSQL_TYPE_NEWDECIMAL: #endif // !ALPHA) + type = TYPE_DECIM; + break; case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_DOUBLE: - type = TYPE_FLOAT; + type = TYPE_DOUBLE; break; case MYSQL_TYPE_TIMESTAMP: case MYSQL_TYPE_DATE: diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 846d8963502..e50c5d03eb9 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -1,5 +1,5 @@ /************ Odbconn C++ Functions Source Code File (.CPP) ************/ -/* Name: ODBCONN.CPP Version 1.8 */ +/* Name: ODBCONN.CPP Version 1.9 */ /* */ /* (C) Copyright to the author Olivier BERTRAND 1998-2013 */ /* */ @@ -9,7 +9,8 @@ /***********************************************************************/ /* Include relevant MariaDB header file. */ /***********************************************************************/ -#include "my_global.h" +#include <my_global.h> +#include <m_string.h> #if defined(WIN32) //nclude <io.h> //nclude <fcntl.h> @@ -78,8 +79,9 @@ static short GetSQLType(int type) case TYPE_INT: tp = SQL_INTEGER; break; case TYPE_DATE: tp = SQL_TIMESTAMP; break; case TYPE_BIGINT: tp = SQL_BIGINT; break; // (-5) - case TYPE_FLOAT: tp = SQL_DOUBLE; break; - case TYPE_TINY : tp = SQL_TINYINT; break; + case TYPE_DOUBLE: tp = SQL_DOUBLE; break; + case TYPE_TINY: tp = SQL_TINYINT; break; + case TYPE_DECIM: tp = SQL_DECIMAL; break; } // endswitch type return tp; @@ -98,8 +100,9 @@ static int GetSQLCType(int type) case TYPE_INT: tp = SQL_C_LONG; break; case TYPE_DATE: tp = SQL_C_TIMESTAMP; break; case TYPE_BIGINT: tp = SQL_C_SBIGINT; break; - case TYPE_FLOAT: tp = SQL_C_DOUBLE; break; + case TYPE_DOUBLE: tp = SQL_C_DOUBLE; break; case TYPE_TINY : tp = SQL_C_TINYINT; break; + case TYPE_DECIM: tp = SQL_C_CHAR; break; } // endswitch type return tp; @@ -125,8 +128,9 @@ int TranslateSQLType(int stp, int prec, int& len, char& v) break; case SQL_NUMERIC: // 2 case SQL_DECIMAL: // 3 - type = (prec || len > 20) ? TYPE_FLOAT - : (len > 10) ? TYPE_BIGINT : TYPE_INT; +// type = (prec || len > 20) ? TYPE_DOUBLE +// : (len > 10) ? TYPE_BIGINT : TYPE_INT; + type = TYPE_DECIM; break; case SQL_INTEGER: // 4 type = TYPE_INT; @@ -141,7 +145,7 @@ int TranslateSQLType(int stp, int prec, int& len, char& v) case SQL_FLOAT: // 6 case SQL_REAL: // 7 case SQL_DOUBLE: // 8 - type = TYPE_FLOAT; + type = TYPE_DOUBLE; break; case SQL_DATETIME: // 9 // case SQL_DATE: // 9 @@ -312,9 +316,9 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table, } else if (!maxres) maxres = 20000; -// n = ocp->GetMaxValue(SQL_MAX_QUALIFIER_NAME_LEN); +// n = ocp->GetMaxValue(SQL_MAX_CATALOG_NAME_LEN); // length[0] = (n) ? (n + 1) : 0; -// n = ocp->GetMaxValue(SQL_MAX_USER_NAME_LEN); +// n = ocp->GetMaxValue(SQL_MAX_SCHEMA_NAME_LEN); // length[1] = (n) ? (n + 1) : 0; // n = ocp->GetMaxValue(SQL_MAX_TABLE_NAME_LEN); // length[2] = (n) ? (n + 1) : 0; @@ -425,7 +429,7 @@ PQRYRES MyODBCCols(PGLOBAL g, char *dsn, char *tab, bool info) /************************************************************************/ /* Keep only the info used by ha_connect::pre_create. */ /************************************************************************/ - qrp->Colresp = qrp->Colresp->Next->Next; // Skip Owner and Table names + qrp->Colresp = qrp->Colresp->Next->Next; // Skip Schema and Table names crpt = qrp->Colresp->Next; // SQL type crpl = crpt->Next->Next; // Length @@ -440,7 +444,7 @@ PQRYRES MyODBCCols(PGLOBAL g, char *dsn, char *tab, bool info) crpt->Kdata->SetValue(type, i); // Some data sources do not count prec in length - if (type == TYPE_FLOAT) + if (type == TYPE_DOUBLE) len += (prec + 2); // To be safe // Could have been changed for blobs or numeric @@ -588,9 +592,9 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *db, char *tabpat, if (!maxres) maxres = 10000; // This is completely arbitrary -// n = ocp->GetMaxValue(SQL_MAX_QUALIFIER_NAME_LEN); +// n = ocp->GetMaxValue(SQL_MAX_CATALOG_NAME_LEN); // length[0] = (n) ? (n + 1) : 0; -// n = ocp->GetMaxValue(SQL_MAX_USER_NAME_LEN); +// n = ocp->GetMaxValue(SQL_MAX_SCHEMA_NAME_LEN); // length[1] = (n) ? (n + 1) : 0; n = ocp->GetMaxValue(SQL_MAX_TABLE_NAME_LEN); length[2] = (n) ? (n + 1) : 128; @@ -678,9 +682,9 @@ PQRYRES ODBCPrimaryKeys(PGLOBAL g, ODBConn *op, char *dsn, char *table) /************************************************************************/ n = ocp->GetMaxValue(SQL_MAX_COLUMNS_IN_TABLE); maxres = (n) ? (int)n : 250; - n = ocp->GetMaxValue(SQL_MAX_QUALIFIER_NAME_LEN); + n = ocp->GetMaxValue(SQL_MAX_CATALOG_NAME_LEN); length[0] = (n) ? (n + 1) : 128; - n = ocp->GetMaxValue(SQL_MAX_USER_NAME_LEN); + n = ocp->GetMaxValue(SQL_MAX_SCHEMA_NAME_LEN); length[1] = (n) ? (n + 1) : 128; n = ocp->GetMaxValue(SQL_MAX_TABLE_NAME_LEN); length[2] = (n) ? (n + 1) : 128; @@ -761,11 +765,11 @@ PQRYRES ODBCStatistics(PGLOBAL g, ODBConn *op, char *dsn, char *pat, /************************************************************************/ n = 1 + ocp->GetMaxValue(SQL_MAX_COLUMNS_IN_INDEX); maxres = (n) ? (int)n : 32; - n = ocp->GetMaxValue(SQL_MAX_USER_NAME_LEN); + n = ocp->GetMaxValue(SQL_MAX_SCHEMA_NAME_LEN); length[1] = (n) ? (n + 1) : 128; n = ocp->GetMaxValue(SQL_MAX_TABLE_NAME_LEN); length[2] = length[5] = (n) ? (n + 1) : 128; - n = ocp->GetMaxValue(SQL_MAX_QUALIFIER_NAME_LEN); + n = ocp->GetMaxValue(SQL_MAX_CATALOG_NAME_LEN); length[0] = length[4] = (n) ? (n + 1) : length[2]; n = ocp->GetMaxValue(SQL_MAX_COLUMN_NAME_LEN); length[7] = (n) ? (n + 1) : 128; @@ -1648,35 +1652,35 @@ int ODBConn::ExecuteSQL(void) /***********************************************************************/ bool ODBConn::BindParam(ODBCCOL *colp) { - void *buf; - UWORD n = colp->GetRank(); - SWORD ct, sqlt; - UDWORD len; - SQLLEN *strlen = colp->GetStrLen(); - RETCODE rc; + void *buf; + int buftype = colp->GetResultType(); + SQLUSMALLINT n = colp->GetRank(); + SQLSMALLINT ct, sqlt, dec, nul; + SQLULEN colsize; + SQLLEN len; + SQLLEN *strlen = colp->GetStrLen(); + SQLRETURN rc; -#if 0 try { - SWORD dec, nul; - rc = SQLDescribeParam(m_hstmt, n, &sqlt, &len, &dec, &nul); + rc = SQLDescribeParam(m_hstmt, n, &sqlt, &colsize, &dec, &nul); if (!Check(rc)) - ThrowDBX(rc, m_hstmt); + ThrowDBX(rc, "SQLDescribeParam", m_hstmt); } catch(DBX *x) { strcpy(m_G->Message, x->GetErrorMessage(0)); + colsize = colp->GetPrecision(); + sqlt = GetSQLType(buftype); } // end try/catch -#endif // 0 buf = colp->GetBuffer(0); - len = IsTypeNum(colp->GetResultType()) ? 0 : colp->GetBuflen(); - ct = GetSQLCType(colp->GetResultType()); - sqlt = GetSQLType(colp->GetResultType()); - *strlen = IsTypeNum(colp->GetResultType()) ? 0 : SQL_NTS; + len = IsTypeChar(buftype) ? colp->GetBuflen() : 0; + ct = GetSQLCType(buftype); + *strlen = IsTypeChar(buftype) ? SQL_NTS : 0; try { rc = SQLBindParameter(m_hstmt, n, SQL_PARAM_INPUT, ct, sqlt, - len, 0, buf, 0, strlen); + colsize, dec, buf, len, strlen); if (!Check(rc)) ThrowDBX(rc, "SQLBindParameter", m_hstmt); @@ -2020,7 +2024,6 @@ bool ODBConn::GetDrivers(PQRYRES qrp) return rv; } // end of GetDrivers - /***********************************************************************/ /* A helper class to split an optionally qualified table name into */ /* components. */ @@ -2039,7 +2042,7 @@ class SQLQualifiedName { S->str= str; S->length= length; - } // eend of lex_string_set + } // end of lex_string_set void lex_string_shorten_down(MYSQL_LEX_STRING *S, size_t offs) { @@ -2228,7 +2231,7 @@ int ODBConn::GetCatInfo(CATPARM *cap) ((STRBLK*)crp->Kdata)->SetSorted(true); } // endif len - pval[n] = AllocateValue(g, crp->Type, len, 0); + pval[n] = AllocateValue(g, crp->Type, len); buffer = pval[n]->GetTo_Val(); vl = vlen + n; diff --git a/storage/connect/os.h b/storage/connect/os.h index e3d452bf7b8..8e94f4241bb 100644 --- a/storage/connect/os.h +++ b/storage/connect/os.h @@ -9,6 +9,12 @@ typedef off_t off64_t; #define O_LARGEFILE 0 #endif +#ifdef _AIX +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif +#endif + #if defined(WIN32) typedef __int64 BIGINT; #else // !WIN32 diff --git a/storage/connect/plgcnx.h b/storage/connect/plgcnx.h index 7ce72b45268..fe3997d1986 100644 --- a/storage/connect/plgcnx.h +++ b/storage/connect/plgcnx.h @@ -1,6 +1,6 @@ /**************************************************************************/ /* PLGCNX.H */ -/* Copyright to the author: Olivier Bertrand 2000-2012 */ +/* Copyright to the author: Olivier Bertrand 2000-2014 */ /* */ /* This is the connection DLL's declares. */ /**************************************************************************/ @@ -62,6 +62,7 @@ enum INFO {INDX_RC, /* Index of PlugDB return code field */ INDX_SIZE, /* Index of returned data size field */ INDX_MAX}; /* Size of info array */ +#ifdef NOT_USED /**************************************************************************/ /* Internal message types. */ /**************************************************************************/ @@ -97,9 +98,9 @@ enum VENDOR {VDR_UNKNOWN = -2, /* Not known or not connected */ /**************************************************************************/ enum CKEYS {K_ProgMsg, K_Lang, K_ActiveDB, K_Cmax}; enum LKEYS {K_NBcol, K_NBlin, K_CurPos, K_RC, K_Result, K_Elapsed, - K_Continued, K_Maxsize, K_Lmax, K_Maxcol, + K_Continued, K_Maxsize, K_Affrows, K_Lmax, K_Maxcol, K_Maxres, K_Maxlin, K_NBparm}; -enum NKEYS {K_Type, K_Length, K_Prec, K_DataLen, K_Nmax}; +enum NKEYS {K_Type, K_Length, K_Prec, K_DataLen, K_Unsigned, K_Nmax}; /**************************************************************************/ /* Result description structures. */ @@ -157,7 +158,6 @@ typedef struct _ResDesc { #define XTRN #endif -#ifdef NOT_USED //#if !defined(NO_FUNC) #ifdef __cplusplus extern "C" { @@ -172,7 +172,7 @@ XTRN bool CNXFUNC(PLGGetCharValue)(CNXKEY, char *, int, int); XTRN bool CNXFUNC(PLGGetIntValue)(CNXKEY, int *, int); XTRN bool CNXFUNC(PLGGetColValue) (CNXKEY, int *, int, int); XTRN bool CNXFUNC(PLGGetMessage) (CNXKEY, char *, int); -XTRN bool CNXFUNC(PLGGetHeader) (CNXKEY, char *, int, int); +XTRN bool CNXFUNC(PLGGetHeader) (CNXKEY, char *, int, int, int); #ifdef __cplusplus } diff --git a/storage/connect/plgdbsem.h b/storage/connect/plgdbsem.h index b62979451ee..e251ded13df 100644 --- a/storage/connect/plgdbsem.h +++ b/storage/connect/plgdbsem.h @@ -1,7 +1,7 @@ /************** PlgDBSem H Declares Source Code File (.H) **************/ -/* Name: PLGDBSEM.H Version 3.5 */ +/* Name: PLGDBSEM.H Version 3.6 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 1998-2012 */ +/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */ /* */ /* This file contains the PlugDB++ application type definitions. */ /***********************************************************************/ @@ -166,7 +166,8 @@ enum MODE {MODE_ERROR = -1, /* Invalid mode */ MODE_WRITE = 20, /* Input/Output mode */ MODE_UPDATE = 30, /* Input/Output mode */ MODE_INSERT = 40, /* Input/Output mode */ - MODE_DELETE = 50}; /* Input/Output mode */ + MODE_DELETE = 50, /* Input/Output mode */ + MODE_ALTER = 60}; /* alter mode */ #if !defined(RC_OK_DEFINED) #define RC_OK_DEFINED @@ -549,8 +550,6 @@ PPARM Vcolist(PGLOBAL, PTDB, PSZ, bool); void PlugPutOut(PGLOBAL, FILE *, short, void *, uint); void PlugLineDB(PGLOBAL, PSZ, short, void *, uint); char *PlgGetDataPath(PGLOBAL g); -void *PlgDBalloc(PGLOBAL, void *, MBLOCK&); -void *PlgDBrealloc(PGLOBAL, void *, MBLOCK&, size_t); void AddPointer(PTABS, void *); PDTP MakeDateFormat(PGLOBAL, PSZ, bool, bool, int); int ExtractDate(char *, PDTP, int, int val[6]); @@ -558,9 +557,10 @@ int ExtractDate(char *, PDTP, int, int val[6]); /**************************************************************************/ /* Allocate the result structure that will contain result data. */ /**************************************************************************/ -PQRYRES PlgAllocResult(PGLOBAL g, int ncol, int maxres, int ids, - int *buftyp, XFLD *fldtyp, - unsigned int *length, bool blank, bool nonull); +DllExport PQRYRES PlgAllocResult(PGLOBAL g, int ncol, int maxres, int ids, + int *buftyp, XFLD *fldtyp, + unsigned int *length, + bool blank, bool nonull); /***********************************************************************/ /* Exported utility routines. */ @@ -576,12 +576,16 @@ DllExport PCATLG PlgGetCatalog(PGLOBAL g, bool jump = true); DllExport bool PlgSetXdbPath(PGLOBAL g, PSZ, PSZ, char *, int, char *, int); DllExport void PlgDBfree(MBLOCK&); DllExport void *PlgDBSubAlloc(PGLOBAL g, void *memp, size_t size); +DllExport void *PlgDBalloc(PGLOBAL, void *, MBLOCK&); +DllExport void *PlgDBrealloc(PGLOBAL, void *, MBLOCK&, size_t); //lExport PSZ GetIniString(PGLOBAL, void *, LPCSTR, LPCSTR, LPCSTR, LPCSTR); //lExport int GetIniSize(char *, char *, char *, char *); //lExport bool WritePrivateProfileInt(LPCSTR, LPCSTR, int, LPCSTR); DllExport void NewPointer(PTABS, void *, void *); DllExport char *GetIni(int n= 0); DllExport void SetTrc(void); +DllExport char *GetListOption(PGLOBAL, const char *, const char *, + const char *def=NULL); #define MSGID_NONE 0 #define MSGID_CANNOT_OPEN 1 @@ -597,4 +601,4 @@ int global_open(GLOBAL *g, int msgid, const char *filename, int flags, int mode) DllExport LPCSTR PlugSetPath(LPSTR to, LPCSTR name, LPCSTR dir); char *MakeEscape(PGLOBAL g, char* str, char q); -bool PushWarning(PGLOBAL, PTDBASE, int level = 1); +DllExport bool PushWarning(PGLOBAL, PTDBASE, int level = 1); diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp index 26aa4681878..c3c74463271 100644 --- a/storage/connect/plgdbutl.cpp +++ b/storage/connect/plgdbutl.cpp @@ -1,11 +1,11 @@ /********** PlgDBUtl Fpe C++ Program Source Code File (.CPP) ***********/ /* PROGRAM NAME: PLGDBUTL */ /* ------------- */ -/* Version 3.8 */ +/* Version 3.9 */ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 1998-2013 */ +/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -90,6 +90,7 @@ bool Initdone = false; bool plugin = false; // True when called by the XDB plugin handler extern "C" { +extern char connectini[]; char plgxini[_MAX_PATH] = PLGXINI; char plgini[_MAX_PATH] = PLGINI; #if defined(WIN32) @@ -232,6 +233,7 @@ DllExport char *GetIni(int n) #if defined(XMSG) case 5: return msglang; break; #endif // XMSG + case 6: return connectini; break; // default: return plgini; } // endswitch GetIni @@ -1329,7 +1331,7 @@ void *PlgDBalloc(PGLOBAL g, void *area, MBLOCK& mp) maxsub = (pph->FreeBlk < minsub) ? 0 : pph->FreeBlk - minsub; mp.Sub = mp.Size <= ((mp.Sub) ? maxsub : (maxsub >> 2)); - if (trace) + if (trace > 1) htrc("PlgDBalloc: in %p size=%d used=%d free=%d sub=%d\n", arp, mp.Size, pph->To_Free, pph->FreeBlk, mp.Sub); @@ -1372,7 +1374,7 @@ void *PlgDBrealloc(PGLOBAL g, void *area, MBLOCK& mp, size_t newsize) // assert (mp.Memp != NULL); #endif - if (trace) + if (trace > 1) htrc("PlgDBrealloc: %p size=%d sub=%d\n", mp.Memp, mp.Size, mp.Sub); if (newsize == mp.Size) @@ -1429,7 +1431,7 @@ void *PlgDBrealloc(PGLOBAL g, void *area, MBLOCK& mp, size_t newsize) /***********************************************************************/ void PlgDBfree(MBLOCK& mp) { - if (trace) + if (trace > 1) htrc("PlgDBfree: %p sub=%d size=%d\n", mp.Memp, mp.Sub, mp.Size); if (!mp.Sub && mp.Memp) @@ -1523,7 +1525,7 @@ void PlugPutOut(PGLOBAL g, FILE *f, short t, void *v, uint n) fprintf(f, "%s%s\n", m, (PSZ)v); break; - case TYPE_FLOAT: + case TYPE_DOUBLE: fprintf(f, "%s%lf\n", m, *(double *)v); break; diff --git a/storage/connect/plugutil.c b/storage/connect/plugutil.c index ec2ac399ad0..91b850022fb 100644 --- a/storage/connect/plugutil.c +++ b/storage/connect/plugutil.c @@ -152,6 +152,7 @@ PGLOBAL PlugInit(LPCSTR Language, uint worksize) g->Sarea_Size = worksize; g->Trace = 0; g->Createas = 0; + g->Alchecked = 0; g->Activityp = g->ActivityStart = NULL; g->Xchk = NULL; strcpy(g->Message, ""); diff --git a/storage/connect/rcmsg.c b/storage/connect/rcmsg.c index 25dd4df7a92..bac420e696f 100644 --- a/storage/connect/rcmsg.c +++ b/storage/connect/rcmsg.c @@ -38,13 +38,13 @@ char *GetMsgid(int id) case IDS_13: p = "%s: clé de connexion invalide %d"; break; case IDS_14: p = "SafeDB: %s rc=%d"; break; case IDS_15: p = "Mauvaise Dll de communication appelée par le moteur %s"; break; - case IDS_TAB_01: p = "Qualificateur"; break; - case IDS_TAB_02: p = "Propriétaire"; break; + case IDS_TAB_01: p = "Catalogue"; break; + case IDS_TAB_02: p = "Schéma"; break; case IDS_TAB_03: p = "Nom"; break; case IDS_TAB_04: p = "Type"; break; case IDS_TAB_05: p = "Remarque"; break; - case IDS_COL_01: p = "Qualif_Table"; break; - case IDS_COL_02: p = "Prop_Tabl"; break; + case IDS_COL_01: p = "Cat_Table"; break; + case IDS_COL_02: p = "Schem_Table"; break; case IDS_COL_03: p = "Nom_Table"; break; case IDS_COL_04: p = "Nom_Colonne"; break; case IDS_COL_05: p = "Type_Données"; break; @@ -70,18 +70,18 @@ char *GetMsgid(int id) case IDS_INF_13: p = "Nom_Type_Local"; break; case IDS_INF_14: p = "Echelle_Minimum"; break; case IDS_INF_15: p = "Echelle_Maximum"; break; - case IDS_PKY_01: p = "Qualif_Table"; break; - case IDS_PKY_02: p = "Prop_Table"; break; + case IDS_PKY_01: p = "Cat_Table"; break; + case IDS_PKY_02: p = "Schem_Table"; break; case IDS_PKY_03: p = "Nom_Table"; break; case IDS_PKY_04: p = "Nom_Colonne"; break; case IDS_PKY_05: p = "Numéro_Clé"; break; case IDS_PKY_06: p = "Nom_Clé"; break; - case IDS_FKY_01: p = "PKTable_Qualifier"; break; - case IDS_FKY_02: p = "PKTable_Owner"; break; + case IDS_FKY_01: p = "PKTable_Catalog"; break; + case IDS_FKY_02: p = "PKTable_Schema"; break; case IDS_FKY_03: p = "PKTable_Name"; break; case IDS_FKY_04: p = "PKColumn_Name"; break; - case IDS_FKY_05: p = "FKTable_Qualifier"; break; - case IDS_FKY_06: p = "FKTable_Owner"; break; + case IDS_FKY_05: p = "FKTable_Catalog"; break; + case IDS_FKY_06: p = "FKTable_Schema"; break; case IDS_FKY_07: p = "FKTable_Name"; break; case IDS_FKY_08: p = "FKColumn_Name"; break; case IDS_FKY_09: p = "Key_Seq"; break; @@ -89,8 +89,8 @@ char *GetMsgid(int id) case IDS_FKY_11: p = "Delete_Rule"; break; case IDS_FKY_12: p = "FK_Name"; break; case IDS_FKY_13: p = "PK_Name"; break; - case IDS_STA_01: p = "Table_Qualifier"; break; - case IDS_STA_02: p = "Table_Owner"; break; + case IDS_STA_01: p = "Table_Catalog"; break; + case IDS_STA_02: p = "Table_Schema"; break; case IDS_STA_03: p = "Table_Name"; break; case IDS_STA_04: p = "Non_Unique"; break; case IDS_STA_05: p = "Index_Qualifier"; break; @@ -162,18 +162,18 @@ char *GetMsgid(int id) case IDS_INF_13: p = "Local_Type_Name"; break; case IDS_INF_14: p = "Minimum_Scale"; break; case IDS_INF_15: p = "Maximum_Scale"; break; - case IDS_PKY_01: p = "Table_Qualifier"; break; - case IDS_PKY_02: p = "Table_Owner"; break; + case IDS_PKY_01: p = "Table_Catalog"; break; + case IDS_PKY_02: p = "Table_Schema"; break; case IDS_PKY_03: p = "Table_Name"; break; case IDS_PKY_04: p = "Column_Name"; break; case IDS_PKY_05: p = "Key_Seq"; break; case IDS_PKY_06: p = "Pk_Name"; break; - case IDS_FKY_01: p = "PKTable_Qualifier"; break; - case IDS_FKY_02: p = "PKTable_Owner"; break; + case IDS_FKY_01: p = "PKTable_Catalog"; break; + case IDS_FKY_02: p = "PKTable_Schema"; break; case IDS_FKY_03: p = "PKTable_Name"; break; case IDS_FKY_04: p = "PKColumn_Name"; break; - case IDS_FKY_05: p = "FKTable_Qualifier"; break; - case IDS_FKY_06: p = "FKTable_Owner"; break; + case IDS_FKY_05: p = "FKTable_Catalog"; break; + case IDS_FKY_06: p = "FKTable_Schema"; break; case IDS_FKY_07: p = "FKTable_Name"; break; case IDS_FKY_08: p = "FKColumn_Name"; break; case IDS_FKY_09: p = "Key_Seq"; break; @@ -181,8 +181,8 @@ char *GetMsgid(int id) case IDS_FKY_11: p = "Delete_Rule"; break; case IDS_FKY_12: p = "FK_Name"; break; case IDS_FKY_13: p = "PK_Name"; break; - case IDS_STA_01: p = "Table_Qualifier"; break; - case IDS_STA_02: p = "Table_Owner"; break; + case IDS_STA_01: p = "Table_Catalog"; break; + case IDS_STA_02: p = "Table_Schema"; break; case IDS_STA_03: p = "Table_Name"; break; case IDS_STA_04: p = "Non_Unique"; break; case IDS_STA_05: p = "Index_Qualifier"; break; diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp index 93d15747911..81c9bf9faca 100644 --- a/storage/connect/reldef.cpp +++ b/storage/connect/reldef.cpp @@ -73,7 +73,7 @@ RELDEF::RELDEF(void) /***********************************************************************/ TABDEF::TABDEF(void) { - Owner = NULL; + Schema = NULL; Desc = NULL; Catfunc = FNC_NO; Card = 0; @@ -338,9 +338,9 @@ COLCRT::COLCRT(PSZ name) Fmt = NULL; Offset = -1; Long = -1; -//Freq = -1; + Precision = -1; Key = -1; - Prec = -1; + Scale = -1; Opt = -1; DataType = '*'; } // end of COLCRT constructor for table creation @@ -354,9 +354,9 @@ COLCRT::COLCRT(void) Fmt = NULL; Offset = 0; Long = 0; -//Freq = 0; + Precision = 0; Key = 0; - Prec = 0; + Scale = 0; Opt = 0; DataType = '*'; } // end of COLCRT constructor for table & view definition @@ -394,8 +394,10 @@ int COLDEF::Define(PGLOBAL g, void *memp, PCOLINFO cfp, int poff) strcpy(F.Type, GetFormatType(Buf_Type)); F.Length = cfp->Length; - F.Prec = cfp->Prec; + F.Prec = cfp->Scale; Offset = (cfp->Offset < 0) ? poff : cfp->Offset; + Precision = cfp->Precision; + Scale = cfp->Scale; Long = cfp->Length; Opt = cfp->Opt; Key = cfp->Key; diff --git a/storage/connect/reldef.h b/storage/connect/reldef.h index e443374b676..a877c8ee915 100644 --- a/storage/connect/reldef.h +++ b/storage/connect/reldef.h @@ -87,7 +87,7 @@ class DllExport TABDEF : public RELDEF { /* Logical table descriptor */ protected: // Members - PSZ Owner; /* Table owner (for ODBC) */ + PSZ Schema; /* Table schema (for ODBC) */ PSZ Desc; /* Table description */ uint Catfunc; /* Catalog function ID */ int Card; /* (max) number of rows in table */ @@ -149,6 +149,7 @@ class DllExport COLCRT : public BLOCK { /* Column description block PSZ GetFmt(void) {return Fmt;} int GetOpt(void) {return Opt;} int GetLong(void) {return Long;} + int GetPrecision(void) {return Precision;} int GetOffset(void) {return Offset;} void SetOffset(int offset) {Offset = offset;} @@ -161,7 +162,8 @@ class DllExport COLCRT : public BLOCK { /* Column description block int Offset; /* Offset of field within record */ int Long; /* Length of field in file record (!BIN) */ int Key; /* Key (greater than 1 if multiple) */ - int Prec; /* Precision for float values */ + int Precision; /* Logical column length */ + int Scale; /* Decimals for float/decimal values */ int Opt; /* 0:Not 1:clustered 2:sorted-asc 3:desc */ char DataType; /* Internal data type (C, N, F, T) */ }; // end of COLCRT diff --git a/storage/connect/tabcol.cpp b/storage/connect/tabcol.cpp index 9af52043f0c..efd863a88cf 100644 --- a/storage/connect/tabcol.cpp +++ b/storage/connect/tabcol.cpp @@ -30,7 +30,7 @@ XTAB::XTAB(LPCSTR name, LPCSTR srcdef) : Name(name) Next = NULL; To_Tdb = NULL; Srcdef = srcdef; - Creator = NULL; + Schema = NULL; Qualifier = NULL; #ifdef DEBTRACE @@ -46,7 +46,7 @@ XTAB::XTAB(PTABLE tp) : Name(tp->Name) Next = NULL; To_Tdb = NULL; Srcdef = tp->Srcdef; - Creator = tp->Creator; + Schema = tp->Schema; Qualifier = tp->Qualifier; #ifdef DEBTRACE @@ -83,7 +83,7 @@ void XTAB::Print(PGLOBAL g, FILE *f, uint n) for (PTABLE tp = this; tp; tp = tp->Next) { fprintf(f, "%sTABLE: %s.%s %s\n", - m, SVP(tp->Creator), tp->Name, SVP(tp->Srcdef)); + m, SVP(tp->Schema), tp->Name, SVP(tp->Srcdef)); PlugPutOut(g, f, TYPE_TDB, tp->To_Tdb, n + 2); } /* endfor tp */ @@ -101,7 +101,7 @@ void XTAB::Print(PGLOBAL g, char *ps, uint z) for (PTABLE tp = this; tp && n > 0; tp = tp->Next) { i = sprintf(buf, "TABLE: %s.%s %s To_Tdb=%p ", - SVP(tp->Creator), tp->Name, SVP(tp->Srcdef), tp->To_Tdb); + SVP(tp->Schema), tp->Name, SVP(tp->Srcdef), tp->To_Tdb); strncat(ps, buf, n); n -= i; } // endif tp diff --git a/storage/connect/tabcol.h b/storage/connect/tabcol.h index c5ebfdbb10d..fe643e075c3 100644 --- a/storage/connect/tabcol.h +++ b/storage/connect/tabcol.h @@ -15,7 +15,7 @@ /***********************************************************************/ /* Definition of class XTAB with all its method functions. */ /***********************************************************************/ -class DllExport XTAB: public BLOCK { // Table Name-Owner-Srcdef block. +class DllExport XTAB: public BLOCK { // Table Name-Schema-Srcdef block. friend class TDBPRX; friend class TDBTBM; public: @@ -28,12 +28,12 @@ class DllExport XTAB: public BLOCK { // Table Name-Owner-Srcdef block. PTDB GetTo_Tdb(void) {return To_Tdb;} LPCSTR GetName(void) {return Name;} LPCSTR GetSrc(void) {return Srcdef;} - LPCSTR GetCreator(void) {return Creator;} + LPCSTR GetSchema(void) {return Schema;} LPCSTR GetQualifier(void) {return Qualifier;} void SetTo_Tdb(PTDB tdbp) {To_Tdb = tdbp;} void SetName(LPCSTR name) {Name = name;} void SetSrc(LPCSTR srcdef) {Srcdef = srcdef;} - void SetCreator(LPCSTR crname) {Creator = crname;} + void SetSchema(LPCSTR schname) {Schema = schname;} void SetQualifier(LPCSTR qname) {Qualifier = qname;} // Methods @@ -47,7 +47,7 @@ class DllExport XTAB: public BLOCK { // Table Name-Owner-Srcdef block. PTDB To_Tdb; // Points to Table description Block LPCSTR Name; // Table name LPCSTR Srcdef; // Table Source definition - LPCSTR Creator; // Creator name + LPCSTR Schema; // Schema name LPCSTR Qualifier; // Qualifier name }; // end of class XTAB @@ -68,7 +68,7 @@ class DllExport COLUMN: public XOBJECT { // Column Name/Qualifier block. virtual int GetResultType(void) {assert(false); return TYPE_VOID;} virtual int GetLength(void) {assert(false); return 0;} virtual int GetLengthEx(void) {assert(false); return 0;} - virtual int GetPrecision() {assert(false); return 0;}; + virtual int GetScale() {assert(false); return 0;}; LPCSTR GetName(void) {return Name;} LPCSTR GetQualifier(void) {return Qualifier;} PTABLE GetTo_Table(void) {return To_Table;} diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp index 2baf9de155f..15215dc0f01 100644 --- a/storage/connect/tabdos.cpp +++ b/storage/connect/tabdos.cpp @@ -499,7 +499,10 @@ int TDBDOS::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add) if (!(colp = ColDB(g, kdp->GetName(), 0))) { sprintf(g->Message, MSG(INDX_COL_NOTIN), kdp->GetName(), Name); goto err; - } // endif colp + } else if (colp->GetResultType() == TYPE_DECIM) { + sprintf(g->Message, "Decimal columns are not indexable yet"); + goto err; + } // endif Type colp->InitValue(g); n = max(n, xdp->GetNparts()); @@ -944,7 +947,7 @@ DOSCOL::DOSCOL(PGLOBAL g, PCOLDEF cdp, PTDB tp, PCOL cp, int i, PSZ am) } // endswitch p // Set number of decimal digits - Dcm = (*p) ? atoi(p) : GetPrecision(); + Dcm = (*p) ? atoi(p) : GetScale(); } // endif fmt if (trace) @@ -1006,10 +1009,10 @@ bool DOSCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) if (GetDomain() || ((DTVAL *)value)->IsFormatted()) goto newval; // This will make a new value; - } else if (Buf_Type == TYPE_FLOAT) + } else if (Buf_Type == TYPE_DOUBLE) // Float values must be written with the correct (column) precision // Note: maybe this should be forced by ShowValue instead of this ? - value->SetPrec(GetPrecision()); + value->SetPrec(GetScale()); Value = value; // Directly access the external value } else { @@ -1094,7 +1097,7 @@ void DOSCOL::ReadColumn(PGLOBAL g) } // endif SetValue_char break; - case TYPE_FLOAT: + case TYPE_DOUBLE: Value->SetValue_char(p, field); dval = Value->GetFloatValue(); @@ -1207,7 +1210,7 @@ void DOSCOL::WriteColumn(PGLOBAL g) len = sprintf(Buf, fmt, field - i, Value->GetTinyValue()); break; - case TYPE_FLOAT: + case TYPE_DOUBLE: strcpy(fmt, (Ldz) ? "%0*.*lf" : "%*.*lf"); sprintf(Buf, fmt, field + ((Nod && Dcm) ? 1 : 0), Dcm, Value->GetFloatValue()); diff --git a/storage/connect/tabfix.cpp b/storage/connect/tabfix.cpp index 2358dc07638..99063e86b57 100644 --- a/storage/connect/tabfix.cpp +++ b/storage/connect/tabfix.cpp @@ -331,7 +331,7 @@ void BINCOL::ReadColumn(PGLOBAL g) int rc; PTDBFIX tdbp = (PTDBFIX)To_Tdb; - if (trace) + if (trace > 1) htrc("BIN ReadColumn: col %s R%d coluse=%.4X status=%.4X buf_type=%d\n", Name, tdbp->GetTdb_No(), ColUse, Status, Buf_Type); diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp index 95ea232d798..9a121b9ab9a 100644 --- a/storage/connect/tabfmt.cpp +++ b/storage/connect/tabfmt.cpp @@ -72,7 +72,7 @@ extern "C" int trace; /* CSVColumns: constructs the result blocks containing the description */ /* of all the columns of a CSV file that will be retrieved by #GetData.*/ /* Note: the algorithm to set the type is based on the internal values */ -/* of types (TYPE_STRING < TYPE_FLOAT < TYPE_INT) (1 < 2 < 7). */ +/* of types (TYPE_STRING < TYPE_DOUBLE < TYPE_INT) (1 < 2 < 7). */ /* If these values are changed, this will have to be revisited. */ /***********************************************************************/ PQRYRES CSVColumns(PGLOBAL g, const char *fn, char sep, char q, @@ -230,9 +230,9 @@ PQRYRES CSVColumns(PGLOBAL g, const char *fn, char sep, char q, if (n) { len[i] = max(len[i], n); type = (digit || (dec && n == 1)) ? TYPE_STRING - : (dec) ? TYPE_FLOAT : TYPE_INT; + : (dec) ? TYPE_DOUBLE : TYPE_INT; typ[i] = min(type, typ[i]); - prc[i] = max((typ[i] == TYPE_FLOAT) ? (dec - 1) : 0, prc[i]); + prc[i] = max((typ[i] == TYPE_DOUBLE) ? (dec - 1) : 0, prc[i]); } // endif n i++; @@ -310,9 +310,9 @@ PQRYRES CSVColumns(PGLOBAL g, const char *fn, char sep, char q, if (n) { len[i] = max(len[i], n); type = (digit || n == 0 || (dec && n == 1)) ? TYPE_STRING - : (dec) ? TYPE_FLOAT : TYPE_INT; + : (dec) ? TYPE_DOUBLE : TYPE_INT; typ[i] = min(type, typ[i]); - prc[i] = max((typ[i] == TYPE_FLOAT) ? (dec - 1) : 0, prc[i]); + prc[i] = max((typ[i] == TYPE_DOUBLE) ? (dec - 1) : 0, prc[i]); } // endif n imax = max(imax, i+1); diff --git a/storage/connect/table.cpp b/storage/connect/table.cpp index efe203e8e75..37035ed752d 100644 --- a/storage/connect/table.cpp +++ b/storage/connect/table.cpp @@ -1,7 +1,7 @@ /************** Table C++ Functions Source Code File (.CPP) ************/ -/* Name: TABLE.CPP Version 2.6 */ +/* Name: TABLE.CPP Version 2.7 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 1999-2013 */ +/* (C) Copyright to the author Olivier BERTRAND 1999-2014 */ /* */ /* This file contains the TBX, TDB and OPJOIN classes functions. */ /***********************************************************************/ @@ -263,6 +263,17 @@ PCATLG TDBASE::GetCat(void) } // end of GetCat /***********************************************************************/ +/* Return the pointer on the charset of this table. */ +/***********************************************************************/ +CHARSET_INFO *TDBASE::data_charset(void) + { + // If no DATA_CHARSET is specified, we assume that character + // set of the remote data is the same with CHARACTER SET + // definition of the SQL column. + return m_data_charset ? m_data_charset : &my_charset_bin; + } // end of data_charset + +/***********************************************************************/ /* Return the datapath of the DB this table belongs to. */ /***********************************************************************/ PSZ TDBASE::GetPath(void) diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp index 12b206a911a..564eddbaf2b 100644 --- a/storage/connect/tabmysql.cpp +++ b/storage/connect/tabmysql.cpp @@ -1117,7 +1117,7 @@ MYSQLCOL::MYSQLCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am) } // endif cprec // Set additional MySQL access method information for column. - Long = cdp->GetLong(); + Precision = Long = cdp->GetLong(); Bind = NULL; To_Val = NULL; Slen = 0; @@ -1136,7 +1136,7 @@ MYSQLCOL::MYSQLCOL(MYSQL_FIELD *fld, PTDB tdbp, int i, PSZ am) { Name = fld->name; Opt = 0; - Long = fld->length; + Precision = Long = fld->length; Buf_Type = MYSQLtoPLG(fld->type); strcpy(Format.Type, GetFormatType(Buf_Type)); Format.Length = Long; @@ -1144,6 +1144,9 @@ MYSQLCOL::MYSQLCOL(MYSQL_FIELD *fld, PTDB tdbp, int i, PSZ am) ColUse = U_P; Nullable = !IS_NOT_NULL(fld->flags); + if (Buf_Type == TYPE_DECIM) + Precision = ((Field_new_decimal*)fld)->precision; + // Set additional MySQL access method information for column. Bind = NULL; To_Val = NULL; @@ -1202,10 +1205,10 @@ bool MYSQLCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) if (GetDomain() || ((DTVAL *)value)->IsFormatted()) goto newval; // This will make a new value; - } else if (Buf_Type == TYPE_FLOAT) + } else if (Buf_Type == TYPE_DOUBLE) // Float values must be written with the correct (column) precision // Note: maybe this should be forced by ShowValue instead of this ? - value->SetPrec(GetPrecision()); + value->SetPrec(GetScale()); Value = value; // Directly access the external value } else { @@ -1280,7 +1283,7 @@ void MYSQLCOL::ReadColumn(PGLOBAL g) tdbp->Fetched = TRUE; if ((buf = ((PTDBMY)To_Tdb)->Myc.GetCharField(Rank))) { - if (trace) + if (trace > 1) htrc("MySQL ReadColumn: name=%s buf=%s\n", Name, buf); // TODO: have a true way to differenciate temporal values diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp index 9d705d7e757..1fb71e33646 100644 --- a/storage/connect/tabodbc.cpp +++ b/storage/connect/tabodbc.cpp @@ -90,7 +90,7 @@ extern int num_read, num_there, num_eq[2]; // Statistics /***********************************************************************/ ODBCDEF::ODBCDEF(void) { - Connect = Tabname = Tabowner = Tabqual = Srcdef = Qchar = Qrystr = NULL; + Connect= Tabname= Tabschema= Tabcat= Srcdef= Qchar= Qrystr= Sep= NULL; Catver = Options = Quoted = Maxerr = Maxres = 0; Xsrc = false; } // end of ODBCDEF constructor @@ -104,11 +104,13 @@ bool ODBCDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) Tabname = Cat->GetStringCatInfo(g, "Name", (Catfunc & (FNC_TABLE | FNC_COL)) ? NULL : Name); Tabname = Cat->GetStringCatInfo(g, "Tabname", Tabname); -//Tabowner = Cat->GetStringCatInfo(g, "Owner", NULL); - Tabowner = Cat->GetStringCatInfo(g, "Dbname", NULL); - Tabqual = Cat->GetStringCatInfo(g, "Qualifier", NULL); + Tabschema = Cat->GetStringCatInfo(g, "Dbname", NULL); + Tabschema = Cat->GetStringCatInfo(g, "Schema", Tabschema); + Tabcat = Cat->GetStringCatInfo(g, "Qualifier", NULL); + Tabcat = Cat->GetStringCatInfo(g, "Catalog", Tabcat); Srcdef = Cat->GetStringCatInfo(g, "Srcdef", NULL); Qrystr = Cat->GetStringCatInfo(g, "Query_String", "?"); + Sep = Cat->GetStringCatInfo(g, "Separator", NULL); Catver = Cat->GetIntCatInfo("Catver", 2); Xsrc = Cat->GetBoolCatInfo("Execsrc", FALSE); Maxerr = Cat->GetIntCatInfo("Maxerr", 0); @@ -170,10 +172,11 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp) if (tdp) { Connect = tdp->Connect; TableName = tdp->Tabname; - Owner = tdp->Tabowner; - Qualifier = tdp->Tabqual; + Schema = tdp->Tabschema; + Catalog = tdp->Tabcat; Srcdef = tdp->Srcdef; Qrystr = tdp->Qrystr; + Sep = tdp->GetSep(); Options = tdp->Options; Quoted = max(0, tdp->GetQuoted()); Rows = tdp->GetElemt(); @@ -181,10 +184,11 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp) } else { Connect = NULL; TableName = NULL; - Owner = NULL; - Qualifier = NULL; + Schema = NULL; + Catalog = NULL; Srcdef = NULL; Qrystr = NULL; + Sep = 0; Options = 0; Quoted = 0; Rows = 0; @@ -211,8 +215,8 @@ TDBODBC::TDBODBC(PTDBODBC tdbp) : TDBASE(tdbp) Cnp = tdbp->Cnp; Connect = tdbp->Connect; TableName = tdbp->TableName; - Owner = tdbp->Owner; - Qualifier = tdbp->Qualifier; + Schema = tdbp->Schema; + Catalog = tdbp->Catalog; Srcdef = tdbp->Srcdef; Qrystr = tdbp->Qrystr; Quote = tdbp->Quote; @@ -336,7 +340,7 @@ int TDBODBC::Decode(char *txt, char *buf, size_t n) char *TDBODBC::MakeSQL(PGLOBAL g, bool cnt) { char *colist, *tabname, *sql, buf[64]; - LPCSTR ownp = NULL, qualp = NULL; + LPCSTR schmp = NULL, catp = NULL; int len, ncol = 0; bool first = true; PTABLE tablep = To_Table; @@ -406,37 +410,34 @@ char *TDBODBC::MakeSQL(PGLOBAL g, bool cnt) len = (strlen(colist) + strlen(buf) + 14); len += (To_Filter ? strlen(To_Filter->Body) + 7 : 0); -// if (tablep->GetQualifier()) This is used when using a table -// qualp = tablep->GetQualifier(); from anotherPlugDB database but -// else makes no sense for ODBC. - if (Qualifier && *Qualifier) - qualp = Qualifier; + if (Catalog && *Catalog) + catp = Catalog; - if (qualp) - len += (strlen(qualp) + 2); + if (catp) + len += (strlen(catp) + 2); - if (tablep->GetCreator()) - ownp = tablep->GetCreator(); - else if (Owner && *Owner) - ownp = Owner; + if (tablep->GetSchema()) + schmp = tablep->GetSchema(); + else if (Schema && *Schema) + schmp = Schema; - if (ownp) - len += (strlen(ownp) + 1); + if (schmp) + len += (strlen(schmp) + 1); sql = (char*)PlugSubAlloc(g, NULL, len); strcat(strcat(strcpy(sql, "SELECT "), colist), " FROM "); - if (qualp) { - strcat(sql, qualp); + if (catp) { + strcat(sql, catp); - if (ownp) - strcat(strcat(sql, "."), ownp); + if (schmp) + strcat(strcat(sql, "."), schmp); else strcat(sql, "."); strcat(sql, "."); - } else if (ownp) - strcat(strcat(sql, ownp), "."); + } else if (schmp) + strcat(strcat(sql, schmp), "."); strcat(sql, tabname); @@ -921,7 +922,8 @@ ODBCCOL::ODBCCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am) } // endif cprec // Set additional ODBC access method information for column. - Long = cdp->GetLong(); +//Long = cdp->GetLong(); + Long = Precision; //strcpy(F_Date, cdp->F_Date); To_Val = NULL; Slen = 0; @@ -986,10 +988,10 @@ bool ODBCCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) if (GetDomain() || ((DTVAL *)value)->IsFormatted()) goto newval; // This will make a new value; - } else if (Buf_Type == TYPE_FLOAT) + } else if (Buf_Type == TYPE_DOUBLE) // Float values must be written with the correct (column) precision // Note: maybe this should be forced by ShowValue instead of this ? - value->SetPrec(GetPrecision()); + value->SetPrec(GetScale()); Value = value; // Directly access the external value } else { @@ -1036,12 +1038,14 @@ void ODBCCOL::ReadColumn(PGLOBAL g) } else Value->SetNull(false); - if (Bufp && tdbp->Rows) + if (Bufp && tdbp->Rows) { if (Buf_Type == TYPE_DATE) *Sqlbuf = ((TIMESTAMP_STRUCT*)Bufp)[n]; else Value->SetValue_pvblk(Blkp, n); + } // endif Bufp + if (Buf_Type == TYPE_DATE) { struct tm dbtime = {0,0,0,0,0,0,0,0,0}; @@ -1052,7 +1056,14 @@ void ODBCCOL::ReadColumn(PGLOBAL g) dbtime.tm_mon = (int)Sqlbuf->month - 1; dbtime.tm_year = (int)Sqlbuf->year - 1900; ((DTVAL*)Value)->MakeTime(&dbtime); - } // endif Buf_Type + } else if (Buf_Type == TYPE_DECIM && tdbp->Sep) { + // Be sure to use decimal point + char *p = strchr(Value->GetCharValue(), tdbp->Sep); + + if (p) + *p = '.'; + + } // endif Buf_Type if (g->Trace) { char buf[32]; @@ -1080,7 +1091,8 @@ void ODBCCOL::AllocateBuffers(PGLOBAL g, int rows) if (Buf_Type == TYPE_DATE) Bufp = PlugSubAlloc(g, NULL, rows * sizeof(TIMESTAMP_STRUCT)); else { - Blkp = AllocValBlock(g, NULL, Buf_Type, rows, Long+1, 0, true, false, false); + Blkp = AllocValBlock(g, NULL, Buf_Type, rows, GetBuflen(), + GetScale(), true, false, false); Bufp = Blkp->GetValPointer(); } // endelse @@ -1107,13 +1119,21 @@ void *ODBCCOL::GetBuffer(DWORD rows) /***********************************************************************/ SWORD ODBCCOL::GetBuflen(void) { - if (Buf_Type == TYPE_DATE) - return (SWORD)sizeof(TIMESTAMP_STRUCT); - else if (Buf_Type == TYPE_STRING) - return (SWORD)Value->GetClen() + 1; - else - return (SWORD)Value->GetClen(); + SWORD flen; + switch (Buf_Type) { + case TYPE_DATE: + flen = (SWORD)sizeof(TIMESTAMP_STRUCT); + break; + case TYPE_STRING: + case TYPE_DECIM: + flen = (SWORD)Value->GetClen() + 1; + break; + default: + flen = (SWORD)Value->GetClen(); + } // endswitch Buf_Type + + return flen; } // end of GetBuflen /***********************************************************************/ @@ -1137,11 +1157,18 @@ void ODBCCOL::WriteColumn(PGLOBAL g) Sqlbuf->month = dbtime->tm_mon + 1; Sqlbuf->year = dbtime->tm_year + 1900; Sqlbuf->fraction = 0; - } // endif Buf_Type + } else if (Buf_Type == TYPE_DECIM) { + // Some data sources require local decimal separator + char *p, sep = ((PTDBODBC)To_Tdb)->Sep; + + if (sep && (p = strchr(Value->GetCharValue(), '.'))) + *p = sep; + + } // endif Buf_Type if (Nullable) *StrLen = (Value->IsNull()) ? SQL_NULL_DATA : - (IsTypeNum(Buf_Type)) ? 0 : SQL_NTS; + (IsTypeChar(Buf_Type)) ? SQL_NTS : 0; } // end of WriteColumn @@ -1415,7 +1442,7 @@ PQRYRES TDBSRC::GetResult(PGLOBAL g) TDBOTB::TDBOTB(PODEF tdp) : TDBDRV(tdp) { Dsn = tdp->GetConnect(); - Schema = tdp->GetTabowner(); + Schema = tdp->GetTabschema(); Tab = tdp->GetTabname(); } // end of TDBOTB constructor diff --git a/storage/connect/tabodbc.h b/storage/connect/tabodbc.h index a55e0c1f5b2..35864bab5ef 100644 --- a/storage/connect/tabodbc.h +++ b/storage/connect/tabodbc.h @@ -32,9 +32,10 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */ virtual const char *GetType(void) {return "ODBC";} PSZ GetConnect(void) {return Connect;} PSZ GetTabname(void) {return Tabname;} - PSZ GetTabowner(void) {return Tabowner;} - PSZ GetTabqual(void) {return Tabqual;} + PSZ GetTabschema(void) {return Tabschema;} + PSZ GetTabcat(void) {return Tabcat;} PSZ GetSrcdef(void) {return Srcdef;} + char GetSep(void) {return (Sep) ? *Sep : 0;} int GetQuoted(void) {return Quoted;} int GetCatver(void) {return Catver;} int GetOptions(void) {return Options;} @@ -47,11 +48,12 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */ // Members PSZ Connect; /* ODBC connection string */ PSZ Tabname; /* External table name */ - PSZ Tabowner; /* External table owner */ - PSZ Tabqual; /* External table qualifier */ + PSZ Tabschema; /* External table schema */ + PSZ Tabcat; /* External table catalog */ PSZ Srcdef; /* The source table SQL definition */ PSZ Qchar; /* Identifier quoting character */ PSZ Qrystr; /* The original query */ + PSZ Sep; /* Decimal separator */ int Catver; /* ODBC version for catalog functions */ int Options; /* Open connection options */ int Quoted; /* Identifier quoting level */ @@ -115,8 +117,8 @@ class TDBODBC : public TDBASE { ODBCCOL *Cnp; // Points to count(*) column char *Connect; // Points to connection string char *TableName; // Points to ODBC table name - char *Owner; // Points to ODBC table Owner - char *Qualifier; // Points to ODBC table Qualifier + char *Schema; // Points to ODBC table Schema + char *Catalog; // Points to ODBC table Catalog char *Srcdef; // The source table SQL definition char *Query; // Points to SQL statement char *Count; // Points to count(*) SQL statement @@ -125,6 +127,7 @@ class TDBODBC : public TDBASE { char *MulConn; // Used for multiple ODBC tables char *DBQ; // The address part of Connect string char *Qrystr; // The original query + char Sep; // The decimal separator int Options; // Connect options int Quoted; // The identifier quoting level int Fpos; // Position of last read record diff --git a/storage/connect/tabsys.cpp b/storage/connect/tabsys.cpp index a7fc9346d1f..2bb5532cea0 100644 --- a/storage/connect/tabsys.cpp +++ b/storage/connect/tabsys.cpp @@ -416,10 +416,10 @@ bool INICOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) if (GetDomain() || ((DTVAL *)value)->IsFormatted()) goto newval; // This will make a new value; - } else if (Buf_Type == TYPE_FLOAT) + } else if (Buf_Type == TYPE_DOUBLE || Buf_Type == TYPE_DECIM) // Float values must be written with the correct (column) precision // Note: maybe this should be forced by ShowValue instead of this ? - value->SetPrec(GetPrecision()); + value->SetPrec(GetScale()); Value = value; // Directly access the external value } else { diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index 48b6d008a31..5e10c0a6846 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -122,16 +122,16 @@ TABLE_SHARE *GetTableShare(PGLOBAL g, THD *thd, const char *db, PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, const char *name, bool& info) { - static int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING, TYPE_INT, - TYPE_INT, TYPE_SHORT, TYPE_SHORT, TYPE_SHORT, - TYPE_STRING, TYPE_STRING, TYPE_STRING}; - static XFLD fldtyp[] = {FLD_NAME, FLD_TYPE, FLD_TYPENAME, FLD_PREC, - FLD_LENGTH, FLD_SCALE, FLD_RADIX, FLD_NULL, - FLD_REM, FLD_NO, FLD_CHARSET}; - static unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 32, 32}; + int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING, TYPE_INT, + TYPE_INT, TYPE_SHORT, TYPE_SHORT, TYPE_SHORT, + TYPE_STRING, TYPE_STRING, TYPE_STRING}; + XFLD fldtyp[] = {FLD_NAME, FLD_TYPE, FLD_TYPENAME, FLD_PREC, + FLD_LENGTH, FLD_SCALE, FLD_RADIX, FLD_NULL, + FLD_REM, FLD_NO, FLD_CHARSET}; + unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 32, 32}; char *fld, *fmt, v; int i, n, ncol = sizeof(buftyp) / sizeof(int); - int len, type, prec; + int prec, len, type, scale; bool mysql; TABLE_SHARE *s = NULL; Field* *field; @@ -208,27 +208,33 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, // When creating tables we do need info about date columns if (mysql) { fmt = MyDateFmt(fp->type()); - len = strlen(fmt); + prec = len = strlen(fmt); } else { fmt = (char*)fp->option_struct->dateformat; - len = fp->field_length; + prec = len = fp->field_length; } // endif mysql } else { - fmt = NULL; + if (type == TYPE_DECIM) + prec = ((Field_new_decimal*)fp)->precision; + else + prec = fp->field_length; +// prec = (prec(???) == NOT_FIXED_DEC) ? 0 : fp->field_length; + len = fp->char_length(); + fmt = NULL; } // endif type crp = crp->Next; // Precision - crp->Kdata->SetValue(len, i); + crp->Kdata->SetValue(prec, i); crp = crp->Next; // Length - prec = (type == TYPE_FLOAT) ? fp->decimals() : 0; - len = (prec == 31) ? 0 : fp->field_length; crp->Kdata->SetValue(len, i); crp = crp->Next; // Scale - crp->Kdata->SetValue(prec, i); + scale = (type == TYPE_DOUBLE || type == TYPE_DECIM) ? fp->decimals() + : 0; + crp->Kdata->SetValue(scale, i); crp = crp->Next; // Radix crp->Kdata->SetValue(0, i); diff --git a/storage/connect/tabwmi.cpp b/storage/connect/tabwmi.cpp index 6d3d1609430..8f91d9b3ed8 100644 --- a/storage/connect/tabwmi.cpp +++ b/storage/connect/tabwmi.cpp @@ -269,7 +269,7 @@ PQRYRES WMIColumns(PGLOBAL g, char *nsp, char *cls, bool info) case CIM_REAL64: case CIM_REAL32: prec = 2; - typ = TYPE_FLOAT; + typ = TYPE_DOUBLE; lng = 15; break; case CIM_SINT64: diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 3feba14ca5e..aa1133b0e92 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -1,9 +1,9 @@ /************* Tabxml C++ Program Source Code File (.CPP) **************/ /* PROGRAM NAME: TABXML */ /* ------------- */ -/* Version 2.6 */ +/* Version 2.7 */ /* */ -/* Author Olivier BERTRAND 2007 - 2013 */ +/* Author Olivier BERTRAND 2007 - 2014 */ /* */ /* This program are the XML tables classes using MS-DOM or libxml2. */ /***********************************************************************/ @@ -47,6 +47,7 @@ #include "xindex.h" #include "plgxml.h" #include "tabxml.h" +#include "tabmul.h" extern "C" { extern char version[]; @@ -136,7 +137,8 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) } // endswitch typname Tabname = Cat->GetStringCatInfo(g, "Name", Name); // Deprecated - Tabname = Cat->GetStringCatInfo(g, "Table_name", Tabname); + Tabname = Cat->GetStringCatInfo(g, "Table_name", Tabname); // Deprecated + Tabname = Cat->GetStringCatInfo(g, "Tabname", Tabname); Rowname = Cat->GetStringCatInfo(g, "Rownode", defrow); Colname = Cat->GetStringCatInfo(g, "Colnode", defcol); Mulnode = Cat->GetStringCatInfo(g, "Mulnode", ""); @@ -177,7 +179,12 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) /***********************************************************************/ PTDB XMLDEF::GetTable(PGLOBAL g, MODE m) { - return new(g) TDBXML(this); + PTDBASE tdbp = new(g) TDBXML(this); + + if (Multiple) + tdbp = new(g) TDBMUL(tdbp); + + return tdbp; } // end of GetTable /***********************************************************************/ @@ -245,6 +252,7 @@ TDBXML::TDBXML(PXMLDEF tdp) : TDBASE(tdp) Void = false; Usedom = tdp->Usedom; Header = tdp->Header; + Multiple = tdp->Multiple; Nrow = -1; Irow = Header - 1; Nsub = 0; @@ -287,6 +295,7 @@ TDBXML::TDBXML(PTDBXML tdbp) : TDBASE(tdbp) Void = tdbp->Void; Usedom = tdbp->Usedom; Header = tdbp->Header; + Multiple = tdbp->Multiple; Nrow = tdbp->Nrow; Irow = tdbp->Irow; Nsub = tdbp->Nsub; @@ -578,7 +587,7 @@ bool TDBXML::Initialize(PGLOBAL g) #endif } // end of try-catches - if (Root && Columns && !Nodedone) { + if (Root && Columns && (Multiple || !Nodedone)) { // Allocate class nodes to avoid dynamic allocation for (colp = (PXMLCOL)Columns; colp; colp = (PXMLCOL)colp->GetNext()) if (!colp->IsSpecial()) // Not a pseudo column @@ -671,7 +680,10 @@ void TDBXML::SetNodeAttr(PGLOBAL g, char *attr, PXNODE node) int TDBXML::Cardinality(PGLOBAL g) { if (!g) - return (Xpand || Coltype == 2) ? 0 : 1; + return (Multiple || Xpand || Coltype == 2) ? 0 : 1; + + if (Multiple) + return 10; if (Nrow < 0) if (Initialize(g)) @@ -685,8 +697,13 @@ int TDBXML::Cardinality(PGLOBAL g) /***********************************************************************/ int TDBXML::GetMaxSize(PGLOBAL g) { - if (MaxSize < 0) - MaxSize = Cardinality(g) * ((Xpand) ? Limit : 1); + if (MaxSize < 0) { + if (!Multiple) + MaxSize = Cardinality(g) * ((Xpand) ? Limit : 1); + else + MaxSize = 10; + + } // endif MaxSize return MaxSize; } // end of GetMaxSize @@ -952,6 +969,34 @@ void TDBXML::CloseDB(PGLOBAL g) Docp->CloseDoc(g, To_Xb); } // endif docp + if (Multiple) { + // Reset all constants to start a new parse + Docp = NULL; + Root = NULL; + Curp = NULL; + DBnode = NULL; + TabNode = NULL; + RowNode = NULL; + ColNode = NULL; + Nlist = NULL; + Clist = NULL; + To_Xb = NULL; + Colp = NULL; + Changed = false; + Checked = false; + NextSame = false; + NewRow = false; + Hasnod = false; + Write = false; +// Bufdone = false; + Nodedone = false; + Void = false; + Nrow = -1; + Irow = Header - 1; + Nsub = 0; + N = 0; + } // endif Multiple + } // end of CloseDB // ------------------------ XMLCOL functions ---------------------------- @@ -1168,10 +1213,10 @@ bool XMLCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) if (GetDomain() || ((DTVAL *)value)->IsFormatted()) goto newval; // This will make a new value; - } else if (Buf_Type == TYPE_FLOAT) + } else if (Buf_Type == TYPE_DOUBLE) // Float values must be written with the correct (column) precision // Note: maybe this should be forced by ShowValue instead of this ? - value->SetPrec(GetPrecision()); + value->SetPrec(GetScale()); Value = value; // Directly access the external value } else { diff --git a/storage/connect/tabxml.h b/storage/connect/tabxml.h index 5aa038530c7..817bea45b3b 100644 --- a/storage/connect/tabxml.h +++ b/storage/connect/tabxml.h @@ -139,6 +139,7 @@ class DllExport TDBXML : public TDBASE { int Coltype; // Default column type int Limit; // Limit of multiple values int Header; // n first rows are header rows + int Multiple; // If multiple files int Nrow; // The table cardinality int Irow; // The current row index int Nsub; // The current subrow index diff --git a/storage/connect/user_connect.cc b/storage/connect/user_connect.cc index 877f612fc0a..b778d3f0883 100644 --- a/storage/connect/user_connect.cc +++ b/storage/connect/user_connect.cc @@ -146,6 +146,7 @@ bool user_connect::CheckCleanup(void) PlugSubSet(g, g->Sarea, g->Sarea_Size); g->Xchk = NULL; g->Createas = 0; + g->Alchecked = 0; last_query_id= thdp->query_id; if (xtrace) diff --git a/storage/connect/user_connect.h b/storage/connect/user_connect.h index 386e678b138..ef17a958824 100644 --- a/storage/connect/user_connect.h +++ b/storage/connect/user_connect.h @@ -62,10 +62,10 @@ public: static PCONNECT to_users; // To the chain of users PCONNECT next; // Next user in chain PCONNECT previous; // Previous user in chain - PGLOBAL g; // The common handle to CONNECT + PGLOBAL g; // The common handle to CONNECT //char dbname[32]; // The DBCONNECT database query_id_t last_query_id; // the latest user query id - int count; // if used by several handlers + int count; // if used by several handlers // Statistics ulong nrd, fnd, nfd; ulonglong tb1; diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp index b041760e1c4..c0127072896 100644 --- a/storage/connect/valblk.cpp +++ b/storage/connect/valblk.cpp @@ -1,7 +1,7 @@ /************ Valblk C++ Functions Source Code File (.CPP) *************/ -/* Name: VALBLK.CPP Version 2.0 */ +/* Name: VALBLK.CPP Version 2.1 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2013 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ /* */ /* This file contains the VALBLK and derived classes functions. */ /* Second family is VALBLK, representing simple suballocated arrays */ @@ -57,6 +57,7 @@ PVBLK AllocValBlock(PGLOBAL g, void *mp, int type, int nval, int len, switch (type) { case TYPE_STRING: + case TYPE_DECIM: if (len) blkp = new(g) CHRBLK(mp, nval, len, prec, blank); else @@ -87,7 +88,7 @@ PVBLK AllocValBlock(PGLOBAL g, void *mp, int type, int nval, int len, blkp = new(g) TYPBLK<longlong>(mp, nval, type); break; - case TYPE_FLOAT: + case TYPE_DOUBLE: blkp = new(g) TYPBLK<double>(mp, nval, type, prec); break; case TYPE_TINY: @@ -236,6 +237,23 @@ void TYPBLK<TYPE>::Init(PGLOBAL g, bool check) } // end of Init /***********************************************************************/ +/* TYPVAL GetCharString: get string representation of a typed value. */ +/***********************************************************************/ +template <class TYPE> +char *TYPBLK<TYPE>::GetCharString(char *p, int n) + { + sprintf(p, Fmt, Typp[n]); + return p; + } // end of GetCharString + +template <> +char *TYPBLK<double>::GetCharString(char *p, int n) + { + sprintf(p, Fmt, Prec, Typp[n]); + return p; + } // end of GetCharString + +/***********************************************************************/ /* Set one value in a block. */ /***********************************************************************/ template <class TYPE> @@ -343,6 +361,21 @@ ulonglong TYPBLK<longlong>::MaxVal(void) {return INT_MAX64;} template <> ulonglong TYPBLK<ulonglong>::MaxVal(void) {return ULONGLONG_MAX;} +template <> +void TYPBLK<double>::SetValue(PSZ p, int n) + { + ChkIndx(n); + + if (Check) { + PGLOBAL& g = Global; + strcpy(g->Message, MSG(BAD_SET_STRING)); + longjmp(g->jumper[g->jump_level], Type); + } // endif Check + + Typp[n] = atof(p); + SetNull(n, false); + } // end of SetValue + /***********************************************************************/ /* Set one value in a block from an array of characters. */ /***********************************************************************/ @@ -662,6 +695,14 @@ double CHRBLK::GetFloatValue(int n) } // end of GetFloatValue /***********************************************************************/ +/* STRING GetCharString: get string representation of a char value. */ +/***********************************************************************/ +char *CHRBLK::GetCharString(char *p, int n) + { + return (char *)GetValPtrEx(n); + } // end of GetCharString + +/***********************************************************************/ /* Set one value in a block. */ /***********************************************************************/ void CHRBLK::SetValue(PVAL valp, int n) @@ -1163,13 +1204,29 @@ DATBLK::DATBLK(void *mp, int nval) : TYPBLK<int>(mp, nval, TYPE_INT) /***********************************************************************/ bool DATBLK::SetFormat(PGLOBAL g, PSZ fmt, int len, int year) { - if (!(Dvalp = AllocateValue(g, TYPE_DATE, len, year, fmt))) + if (!(Dvalp = AllocateValue(g, TYPE_DATE, len, year, false, fmt))) return true; return false; } // end of SetFormat /***********************************************************************/ +/* DTVAL GetCharString: get string representation of a date value. */ +/***********************************************************************/ +char *DATBLK::GetCharString(char *p, int n) + { + char *vp; + + if (Dvalp) { + Dvalp->SetValue(Typp[n]); + vp = Dvalp->GetCharString(p); + } else + vp = TYPBLK<int>::GetCharString(p, n); + + return vp; + } // end of GetCharString + +/***********************************************************************/ /* Set one value in a block from a char string. */ /***********************************************************************/ void DATBLK::SetValue(PSZ p, int n) diff --git a/storage/connect/valblk.h b/storage/connect/valblk.h index debeb0669b0..1edfe7f76b4 100644 --- a/storage/connect/valblk.h +++ b/storage/connect/valblk.h @@ -1,7 +1,7 @@ /*************** Valblk H Declares Source Code File (.H) ***************/ -/* Name: VALBLK.H Version 2.0 */ +/* Name: VALBLK.H Version 2.1 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2013 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ /* */ /* This file contains the VALBLK and derived classes declares. */ /***********************************************************************/ @@ -58,6 +58,7 @@ class VALBLK : public BLOCK { virtual longlong GetBigintValue(int n) = 0; virtual ulonglong GetUBigintValue(int n) = 0; virtual double GetFloatValue(int n) = 0; + virtual char *GetCharString(char *p, int n) = 0; virtual void ReAlloc(void *mp, int n) {Blkp = mp; Nval = n;} virtual void Reset(int n) = 0; virtual bool SetFormat(PGLOBAL g, PSZ fmt, int len, int year = 0); @@ -133,6 +134,7 @@ class TYPBLK : public VALBLK { virtual longlong GetBigintValue(int n) {return (longlong)Typp[n];} virtual ulonglong GetUBigintValue(int n) {return (ulonglong)Typp[n];} virtual double GetFloatValue(int n) {return (double)Typp[n];} + virtual char *GetCharString(char *p, int n); virtual void Reset(int n) {Typp[n] = 0;} // Methods @@ -199,6 +201,7 @@ class CHRBLK : public VALBLK { virtual longlong GetBigintValue(int n); virtual ulonglong GetUBigintValue(int n); virtual double GetFloatValue(int n); + virtual char *GetCharString(char *p, int n); virtual void Reset(int n); virtual void SetPrec(int p) {Ci = (p != 0);} virtual bool IsCi(void) {return Ci;} @@ -252,6 +255,7 @@ class STRBLK : public VALBLK { virtual longlong GetBigintValue(int n); virtual ulonglong GetUBigintValue(int n); virtual double GetFloatValue(int n) {return atof(Strp[n]);} + virtual char *GetCharString(char *p, int n) {return Strp[n];} virtual void Reset(int n) {Strp[n] = NULL;} // Methods @@ -286,10 +290,11 @@ class DATBLK : public TYPBLK<int> { DATBLK(void *mp, int size); // Implementation - virtual bool SetFormat(PGLOBAL g, PSZ fmt, int len, int year = 0); + virtual bool SetFormat(PGLOBAL g, PSZ fmt, int len, int year = 0); + virtual char *GetCharString(char *p, int n); // Methods - virtual void SetValue(PSZ sp, int n); + virtual void SetValue(PSZ sp, int n); protected: // Members diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index 8857608015e..8a839f3b50b 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -1,7 +1,7 @@ /************* Value C++ Functions Source Code File (.CPP) *************/ -/* Name: VALUE.CPP Version 2.3 */ +/* Name: VALUE.CPP Version 2.4 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2001-2013 */ +/* (C) Copyright to the author Olivier BERTRAND 2001-2014 */ /* */ /* This file contains the VALUE and derived classes family functions. */ /* These classes contain values of different types. They are used so */ @@ -153,8 +153,9 @@ PSZ GetTypeName(int type) case TYPE_INT: name = "INTEGER"; break; case TYPE_BIGINT: name = "BIGINT"; break; case TYPE_DATE: name = "DATE"; break; - case TYPE_FLOAT: name = "FLOAT"; break; + case TYPE_DOUBLE: name = "DOUBLE"; break; case TYPE_TINY: name = "TINY"; break; + case TYPE_DECIM: name = "DECIMAL"; break; default: name = "UNKNOWN"; break; } // endswitch type @@ -167,12 +168,13 @@ PSZ GetTypeName(int type) int GetTypeSize(int type, int len) { switch (type) { + case TYPE_DECIM: case TYPE_STRING: len = len * sizeof(char); break; case TYPE_SHORT: len = sizeof(short); break; case TYPE_INT: len = sizeof(int); break; case TYPE_BIGINT: len = sizeof(longlong); break; case TYPE_DATE: len = sizeof(int); break; - case TYPE_FLOAT: len = sizeof(double); break; + case TYPE_DOUBLE: len = sizeof(double); break; case TYPE_TINY: len = sizeof(char); break; default: len = 0; } // endswitch type @@ -192,9 +194,10 @@ char *GetFormatType(int type) case TYPE_SHORT: c = "S"; break; case TYPE_INT: c = "N"; break; case TYPE_BIGINT: c = "L"; break; - case TYPE_FLOAT: c = "F"; break; + case TYPE_DOUBLE: c = "F"; break; case TYPE_DATE: c = "D"; break; case TYPE_TINY: c = "T"; break; + case TYPE_DECIM: c = "M"; break; } // endswitch type return c; @@ -212,15 +215,15 @@ int GetFormatType(char c) case 'S': type = TYPE_SHORT; break; case 'N': type = TYPE_INT; break; case 'L': type = TYPE_BIGINT; break; - case 'F': type = TYPE_FLOAT; break; + case 'F': type = TYPE_DOUBLE; break; case 'D': type = TYPE_DATE; break; case 'T': type = TYPE_TINY; break; + case 'M': type = TYPE_DECIM; break; } // endswitch type return type; } // end of GetFormatType - /***********************************************************************/ /* IsTypeChar: returns true for character type(s). */ /***********************************************************************/ @@ -228,6 +231,7 @@ bool IsTypeChar(int type) { switch (type) { case TYPE_STRING: + case TYPE_DECIM: return true; } // endswitch type @@ -243,10 +247,11 @@ bool IsTypeNum(int type) case TYPE_INT: case TYPE_BIGINT: case TYPE_DATE: - case TYPE_FLOAT: + case TYPE_DOUBLE: case TYPE_SHORT: case TYPE_NUM: case TYPE_TINY: + case TYPE_DECIM: return true; } // endswitch type @@ -261,10 +266,11 @@ const char *GetFmt(int type, bool un) const char *fmt; switch (type) { + case TYPE_DECIM: case TYPE_STRING: fmt = "%s"; break; case TYPE_SHORT: fmt = (un) ? "%hu" : "%hd"; break; case TYPE_BIGINT: fmt = (un) ? "%llu" : "%lld"; break; - case TYPE_FLOAT: fmt = "%.*lf"; break; + case TYPE_DOUBLE: fmt = "%.*lf"; break; default: fmt = (un) ? "%u" : "%d"; break; } // endswitch Type @@ -293,7 +299,7 @@ int ConvertType(int target, int type, CONV kind, bool match) if (match && (!IsTypeNum(target) || !IsTypeNum(type))) return TYPE_ERROR; - return (target == TYPE_FLOAT || type == TYPE_FLOAT) ? TYPE_FLOAT + return (target == TYPE_DOUBLE || type == TYPE_DOUBLE) ? TYPE_DOUBLE : (target == TYPE_DATE || type == TYPE_DATE) ? TYPE_DATE : (target == TYPE_BIGINT || type == TYPE_BIGINT) ? TYPE_BIGINT : (target == TYPE_INT || type == TYPE_INT) ? TYPE_INT @@ -307,7 +313,7 @@ int ConvertType(int target, int type, CONV kind, bool match) (IsTypeNum(target) && !IsTypeNum(type)))) return TYPE_ERROR; - return (target == TYPE_FLOAT || type == TYPE_FLOAT) ? TYPE_FLOAT + return (target == TYPE_DOUBLE || type == TYPE_DOUBLE) ? TYPE_DOUBLE : (target == TYPE_DATE || type == TYPE_DATE) ? TYPE_DATE : (target == TYPE_BIGINT || type == TYPE_BIGINT) ? TYPE_BIGINT : (target == TYPE_INT || type == TYPE_INT) ? TYPE_INT @@ -343,8 +349,8 @@ PVAL AllocateValue(PGLOBAL g, void *value, short type) case TYPE_BIGINT: valp = new(g) TYPVAL<longlong>(*(longlong*)value, TYPE_BIGINT); break; - case TYPE_FLOAT: - valp = new(g) TYPVAL<double>(*(double *)value, TYPE_FLOAT, 2); + case TYPE_DOUBLE: + valp = new(g) TYPVAL<double>(*(double *)value, TYPE_DOUBLE, 2); break; case TYPE_TINY: valp = new(g) TYPVAL<char>(*(char *)value, TYPE_TINY); @@ -361,7 +367,8 @@ PVAL AllocateValue(PGLOBAL g, void *value, short type) /***********************************************************************/ /* Allocate a variable Value according to type, length and precision. */ /***********************************************************************/ -PVAL AllocateValue(PGLOBAL g, int type, int len, int prec, PSZ fmt) +PVAL AllocateValue(PGLOBAL g, int type, int len, int prec, + bool uns, PSZ fmt) { PVAL valp; @@ -373,36 +380,39 @@ PVAL AllocateValue(PGLOBAL g, int type, int len, int prec, PSZ fmt) valp = new(g) DTVAL(g, len, prec, fmt); break; case TYPE_INT: - if (prec) + if (uns) valp = new(g) TYPVAL<uint>((uint)0, TYPE_INT, 0, true); else valp = new(g) TYPVAL<int>((int)0, TYPE_INT); break; case TYPE_BIGINT: - if (prec) + if (uns) valp = new(g) TYPVAL<ulonglong>((ulonglong)0, TYPE_BIGINT, 0, true); else valp = new(g) TYPVAL<longlong>((longlong)0, TYPE_BIGINT); break; case TYPE_SHORT: - if (prec) + if (uns) valp = new(g) TYPVAL<ushort>((ushort)0, TYPE_SHORT, 0, true); else valp = new(g) TYPVAL<short>((short)0, TYPE_SHORT); break; - case TYPE_FLOAT: - valp = new(g) TYPVAL<double>(0.0, TYPE_FLOAT, prec); + case TYPE_DOUBLE: + valp = new(g) TYPVAL<double>(0.0, TYPE_DOUBLE, prec); break; case TYPE_TINY: - if (prec) + if (uns) valp = new(g) TYPVAL<uchar>((uchar)0, TYPE_TINY, 0, true); else valp = new(g) TYPVAL<char>((char)0, TYPE_TINY); break; + case TYPE_DECIM: + valp = new(g) DECVAL(g, (PSZ)NULL, len, prec, uns); + break; default: sprintf(g->Message, MSG(BAD_VALUE_TYPE), type); return NULL; @@ -412,6 +422,7 @@ PVAL AllocateValue(PGLOBAL g, int type, int len, int prec, PSZ fmt) return valp; } // end of AllocateValue +#if 0 /***********************************************************************/ /* Allocate a constant Value converted to newtype. */ /* Can also be used to copy a Value eventually converted. */ @@ -459,8 +470,8 @@ PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns) case TYPE_DATE: valp = new(g) DTVAL(g, valp->GetIntValue()); break; - case TYPE_FLOAT: - valp = new(g) TYPVAL<double>(valp->GetFloatValue(), TYPE_FLOAT, + case TYPE_DOUBLE: + valp = new(g) TYPVAL<double>(valp->GetFloatValue(), TYPE_DOUBLE, valp->GetValPrec()); break; case TYPE_TINY: @@ -479,7 +490,7 @@ PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns) valp->SetGlobal(g); return valp; } // end of AllocateValue - +#endif // 0 /* -------------------------- Class VALUE ---------------------------- */ @@ -505,10 +516,11 @@ const char *VALUE::GetXfmt(void) const char *fmt; switch (Type) { + case TYPE_DECIM: case TYPE_STRING: fmt = "%*s"; break; case TYPE_SHORT: fmt = (Unsigned) ? "%*hu" : "%*hd"; break; case TYPE_BIGINT: fmt = (Unsigned) ? "%*llu" : "%*lld"; break; - case TYPE_FLOAT: fmt = "%*.*lf"; break; + case TYPE_DOUBLE: fmt = "%*.*lf"; break; default: fmt = (Unsigned) ? "%*u" : "%*d"; break; } // endswitch Type @@ -1130,7 +1142,11 @@ void TYPVAL<PSZ>::SetValue_psz(PSZ s) void TYPVAL<PSZ>::SetValue_pvblk(PVBLK blk, int n) { // STRBLK's can return a NULL pointer - SetValue_psz(blk->GetCharValue(n)); + PSZ vp = blk->GetCharString(Strp, n); + + if (vp != Strp) + SetValue_psz(vp); + } // end of SetValue_pvblk /***********************************************************************/ @@ -1355,6 +1371,234 @@ bool TYPVAL<PSZ>::SetConstFormat(PGLOBAL g, FORMAT& fmt) return false; } // end of SetConstFormat +/* -------------------------- Class DECIMAL -------------------------- */ + +/***********************************************************************/ +/* DECIMAL public constructor from a constant string. */ +/***********************************************************************/ +DECVAL::DECVAL(PSZ s) : TYPVAL<PSZ>(s) + { + if (s) { + char *p = strchr(Strp, '.'); + + Prec = (p) ? Len - (p - Strp) : 0; + } // endif s + + Type = TYPE_DECIM; + } // end of DECVAL constructor + +/***********************************************************************/ +/* DECIMAL public constructor from char. */ +/***********************************************************************/ +DECVAL::DECVAL(PGLOBAL g, PSZ s, int n, int prec, bool uns) + : TYPVAL<PSZ>(g, s, n + (prec ? 1 : 0) + (uns ? 0 : 1), 0) + { + Prec = prec; + Unsigned = uns; + Type = TYPE_DECIM; + } // end of DECVAL constructor + +/***********************************************************************/ +/* DECIMAL: Check whether the numerica value is equal to 0. */ +/***********************************************************************/ +bool DECVAL::IsZero(void) + { + for (int i = 0; Strp[i]; i++) + if (!strchr("0 +-.", Strp[i])) + return false; + + return true; + } // end of IsZero + +/***********************************************************************/ +/* DECIMAL: Reset value to zero. */ +/***********************************************************************/ +void DECVAL::Reset(void) +{ + int i = 0; + + Strp[i++] = '0'; + + if (Prec) { + Strp[i++] = '.'; + + do { + Strp[i++] = '0'; + } while (i < Prec + 2); + + } // endif Prec + + Strp[i] = 0; +} // end of Reset + +/***********************************************************************/ +/* DECIMAL ShowValue: get string representation right justified. */ +/***********************************************************************/ +char *DECVAL::ShowValue(char *buf, int len) + { + sprintf(buf, Xfmt, len, Strp); + return buf; + } // end of ShowValue + +/***********************************************************************/ +/* GetBinValue: fill a buffer with the internal binary value. */ +/* This function checks whether the buffer length is enough and */ +/* returns true if not. Actual filling occurs only if go is true. */ +/* Currently used by WriteColumn of binary files. */ +/***********************************************************************/ +bool DECVAL::GetBinValue(void *buf, int buflen, bool go) + { + int len = (Null) ? 0 : strlen(Strp); + + if (len > buflen) + return true; + else if (go) { + memset(buf, ' ', buflen - len); + memcpy((char*)buf + buflen - len, Strp, len); + } // endif go + + return false; + } // end of GetBinValue + +#if 0 +/***********************************************************************/ +/* DECIMAL SetValue: copy the value of another Value object. */ +/***********************************************************************/ +bool DECVAL::SetValue_pval(PVAL valp, bool chktype) + { + if (chktype && (valp->GetType() != Type || valp->GetSize() > Len)) + return true; + + char buf[32]; + + if (!(Null = valp->IsNull() && Nullable)) + strncpy(Strp, valp->GetCharString(buf), Len); + else + Reset(); + + return false; + } // end of SetValue_pval + +/***********************************************************************/ +/* DECIMAL SetValue: fill string with chars extracted from a line. */ +/***********************************************************************/ +bool DECVAL::SetValue_char(char *p, int n) + { + bool rc; + + if (p) { + rc = n > Len; + + if ((n = min(n, Len))) { + strncpy(Strp, p, n); + +// for (p = Strp + n - 1; p >= Strp && (*p == ' ' || *p == '\0'); p--) ; + for (p = Strp + n - 1; p >= Strp; p--) + if (*p && *p != ' ') + break; + + *(++p) = '\0'; + + if (trace > 1) + htrc(" Setting string to: '%s'\n", Strp); + + } else + Reset(); + + Null = false; + } else { + rc = false; + Reset(); + Null = Nullable; + } // endif p + + return rc; + } // end of SetValue_char + +/***********************************************************************/ +/* DECIMAL SetValue: fill string with another string. */ +/***********************************************************************/ +void DECVAL::SetValue_psz(PSZ s) + { + if (s) { + strncpy(Strp, s, Len); + Null = false; + } else { + Reset(); + Null = Nullable; + } // endif s + + } // end of SetValue_psz + +/***********************************************************************/ +/* DECIMAL SetValue: fill string with a string extracted from a block.*/ +/***********************************************************************/ +void DECVAL::SetValue_pvblk(PVBLK blk, int n) + { + // STRBLK's can return a NULL pointer + SetValue_psz(blk->GetCharValue(n)); + } // end of SetValue_pvblk + +/***********************************************************************/ +/* DECIMAL SetBinValue: fill string with chars extracted from a line. */ +/***********************************************************************/ +void DECVAL::SetBinValue(void *p) + { + SetValue_char((char *)p, Len); + } // end of SetBinValue + +/***********************************************************************/ +/* DECIMAL GetCharString: get string representation of a char value. */ +/***********************************************************************/ +char *DECVAL::GetCharString(char *p) + { + return Strp; + } // end of GetCharString +#endif // 0 + +/***********************************************************************/ +/* DECIMAL compare value with another Value. */ +/***********************************************************************/ +bool DECVAL::IsEqual(PVAL vp, bool chktype) + { + if (this == vp) + return true; + else if (chktype && Type != vp->GetType()) + return false; + else if (Null || vp->IsNull()) + return false; + + char buf[32]; + + return !strcmp(Strp, vp->GetCharString(buf)); + } // end of IsEqual + +#if 0 +/***********************************************************************/ +/* FormatValue: This function set vp (a STRING value) to the string */ +/* constructed from its own value formated using the fmt format. */ +/* This function assumes that the format matches the value type. */ +/***********************************************************************/ +bool DECVAL::FormatValue(PVAL vp, char *fmt) + { + char *buf = (char*)vp->GetTo_Val(); // Should be big enough + int n = sprintf(buf, fmt, Strp); + + return (n > vp->GetValLen()); + } // end of FormatValue + +/***********************************************************************/ +/* DECIMAL SetFormat function (used to set SELECT output format). */ +/***********************************************************************/ +bool DECVAL::SetConstFormat(PGLOBAL g, FORMAT& fmt) + { + fmt.Type[0] = 'C'; + fmt.Length = Len; + fmt.Prec = 0; + return false; + } // end of SetConstFormat +#endif // 0 + /* -------------------------- Class DTVAL ---------------------------- */ /***********************************************************************/ diff --git a/storage/connect/value.h b/storage/connect/value.h index 185234b42b9..f8e89ba55fd 100644 --- a/storage/connect/value.h +++ b/storage/connect/value.h @@ -47,9 +47,9 @@ DllExport int GetFormatType(char); DllExport bool IsTypeChar(int type); DllExport bool IsTypeNum(int type); //lExport int ConvertType(int, int, CONV, bool match = false); -DllExport PVAL AllocateValue(PGLOBAL, PVAL, int = TYPE_VOID, int = 0); +//lExport PVAL AllocateValue(PGLOBAL, PVAL, int = TYPE_VOID, int = 0); DllExport PVAL AllocateValue(PGLOBAL, int, int len = 0, int prec = 0, - PSZ fmt = NULL); + bool uns = false, PSZ fmt = NULL); DllExport ulonglong CharToNumber(char *, int, ulonglong, bool, bool *minus = NULL, bool *rc = NULL); @@ -256,6 +256,37 @@ class DllExport TYPVAL<PSZ>: public VALUE { }; // end of class TYPVAL<PSZ> /***********************************************************************/ +/* Specific DECIMAL class. */ +/***********************************************************************/ +class DllExport DECVAL: public TYPVAL<PSZ> { + public: + // Constructors + DECVAL(PSZ s); + DECVAL(PGLOBAL g, PSZ s, int n, int prec, bool uns); + + // Implementation + virtual bool IsTypeNum(void) {return true;} + virtual bool IsZero(void); + virtual void Reset(void); + virtual int GetValPrec() {return Prec;} + + // Methods +//virtual bool SetValue_pval(PVAL valp, bool chktype); +//virtual bool SetValue_char(char *p, int n); +//virtual void SetValue_psz(PSZ s); +//virtual void SetValue_pvblk(PVBLK blk, int n); +//virtual void SetBinValue(void *p); + virtual bool GetBinValue(void *buf, int buflen, bool go); + virtual char *ShowValue(char *buf, int); +//virtual char *GetCharString(char *p); + virtual bool IsEqual(PVAL vp, bool chktype); +//virtual bool FormatValue(PVAL vp, char *fmt); +//virtual bool SetConstFormat(PGLOBAL, FORMAT&); + + // Members + }; // end of class DECVAL + +/***********************************************************************/ /* Class DTVAL: represents a time stamp value. */ /***********************************************************************/ class DllExport DTVAL : public TYPVAL<int> { diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp index 46ddba52332..601374ef5d7 100755 --- a/storage/connect/xindex.cpp +++ b/storage/connect/xindex.cpp @@ -2753,7 +2753,7 @@ KXYCOL::KXYCOL(PKXBASE kp) : To_Keys(Keys.Memp), /***********************************************************************/ bool KXYCOL::Init(PGLOBAL g, PCOL colp, int n, bool sm, int kln) { - int len = colp->GetLength(), prec = colp->GetPrecision(); + int len = colp->GetLength(), prec = colp->GetScale(); // Currently no indexing on NULL columns if (colp->IsNullable()) { @@ -2774,7 +2774,8 @@ bool KXYCOL::Init(PGLOBAL g, PCOL colp, int n, bool sm, int kln) // Allocate the Value object used when moving items Type = colp->GetResultType(); - if (!(Valp = AllocateValue(g, Type, len, colp->GetPrecision()))) + if (!(Valp = AllocateValue(g, Type, len, colp->GetScale(), + colp->IsUnsigned()))) return true; Klen = Valp->GetClen(); @@ -2825,7 +2826,7 @@ BYTE* KXYCOL::MapInit(PGLOBAL g, PCOL colp, int *n, BYTE *m) #endif // Allocate the Value object used when moving items - Valp = AllocateValue(g, Type, len, prec, NULL); + Valp = AllocateValue(g, Type, len, prec, false, NULL); Klen = Valp->GetClen(); if (n[2]) { diff --git a/storage/connect/xobject.cpp b/storage/connect/xobject.cpp index 3da78426e95..aa87517bd2e 100644 --- a/storage/connect/xobject.cpp +++ b/storage/connect/xobject.cpp @@ -109,6 +109,7 @@ int CONSTANT::GetLengthEx(void) return Value->GetValLen(); } // end of GetLengthEx +#if 0 /***********************************************************************/ /* Convert a constant to the given type. */ /***********************************************************************/ @@ -119,6 +120,7 @@ void CONSTANT::Convert(PGLOBAL g, int newtype) longjmp(g->jumper[g->jump_level], TYPE_CONST); } // end of Convert +#endif // 0 /***********************************************************************/ /* Compare: returns true if this object is equivalent to xp. */ @@ -151,7 +153,7 @@ bool CONSTANT::Rephrase(PGLOBAL g, PSZ work) case TYPE_DATE: sprintf(work + strlen(work), "%d", Value->GetIntValue()); break; - case TYPE_FLOAT: + case TYPE_DOUBLE: sprintf(work + strlen(work), "%lf", Value->GetFloatValue()); break; case TYPE_BIGINT: diff --git a/storage/connect/xobject.h b/storage/connect/xobject.h index 74d571a6e60..b7869be96b2 100644 --- a/storage/connect/xobject.h +++ b/storage/connect/xobject.h @@ -52,7 +52,7 @@ class DllExport XOBJECT : public BLOCK { virtual short GetShortValue(void); virtual int GetIntValue(void); virtual double GetFloatValue(void); - virtual int GetPrecision(void) = 0; + virtual int GetScale(void) = 0; // Methods virtual void Reset(void) {} @@ -92,7 +92,7 @@ class DllExport XVOID : public XOBJECT { virtual PSZ GetCharValue(void) {return NULL;} virtual int GetIntValue(void) {return 0;} virtual double GetFloatValue(void) {return 0.0;} - virtual int GetPrecision() {return 0;} + virtual int GetScale() {return 0;} // Methods virtual bool Compare(PXOB xp) {return xp->GetType() == TYPE_VOID;} @@ -115,7 +115,7 @@ class DllExport CONSTANT : public XOBJECT { virtual int GetType(void) {return TYPE_CONST;} virtual int GetResultType(void) {return Value->Type;} virtual int GetLength(void) {return Value->GetValLen();} - virtual int GetPrecision() {return Value->GetValPrec();} + virtual int GetScale() {return Value->GetValPrec();} virtual int GetLengthEx(void); // Methods @@ -123,7 +123,7 @@ class DllExport CONSTANT : public XOBJECT { virtual bool SetFormat(PGLOBAL g, FORMAT& fmt) {return Value->SetConstFormat(g, fmt);} virtual int CheckSpcCol(PTDB, int) {return 1;} - void Convert(PGLOBAL g, int newtype); +// void Convert(PGLOBAL g, int newtype); // bool Rephrase(PGLOBAL g, PSZ work); void SetValue(PVAL vp) {Value = vp;} virtual bool VerifyColumn(PTBX txp) {return true;} diff --git a/storage/connect/xtable.h b/storage/connect/xtable.h index 174ceb19731..8884860cb5b 100644 --- a/storage/connect/xtable.h +++ b/storage/connect/xtable.h @@ -1,7 +1,7 @@ /**************** Table H Declares Source Code File (.H) ***************/ -/* Name: TABLE.H Version 2.2 */ +/* Name: TABLE.H Version 2.3 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 1999-2012 */ +/* (C) Copyright to the author Olivier BERTRAND 1999-2014 */ /* */ /* This file contains the TBX, OPJOIN and TDB class definitions. */ /***********************************************************************/ @@ -185,15 +185,7 @@ class DllExport TDBASE : public TDB { virtual bool SetRecpos(PGLOBAL g, int recpos); virtual bool IsReadOnly(void) {return Read_Only;} virtual bool IsView(void) {return FALSE;} - virtual CHARSET_INFO *data_charset() - { - /* - If no DATA_CHARSET is specified, we assume that character - set of the remote data is the same with CHARACTER SET - definition of the SQL column. - */ - return m_data_charset ? m_data_charset : &my_charset_bin; - } + virtual CHARSET_INFO *data_charset(void); virtual int GetProgMax(PGLOBAL g) {return GetMaxSize(g);} virtual int GetProgCur(void) {return GetRecpos();} virtual PSZ GetFile(PGLOBAL g) {return "Not a file";} @@ -229,7 +221,7 @@ class DllExport TDBASE : public TDB { /***********************************************************************/ /* The abstract base class declaration for the catalog tables. */ /***********************************************************************/ -class TDBCAT : public TDBASE { +class DllExport TDBCAT : public TDBASE { friend class CATCOL; public: // Constructor @@ -268,7 +260,7 @@ class TDBCAT : public TDBASE { /***********************************************************************/ /* Class CATCOL: ODBC info column. */ /***********************************************************************/ -class CATCOL : public COLBLK { +class DllExport CATCOL : public COLBLK { friend class TDBCAT; public: // Constructors diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc index c5e53cb7354..9db78065bb3 100644 --- a/storage/csv/ha_tina.cc +++ b/storage/csv/ha_tina.cc @@ -143,6 +143,7 @@ static void init_tina_psi_keys(void) static const char *ha_tina_exts[] = { CSV_EXT, CSM_EXT, + CSN_EXT, NullS }; diff --git a/storage/csv/ha_tina.h b/storage/csv/ha_tina.h index ebf62fbed65..000b46b2bb2 100644 --- a/storage/csv/ha_tina.h +++ b/storage/csv/ha_tina.h @@ -106,7 +106,7 @@ public: ulonglong table_flags() const { return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_NO_AUTO_INCREMENT | - HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | + HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_CAN_EXPORT | HA_CAN_REPAIR); } ulong index_flags(uint idx, uint part, bool all_parts) const diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index a3691564310..930c4f38633 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -1,4 +1,5 @@ -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. +/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. + Copyright (c) 2010, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -905,84 +906,84 @@ int ha_example::create(const char *name, TABLE *table_arg, /** - check_if_incompatible_data() called if ALTER TABLE can't detect otherwise - if new and old definition are compatible - - @details If there are no other explicit signs like changed number of - fields this function will be called by compare_tables() - (sql/sql_tables.cc) to decide should we rewrite whole table or only .frm - file. - + check_if_supported_inplace_alter() is used to ask the engine whether + it can execute this ALTER TABLE statement in place or the server needs to + create a new table and copy th data over. + + The engine may answer that the inplace alter is not supported or, + if supported, whether the server should protect the table from concurrent + accesses. Return values are + + HA_ALTER_INPLACE_NOT_SUPPORTED + HA_ALTER_INPLACE_EXCLUSIVE_LOCK + HA_ALTER_INPLACE_SHARED_LOCK + etc */ -bool ha_example::check_if_incompatible_data(HA_CREATE_INFO *info, - uint table_changes) +enum_alter_inplace_result +ha_example::check_if_supported_inplace_alter(TABLE* altered_table, + Alter_inplace_info* ha_alter_info) { - ha_table_option_struct *param_old, *param_new; - DBUG_ENTER("ha_example::check_if_incompatible_data"); - /* - This example shows how custom engine specific table and field - options can be accessed from this function to be compared. - */ - param_new= info->option_struct; - DBUG_PRINT("info", ("new strparam: '%-.64s' ullparam: %llu enumparam: %u " - "boolparam: %u", - (param_new->strparam ? param_new->strparam : "<NULL>"), - param_new->ullparam, param_new->enumparam, - param_new->boolparam)); - - param_old= table->s->option_struct; - DBUG_PRINT("info", ("old strparam: '%-.64s' ullparam: %llu enumparam: %u " - "boolparam: %u", - (param_old->strparam ? param_old->strparam : "<NULL>"), - param_old->ullparam, param_old->enumparam, - param_old->boolparam)); - - /* - check important parameters: - for this example engine, we'll assume that changing ullparam or - boolparam requires a table to be rebuilt, while changing strparam - or enumparam - does not. - - For debugging purposes we'll announce this to the user - (don't do it in production!) + HA_CREATE_INFO *info= ha_alter_info->create_info; + DBUG_ENTER("ha_example::check_if_supported_inplace_alter"); - */ - if (param_new->ullparam != param_old->ullparam) + if (ha_alter_info->handler_flags & Alter_inplace_info::CHANGE_CREATE_OPTION) { - push_warning_printf(ha_thd(), Sql_condition::WARN_LEVEL_NOTE, - ER_UNKNOWN_ERROR, "EXAMPLE DEBUG: ULL %llu -> %llu", - param_old->ullparam, param_new->ullparam); - DBUG_RETURN(COMPATIBLE_DATA_NO); - } + /* + This example shows how custom engine specific table and field + options can be accessed from this function to be compared. + */ + ha_table_option_struct *param_new= info->option_struct; + ha_table_option_struct *param_old= table->s->option_struct; + + /* + check important parameters: + for this example engine, we'll assume that changing ullparam or + boolparam requires a table to be rebuilt, while changing strparam + or enumparam - does not. + + For debugging purposes we'll announce this to the user + (don't do it in production!) + + */ + if (param_new->ullparam != param_old->ullparam) + { + push_warning_printf(ha_thd(), Sql_condition::WARN_LEVEL_NOTE, + ER_UNKNOWN_ERROR, "EXAMPLE DEBUG: ULL %llu -> %llu", + param_old->ullparam, param_new->ullparam); + DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); + } - if (param_new->boolparam != param_old->boolparam) - { - push_warning_printf(ha_thd(), Sql_condition::WARN_LEVEL_NOTE, - ER_UNKNOWN_ERROR, "EXAMPLE DEBUG: YESNO %u -> %u", - param_old->boolparam, param_new->boolparam); - DBUG_RETURN(COMPATIBLE_DATA_NO); + if (param_new->boolparam != param_old->boolparam) + { + push_warning_printf(ha_thd(), Sql_condition::WARN_LEVEL_NOTE, + ER_UNKNOWN_ERROR, "EXAMPLE DEBUG: YESNO %u -> %u", + param_old->boolparam, param_new->boolparam); + DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); + } } - for (uint i= 0; i < table->s->fields; i++) + if (ha_alter_info->handler_flags & Alter_inplace_info::ALTER_COLUMN_OPTION) { - ha_field_option_struct *f_old, *f_new; - f_old= table->s->field[i]->option_struct; - DBUG_ASSERT(f_old); - if (info->fields_option_struct[i]) + for (uint i= 0; i < table->s->fields; i++) { - f_new= info->fields_option_struct[i]; - push_warning_printf(ha_thd(), Sql_condition::WARN_LEVEL_NOTE, - ER_UNKNOWN_ERROR, "EXAMPLE DEBUG: Field %`s COMPLEX '%s' -> '%s'", - table->s->field[i]->field_name, - f_old->complex_param_to_parse_it_in_engine, - f_new->complex_param_to_parse_it_in_engine); + ha_field_option_struct *f_old= table->s->field[i]->option_struct; + ha_field_option_struct *f_new= info->fields_option_struct[i]; + DBUG_ASSERT(f_old); + if (f_new) + { + push_warning_printf(ha_thd(), Sql_condition::WARN_LEVEL_NOTE, + ER_UNKNOWN_ERROR, "EXAMPLE DEBUG: Field %`s COMPLEX '%s' -> '%s'", + table->s->field[i]->field_name, + f_old->complex_param_to_parse_it_in_engine, + f_new->complex_param_to_parse_it_in_engine); + } + else + DBUG_PRINT("info", ("old field %i did not changed", i)); } - else - DBUG_PRINT("info", ("old field %i did not changed", i)); } - DBUG_RETURN(COMPATIBLE_DATA_YES); + DBUG_RETURN(HA_ALTER_INPLACE_EXCLUSIVE_LOCK); } diff --git a/storage/example/ha_example.h b/storage/example/ha_example.h index d25541f7422..2d3d0c81ed9 100644 --- a/storage/example/ha_example.h +++ b/storage/example/ha_example.h @@ -247,8 +247,9 @@ public: int delete_table(const char *from); int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info); ///< required - bool check_if_incompatible_data(HA_CREATE_INFO *info, - uint table_changes); + enum_alter_inplace_result + check_if_supported_inplace_alter(TABLE* altered_table, + Alter_inplace_info* ha_alter_info); THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); ///< required diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 644f6c2a04e..8217d583599 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. +/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1466,7 +1466,7 @@ prepare_for_next_key_part: ptr was incremented by 1. Since store_length still counts null-byte, we need to subtract 1 from store_length. */ - ptr+= store_length - test(key_part->null_bit); + ptr+= store_length - MY_TEST(key_part->null_bit); if (tmp.append(STRING_WITH_LEN(" AND "))) goto err; @@ -2129,7 +2129,7 @@ int ha_federated::update_row(const uchar *old_data, uchar *new_data) this? Because we only are updating one record, and LIMIT enforces this. */ - bool has_a_primary_key= test(table->s->primary_key != MAX_KEY); + bool has_a_primary_key= MY_TEST(table->s->primary_key != MAX_KEY); /* buffers for following strings @@ -2332,7 +2332,6 @@ int ha_federated::delete_row(const uchar *buf) DBUG_RETURN(0); } - /* Positions an index cursor to the index specified in the handle. Fetches the row if available. If the key value is null, begin at the first key of the @@ -2725,7 +2724,8 @@ void ha_federated::position(const uchar *record __attribute__ ((unused))) { DBUG_ENTER("ha_federated::position"); - DBUG_ASSERT(stored_result); + if (!stored_result) + DBUG_VOID_RETURN; position_called= TRUE; /* Store result set address. */ diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h index 31f33f5f789..cfda0eadf3e 100644 --- a/storage/federated/ha_federated.h +++ b/storage/federated/ha_federated.h @@ -1,5 +1,4 @@ -/* - Copyright (c) 2004, 2011, Oracle and/or its affiliates +/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/federatedx/CMakeLists.txt b/storage/federatedx/CMakeLists.txt index 24d64585ddb..67b6c1c96bb 100644 --- a/storage/federatedx/CMakeLists.txt +++ b/storage/federatedx/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(FEDERATEDX_PLUGIN_STATIC "federatedx")
-SET(FEDERATEDX_PLUGIN_DYNAMIC "ha_federatedx")
-SET(FEDERATEDX_SOURCES ha_federatedx.cc federatedx_txn.cc federatedx_io.cc federatedx_io_null.cc federatedx_io_mysql.cc)
-MYSQL_ADD_PLUGIN(federatedx ${FEDERATEDX_SOURCES} STORAGE_ENGINE)
+SET(FEDERATEDX_PLUGIN_STATIC "federatedx") +SET(FEDERATEDX_PLUGIN_DYNAMIC "ha_federatedx") +SET(FEDERATEDX_SOURCES ha_federatedx.cc federatedx_txn.cc federatedx_io.cc federatedx_io_null.cc federatedx_io_mysql.cc) +MYSQL_ADD_PLUGIN(federatedx ${FEDERATEDX_SOURCES} STORAGE_ENGINE) diff --git a/storage/federatedx/federatedx_io_mysql.cc b/storage/federatedx/federatedx_io_mysql.cc index e64656074ab..2933073a679 100644 --- a/storage/federatedx/federatedx_io_mysql.cc +++ b/storage/federatedx/federatedx_io_mysql.cc @@ -62,6 +62,7 @@ struct mysql_position class federatedx_io_mysql :public federatedx_io { MYSQL mysql; /* MySQL connection */ + MYSQL_ROWS *current; DYNAMIC_ARRAY savepoints; bool requested_autocommit; bool actual_autocommit; @@ -514,7 +515,9 @@ my_ulonglong federatedx_io_mysql::get_num_rows(FEDERATEDX_IO_RESULT *io_result) FEDERATEDX_IO_ROW *federatedx_io_mysql::fetch_row(FEDERATEDX_IO_RESULT *io_result) { - return (FEDERATEDX_IO_ROW *) mysql_fetch_row((MYSQL_RES *) io_result); + MYSQL_RES *result= (MYSQL_RES*)io_result; + current= result->data_cursor; + return (FEDERATEDX_IO_ROW *) mysql_fetch_row(result); } @@ -623,19 +626,9 @@ size_t federatedx_io_mysql::get_ref_length() const void federatedx_io_mysql::mark_position(FEDERATEDX_IO_RESULT *io_result, void *ref) { - MYSQL_ROWS *tmp= 0; mysql_position& pos= *reinterpret_cast<mysql_position*>(ref); pos.result= (MYSQL_RES *) io_result; - - if (pos.result && pos.result->data) - { - for (tmp= pos.result->data->data; - tmp && (tmp->next != pos.result->data_cursor); - tmp= tmp->next) - {} - } - - pos.offset= tmp; + pos.offset= current; } int federatedx_io_mysql::seek_position(FEDERATEDX_IO_RESULT **io_result, diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index f8ec026be66..e481c30deff 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.cc @@ -1386,7 +1386,7 @@ prepare_for_next_key_part: ptr was incremented by 1. Since store_length still counts null-byte, we need to subtract 1 from store_length. */ - ptr+= store_length - test(key_part->null_bit); + ptr+= store_length - MY_TEST(key_part->null_bit); if (tmp.append(STRING_WITH_LEN(" AND "))) goto err; @@ -2286,7 +2286,7 @@ int ha_federatedx::update_row(const uchar *old_data, uchar *new_data) this? Because we only are updating one record, and LIMIT enforces this. */ - bool has_a_primary_key= test(table->s->primary_key != MAX_KEY); + bool has_a_primary_key= MY_TEST(table->s->primary_key != MAX_KEY); /* buffers for following strings @@ -2716,7 +2716,8 @@ int ha_federatedx::read_range_next() int ha_federatedx::index_next(uchar *buf) { DBUG_ENTER("ha_federatedx::index_next"); - DBUG_RETURN(read_next(buf, stored_result)); + int retval=read_next(buf, stored_result); + DBUG_RETURN(retval); } @@ -2871,7 +2872,8 @@ int ha_federatedx::rnd_next(uchar *buf) */ DBUG_RETURN(1); } - DBUG_RETURN(read_next(buf, stored_result)); + int retval=read_next(buf, stored_result); + DBUG_RETURN(retval); } @@ -2942,10 +2944,11 @@ void ha_federatedx::position(const uchar *record __attribute__ ((unused))) { DBUG_ENTER("ha_federatedx::position"); - bzero(ref, ref_length); - if (!stored_result) + { + bzero(ref, ref_length); DBUG_VOID_RETURN; + } if (txn->acquire(share, TRUE, &io)) DBUG_VOID_RETURN; diff --git a/storage/heap/_check.c b/storage/heap/_check.c index e6a56bccdbf..b64c9ab1831 100644 --- a/storage/heap/_check.c +++ b/storage/heap/_check.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (c) 2000, 2002-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/_rectest.c b/storage/heap/_rectest.c index f3f893114b4..f2cadad4274 100644 --- a/storage/heap/_rectest.c +++ b/storage/heap/_rectest.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index b9ff9d28159..73dce174a09 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -90,7 +90,7 @@ ha_heap::ha_heap(handlerton *hton, TABLE_SHARE *table_arg) int ha_heap::open(const char *name, int mode, uint test_if_locked) { - internal_table= test(test_if_locked & HA_OPEN_INTERNAL_TABLE); + internal_table= MY_TEST(test_if_locked & HA_OPEN_INTERNAL_TABLE); if (internal_table || (!(file= heap_open(name, mode)) && my_errno == ENOENT)) { HP_CREATE_INFO create_info; @@ -106,7 +106,7 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) if (rc) goto end; - implicit_emptied= test(created_new_share); + implicit_emptied= MY_TEST(created_new_share); if (internal_table) file= heap_open_from_share(internal_share, mode); else diff --git a/storage/heap/hp_delete.c b/storage/heap/hp_delete.c index 0ae3f615a52..fe71b14a30a 100644 --- a/storage/heap/hp_delete.c +++ b/storage/heap/hp_delete.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2002, 2004-2007 MySQL AB +/* Copyright (c) 2000, 2012, 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 diff --git a/storage/heap/hp_extra.c b/storage/heap/hp_extra.c index e44cecd45fa..c83efd5af61 100644 --- a/storage/heap/hp_extra.c +++ b/storage/heap/hp_extra.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2001, 2004 MySQL AB +/* Copyright (c) 2000, 2004-2006 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/hp_hash.c b/storage/heap/hp_hash.c index 2abed55459c..f96cf866138 100644 --- a/storage/heap/hp_hash.c +++ b/storage/heap/hp_hash.c @@ -640,7 +640,7 @@ int hp_key_cmp(HP_KEYDEF *keydef, const uchar *rec, const uchar *key) { if (seg->null_bit) { - int found_null=test(rec[seg->null_pos] & seg->null_bit); + int found_null= MY_TEST(rec[seg->null_pos] & seg->null_bit); if (found_null != (int) *key++) return 1; if (found_null) @@ -737,7 +737,7 @@ void hp_make_key(HP_KEYDEF *keydef, uchar *key, const uchar *rec) uint char_length= seg->length; uchar *pos= (uchar*) rec + seg->start; if (seg->null_bit) - *key++= test(rec[seg->null_pos] & seg->null_bit); + *key++= MY_TEST(rec[seg->null_pos] & seg->null_bit); if (cs->mbmaxlen > 1) { char_length= my_charpos(cs, pos, pos + seg->length, @@ -776,7 +776,7 @@ uint hp_rb_make_key(HP_KEYDEF *keydef, uchar *key, uint char_length; if (seg->null_bit) { - if (!(*key++= 1 - test(rec[seg->null_pos] & seg->null_bit))) + if (!(*key++= 1 - MY_TEST(rec[seg->null_pos] & seg->null_bit))) continue; } if (seg->flag & HA_SWAP_KEY) diff --git a/storage/heap/hp_rfirst.c b/storage/heap/hp_rfirst.c index 206a105bbcc..685ecdb5456 100644 --- a/storage/heap/hp_rfirst.c +++ b/storage/heap/hp_rfirst.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002, 2004 MySQL AB +/* Copyright (c) 2000-2002, 2004-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/hp_rlast.c b/storage/heap/hp_rlast.c index 9186094c2e9..ff0d57228da 100644 --- a/storage/heap/hp_rlast.c +++ b/storage/heap/hp_rlast.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/hp_rnext.c b/storage/heap/hp_rnext.c index 76970868c27..8fd469a317e 100644 --- a/storage/heap/hp_rnext.c +++ b/storage/heap/hp_rnext.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000, 2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/hp_rprev.c b/storage/heap/hp_rprev.c index 10726616bd6..6e06607187b 100644 --- a/storage/heap/hp_rprev.c +++ b/storage/heap/hp_rprev.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/hp_rrnd.c b/storage/heap/hp_rrnd.c index ef93cd547da..8e0d51a78ca 100644 --- a/storage/heap/hp_rrnd.c +++ b/storage/heap/hp_rrnd.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002, 2004, 2006 MySQL AB +/* Copyright (c) 2000-2002, 2004-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/hp_rsame.c b/storage/heap/hp_rsame.c index 7a65b0f1294..40c5a18f974 100644 --- a/storage/heap/hp_rsame.c +++ b/storage/heap/hp_rsame.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/hp_scan.c b/storage/heap/hp_scan.c index e846bb2b59c..39a6f2082a3 100644 --- a/storage/heap/hp_scan.c +++ b/storage/heap/hp_scan.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/heap/hp_update.c b/storage/heap/hp_update.c index 3ac6dabf6bb..8757f8e87c5 100644 --- a/storage/heap/hp_update.c +++ b/storage/heap/hp_update.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002, 2004-2005 MySQL AB +/* Copyright (c) 2000-2002, 2004-2008 MySQL AB + Use is subject to license terms 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 diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index 67c7cf9f7db..95d695d7fa6 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -59,6 +59,12 @@ CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU) IF(NOT MSVC) # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not IF(NOT CMAKE_CROSSCOMPILING) + # workaround for gcc 4.1.2 RHEL5/x86, gcc atomic ops only work under -march=i686 + IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND + CMAKE_C_COMPILER_VERSION VERSION_LESS "4.1.3") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686") + ENDIF() CHECK_C_SOURCE_RUNS( " int main() @@ -410,18 +416,8 @@ IF(WITH_INNODB) SET(WITH_INNOBASE_STORAGE_ENGINE TRUE) ENDIF() - -# On solaris, reduce symbol visibility, so loader does not mix -# the same symbols from builtin innodb and from shared one. -# Only required for old GCC (3.4.3) that does not support hidden visibility -IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCC - AND NOT HAVE_VISIBILITY_HIDDEN) - SET(LINKER_SCRIPT "-Wl,-M${CMAKE_CURRENT_SOURCE_DIR}/plugin_exports") -ELSE() - SET(LINKER_SCRIPT) -ENDIF() - MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE - DEFAULT + MODULE_ONLY MODULE_OUTPUT_NAME ha_innodb LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT}) + diff --git a/storage/innobase/api/api0api.cc b/storage/innobase/api/api0api.cc index 5f9762a1846..d2f1a468f25 100644 --- a/storage/innobase/api/api0api.cc +++ b/storage/innobase/api/api0api.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2008, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2008, 2013, 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 @@ -245,7 +245,7 @@ ib_open_table_by_id( dict_mutex_enter_for_mysql(); } - table = dict_table_open_on_id(table_id, FALSE, FALSE); + table = dict_table_open_on_id(table_id, FALSE, DICT_TABLE_OP_NORMAL); if (table != NULL && table->ibd_file_missing) { table = NULL; @@ -355,7 +355,9 @@ ib_read_tuple( /*==========*/ const rec_t* rec, /*!< in: Record to read */ ib_bool_t page_format, /*!< in: IB_TRUE if compressed format */ - ib_tuple_t* tuple) /*!< in: tuple to read into */ + ib_tuple_t* tuple, /*!< in: tuple to read into */ + void** rec_buf, /*!< in/out: row buffer */ + ulint* len) /*!< in/out: buffer len */ { ulint i; void* ptr; @@ -366,6 +368,7 @@ ib_read_tuple( ulint* offsets = offsets_; dtuple_t* dtuple = tuple->ptr; const dict_index_t* index = tuple->index; + ulint offset_size; rec_offs_init(offsets_); @@ -375,8 +378,20 @@ ib_read_tuple( rec_meta_data = rec_get_info_bits(rec, page_format); dtuple_set_info_bits(dtuple, rec_meta_data); - /* Make a copy of the rec. */ - ptr = mem_heap_alloc(tuple->heap, rec_offs_size(offsets)); + offset_size = rec_offs_size(offsets); + + if (rec_buf && *rec_buf) { + if (*len < offset_size) { + free(*rec_buf); + *rec_buf = malloc(offset_size); + *len = offset_size; + } + ptr = *rec_buf; + } else { + /* Make a copy of the rec. */ + ptr = mem_heap_alloc(tuple->heap, offset_size); + } + copy = rec_copy(ptr, rec, offsets); n_index_fields = ut_min( @@ -557,6 +572,10 @@ ib_trx_start( /*=========*/ ib_trx_t ib_trx, /*!< in: transaction to restart */ ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ + ib_bool_t read_write, /*!< in: true if read write + transaction */ + ib_bool_t auto_commit, /*!< in: auto commit after each + single DML */ void* thd) /*!< in: THD */ { ib_err_t err = DB_SUCCESS; @@ -564,6 +583,10 @@ ib_trx_start( ut_a(ib_trx_level <= IB_TRX_SERIALIZABLE); + trx->api_trx = true; + trx->api_auto_commit = auto_commit; + trx->read_write = read_write; + trx_start_if_not_started(trx); trx->isolation_level = ib_trx_level; @@ -583,16 +606,22 @@ UNIV_INTERN ib_trx_t ib_trx_begin( /*=========*/ - ib_trx_level_t ib_trx_level) /*!< in: trx isolation level */ + ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ + ib_bool_t read_write, /*!< in: true if read write + transaction */ + ib_bool_t auto_commit) /*!< in: auto commit after each + single DML */ { trx_t* trx; ib_bool_t started; trx = trx_allocate_for_mysql(); - started = ib_trx_start((ib_trx_t) trx, ib_trx_level, NULL); + + started = ib_trx_start(static_cast<ib_trx_t>(trx), ib_trx_level, + read_write, auto_commit, NULL); ut_a(started); - return((ib_trx_t) trx); + return(static_cast<ib_trx_t>(trx)); } /*****************************************************************//** @@ -652,15 +681,11 @@ ib_trx_commit( trx_t* trx = (trx_t*) ib_trx; if (trx->state == TRX_STATE_NOT_STARTED) { - err = ib_trx_release(ib_trx); return(err); } trx_commit(trx); - err = ib_trx_release(ib_trx); - ut_a(err == DB_SUCCESS); - return(DB_SUCCESS); } @@ -682,9 +707,6 @@ ib_trx_rollback( /* It should always succeed */ ut_a(err == DB_SUCCESS); - err = ib_trx_release(ib_trx); - ut_a(err == DB_SUCCESS); - ib_wake_master_thread(); return(err); @@ -1183,7 +1205,7 @@ ib_cursor_open_index_using_name( /* We want to increment the ref count, so we do a redundant search. */ table = dict_table_open_on_id(cursor->prebuilt->table->id, - FALSE, FALSE); + FALSE, DICT_TABLE_OP_NORMAL); ut_a(table != NULL); /* The first index is always the cluster index. */ @@ -1371,11 +1393,12 @@ ib_cursor_commit_trx( { ib_err_t err = DB_SUCCESS; ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; +#ifdef UNIV_DEBUG row_prebuilt_t* prebuilt = cursor->prebuilt; ut_ad(prebuilt->trx == (trx_t*) ib_trx); - err = ib_trx_commit(ib_trx); - prebuilt->trx = NULL; +#endif /* UNIV_DEBUG */ + ib_trx_commit(ib_trx); cursor->valid_trx = FALSE; return(err); } @@ -1630,6 +1653,8 @@ ib_cursor_insert_row( src_tuple->index->table, q_proc->grph.ins, node->ins); } + srv_active_wake_master_thread(); + return(err); } @@ -1914,6 +1939,8 @@ ib_cursor_update_row( err = ib_execute_update_query_graph(cursor, pcur); } + srv_active_wake_master_thread(); + return(err); } @@ -1951,7 +1978,7 @@ ib_delete_row( upd = ib_update_vector_create(cursor); page_format = dict_table_is_comp(index->table); - ib_read_tuple(rec, page_format, tuple); + ib_read_tuple(rec, page_format, tuple, NULL, NULL); upd->n_fields = ib_tuple_get_n_cols(ib_tpl); @@ -2039,6 +2066,8 @@ ib_cursor_delete_row( err = DB_RECORD_NOT_FOUND; } + srv_active_wake_master_thread(); + return(err); } @@ -2050,7 +2079,9 @@ ib_err_t ib_cursor_read_row( /*===============*/ ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_tpl_t ib_tpl) /*!< out: read cols into this tuple */ + ib_tpl_t ib_tpl, /*!< out: read cols into this tuple */ + void** row_buf, /*!< in/out: row buffer */ + ib_ulint_t* row_len) /*!< in/out: row buffer len */ { ib_err_t err; ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; @@ -2094,7 +2125,8 @@ ib_cursor_read_row( } if (!rec_get_deleted_flag(rec, page_format)) { - ib_read_tuple(rec, page_format, tuple); + ib_read_tuple(rec, page_format, tuple, + row_buf, (ulint*) row_len); err = DB_SUCCESS; } else{ err = DB_RECORD_NOT_FOUND; @@ -2296,12 +2328,14 @@ ib_col_set_value( ib_tpl_t ib_tpl, /*!< in: tuple instance */ ib_ulint_t col_no, /*!< in: column index in tuple */ const void* src, /*!< in: data value */ - ib_ulint_t len) /*!< in: data value len */ + ib_ulint_t len, /*!< in: data value len */ + ib_bool_t need_cpy) /*!< in: if need memcpy */ { const dtype_t* dtype; dfield_t* dfield; void* dst = NULL; ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; + ulint col_len; dfield = ib_col_get_dfield(tuple, col_no); @@ -2312,6 +2346,7 @@ ib_col_set_value( } dtype = dfield_get_type(dfield); + col_len = dtype_get_len(dtype); /* Not allowed to update system columns. */ if (dtype_get_mtype(dtype) == DATA_SYS) { @@ -2325,10 +2360,10 @@ ib_col_set_value( for that. */ if (ib_col_is_capped(dtype)) { - len = ut_min(len, dtype_get_len(dtype)); + len = ut_min(len, col_len); if (dst == NULL || len > dfield_get_len(dfield)) { - dst = mem_heap_alloc(tuple->heap, dtype_get_len(dtype)); + dst = mem_heap_alloc(tuple->heap, col_len); ut_a(dst != NULL); } } else if (dst == NULL || len > dfield_get_len(dfield)) { @@ -2342,7 +2377,7 @@ ib_col_set_value( switch (dtype_get_mtype(dtype)) { case DATA_INT: { - if (dtype_get_len(dtype) == len) { + if (col_len == len) { ibool usign; usign = dtype_get_prtype(dtype) & DATA_UNSIGNED; @@ -2387,22 +2422,96 @@ ib_col_set_value( memset((byte*) dst + len, pad_char, - dtype_get_len(dtype) - len); + col_len - len); memcpy(dst, src, len); - len = dtype_get_len(dtype); + len = col_len; break; } case DATA_BLOB: case DATA_BINARY: - case DATA_MYSQL: case DATA_DECIMAL: case DATA_VARCHAR: - case DATA_VARMYSQL: case DATA_FIXBINARY: + if (need_cpy) { + memcpy(dst, src, len); + } else { + dfield_set_data(dfield, src, len); + dst = dfield_get_data(dfield); + } + break; + + case DATA_MYSQL: + case DATA_VARMYSQL: { + ulint cset; + CHARSET_INFO* cs; + int error = 0; + ulint true_len = len; + + /* For multi byte character sets we need to + calculate the true length of the data. */ + cset = dtype_get_charset_coll( + dtype_get_prtype(dtype)); + cs = all_charsets[cset]; + if (cs) { + uint pos = (uint)(col_len / cs->mbmaxlen); + + if (len > 0 && cs->mbmaxlen > 1) { + true_len = (ulint) + cs->cset->well_formed_len( + cs, + (const char*)src, + (const char*)src + len, + pos, + &error); + + if (true_len < len) { + len = true_len; + } + } + } + + /* All invalid bytes in data need be truncated. + If len == 0, means all bytes of the data is invalid. + In this case, the data will be truncated to empty.*/ memcpy(dst, src, len); + + /* For DATA_MYSQL, need to pad the unused + space with spaces. */ + if (dtype_get_mtype(dtype) == DATA_MYSQL) { + ulint n_chars; + + if (len < col_len) { + ulint pad_len = col_len - len; + + ut_a(cs != NULL); + ut_a(!(pad_len % cs->mbminlen)); + + cs->cset->fill(cs, (char*)dst + len, + pad_len, + 0x20 /* space */); + } + + /* Why we should do below? See function + row_mysql_store_col_in_innobase_format */ + + ut_a(!(dtype_get_len(dtype) + % dtype_get_mbmaxlen(dtype))); + + n_chars = dtype_get_len(dtype) + / dtype_get_mbmaxlen(dtype); + + /* Strip space padding. */ + while (col_len > n_chars + && ((char*)dst)[col_len - 1] == 0x20) { + col_len--; + } + + len = col_len; + } break; + } default: ut_error; @@ -2476,7 +2585,9 @@ ib_col_copy_value_low( data_len, usign); if (usign) { - if (len == 2) { + if (len == 1) { + *(ib_i8_t*)dst = (ib_i8_t)ret; + } else if (len == 2) { *(ib_i16_t*)dst = (ib_i16_t)ret; } else if (len == 4) { *(ib_i32_t*)dst = (ib_i32_t)ret; @@ -2484,7 +2595,9 @@ ib_col_copy_value_low( *(ib_i64_t*)dst = (ib_i64_t)ret; } } else { - if (len == 2) { + if (len == 1) { + *(ib_u8_t*)dst = (ib_i8_t)ret; + } else if (len == 2) { *(ib_u16_t*)dst = (ib_i16_t)ret; } else if (len == 4) { *(ib_u32_t*)dst = (ib_i32_t)ret; @@ -3450,7 +3563,7 @@ ib_tuple_write_int( return(DB_DATA_MISMATCH); } - return(ib_col_set_value(ib_tpl, col_no, value, type_len)); + return(ib_col_set_value(ib_tpl, col_no, value, type_len, true)); } /*****************************************************************//** @@ -3465,7 +3578,7 @@ ib_tuple_write_i8( int col_no, /*!< in: column number */ ib_i8_t val) /*!< in: value to write */ { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val), true)); } /*****************************************************************//** @@ -3480,7 +3593,7 @@ ib_tuple_write_i16( int col_no, /*!< in: column number */ ib_i16_t val) /*!< in: value to write */ { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val), true)); } /*****************************************************************//** @@ -3495,7 +3608,7 @@ ib_tuple_write_i32( int col_no, /*!< in: column number */ ib_i32_t val) /*!< in: value to write */ { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val), true)); } /*****************************************************************//** @@ -3510,7 +3623,7 @@ ib_tuple_write_i64( int col_no, /*!< in: column number */ ib_i64_t val) /*!< in: value to write */ { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val), true)); } /*****************************************************************//** @@ -3525,7 +3638,7 @@ ib_tuple_write_u8( int col_no, /*!< in: column number */ ib_u8_t val) /*!< in: value to write */ { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val), true)); } /*****************************************************************//** @@ -3540,7 +3653,7 @@ ib_tuple_write_u16( int col_no, /*!< in: column number */ ib_u16_t val) /*!< in: value to write */ { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val), true)); } /*****************************************************************//** @@ -3555,7 +3668,7 @@ ib_tuple_write_u32( int col_no, /*!< in: column number */ ib_u32_t val) /*!< in: value to write */ { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val), true)); } /*****************************************************************//** @@ -3570,7 +3683,7 @@ ib_tuple_write_u64( int col_no, /*!< in: column number */ ib_u64_t val) /*!< in: value to write */ { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val), true)); } /*****************************************************************//** @@ -3603,7 +3716,8 @@ ib_tuple_write_double( dfield = ib_col_get_dfield(tuple, col_no); if (dtype_get_mtype(dfield_get_type(dfield)) == DATA_DOUBLE) { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, + &val, sizeof(val), true)); } else { return(DB_DATA_MISMATCH); } @@ -3653,7 +3767,8 @@ ib_tuple_write_float( dfield = ib_col_get_dfield(tuple, col_no); if (dtype_get_mtype(dfield_get_type(dfield)) == DATA_FLOAT) { - return(ib_col_set_value(ib_tpl, col_no, &val, sizeof(val))); + return(ib_col_set_value(ib_tpl, col_no, + &val, sizeof(val), true)); } else { return(DB_DATA_MISMATCH); } @@ -3756,7 +3871,7 @@ ib_table_truncate( ib_trx_t ib_trx = NULL; ib_crsr_t ib_crsr = NULL; - ib_trx = ib_trx_begin(IB_TRX_SERIALIZABLE); + ib_trx = ib_trx_begin(IB_TRX_SERIALIZABLE, true, false); dict_mutex_enter_for_mysql(); diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc index e3e127c3ace..0136c9c43a3 100644 --- a/storage/innobase/btr/btr0btr.cc +++ b/storage/innobase/btr/btr0btr.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -44,7 +44,21 @@ Created 6/2/1994 Heikki Tuuri #include "trx0trx.h" #include "srv0mon.h" +/**************************************************************//** +Checks if the page in the cursor can be merged with given page. +If necessary, re-organize the merge_page. +@return TRUE if possible to merge. */ +UNIV_INTERN +ibool +btr_can_merge_with_page( +/*====================*/ + btr_cur_t* cursor, /*!< in: cursor on the page to merge */ + ulint page_no, /*!< in: a sibling page */ + buf_block_t** merge_block, /*!< out: the merge block */ + mtr_t* mtr); /*!< in: mini-transaction */ + #endif /* UNIV_HOTBACKUP */ + /**************************************************************//** Report that an index page is corrupted. */ UNIV_INTERN @@ -1032,7 +1046,7 @@ btr_page_create( btr_blob_dbg_assert_empty(index, buf_block_get_page_no(block)); if (page_zip) { - page_create_zip(block, index, level, mtr); + page_create_zip(block, index, level, 0, mtr); } else { page_create(block, mtr, dict_table_is_comp(index->table)); /* Set the level of the new index page */ @@ -1602,7 +1616,7 @@ btr_create( page_zip = buf_block_get_page_zip(block); if (page_zip) { - page = page_create_zip(block, index, 0, mtr); + page = page_create_zip(block, index, 0, 0, mtr); } else { page = page_create(block, mtr, dict_table_is_comp(index->table)); @@ -1727,22 +1741,32 @@ btr_free_root( #endif /* !UNIV_HOTBACKUP */ /*************************************************************//** -Reorganizes an index page. */ -static -ibool +Reorganizes an index page. + +IMPORTANT: On success, the caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. This has to +be done either within the same mini-transaction, or by invoking +ibuf_reset_free_bits() before mtr_commit(). On uncompressed pages, +IBUF_BITMAP_FREE is unaffected by reorganization. + +@retval true if the operation was successful +@retval false if it is a compressed page, and recompression failed */ +UNIV_INTERN +bool btr_page_reorganize_low( /*====================*/ - ibool recovery,/*!< in: TRUE if called in recovery: + bool recovery,/*!< in: true if called in recovery: locks should not be updated, i.e., there cannot exist locks on the page, and a hash index should not be dropped: it cannot exist */ - ulint compression_level,/*!< in: compression level to be used + ulint z_level,/*!< in: compression level to be used if dealing with compressed page */ - buf_block_t* block, /*!< in: page to be reorganized */ - dict_index_t* index, /*!< in: record descriptor */ - mtr_t* mtr) /*!< in: mtr */ + page_cur_t* cursor, /*!< in/out: page cursor */ + dict_index_t* index, /*!< in: the index tree of the page */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { + buf_block_t* block = page_cur_get_block(cursor); #ifndef UNIV_HOTBACKUP buf_pool_t* buf_pool = buf_pool_from_bpage(&block->page); #endif /* !UNIV_HOTBACKUP */ @@ -1755,9 +1779,9 @@ btr_page_reorganize_low( ulint data_size2; ulint max_ins_size1; ulint max_ins_size2; - ibool success = FALSE; - byte type; - byte* log_ptr; + bool success = false; + ulint pos; + bool log_compressed; ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); btr_assert_not_corrupted(block, index); @@ -1767,27 +1791,6 @@ btr_page_reorganize_low( data_size1 = page_get_data_size(page); max_ins_size1 = page_get_max_insert_size_after_reorganize(page, 1); -#ifndef UNIV_HOTBACKUP - /* Write the log record */ - if (page_zip) { - type = MLOG_ZIP_PAGE_REORGANIZE; - } else if (page_is_comp(page)) { - type = MLOG_COMP_PAGE_REORGANIZE; - } else { - type = MLOG_PAGE_REORGANIZE; - } - - log_ptr = mlog_open_and_write_index( - mtr, page, index, type, page_zip ? 1 : 0); - - /* For compressed pages write the compression level. */ - if (log_ptr && page_zip) { - mach_write_to_1(log_ptr, compression_level); - mlog_close(mtr, log_ptr + 1); - } - -#endif /* !UNIV_HOTBACKUP */ - /* Turn logging off */ log_mode = mtr_set_log_mode(mtr, MTR_LOG_NONE); @@ -1799,6 +1802,8 @@ btr_page_reorganize_low( #endif /* !UNIV_HOTBACKUP */ temp_page = temp_block->frame; + MONITOR_INC(MONITOR_INDEX_REORG_ATTEMPTS); + /* Copy the old page to temporary space */ buf_frame_copy(temp_page, page); @@ -1811,6 +1816,9 @@ btr_page_reorganize_low( #endif /* !UNIV_HOTBACKUP */ btr_blob_dbg_remove(page, index, "btr_page_reorganize"); + /* Save the cursor position. */ + pos = page_rec_get_n_recs_before(page_cur_get_rec(cursor)); + /* Recreate the page: note that global data on page (possible segment headers, next page-field, etc.) is preserved intact */ @@ -1828,14 +1836,21 @@ btr_page_reorganize_low( trx_id_t max_trx_id = page_get_max_trx_id(temp_page); page_set_max_trx_id(block, NULL, max_trx_id, mtr); /* In crash recovery, dict_index_is_sec_or_ibuf() always - returns TRUE, even for clustered indexes. max_trx_id is + holds, even for clustered indexes. max_trx_id is unused in clustered index pages. */ ut_ad(max_trx_id != 0 || recovery); } + /* If innodb_log_compressed_pages is ON, page reorganize should log the + compressed page image.*/ + log_compressed = page_zip && page_zip_log_pages; + + if (log_compressed) { + mtr_set_log_mode(mtr, log_mode); + } + if (page_zip - && !page_zip_compress(page_zip, page, index, - compression_level, NULL)) { + && !page_zip_compress(page_zip, page, index, z_level, mtr)) { /* Restore the old page and exit. */ btr_blob_dbg_restore(page, temp_page, index, @@ -1890,7 +1905,14 @@ btr_page_reorganize_low( (unsigned long) max_ins_size2); ut_ad(0); } else { - success = TRUE; + success = true; + } + + /* Restore the cursor position. */ + if (pos > 0) { + cursor->rec = page_rec_get_nth(page, pos); + } else { + ut_ad(cursor->rec == page_get_infimum_rec(page)); } func_exit: @@ -1904,27 +1926,94 @@ func_exit: /* Restore logging mode */ mtr_set_log_mode(mtr, log_mode); +#ifndef UNIV_HOTBACKUP + if (success) { + byte type; + byte* log_ptr; + + /* Write the log record */ + if (page_zip) { + ut_ad(page_is_comp(page)); + type = MLOG_ZIP_PAGE_REORGANIZE; + } else if (page_is_comp(page)) { + type = MLOG_COMP_PAGE_REORGANIZE; + } else { + type = MLOG_PAGE_REORGANIZE; + } + + log_ptr = log_compressed + ? NULL + : mlog_open_and_write_index( + mtr, page, index, type, + page_zip ? 1 : 0); + + /* For compressed pages write the compression level. */ + if (log_ptr && page_zip) { + mach_write_to_1(log_ptr, z_level); + mlog_close(mtr, log_ptr + 1); + } + + MONITOR_INC(MONITOR_INDEX_REORG_SUCCESSFUL); + } +#endif /* !UNIV_HOTBACKUP */ + return(success); } +/*************************************************************//** +Reorganizes an index page. + +IMPORTANT: On success, the caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. This has to +be done either within the same mini-transaction, or by invoking +ibuf_reset_free_bits() before mtr_commit(). On uncompressed pages, +IBUF_BITMAP_FREE is unaffected by reorganization. + +@retval true if the operation was successful +@retval false if it is a compressed page, and recompression failed */ +static __attribute__((nonnull)) +bool +btr_page_reorganize_block( +/*======================*/ + bool recovery,/*!< in: true if called in recovery: + locks should not be updated, i.e., + there cannot exist locks on the + page, and a hash index should not be + dropped: it cannot exist */ + ulint z_level,/*!< in: compression level to be used + if dealing with compressed page */ + buf_block_t* block, /*!< in/out: B-tree page */ + dict_index_t* index, /*!< in: the index tree of the page */ + mtr_t* mtr) /*!< in/out: mini-transaction */ +{ + page_cur_t cur; + page_cur_set_before_first(block, &cur); + + return(btr_page_reorganize_low(recovery, z_level, &cur, index, mtr)); +} + #ifndef UNIV_HOTBACKUP /*************************************************************//** Reorganizes an index page. -IMPORTANT: if btr_page_reorganize() is invoked on a compressed leaf -page of a non-clustered index, the caller must update the insert -buffer free bits in the same mini-transaction in such a way that the -modification will be redo-logged. -@return TRUE on success, FALSE on failure */ + +IMPORTANT: On success, the caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. This has to +be done either within the same mini-transaction, or by invoking +ibuf_reset_free_bits() before mtr_commit(). On uncompressed pages, +IBUF_BITMAP_FREE is unaffected by reorganization. + +@retval true if the operation was successful +@retval false if it is a compressed page, and recompression failed */ UNIV_INTERN -ibool +bool btr_page_reorganize( /*================*/ - buf_block_t* block, /*!< in: page to be reorganized */ - dict_index_t* index, /*!< in: record descriptor */ - mtr_t* mtr) /*!< in: mtr */ + page_cur_t* cursor, /*!< in/out: page cursor */ + dict_index_t* index, /*!< in: the index tree of the page */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { - return(btr_page_reorganize_low(FALSE, page_compression_level, - block, index, mtr)); + return(btr_page_reorganize_low(false, page_zip_level, + cursor, index, mtr)); } #endif /* !UNIV_HOTBACKUP */ @@ -1942,7 +2031,7 @@ btr_parse_page_reorganize( buf_block_t* block, /*!< in: page to be reorganized, or NULL */ mtr_t* mtr) /*!< in: mtr or NULL */ { - ulint level = page_compression_level; + ulint level; ut_ad(ptr && end_ptr); @@ -1954,14 +2043,16 @@ btr_parse_page_reorganize( return(NULL); } - level = (ulint)mach_read_from_1(ptr); + level = mach_read_from_1(ptr); ut_a(level <= 9); ++ptr; + } else { + level = page_zip_level; } if (block != NULL) { - btr_page_reorganize_low(TRUE, level, block, index, mtr); + btr_page_reorganize_block(true, level, block, index, mtr); } return(ptr); @@ -1995,7 +2086,7 @@ btr_page_empty( segment headers, next page-field, etc.) is preserved intact */ if (page_zip) { - page_create_zip(block, index, level, mtr); + page_create_zip(block, index, level, 0, mtr); } else { page_create(block, mtr, dict_table_is_comp(index->table)); btr_page_set_level(page, NULL, level, mtr); @@ -2043,7 +2134,7 @@ btr_root_raise_and_insert( root = btr_cur_get_page(cursor); root_block = btr_cur_get_block(cursor); root_page_zip = buf_block_get_page_zip(root_block); - ut_ad(page_get_n_recs(root) > 0); + ut_ad(!page_is_empty(root)); index = btr_cur_get_index(cursor); #ifdef UNIV_ZIP_DEBUG ut_a(!root_page_zip || page_zip_validate(root_page_zip, root, index)); @@ -2091,8 +2182,8 @@ btr_root_raise_and_insert( || new_page_zip #endif /* UNIV_ZIP_COPY */ || !page_copy_rec_list_end(new_block, root_block, - page_get_infimum_rec(root), - index, mtr)) { + page_get_infimum_rec(root), + index, mtr)) { ut_a(new_page_zip); /* Copy the page byte for byte. */ @@ -2779,7 +2870,7 @@ func_start: page_zip = buf_block_get_page_zip(block); ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); - ut_ad(page_get_n_recs(page) >= 1); + ut_ad(!page_is_empty(page)); page_no = buf_block_get_page_no(block); @@ -2909,7 +3000,7 @@ insert_empty: || page_zip #endif /* UNIV_ZIP_COPY */ || !page_move_rec_list_start(new_block, block, move_limit, - cursor->index, mtr)) { + cursor->index, mtr)) { /* For some reason, compressing new_page failed, even though it should contain fewer records than the original page. Copy the page byte for byte @@ -2951,7 +3042,7 @@ insert_empty: || page_zip #endif /* UNIV_ZIP_COPY */ || !page_move_rec_list_end(new_block, block, move_limit, - cursor->index, mtr)) { + cursor->index, mtr)) { /* For some reason, compressing new_page failed, even though it should contain fewer records than the original page. Copy the page byte for byte @@ -3033,15 +3124,16 @@ insert_empty: goto func_exit; } - /* 8. If insert did not fit, try page reorganization */ + /* 8. If insert did not fit, try page reorganization. + For compressed pages, page_cur_tuple_insert() will have + attempted this already. */ - if (!btr_page_reorganize(insert_block, cursor->index, mtr)) { + if (page_cur_get_page_zip(page_cursor) + || !btr_page_reorganize(page_cursor, cursor->index, mtr)) { goto insert_failed; } - page_cur_search(insert_block, cursor->index, tuple, - PAGE_CUR_LE, page_cursor); rec = page_cur_tuple_insert(page_cursor, tuple, cursor->index, offsets, heap, n_ext, mtr); @@ -3049,9 +3141,10 @@ insert_empty: /* The insert did not fit on the page: loop back to the start of the function for a new split */ insert_failed: - /* We play safe and reset the free bits for new_page */ + /* We play safe and reset the free bits */ if (!dict_index_is_clust(cursor->index)) { ibuf_reset_free_bits(new_block); + ibuf_reset_free_bits(block); } /* fprintf(stderr, "Split second round %lu\n", @@ -3461,7 +3554,7 @@ btr_compress( ulint left_page_no; ulint right_page_no; buf_block_t* merge_block; - page_t* merge_page; + page_t* merge_page = NULL; page_zip_des_t* merge_page_zip; ibool is_left; buf_block_t* block; @@ -3469,11 +3562,8 @@ btr_compress( btr_cur_t father_cursor; mem_heap_t* heap; ulint* offsets; - ulint data_size; - ulint n_recs; ulint nth_rec = 0; /* remove bogus warning */ - ulint max_ins_size; - ulint max_ins_size_reorg; + DBUG_ENTER("btr_compress"); block = btr_cur_get_block(cursor); page = btr_cur_get_page(cursor); @@ -3487,13 +3577,18 @@ btr_compress( space = dict_index_get_space(index); zip_size = dict_table_zip_size(index->table); + MONITOR_INC(MONITOR_INDEX_MERGE_ATTEMPTS); + left_page_no = btr_page_get_prev(page, mtr); right_page_no = btr_page_get_next(page, mtr); -#if 0 - fprintf(stderr, "Merge left page %lu right %lu \n", - left_page_no, right_page_no); -#endif +#ifdef UNIV_DEBUG + if (!page_is_leaf(page) && left_page_no == FIL_NULL) { + ut_a(REC_INFO_MIN_REC_FLAG & rec_get_info_bits( + page_rec_get_next(page_get_infimum_rec(page)), + page_is_comp(page))); + } +#endif /* UNIV_DEBUG */ heap = mem_heap_create(100); offsets = btr_page_get_father_block(NULL, heap, index, block, mtr, @@ -3504,30 +3599,7 @@ btr_compress( ut_ad(nth_rec > 0); } - /* Decide the page to which we try to merge and which will inherit - the locks */ - - is_left = left_page_no != FIL_NULL; - - if (is_left) { - - merge_block = btr_block_get(space, zip_size, left_page_no, - RW_X_LATCH, index, mtr); - merge_page = buf_block_get_frame(merge_block); -#ifdef UNIV_BTR_DEBUG - ut_a(btr_page_get_next(merge_page, mtr) - == buf_block_get_page_no(block)); -#endif /* UNIV_BTR_DEBUG */ - } else if (right_page_no != FIL_NULL) { - - merge_block = btr_block_get(space, zip_size, right_page_no, - RW_X_LATCH, index, mtr); - merge_page = buf_block_get_frame(merge_block); -#ifdef UNIV_BTR_DEBUG - ut_a(btr_page_get_prev(merge_page, mtr) - == buf_block_get_page_no(block)); -#endif /* UNIV_BTR_DEBUG */ - } else { + if (left_page_no == FIL_NULL && right_page_no == FIL_NULL) { /* The page is the only one on the level, lift the records to the father */ @@ -3535,66 +3607,34 @@ btr_compress( goto func_exit; } - n_recs = page_get_n_recs(page); - data_size = page_get_data_size(page); -#ifdef UNIV_BTR_DEBUG - ut_a(page_is_comp(merge_page) == page_is_comp(page)); -#endif /* UNIV_BTR_DEBUG */ + /* Decide the page to which we try to merge and which will inherit + the locks */ - max_ins_size_reorg = page_get_max_insert_size_after_reorganize( - merge_page, n_recs); - if (data_size > max_ins_size_reorg) { + is_left = btr_can_merge_with_page(cursor, left_page_no, + &merge_block, mtr); - /* No space for merge */ -err_exit: - /* We play it safe and reset the free bits. */ - if (zip_size - && page_is_leaf(merge_page) - && !dict_index_is_clust(index)) { - ibuf_reset_free_bits(merge_block); - } + DBUG_EXECUTE_IF("ib_always_merge_right", is_left = FALSE;); - mem_heap_free(heap); - return(FALSE); + if(!is_left + && !btr_can_merge_with_page(cursor, right_page_no, &merge_block, + mtr)) { + goto err_exit; } - /* If compression padding tells us that merging will result in - too packed up page i.e.: which is likely to cause compression - failure then don't merge the pages. */ - if (zip_size && page_is_leaf(merge_page) - && (page_get_data_size(merge_page) + data_size - >= dict_index_zip_pad_optimal_page_size(index))) { + merge_page = buf_block_get_frame(merge_block); - goto err_exit; +#ifdef UNIV_BTR_DEBUG + if (is_left) { + ut_a(btr_page_get_next(merge_page, mtr) + == buf_block_get_page_no(block)); + } else { + ut_a(btr_page_get_prev(merge_page, mtr) + == buf_block_get_page_no(block)); } +#endif /* UNIV_BTR_DEBUG */ ut_ad(page_validate(merge_page, index)); - max_ins_size = page_get_max_insert_size(merge_page, n_recs); - - if (data_size > max_ins_size) { - - /* We have to reorganize merge_page */ - - if (!btr_page_reorganize(merge_block, index, mtr)) { - - goto err_exit; - } - - max_ins_size = page_get_max_insert_size(merge_page, n_recs); - - ut_ad(page_validate(merge_page, index)); - ut_ad(max_ins_size == max_ins_size_reorg); - - if (data_size > max_ins_size) { - - /* Add fault tolerance, though this should - never happen */ - - goto err_exit; - } - } - merge_page_zip = buf_block_get_page_zip(merge_block); #ifdef UNIV_ZIP_DEBUG if (merge_page_zip) { @@ -3629,11 +3669,19 @@ err_exit: } } else { rec_t* orig_succ; + ibool compressed; + dberr_t err; + btr_cur_t cursor2; + /* father cursor pointing to node ptr + of the right sibling */ #ifdef UNIV_BTR_DEBUG byte fil_page_prev[4]; #endif /* UNIV_BTR_DEBUG */ - if (merge_page_zip) { + btr_page_get_father(index, merge_block, mtr, &cursor2); + + if (merge_page_zip && left_page_no == FIL_NULL) { + /* The function page_zip_compress(), which will be invoked by page_copy_rec_list_end() below, requires that FIL_PAGE_PREV be FIL_NULL. @@ -3654,9 +3702,12 @@ err_exit: if (!orig_succ) { ut_a(merge_page_zip); #ifdef UNIV_BTR_DEBUG - /* FIL_PAGE_PREV was restored from merge_page_zip. */ - ut_a(!memcmp(fil_page_prev, - merge_page + FIL_PAGE_PREV, 4)); + if (left_page_no == FIL_NULL) { + /* FIL_PAGE_PREV was restored from + merge_page_zip. */ + ut_a(!memcmp(fil_page_prev, + merge_page + FIL_PAGE_PREV, 4)); + } #endif /* UNIV_BTR_DEBUG */ goto err_exit; } @@ -3664,7 +3715,8 @@ err_exit: btr_search_drop_page_hash_index(block); #ifdef UNIV_BTR_DEBUG - if (merge_page_zip) { + if (merge_page_zip && left_page_no == FIL_NULL) { + /* Restore FIL_PAGE_PREV in order to avoid an assertion failure in btr_level_list_remove(), which will set the field again to FIL_NULL. Even though this makes @@ -3680,12 +3732,19 @@ err_exit: /* Replace the address of the old child node (= page) with the address of the merge page to the right */ - btr_node_ptr_set_child_page_no( btr_cur_get_rec(&father_cursor), btr_cur_get_page_zip(&father_cursor), offsets, right_page_no, mtr); - btr_node_ptr_delete(index, merge_block, mtr); + + compressed = btr_cur_pessimistic_delete(&err, TRUE, &cursor2, + BTR_CREATE_FLAG, + RB_NONE, mtr); + ut_a(err == DB_SUCCESS); + + if (!compressed) { + btr_cur_compress_if_useful(&cursor2, FALSE, mtr); + } lock_update_merge_right(merge_block, orig_succ, block); } @@ -3754,7 +3813,21 @@ func_exit: merge_block, cursor); } - return(TRUE); + MONITOR_INC(MONITOR_INDEX_MERGE_SUCCESSFUL); + + DBUG_RETURN(TRUE); + +err_exit: + /* We play it safe and reset the free bits. */ + if (zip_size + && merge_page + && page_is_leaf(merge_page) + && !dict_index_is_clust(index)) { + ibuf_reset_free_bits(merge_block); + } + + mem_heap_free(heap); + DBUG_RETURN(FALSE); } /*************************************************************//** @@ -3816,17 +3889,16 @@ btr_discard_only_page_on_level( #endif /* UNIV_BTR_DEBUG */ btr_page_empty(block, buf_block_get_page_zip(block), index, 0, mtr); + ut_ad(page_is_leaf(buf_block_get_frame(block))); if (!dict_index_is_clust(index)) { /* We play it safe and reset the free bits for the root */ ibuf_reset_free_bits(block); - if (page_is_leaf(buf_block_get_frame(block))) { - ut_a(max_trx_id); - page_set_max_trx_id(block, - buf_block_get_page_zip(block), - max_trx_id, mtr); - } + ut_a(max_trx_id); + page_set_max_trx_id(block, + buf_block_get_page_zip(block), + max_trx_id, mtr); } } @@ -3863,6 +3935,8 @@ btr_discard_page( space = dict_index_get_space(index); zip_size = dict_table_zip_size(index->table); + MONITOR_INC(MONITOR_INDEX_DISCARD); + /* Decide the page which will inherit the locks */ left_page_no = btr_page_get_prev(buf_block_get_frame(block), mtr); @@ -4489,9 +4563,9 @@ loop: right_page_no = btr_page_get_next(page, &mtr); left_page_no = btr_page_get_prev(page, &mtr); - ut_a(page_get_n_recs(page) > 0 || (level == 0 - && page_get_page_no(page) - == dict_index_get_page(index))); + ut_a(!page_is_empty(page) + || (level == 0 + && page_get_page_no(page) == dict_index_get_page(index))); if (right_page_no != FIL_NULL) { const rec_t* right_rec; @@ -4799,4 +4873,97 @@ btr_validate_index( return(ok); } +/**************************************************************//** +Checks if the page in the cursor can be merged with given page. +If necessary, re-organize the merge_page. +@return TRUE if possible to merge. */ +UNIV_INTERN +ibool +btr_can_merge_with_page( +/*====================*/ + btr_cur_t* cursor, /*!< in: cursor on the page to merge */ + ulint page_no, /*!< in: a sibling page */ + buf_block_t** merge_block, /*!< out: the merge block */ + mtr_t* mtr) /*!< in: mini-transaction */ +{ + dict_index_t* index; + page_t* page; + ulint space; + ulint zip_size; + ulint n_recs; + ulint data_size; + ulint max_ins_size_reorg; + ulint max_ins_size; + buf_block_t* mblock; + page_t* mpage; + DBUG_ENTER("btr_can_merge_with_page"); + + if (page_no == FIL_NULL) { + goto error; + } + + index = btr_cur_get_index(cursor); + page = btr_cur_get_page(cursor); + space = dict_index_get_space(index); + zip_size = dict_table_zip_size(index->table); + + mblock = btr_block_get(space, zip_size, page_no, RW_X_LATCH, index, + mtr); + mpage = buf_block_get_frame(mblock); + + n_recs = page_get_n_recs(page); + data_size = page_get_data_size(page); + + max_ins_size_reorg = page_get_max_insert_size_after_reorganize( + mpage, n_recs); + + if (data_size > max_ins_size_reorg) { + goto error; + } + + /* If compression padding tells us that merging will result in + too packed up page i.e.: which is likely to cause compression + failure then don't merge the pages. */ + if (zip_size && page_is_leaf(mpage) + && (page_get_data_size(mpage) + data_size + >= dict_index_zip_pad_optimal_page_size(index))) { + + goto error; + } + + + max_ins_size = page_get_max_insert_size(mpage, n_recs); + + if (data_size > max_ins_size) { + + /* We have to reorganize mpage */ + + if (!btr_page_reorganize_block( + false, page_zip_level, mblock, index, mtr)) { + + goto error; + } + + max_ins_size = page_get_max_insert_size(mpage, n_recs); + + ut_ad(page_validate(mpage, index)); + ut_ad(max_ins_size == max_ins_size_reorg); + + if (data_size > max_ins_size) { + + /* Add fault tolerance, though this should + never happen */ + + goto error; + } + } + + *merge_block = mblock; + DBUG_RETURN(TRUE); + +error: + *merge_block = NULL; + DBUG_RETURN(FALSE); +} + #endif /* !UNIV_HOTBACKUP */ diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index ecc17188770..7e1483cfe85 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2012, Facebook Inc. @@ -1086,6 +1086,12 @@ Inserts a record if there is enough space, or if enough space can be freed by reorganizing. Differs from btr_cur_optimistic_insert because no heuristics is applied to whether it pays to use CPU time for reorganizing the page or not. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to inserted record if succeed, else NULL */ static __attribute__((nonnull, warn_unused_result)) rec_t* @@ -1098,35 +1104,29 @@ btr_cur_insert_if_possible( ulint** offsets,/*!< out: offsets on *rec */ mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ ulint n_ext, /*!< in: number of externally stored columns */ - mtr_t* mtr) /*!< in: mtr */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { page_cur_t* page_cursor; - buf_block_t* block; rec_t* rec; ut_ad(dtuple_check_typed(tuple)); - block = btr_cur_get_block(cursor); - - ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); + ut_ad(mtr_memo_contains(mtr, btr_cur_get_block(cursor), + MTR_MEMO_PAGE_X_FIX)); page_cursor = btr_cur_get_page_cur(cursor); /* Now, try the insert */ rec = page_cur_tuple_insert(page_cursor, tuple, cursor->index, offsets, heap, n_ext, mtr); - if (UNIV_UNLIKELY(!rec)) { - /* If record did not fit, reorganize */ - - if (btr_page_reorganize(block, cursor->index, mtr)) { - - page_cur_search(block, cursor->index, tuple, - PAGE_CUR_LE, page_cursor); - - rec = page_cur_tuple_insert( - page_cursor, tuple, cursor->index, - offsets, heap, n_ext, mtr); - } + /* If the record did not fit, reorganize. + For compressed pages, page_cur_tuple_insert() + attempted this already. */ + if (!rec && !page_cur_get_page_zip(page_cursor) + && btr_page_reorganize(page_cursor, cursor->index, mtr)) { + rec = page_cur_tuple_insert( + page_cursor, tuple, cursor->index, + offsets, heap, n_ext, mtr); } ut_ad(!rec || rec_offs_validate(rec, cursor->index, *offsets)); @@ -1240,10 +1240,11 @@ btr_cur_optimistic_insert( NULL */ ulint n_ext, /*!< in: number of externally stored columns */ que_thr_t* thr, /*!< in: query thread or NULL */ - mtr_t* mtr) /*!< in: mtr; if this function returns - DB_SUCCESS on a leaf page of a secondary - index in a compressed tablespace, the - mtr must be committed before latching + mtr_t* mtr) /*!< in/out: mini-transaction; + if this function returns DB_SUCCESS on + a leaf page of a secondary index in a + compressed tablespace, the caller must + mtr_commit(mtr) before latching any further pages */ { big_rec_t* big_rec_vec = NULL; @@ -1251,8 +1252,7 @@ btr_cur_optimistic_insert( page_cur_t* page_cursor; buf_block_t* block; page_t* page; - ulint max_size; - rec_t* dummy_rec; + rec_t* dummy; ibool leaf; ibool reorg; ibool inherit; @@ -1265,9 +1265,13 @@ btr_cur_optimistic_insert( block = btr_cur_get_block(cursor); page = buf_block_get_frame(block); index = cursor->index; + + ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); ut_ad(!dict_index_is_online_ddl(index) || dict_index_is_clust(index) || (flags & BTR_CREATE_FLAG)); + ut_ad(dtuple_check_typed(entry)); + zip_size = buf_block_get_zip_size(block); #ifdef UNIV_DEBUG_VALGRIND if (zip_size) { @@ -1276,10 +1280,6 @@ btr_cur_optimistic_insert( } #endif /* UNIV_DEBUG_VALGRIND */ - if (!dtuple_check_typed_no_assert(entry)) { - fputs("InnoDB: Error in a tuple to insert into ", stderr); - dict_index_name_print(stderr, thr_get_trx(thr), index); - } #ifdef UNIV_DEBUG if (btr_cur_print_record_ops && thr) { btr_cur_trx_report(thr_get_trx(thr)->id, index, "insert "); @@ -1287,8 +1287,6 @@ btr_cur_optimistic_insert( } #endif /* UNIV_DEBUG */ - ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); - max_size = page_get_max_insert_size_after_reorganize(page, 1); leaf = page_is_leaf(page); /* Calculate the record size when entry is converted to a record */ @@ -1314,27 +1312,13 @@ btr_cur_optimistic_insert( Subtract one byte for the encoded heap_no in the modification log. */ ulint free_space_zip = page_zip_empty_size( - cursor->index->n_fields, zip_size) - 1; + cursor->index->n_fields, zip_size); ulint n_uniq = dict_index_get_n_unique_in_tree(index); ut_ad(dict_table_is_comp(index->table)); - /* There should be enough room for two node pointer - records on an empty non-leaf page. This prevents - infinite page splits. */ - - if (UNIV_LIKELY(entry->n_fields >= n_uniq) - && UNIV_UNLIKELY(REC_NODE_PTR_SIZE - + rec_get_converted_size_comp_prefix( - index, entry->fields, n_uniq, - NULL) - /* On a compressed page, there is - a two-byte entry in the dense - page directory for every record. - But there is no record header. */ - - (REC_N_NEW_EXTRA_BYTES - 2) - > free_space_zip / 2)) { - + if (free_space_zip == 0) { +too_big: if (big_rec_vec) { dtuple_convert_back_big_rec( index, entry, big_rec_vec); @@ -1342,21 +1326,39 @@ btr_cur_optimistic_insert( return(DB_TOO_BIG_RECORD); } + + /* Subtract one byte for the encoded heap_no in the + modification log. */ + free_space_zip--; + + /* There should be enough room for two node pointer + records on an empty non-leaf page. This prevents + infinite page splits. */ + + if (entry->n_fields >= n_uniq + && (REC_NODE_PTR_SIZE + + rec_get_converted_size_comp_prefix( + index, entry->fields, n_uniq, NULL) + /* On a compressed page, there is + a two-byte entry in the dense + page directory for every record. + But there is no record header. */ + - (REC_N_NEW_EXTRA_BYTES - 2) + > free_space_zip / 2)) { + goto too_big; + } } LIMIT_OPTIMISTIC_INSERT_DEBUG(page_get_n_recs(page), goto fail); - /* If there have been many consecutive inserts, and we are on the leaf - level, check if we have to split the page to reserve enough free space - for future updates of records. */ - - if (dict_index_is_clust(index) - && (page_get_n_recs(page) >= 2) - && UNIV_LIKELY(leaf) - && (dict_index_get_space_reserve() + rec_size > max_size) - && (btr_page_get_split_rec_to_right(cursor, &dummy_rec) - || btr_page_get_split_rec_to_left(cursor, &dummy_rec))) { + if (leaf && zip_size + && (page_get_data_size(page) + rec_size + >= dict_index_zip_pad_optimal_page_size(index))) { + /* If compression padding tells us that insertion will + result in too packed up page i.e.: which is likely to + cause compression failure then don't do an optimistic + insertion. */ fail: err = DB_FAIL; fail_err: @@ -1368,23 +1370,33 @@ fail_err: return(err); } - if (UNIV_UNLIKELY(max_size < BTR_CUR_PAGE_REORGANIZE_LIMIT - || max_size < rec_size) - && UNIV_LIKELY(page_get_n_recs(page) > 1) - && page_get_max_insert_size(page, 1) < rec_size) { + ulint max_size = page_get_max_insert_size_after_reorganize(page, 1); + if (page_has_garbage(page)) { + if ((max_size < rec_size + || max_size < BTR_CUR_PAGE_REORGANIZE_LIMIT) + && page_get_n_recs(page) > 1 + && page_get_max_insert_size(page, 1) < rec_size) { + + goto fail; + } + } else if (max_size < rec_size) { goto fail; } - /* If compression padding tells us that insertion will result in - too packed up page i.e.: which is likely to cause compression - failure then don't do an optimistic insertion. */ - if (zip_size && leaf - && (page_get_data_size(page) + rec_size - >= dict_index_zip_pad_optimal_page_size(index))) { + /* If there have been many consecutive inserts to the + clustered index leaf page of an uncompressed table, check if + we have to split the page to reserve enough free space for + future updates of records. */ + if (leaf && !zip_size && dict_index_is_clust(index) + && page_get_n_recs(page) >= 2 + && dict_index_get_space_reserve() + rec_size > max_size + && (btr_page_get_split_rec_to_right(cursor, &dummy) + || btr_page_get_split_rec_to_left(cursor, &dummy))) { goto fail; } + /* Check locks and write to the undo log, if specified */ err = btr_cur_ins_lock_and_undo(flags, cursor, entry, thr, mtr, &inherit); @@ -1403,42 +1415,35 @@ fail_err: *rec = page_cur_tuple_insert(page_cursor, entry, index, offsets, heap, n_ext, mtr); reorg = page_cursor_rec != page_cur_get_rec(page_cursor); + } - if (UNIV_UNLIKELY(reorg)) { - ut_a(zip_size); - /* It's possible for rec to be NULL if the - page is compressed. This is because a - reorganized page may become incompressible. */ - if (!*rec) { - goto fail; - } + if (*rec) { + } else if (zip_size) { + /* Reset the IBUF_BITMAP_FREE bits, because + page_cur_tuple_insert() will have attempted page + reorganize before failing. */ + if (leaf && !dict_index_is_clust(index)) { + ibuf_reset_free_bits(block); } - } - if (UNIV_UNLIKELY(!*rec) && UNIV_LIKELY(!reorg)) { - /* If the record did not fit, reorganize */ - if (UNIV_UNLIKELY(!btr_page_reorganize(block, index, mtr))) { - ut_a(zip_size); + goto fail; + } else { + ut_ad(!reorg); + /* If the record did not fit, reorganize */ + if (!btr_page_reorganize(page_cursor, index, mtr)) { + ut_ad(0); goto fail; } - ut_ad(zip_size - || page_get_max_insert_size(page, 1) == max_size); + ut_ad(page_get_max_insert_size(page, 1) == max_size); reorg = TRUE; - page_cur_search(block, index, entry, PAGE_CUR_LE, page_cursor); - *rec = page_cur_tuple_insert(page_cursor, entry, index, offsets, heap, n_ext, mtr); if (UNIV_UNLIKELY(!*rec)) { - if (zip_size != 0) { - - goto fail; - } - fputs("InnoDB: Error: cannot insert tuple ", stderr); dtuple_print(stderr, entry); fputs(" into ", stderr); @@ -1462,12 +1467,6 @@ fail_err: lock_update_insert(block, *rec); } -#if 0 - fprintf(stderr, "Insert into page %lu, max ins size %lu," - " rec %lu ind type %lu\n", - buf_block_get_page_no(block), max_size, - rec_size + PAGE_DIR_SLOT_SIZE, index->type); -#endif if (leaf && !dict_index_is_clust(index)) { /* Update the free bits of the B-tree page in the insert buffer bitmap. */ @@ -1528,7 +1527,7 @@ btr_cur_pessimistic_insert( NULL */ ulint n_ext, /*!< in: number of externally stored columns */ que_thr_t* thr, /*!< in: query thread or NULL */ - mtr_t* mtr) /*!< in: mtr */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { dict_index_t* index = cursor->index; ulint zip_size = dict_table_zip_size(index->table); @@ -1536,8 +1535,7 @@ btr_cur_pessimistic_insert( dberr_t err; ibool dummy_inh; ibool success; - ulint n_extents = 0; - ulint n_reserved; + ulint n_reserved = 0; ut_ad(dtuple_check_typed(entry)); @@ -1569,7 +1567,7 @@ btr_cur_pessimistic_insert( of the index tree, so that the insert will not fail because of lack of space */ - n_extents = cursor->tree_height / 16 + 3; + ulint n_extents = cursor->tree_height / 16 + 3; success = fsp_reserve_free_extents(&n_reserved, index->space, n_extents, FSP_NORMAL, mtr); @@ -1596,7 +1594,7 @@ btr_cur_pessimistic_insert( if (big_rec_vec == NULL) { - if (n_extents > 0) { + if (n_reserved > 0) { fil_space_release_free_extents(index->space, n_reserved); } @@ -1625,7 +1623,7 @@ btr_cur_pessimistic_insert( lock_update_insert(btr_cur_get_block(cursor), *rec); } - if (n_extents > 0) { + if (n_reserved > 0) { fil_space_release_free_extents(index->space, n_reserved); } @@ -1698,7 +1696,7 @@ btr_cur_upd_lock_and_undo( /***********************************************************//** Writes a redo log record of updating a record in-place. */ -UNIV_INLINE __attribute__((nonnull)) +UNIV_INTERN void btr_cur_update_in_place_log( /*========================*/ @@ -1726,18 +1724,29 @@ btr_cur_update_in_place_log( return; } - /* The code below assumes index is a clustered index: change index to - the clustered index if we are updating a secondary index record (or we - could as well skip writing the sys col values to the log in this case - because they are not needed for a secondary index record update) */ - - index = dict_table_get_first_index(index->table); - + /* For secondary indexes, we could skip writing the dummy system fields + to the redo log but we have to change redo log parsing of + MLOG_REC_UPDATE_IN_PLACE/MLOG_COMP_REC_UPDATE_IN_PLACE or we have to add + new redo log record. For now, just write dummy sys fields to the redo + log if we are updating a secondary index record. + */ mach_write_to_1(log_ptr, flags); log_ptr++; - log_ptr = row_upd_write_sys_vals_to_log( - index, trx_id, roll_ptr, log_ptr, mtr); + if (dict_index_is_clust(index)) { + log_ptr = row_upd_write_sys_vals_to_log( + index, trx_id, roll_ptr, log_ptr, mtr); + } else { + /* Dummy system fields for a secondary index */ + /* TRX_ID Position */ + log_ptr += mach_write_compressed(log_ptr, 0); + /* ROLL_PTR */ + trx_write_roll_ptr(log_ptr, 0); + log_ptr += DATA_ROLL_PTR_LEN; + /* TRX_ID */ + log_ptr += mach_ull_write_compressed(log_ptr, 0); + } + mach_write_to_2(log_ptr, page_offset(rec)); log_ptr += 2; @@ -1827,61 +1836,59 @@ func_exit: /*************************************************************//** See if there is enough place in the page modification log to log an update-in-place. -@return TRUE if enough place */ + +@retval false if out of space; IBUF_BITMAP_FREE will be reset +outside mtr if the page was recompressed +@retval true if enough place; + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE if this is +a secondary index leaf page. This has to be done either within the +same mini-transaction, or by invoking ibuf_reset_free_bits() before +mtr_commit(mtr). */ UNIV_INTERN -ibool -btr_cur_update_alloc_zip( -/*=====================*/ +bool +btr_cur_update_alloc_zip_func( +/*==========================*/ page_zip_des_t* page_zip,/*!< in/out: compressed page */ - buf_block_t* block, /*!< in/out: buffer page */ - dict_index_t* index, /*!< in: the index corresponding to the block */ + page_cur_t* cursor, /*!< in/out: B-tree page cursor */ + dict_index_t* index, /*!< in: the index corresponding to cursor */ +#ifdef UNIV_DEBUG + ulint* offsets,/*!< in/out: offsets of the cursor record */ +#endif /* UNIV_DEBUG */ ulint length, /*!< in: size needed */ - ibool create, /*!< in: TRUE=delete-and-insert, - FALSE=update-in-place */ - mtr_t* mtr) /*!< in: mini-transaction */ + bool create, /*!< in: true=delete-and-insert, + false=update-in-place */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { + const page_t* page = page_cur_get_page(cursor); - /* Have a local copy of the variables as these can change - dynamically. */ - bool log_compressed = page_log_compressed_pages; - ulint compression_level = page_compression_level; - page_t* page = buf_block_get_frame(block); - - ut_a(page_zip == buf_block_get_page_zip(block)); + ut_ad(page_zip == page_cur_get_page_zip(cursor)); ut_ad(page_zip); ut_ad(!dict_index_is_ibuf(index)); + ut_ad(rec_offs_validate(page_cur_get_rec(cursor), index, offsets)); if (page_zip_available(page_zip, dict_index_is_clust(index), length, create)) { - return(TRUE); + return(true); } - if (!page_zip->m_nonempty) { + if (!page_zip->m_nonempty && !page_has_garbage(page)) { /* The page has been freshly compressed, so - recompressing it will not help. */ - return(FALSE); + reorganizing it will not help. */ + return(false); } - page = buf_block_get_frame(block); - if (create && page_is_leaf(page) && (length + page_get_data_size(page) >= dict_index_zip_pad_optimal_page_size(index))) { - - return(FALSE); + return(false); } - if (!page_zip_compress( - page_zip, page, index, compression_level, - log_compressed ? mtr : NULL)) { - /* Unable to compress the page */ - return(FALSE); + if (!btr_page_reorganize(cursor, index, mtr)) { + goto out_of_space; } - if (mtr && !log_compressed) { - page_zip_compress_write_log_no_data( - compression_level, page, index, mtr); - } + rec_offs_make_valid(page_cur_get_rec(cursor), index, offsets); /* After recompressing a page, we must make sure that the free bits in the insert buffer bitmap will not exceed the free @@ -1890,25 +1897,32 @@ btr_cur_update_alloc_zip( safe to reset the free bits if page_zip_available() fails again, below. The free bits can safely be reset in a separate mini-transaction. If page_zip_available() succeeds below, we - can be sure that the page_zip_compress() above did not reduce + can be sure that the btr_page_reorganize() above did not reduce the free space available on the page. */ - if (!page_zip_available(page_zip, dict_index_is_clust(index), - length, create)) { - /* Out of space: reset the free bits. */ - if (!dict_index_is_clust(index) && page_is_leaf(page)) { - ibuf_reset_free_bits(block); - } - return(FALSE); + if (page_zip_available(page_zip, dict_index_is_clust(index), + length, create)) { + return(true); } - return(TRUE); +out_of_space: + ut_ad(rec_offs_validate(page_cur_get_rec(cursor), index, offsets)); + + /* Out of space: reset the free bits. */ + if (!dict_index_is_clust(index) && page_is_leaf(page)) { + ibuf_reset_free_bits(page_cur_get_block(cursor)); + } + + return(false); } /*************************************************************//** Updates a record when the update causes no size changes in its fields. We assume here that the ordering fields of the record do not change. -@return DB_SUCCESS or error number */ +@return locking or undo log related error code, or +@retval DB_SUCCESS on success +@retval DB_ZIP_OVERFLOW if there is not enough space left +on the compressed page (IBUF_BITMAP_FREE was reset outside mtr) */ UNIV_INTERN dberr_t btr_cur_update_in_place( @@ -1917,15 +1931,16 @@ btr_cur_update_in_place( btr_cur_t* cursor, /*!< in: cursor on the record to update; cursor stays valid and positioned on the same record */ - const ulint* offsets,/*!< in: offsets on cursor->page_cur.rec */ + ulint* offsets,/*!< in/out: offsets on cursor->page_cur.rec */ const upd_t* update, /*!< in: update vector */ ulint cmpl_info,/*!< in: compiler info on secondary index updates */ - que_thr_t* thr, /*!< in: query thread, or NULL if - appropriate flags are set */ + que_thr_t* thr, /*!< in: query thread */ trx_id_t trx_id, /*!< in: transaction id */ - mtr_t* mtr) /*!< in: mtr; must be committed before - latching any further pages */ + mtr_t* mtr) /*!< in/out: mini-transaction; if this + is a secondary index, the caller must + mtr_commit(mtr) before latching any + further pages */ { dict_index_t* index; buf_block_t* block; @@ -1944,8 +1959,8 @@ btr_cur_update_in_place( ut_ad(!dict_index_is_ibuf(index)); ut_ad(dict_index_is_online_ddl(index) == !!(flags & BTR_CREATE_FLAG) || dict_index_is_clust(index)); - ut_ad(!thr || thr_get_trx(thr)->id == trx_id); - ut_ad(thr || (flags & ~BTR_KEEP_POS_FLAG) + ut_ad(thr_get_trx(thr)->id == trx_id + || (flags & ~(BTR_KEEP_POS_FLAG | BTR_KEEP_IBUF_BITMAP)) == (BTR_NO_UNDO_LOG_FLAG | BTR_NO_LOCKING_FLAG | BTR_CREATE_FLAG | BTR_KEEP_SYS_FLAG)); ut_ad(fil_page_get_type(btr_cur_get_page(cursor)) == FIL_PAGE_INDEX); @@ -1962,10 +1977,15 @@ btr_cur_update_in_place( page_zip = buf_block_get_page_zip(block); /* Check that enough space is available on the compressed page. */ - if (page_zip - && !btr_cur_update_alloc_zip(page_zip, block, index, - rec_offs_size(offsets), FALSE, mtr)) { - return(DB_ZIP_OVERFLOW); + if (page_zip) { + if (!btr_cur_update_alloc_zip( + page_zip, btr_cur_get_page_cur(cursor), + index, offsets, rec_offs_size(offsets), + false, mtr)) { + return(DB_ZIP_OVERFLOW); + } + + rec = btr_cur_get_rec(cursor); } /* Do lock checking and undo logging */ @@ -1973,8 +1993,10 @@ btr_cur_update_in_place( update, cmpl_info, thr, mtr, &roll_ptr); if (UNIV_UNLIKELY(err != DB_SUCCESS)) { - - return(err); + /* We may need to update the IBUF_BITMAP_FREE + bits after a reorganize that was done in + btr_cur_update_alloc_zip(). */ + goto func_exit; } if (!(flags & BTR_KEEP_SYS_FLAG)) { @@ -2013,12 +2035,6 @@ btr_cur_update_in_place( rw_lock_x_unlock(&btr_search_latch); } - if (page_zip && !dict_index_is_clust(index) - && page_is_leaf(buf_block_get_frame(block))) { - /* Update the free bits in the insert buffer. */ - ibuf_update_free_bits_zip(block, mtr); - } - btr_cur_update_in_place_log(flags, rec, index, update, trx_id, roll_ptr, mtr); @@ -2032,7 +2048,18 @@ btr_cur_update_in_place( rec, index, offsets, mtr); } - return(DB_SUCCESS); + ut_ad(err == DB_SUCCESS); + +func_exit: + if (page_zip + && !(flags & BTR_KEEP_IBUF_BITMAP) + && !dict_index_is_clust(index) + && page_is_leaf(buf_block_get_frame(block))) { + /* Update the free bits in the insert buffer. */ + ibuf_update_free_bits_zip(block, mtr); + } + + return(err); } /*************************************************************//** @@ -2041,9 +2068,12 @@ holds an x-latch on the page. The operation does not succeed if there is too little space on the page or if the update would result in too empty a page, so that tree compression is recommended. We assume here that the ordering fields of the record do not change. -@return DB_SUCCESS, or DB_OVERFLOW if the updated record does not fit, -DB_UNDERFLOW if the page would become too empty, or DB_ZIP_OVERFLOW if -there is not enough space left on the compressed page */ +@return error code, including +@retval DB_SUCCESS on success +@retval DB_OVERFLOW if the updated record does not fit +@retval DB_UNDERFLOW if the page would become too empty +@retval DB_ZIP_OVERFLOW if there is not enough space left +on the compressed page (IBUF_BITMAP_FREE was reset outside mtr) */ UNIV_INTERN dberr_t btr_cur_optimistic_update( @@ -2053,7 +2083,7 @@ btr_cur_optimistic_update( cursor stays valid and positioned on the same record */ ulint** offsets,/*!< out: offsets on cursor->page_cur.rec */ - mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ + mem_heap_t** heap, /*!< in/out: pointer to NULL or memory heap */ const upd_t* update, /*!< in: update vector; this must also contain trx id and roll ptr fields */ ulint cmpl_info,/*!< in: compiler info on secondary index @@ -2061,8 +2091,10 @@ btr_cur_optimistic_update( que_thr_t* thr, /*!< in: query thread, or NULL if appropriate flags are set */ trx_id_t trx_id, /*!< in: transaction id */ - mtr_t* mtr) /*!< in: mtr; must be committed before - latching any further pages */ + mtr_t* mtr) /*!< in/out: mini-transaction; if this + is a secondary index, the caller must + mtr_commit(mtr) before latching any + further pages */ { dict_index_t* index; page_cur_t* page_cursor; @@ -2089,8 +2121,8 @@ btr_cur_optimistic_update( ut_ad(!dict_index_is_ibuf(index)); ut_ad(dict_index_is_online_ddl(index) == !!(flags & BTR_CREATE_FLAG) || dict_index_is_clust(index)); - ut_ad(!thr || thr_get_trx(thr)->id == trx_id); - ut_ad(thr || (flags & ~BTR_KEEP_POS_FLAG) + ut_ad(thr_get_trx(thr)->id == trx_id + || (flags & ~(BTR_KEEP_POS_FLAG | BTR_KEEP_IBUF_BITMAP)) == (BTR_NO_UNDO_LOG_FLAG | BTR_NO_LOCKING_FLAG | BTR_CREATE_FLAG | BTR_KEEP_SYS_FLAG)); ut_ad(fil_page_get_type(page) == FIL_PAGE_INDEX); @@ -2163,26 +2195,36 @@ any_extern: ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ - if (page_zip - && !btr_cur_update_alloc_zip(page_zip, block, index, - new_rec_size, TRUE, mtr)) { - return(DB_ZIP_OVERFLOW); + if (page_zip) { + if (!btr_cur_update_alloc_zip( + page_zip, page_cursor, index, *offsets, + new_rec_size, true, mtr)) { + return(DB_ZIP_OVERFLOW); + } + + rec = page_cur_get_rec(page_cursor); } if (UNIV_UNLIKELY(new_rec_size >= (page_get_free_space_of_empty(page_is_comp(page)) / 2))) { - - return(DB_OVERFLOW); + /* We may need to update the IBUF_BITMAP_FREE + bits after a reorganize that was done in + btr_cur_update_alloc_zip(). */ + err = DB_OVERFLOW; + goto func_exit; } if (UNIV_UNLIKELY(page_get_data_size(page) - old_rec_size + new_rec_size < BTR_CUR_PAGE_COMPRESS_LIMIT)) { + /* We may need to update the IBUF_BITMAP_FREE + bits after a reorganize that was done in + btr_cur_update_alloc_zip(). */ /* The page would become too empty */ - - return(DB_UNDERFLOW); + err = DB_UNDERFLOW; + goto func_exit; } /* We do not attempt to reorganize if the page is compressed. @@ -2196,11 +2238,16 @@ any_extern: && (max_size >= new_rec_size)) || (page_get_n_recs(page) <= 1))) { + /* We may need to update the IBUF_BITMAP_FREE + bits after a reorganize that was done in + btr_cur_update_alloc_zip(). */ + /* There was not enough space, or it did not pay to reorganize: for simplicity, we decide what to do assuming a reorganization is needed, though it might not be necessary */ - return(DB_OVERFLOW); + err = DB_OVERFLOW; + goto func_exit; } /* Do lock checking and undo logging */ @@ -2208,8 +2255,10 @@ any_extern: update, cmpl_info, thr, mtr, &roll_ptr); if (err != DB_SUCCESS) { - - return(err); + /* We may need to update the IBUF_BITMAP_FREE + bits after a reorganize that was done in + btr_cur_update_alloc_zip(). */ + goto func_exit; } /* Ok, we may do the replacement. Store on the page infimum the @@ -2236,19 +2285,23 @@ any_extern: cursor, new_entry, offsets, heap, 0/*n_ext*/, mtr); ut_a(rec); /* <- We calculated above the insert would fit */ - if (page_zip && !dict_index_is_clust(index) - && page_is_leaf(page)) { - /* Update the free bits in the insert buffer. */ - ibuf_update_free_bits_zip(block, mtr); - } - /* Restore the old explicit lock state on the record */ lock_rec_restore_from_page_infimum(block, rec, block); page_cur_move_to_next(page_cursor); + ut_ad(err == DB_SUCCESS); - return(DB_SUCCESS); +func_exit: + if (page_zip + && !(flags & BTR_KEEP_IBUF_BITMAP) + && !dict_index_is_clust(index) + && page_is_leaf(page)) { + /* Update the free bits in the insert buffer. */ + ibuf_update_free_bits_zip(block, mtr); + } + + return(err); } /*************************************************************//** @@ -2332,8 +2385,8 @@ btr_cur_pessimistic_update( que_thr_t* thr, /*!< in: query thread, or NULL if appropriate flags are set */ trx_id_t trx_id, /*!< in: transaction id */ - mtr_t* mtr) /*!< in: mtr; must be committed before - latching any further pages */ + mtr_t* mtr) /*!< in/out: mini-transaction; must be + committed before latching any further pages */ { big_rec_t* big_rec_vec = NULL; big_rec_t* dummy_big_rec; @@ -2347,8 +2400,7 @@ btr_cur_pessimistic_update( dberr_t optim_err; roll_ptr_t roll_ptr; ibool was_first; - ulint n_extents = 0; - ulint n_reserved; + ulint n_reserved = 0; ulint n_ext; *offsets = NULL; @@ -2357,7 +2409,6 @@ btr_cur_pessimistic_update( block = btr_cur_get_block(cursor); page = buf_block_get_frame(block); page_zip = buf_block_get_page_zip(block); - rec = btr_cur_get_rec(cursor); index = cursor->index; ut_ad(mtr_memo_contains(mtr, dict_index_get_lock(index), @@ -2370,22 +2421,35 @@ btr_cur_pessimistic_update( ut_ad(!dict_index_is_ibuf(index)); ut_ad(dict_index_is_online_ddl(index) == !!(flags & BTR_CREATE_FLAG) || dict_index_is_clust(index)); - ut_ad(!thr || thr_get_trx(thr)->id == trx_id); - ut_ad(thr || (flags & ~BTR_KEEP_POS_FLAG) + ut_ad(thr_get_trx(thr)->id == trx_id + || (flags & ~BTR_KEEP_POS_FLAG) == (BTR_NO_UNDO_LOG_FLAG | BTR_NO_LOCKING_FLAG | BTR_CREATE_FLAG | BTR_KEEP_SYS_FLAG)); - optim_err = btr_cur_optimistic_update( - flags, cursor, offsets, offsets_heap, update, + err = optim_err = btr_cur_optimistic_update( + flags | BTR_KEEP_IBUF_BITMAP, + cursor, offsets, offsets_heap, update, cmpl_info, thr, trx_id, mtr); - switch (optim_err) { + switch (err) { + case DB_ZIP_OVERFLOW: case DB_UNDERFLOW: case DB_OVERFLOW: - case DB_ZIP_OVERFLOW: break; default: - return(optim_err); + err_exit: + /* We suppressed this with BTR_KEEP_IBUF_BITMAP. + For DB_ZIP_OVERFLOW, the IBUF_BITMAP_FREE bits were + already reset by btr_cur_update_alloc_zip() if the + page was recompressed. */ + if (page_zip + && optim_err != DB_ZIP_OVERFLOW + && !dict_index_is_clust(index) + && page_is_leaf(page)) { + ibuf_update_free_bits_zip(block, mtr); + } + + return(err); } /* Do lock checking and undo logging */ @@ -2393,8 +2457,7 @@ btr_cur_pessimistic_update( update, cmpl_info, thr, mtr, &roll_ptr); if (err != DB_SUCCESS) { - - return(err); + goto err_exit; } if (optim_err == DB_OVERFLOW) { @@ -2404,7 +2467,7 @@ btr_cur_pessimistic_update( of the index tree, so that the update will not fail because of lack of space */ - n_extents = cursor->tree_height / 16 + 3; + ulint n_extents = cursor->tree_height / 16 + 3; if (flags & BTR_NO_UNDO_LOG_FLAG) { reserve_flag = FSP_CLEANING; @@ -2414,10 +2477,13 @@ btr_cur_pessimistic_update( if (!fsp_reserve_free_extents(&n_reserved, index->space, n_extents, reserve_flag, mtr)) { - return(DB_OUT_OF_FILE_SPACE); + err = DB_OUT_OF_FILE_SPACE; + goto err_exit; } } + rec = btr_cur_get_rec(cursor); + *offsets = rec_get_offsets( rec, index, *offsets, ULINT_UNDEFINED, offsets_heap); @@ -2479,8 +2545,21 @@ make_external: big_rec_vec = dtuple_convert_big_rec(index, new_entry, &n_ext); if (UNIV_UNLIKELY(big_rec_vec == NULL)) { + /* We cannot goto return_after_reservations, + because we may need to update the + IBUF_BITMAP_FREE bits, which was suppressed by + BTR_KEEP_IBUF_BITMAP. */ +#ifdef UNIV_ZIP_DEBUG + ut_a(!page_zip + || page_zip_validate(page_zip, page, index)); +#endif /* UNIV_ZIP_DEBUG */ + if (n_reserved > 0) { + fil_space_release_free_extents( + index->space, n_reserved); + } + err = DB_TOO_BIG_RECORD; - goto return_after_reservations; + goto err_exit; } ut_ad(page_is_leaf(page)); @@ -2528,14 +2607,17 @@ make_external: bool adjust = big_rec_vec && (flags & BTR_KEEP_POS_FLAG); - if (btr_cur_compress_if_useful(cursor, adjust, mtr) - && adjust) { - rec_offs_make_valid(page_cursor->rec, index, *offsets); - } - - if (page_zip && !dict_index_is_clust(index) - && page_is_leaf(page)) { - /* Update the free bits in the insert buffer. */ + if (btr_cur_compress_if_useful(cursor, adjust, mtr)) { + if (adjust) { + rec_offs_make_valid( + page_cursor->rec, index, *offsets); + } + } else if (page_zip && + !dict_index_is_clust(index) + && page_is_leaf(page)) { + /* Update the free bits in the insert buffer. + This is the same block which was skipped by + BTR_KEEP_IBUF_BITMAP. */ ibuf_update_free_bits_zip(block, mtr); } @@ -2549,7 +2631,9 @@ make_external: btr_cur_insert_if_possible() to return FALSE. */ ut_a(page_zip || optim_err != DB_UNDERFLOW); - /* Out of space: reset the free bits. */ + /* Out of space: reset the free bits. + This is the same block which was skipped by + BTR_KEEP_IBUF_BITMAP. */ if (!dict_index_is_clust(index) && page_is_leaf(page)) { ibuf_reset_free_bits(block); } @@ -2637,7 +2721,7 @@ return_after_reservations: ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ - if (n_extents > 0) { + if (n_reserved > 0) { fil_space_release_free_extents(index->space, n_reserved); } @@ -2786,7 +2870,7 @@ btr_cur_del_mark_set_clust_rec( dict_index_t* index, /*!< in: clustered index of the record */ const ulint* offsets,/*!< in: rec_get_offsets(rec) */ que_thr_t* thr, /*!< in: query thread */ - mtr_t* mtr) /*!< in: mtr */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { roll_ptr_t roll_ptr; dberr_t err; @@ -2838,7 +2922,7 @@ btr_cur_del_mark_set_clust_rec( if (dict_index_is_online_ddl(index)) { row_log_table_delete( - rec, index, offsets, + rec, index, offsets, false, trx_read_trx_id(row_get_trx_id_offset(index, offsets) + rec)); } @@ -2941,7 +3025,7 @@ btr_cur_del_mark_set_sec_rec( btr_cur_t* cursor, /*!< in: cursor */ ibool val, /*!< in: value to set */ que_thr_t* thr, /*!< in: query thread */ - mtr_t* mtr) /*!< in: mtr */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { buf_block_t* block; rec_t* rec; @@ -3088,38 +3172,42 @@ btr_cur_optimistic_delete_func( page_t* page = buf_block_get_frame(block); page_zip_des_t* page_zip= buf_block_get_page_zip(block); - ulint max_ins = 0; lock_update_delete(block, rec); btr_search_update_hash_on_delete(cursor); - if (!page_zip) { - max_ins = page_get_max_insert_size_after_reorganize( - page, 1); - } + if (page_zip) { #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip - || page_zip_validate(page_zip, page, cursor->index)); + ut_a(page_zip_validate(page_zip, page, cursor->index)); #endif /* UNIV_ZIP_DEBUG */ - page_cur_delete_rec(btr_cur_get_page_cur(cursor), - cursor->index, offsets, mtr); + page_cur_delete_rec(btr_cur_get_page_cur(cursor), + cursor->index, offsets, mtr); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip - || page_zip_validate(page_zip, page, cursor->index)); + ut_a(page_zip_validate(page_zip, page, cursor->index)); #endif /* UNIV_ZIP_DEBUG */ - if (dict_index_is_clust(cursor->index) - || dict_index_is_ibuf(cursor->index) - || !page_is_leaf(page)) { - /* The insert buffer does not handle - inserts to clustered indexes, to - non-leaf pages of secondary index B-trees, - or to the insert buffer. */ - } else if (page_zip) { - ibuf_update_free_bits_zip(block, mtr); + /* On compressed pages, the IBUF_BITMAP_FREE + space is not affected by deleting (purging) + records, because it is defined as the minimum + of space available *without* reorganize, and + space available in the modification log. */ } else { - ibuf_update_free_bits_low(block, max_ins, mtr); + const ulint max_ins + = page_get_max_insert_size_after_reorganize( + page, 1); + + page_cur_delete_rec(btr_cur_get_page_cur(cursor), + cursor->index, offsets, mtr); + + /* The change buffer does not handle inserts + into non-leaf pages, into clustered indexes, + or into the change buffer. */ + if (page_is_leaf(page) + && !dict_index_is_clust(cursor->index) + && !dict_index_is_ibuf(cursor->index)) { + ibuf_update_free_bits_low(block, max_ins, mtr); + } } } @@ -3164,8 +3252,7 @@ btr_cur_pessimistic_delete( page_zip_des_t* page_zip; dict_index_t* index; rec_t* rec; - ulint n_extents = 0; - ulint n_reserved; + ulint n_reserved = 0; ibool success; ibool ret = FALSE; ulint level; @@ -3188,7 +3275,7 @@ btr_cur_pessimistic_delete( of the index tree, so that the node pointer updates will not fail because of lack of space */ - n_extents = cursor->tree_height / 32 + 1; + ulint n_extents = cursor->tree_height / 32 + 1; success = fsp_reserve_free_extents(&n_reserved, index->space, @@ -3292,7 +3379,7 @@ return_after_reservations: ret = btr_cur_compress_if_useful(cursor, FALSE, mtr); } - if (n_extents > 0) { + if (n_reserved > 0) { fil_space_release_free_extents(index->space, n_reserved); } @@ -4250,12 +4337,12 @@ btr_blob_free( && buf_block_get_space(block) == space && buf_block_get_page_no(block) == page_no) { - if (!buf_LRU_free_block(&block->page, all) + if (!buf_LRU_free_page(&block->page, all) && all && block->page.zip.data) { /* Attempt to deallocate the uncompressed page if the whole block cannot be deallocted. */ - buf_LRU_free_block(&block->page, FALSE); + buf_LRU_free_page(&block->page, false); } } @@ -4334,7 +4421,7 @@ btr_store_big_rec_extern_fields( heap = mem_heap_create(250000); page_zip_set_alloc(&c_stream, heap); - err = deflateInit2(&c_stream, page_compression_level, + err = deflateInit2(&c_stream, page_zip_level, Z_DEFLATED, 15, 7, Z_DEFAULT_STRATEGY); ut_a(err == Z_OK); } @@ -4485,6 +4572,8 @@ alloc_another: page_no, MLOG_4BYTES, &mtr); } + } else if (dict_index_is_online_ddl(index)) { + row_log_table_blob_alloc(index, page_no); } if (page_zip) { @@ -4728,6 +4817,10 @@ func_exit: for (i = 0; i < n_freed_pages; i++) { btr_page_free_low(index, freed_pages[i], 0, alloc_mtr); } + + DBUG_EXECUTE_IF("btr_store_big_rec_extern", + error = DB_OUT_OF_FILE_SPACE; + goto func_exit;); } if (heap != NULL) { @@ -4827,13 +4920,17 @@ btr_free_externally_stored_field( X-latch to the index tree */ { page_t* page; - ulint space_id; + const ulint space_id = mach_read_from_4( + field_ref + BTR_EXTERN_SPACE_ID); + const ulint start_page = mach_read_from_4( + field_ref + BTR_EXTERN_PAGE_NO); ulint rec_zip_size = dict_table_zip_size(index->table); ulint ext_zip_size; ulint page_no; ulint next_page_no; mtr_t mtr; + ut_ad(dict_index_is_clust(index)); ut_ad(mtr_memo_contains(local_mtr, dict_index_get_lock(index), MTR_MEMO_X_LOCK)); ut_ad(mtr_memo_contains_page(local_mtr, field_ref, @@ -4850,7 +4947,7 @@ btr_free_externally_stored_field( return; } - space_id = mach_read_from_4(field_ref + BTR_EXTERN_SPACE_ID); + ut_ad(space_id == index->space); if (UNIV_UNLIKELY(space_id != dict_index_get_space(index))) { ext_zip_size = fil_space_get_zip_size(space_id); @@ -4880,8 +4977,7 @@ btr_free_externally_stored_field( btr_blob_dbg_t b; - b.blob_page_no = mach_read_from_4( - field_ref + BTR_EXTERN_PAGE_NO); + b.blob_page_no = start_page; if (rec) { /* Remove the reference from the record to the @@ -4936,6 +5032,10 @@ btr_free_externally_stored_field( return; } + if (page_no == start_page && dict_index_is_online_ddl(index)) { + row_log_table_blob_free(index, start_page); + } + ext_block = buf_page_get(space_id, ext_zip_size, page_no, RW_X_LATCH, &mtr); buf_block_dbg_add_level(ext_block, SYNC_EXTERN_STORAGE); diff --git a/storage/innobase/btr/btr0pcur.cc b/storage/innobase/btr/btr0pcur.cc index aceb6bd1d41..82a2b6dbf6b 100644 --- a/storage/innobase/btr/btr0pcur.cc +++ b/storage/innobase/btr/btr0pcur.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -110,7 +110,7 @@ btr_pcur_store_position( page_t* page; ulint offs; - ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); block = btr_pcur_get_block(cursor); @@ -124,9 +124,8 @@ btr_pcur_store_position( ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_S_FIX) || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); - ut_a(cursor->latch_mode != BTR_NO_LATCHES); - if (UNIV_UNLIKELY(page_get_n_recs(page) == 0)) { + if (page_is_empty(page)) { /* It must be an empty index tree; NOTE that in this case we do not store the modify_clock, but always do a search if we restore the cursor position */ @@ -236,21 +235,12 @@ btr_pcur_restore_position_func( ut_ad(mtr); ut_ad(mtr->state == MTR_ACTIVE); + ut_ad(cursor->old_stored == BTR_PCUR_OLD_STORED); + ut_ad(cursor->pos_state == BTR_PCUR_WAS_POSITIONED + || cursor->pos_state == BTR_PCUR_IS_POSITIONED); index = btr_cur_get_index(btr_pcur_get_btr_cur(cursor)); - if (UNIV_UNLIKELY(cursor->old_stored != BTR_PCUR_OLD_STORED) - || UNIV_UNLIKELY(cursor->pos_state != BTR_PCUR_WAS_POSITIONED - && cursor->pos_state != BTR_PCUR_IS_POSITIONED)) { - ut_print_buf(stderr, cursor, sizeof(btr_pcur_t)); - putc('\n', stderr); - if (cursor->trx_if_known) { - trx_print(stderr, cursor->trx_if_known, 0); - } - - ut_error; - } - if (UNIV_UNLIKELY (cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE || cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE)) { @@ -275,14 +265,14 @@ btr_pcur_restore_position_func( if (UNIV_LIKELY(latch_mode == BTR_SEARCH_LEAF) || UNIV_LIKELY(latch_mode == BTR_MODIFY_LEAF)) { - /* Try optimistic restoration */ + /* Try optimistic restoration. */ - if (UNIV_LIKELY(buf_page_optimistic_get( - latch_mode, - cursor->block_when_stored, - cursor->modify_clock, - file, line, mtr))) { + if (buf_page_optimistic_get(latch_mode, + cursor->block_when_stored, + cursor->modify_clock, + file, line, mtr)) { cursor->pos_state = BTR_PCUR_IS_POSITIONED; + cursor->latch_mode = latch_mode; buf_block_dbg_add_level( btr_pcur_get_block(cursor), @@ -294,9 +284,6 @@ btr_pcur_restore_position_func( const rec_t* rec; const ulint* offsets1; const ulint* offsets2; -#endif /* UNIV_DEBUG */ - cursor->latch_mode = latch_mode; -#ifdef UNIV_DEBUG rec = btr_pcur_get_rec(cursor); heap = mem_heap_create(256); @@ -314,7 +301,13 @@ btr_pcur_restore_position_func( #endif /* UNIV_DEBUG */ return(TRUE); } - + /* This is the same record as stored, + may need to be adjusted for BTR_PCUR_BEFORE/AFTER, + depending on search mode and direction. */ + if (btr_pcur_is_on_user_rec(cursor)) { + cursor->pos_state + = BTR_PCUR_IS_POSITIONED_OPTIMISTIC; + } return(FALSE); } } @@ -416,7 +409,7 @@ btr_pcur_move_to_next_page( buf_block_t* next_block; page_t* next_page; - ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); ut_ad(btr_pcur_is_after_last_on_page(cursor)); @@ -471,7 +464,6 @@ btr_pcur_move_backward_from_page( ulint latch_mode; ulint latch_mode2; - ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); ut_ad(btr_pcur_is_before_first_on_page(cursor)); ut_ad(!btr_pcur_is_before_first_in_tree(cursor, mtr)); diff --git a/storage/innobase/buf/buf0buddy.cc b/storage/innobase/buf/buf0buddy.cc index e34216dbc8f..ee400fcdf23 100644 --- a/storage/innobase/buf/buf0buddy.cc +++ b/storage/innobase/buf/buf0buddy.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2006, 2013, 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 @@ -33,12 +33,128 @@ Created December 2006 by Marko Makela #include "buf0lru.h" #include "buf0flu.h" #include "page0zip.h" +#include "srv0start.h" + +/** When freeing a buf we attempt to coalesce by looking at its buddy +and deciding whether it is free or not. To ascertain if the buddy is +free we look for BUF_BUDDY_STAMP_FREE at BUF_BUDDY_STAMP_OFFSET +within the buddy. The question is how we can be sure that it is +safe to look at BUF_BUDDY_STAMP_OFFSET. +The answer lies in following invariants: +* All blocks allocated by buddy allocator are used for compressed +page frame. +* A compressed table always have space_id < SRV_LOG_SPACE_FIRST_ID +* BUF_BUDDY_STAMP_OFFSET always points to the space_id field in +a frame. + -- The above is true because we look at these fields when the + corresponding buddy block is free which implies that: + * The block we are looking at must have an address aligned at + the same size that its free buddy has. For example, if we have + a free block of 8K then its buddy's address must be aligned at + 8K as well. + * It is possible that the block we are looking at may have been + further divided into smaller sized blocks but its starting + address must still remain the start of a page frame i.e.: it + cannot be middle of a block. For example, if we have a free + block of size 8K then its buddy may be divided into blocks + of, say, 1K, 1K, 2K, 4K but the buddy's address will still be + the starting address of first 1K compressed page. + * What is important to note is that for any given block, the + buddy's address cannot be in the middle of a larger block i.e.: + in above example, our 8K block cannot have a buddy whose address + is aligned on 8K but it is part of a larger 16K block. +*/ + +/** Offset within buf_buddy_free_t where free or non_free stamps +are written.*/ +#define BUF_BUDDY_STAMP_OFFSET FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID + +/** Value that we stamp on all buffers that are currently on the zip_free +list. This value is stamped at BUF_BUDDY_STAMP_OFFSET offset */ +#define BUF_BUDDY_STAMP_FREE (SRV_LOG_SPACE_FIRST_ID) + +/** Stamp value for non-free buffers. Will be overwritten by a non-zero +value by the consumer of the block */ +#define BUF_BUDDY_STAMP_NONFREE (0XFFFFFFFF) + +#if BUF_BUDDY_STAMP_FREE >= BUF_BUDDY_STAMP_NONFREE +# error "BUF_BUDDY_STAMP_FREE >= BUF_BUDDY_STAMP_NONFREE" +#endif + +/** Return type of buf_buddy_is_free() */ +enum buf_buddy_state_t { + BUF_BUDDY_STATE_FREE, /*!< If the buddy to completely free */ + BUF_BUDDY_STATE_USED, /*!< Buddy currently in used */ + BUF_BUDDY_STATE_PARTIALLY_USED/*!< Some sub-blocks in the buddy + are in use */ +}; + +#ifdef UNIV_DEBUG_VALGRIND +/**********************************************************************//** +Invalidate memory area that we won't access while page is free */ +UNIV_INLINE +void +buf_buddy_mem_invalid( +/*==================*/ + buf_buddy_free_t* buf, /*!< in: block to check */ + ulint i) /*!< in: index of zip_free[] */ +{ + const size_t size = BUF_BUDDY_LOW << i; + ut_ad(i <= BUF_BUDDY_SIZES); + + UNIV_MEM_ASSERT_W(buf, size); + UNIV_MEM_INVALID(buf, size); +} +#else /* UNIV_DEBUG_VALGRIND */ +# define buf_buddy_mem_invalid(buf, i) ut_ad((i) <= BUF_BUDDY_SIZES) +#endif /* UNIV_DEBUG_VALGRIND */ + +/**********************************************************************//** +Check if a buddy is stamped free. +@return whether the buddy is free */ +UNIV_INLINE __attribute__((warn_unused_result)) +bool +buf_buddy_stamp_is_free( +/*====================*/ + const buf_buddy_free_t* buf) /*!< in: block to check */ +{ + return(mach_read_from_4(buf->stamp.bytes + BUF_BUDDY_STAMP_OFFSET) + == BUF_BUDDY_STAMP_FREE); +} + +/**********************************************************************//** +Stamps a buddy free. */ +UNIV_INLINE +void +buf_buddy_stamp_free( +/*=================*/ + buf_buddy_free_t* buf, /*!< in/out: block to stamp */ + ulint i) /*!< in: block size */ +{ + ut_d(memset(buf, i, BUF_BUDDY_LOW << i)); + buf_buddy_mem_invalid(buf, i); + mach_write_to_4(buf->stamp.bytes + BUF_BUDDY_STAMP_OFFSET, + BUF_BUDDY_STAMP_FREE); + buf->stamp.size = i; +} + +/**********************************************************************//** +Stamps a buddy nonfree. +@param[in/out] buf block to stamp +@param[in] i block size */ +#define buf_buddy_stamp_nonfree(buf, i) do { \ + buf_buddy_mem_invalid(buf, i); \ + memset(buf->stamp.bytes + BUF_BUDDY_STAMP_OFFSET, 0xff, 4); \ +} while (0) +#if BUF_BUDDY_STAMP_NONFREE != 0xffffffff +# error "BUF_BUDDY_STAMP_NONFREE != 0xffffffff" +#endif /**********************************************************************//** Get the offset of the buddy of a compressed page frame. @return the buddy relative of page */ UNIV_INLINE -byte* +void* buf_buddy_get( /*==========*/ byte* page, /*!< in: compressed page */ @@ -60,14 +176,96 @@ buf_buddy_get( /** Validate a given zip_free list. */ struct CheckZipFree { - void operator()(const buf_page_t* elem) const + ulint i; + CheckZipFree(ulint i) : i (i) {} + + void operator()(const buf_buddy_free_t* elem) const { - ut_a(buf_page_get_state(elem) == BUF_BLOCK_ZIP_FREE); + ut_a(buf_buddy_stamp_is_free(elem)); + ut_a(elem->stamp.size <= i); } }; #define BUF_BUDDY_LIST_VALIDATE(bp, i) \ - UT_LIST_VALIDATE(list, buf_page_t, bp->zip_free[i], CheckZipFree()) + UT_LIST_VALIDATE(list, buf_buddy_free_t, \ + bp->zip_free[i], CheckZipFree(i)) + +#ifdef UNIV_DEBUG +/**********************************************************************//** +Debug function to validate that a buffer is indeed free i.e.: in the +zip_free[]. +@return true if free */ +UNIV_INLINE +bool +buf_buddy_check_free( +/*=================*/ + buf_pool_t* buf_pool,/*!< in: buffer pool instance */ + const buf_buddy_free_t* buf, /*!< in: block to check */ + ulint i) /*!< in: index of buf_pool->zip_free[] */ +{ + const ulint size = BUF_BUDDY_LOW << i; + + ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(!ut_align_offset(buf, size)); + ut_ad(i >= buf_buddy_get_slot(UNIV_ZIP_SIZE_MIN)); + + buf_buddy_free_t* itr; + + for (itr = UT_LIST_GET_FIRST(buf_pool->zip_free[i]); + itr && itr != buf; + itr = UT_LIST_GET_NEXT(list, itr)) { + } + + return(itr == buf); +} +#endif /* UNIV_DEBUG */ + +/**********************************************************************//** +Checks if a buf is free i.e.: in the zip_free[]. +@retval BUF_BUDDY_STATE_FREE if fully free +@retval BUF_BUDDY_STATE_USED if currently in use +@retval BUF_BUDDY_STATE_PARTIALLY_USED if partially in use. */ +static __attribute__((warn_unused_result)) +buf_buddy_state_t +buf_buddy_is_free( +/*==============*/ + buf_buddy_free_t* buf, /*!< in: block to check */ + ulint i) /*!< in: index of + buf_pool->zip_free[] */ +{ +#ifdef UNIV_DEBUG + const ulint size = BUF_BUDDY_LOW << i; + ut_ad(!ut_align_offset(buf, size)); + ut_ad(i >= buf_buddy_get_slot(UNIV_ZIP_SIZE_MIN)); +#endif /* UNIV_DEBUG */ + + /* We assume that all memory from buf_buddy_alloc() + is used for compressed page frames. */ + + /* We look inside the allocated objects returned by + buf_buddy_alloc() and assume that each block is a compressed + page that contains one of the following in space_id. + * BUF_BUDDY_STAMP_FREE if the block is in a zip_free list or + * BUF_BUDDY_STAMP_NONFREE if the block has been allocated but + not initialized yet or + * A valid space_id of a compressed tablespace + + The call below attempts to read from free memory. The memory + is "owned" by the buddy allocator (and it has been allocated + from the buffer pool), so there is nothing wrong about this. */ + if (!buf_buddy_stamp_is_free(buf)) { + return(BUF_BUDDY_STATE_USED); + } + + /* A block may be free but a fragment of it may still be in use. + To guard against that we write the free block size in terms of + zip_free index at start of stamped block. Note that we can + safely rely on this value only if the buf is free. */ + ut_ad(buf->stamp.size <= i); + return(buf->stamp.size == i + ? BUF_BUDDY_STATE_FREE + : BUF_BUDDY_STATE_PARTIALLY_USED); +} /**********************************************************************//** Add a block to the head of the appropriate buddy free list. */ @@ -75,15 +273,17 @@ UNIV_INLINE void buf_buddy_add_to_free( /*==================*/ - buf_pool_t* buf_pool, /*!< in: buffer pool instance */ - buf_page_t* bpage, /*!< in,own: block to be freed */ - ulint i) /*!< in: index of - buf_pool->zip_free[] */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + buf_buddy_free_t* buf, /*!< in,own: block to be freed */ + ulint i) /*!< in: index of + buf_pool->zip_free[] */ { ut_ad(buf_pool_mutex_own(buf_pool)); - ut_ad(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_FREE); - ut_ad(buf_pool->zip_free[i].start != bpage); - UT_LIST_ADD_FIRST(list, buf_pool->zip_free[i], bpage); + ut_ad(buf_pool->zip_free[i].start != buf); + + buf_buddy_stamp_free(buf, i); + UT_LIST_ADD_FIRST(list, buf_pool->zip_free[i], buf); + ut_d(BUF_BUDDY_LIST_VALIDATE(buf_pool, i)); } /**********************************************************************//** @@ -92,35 +292,29 @@ UNIV_INLINE void buf_buddy_remove_from_free( /*=======================*/ - buf_pool_t* buf_pool, /*!< in: buffer pool instance */ - buf_page_t* bpage, /*!< in: block to be removed */ - ulint i) /*!< in: index of - buf_pool->zip_free[] */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + buf_buddy_free_t* buf, /*!< in,own: block to be freed */ + ulint i) /*!< in: index of + buf_pool->zip_free[] */ { -#ifdef UNIV_DEBUG - buf_page_t* prev = UT_LIST_GET_PREV(list, bpage); - buf_page_t* next = UT_LIST_GET_NEXT(list, bpage); - - ut_ad(!prev || buf_page_get_state(prev) == BUF_BLOCK_ZIP_FREE); - ut_ad(!next || buf_page_get_state(next) == BUF_BLOCK_ZIP_FREE); -#endif /* UNIV_DEBUG */ - ut_ad(buf_pool_mutex_own(buf_pool)); - ut_ad(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_FREE); - UT_LIST_REMOVE(list, buf_pool->zip_free[i], bpage); + ut_ad(buf_buddy_check_free(buf_pool, buf, i)); + + UT_LIST_REMOVE(list, buf_pool->zip_free[i], buf); + buf_buddy_stamp_nonfree(buf, i); } /**********************************************************************//** Try to allocate a block from buf_pool->zip_free[]. @return allocated block, or NULL if buf_pool->zip_free[] was empty */ static -void* +buf_buddy_free_t* buf_buddy_alloc_zip( /*================*/ buf_pool_t* buf_pool, /*!< in: buffer pool instance */ ulint i) /*!< in: index of buf_pool->zip_free[] */ { - buf_page_t* bpage; + buf_buddy_free_t* buf; ut_ad(buf_pool_mutex_own(buf_pool)); ut_a(i < BUF_BUDDY_SIZES); @@ -128,33 +322,38 @@ buf_buddy_alloc_zip( ut_d(BUF_BUDDY_LIST_VALIDATE(buf_pool, i)); - bpage = UT_LIST_GET_FIRST(buf_pool->zip_free[i]); - - if (bpage) { - ut_a(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_FREE); + buf = UT_LIST_GET_FIRST(buf_pool->zip_free[i]); - buf_buddy_remove_from_free(buf_pool, bpage, i); + if (buf) { + buf_buddy_remove_from_free(buf_pool, buf, i); } else if (i + 1 < BUF_BUDDY_SIZES) { /* Attempt to split. */ - bpage = (buf_page_t*) buf_buddy_alloc_zip(buf_pool, i + 1); + buf = buf_buddy_alloc_zip(buf_pool, i + 1); - if (bpage) { - buf_page_t* buddy = (buf_page_t*) - (((char*) bpage) + (BUF_BUDDY_LOW << i)); + if (buf) { + buf_buddy_free_t* buddy = + reinterpret_cast<buf_buddy_free_t*>( + buf->stamp.bytes + + (BUF_BUDDY_LOW << i)); ut_ad(!buf_pool_contains_zip(buf_pool, buddy)); - ut_d(memset(buddy, i, BUF_BUDDY_LOW << i)); - buddy->state = BUF_BLOCK_ZIP_FREE; buf_buddy_add_to_free(buf_pool, buddy, i); } } - if (bpage) { - ut_d(memset(bpage, ~i, BUF_BUDDY_LOW << i)); - UNIV_MEM_ALLOC(bpage, BUF_BUDDY_SIZES << i); + if (buf) { + /* Trash the page other than the BUF_BUDDY_STAMP_NONFREE. */ + UNIV_MEM_TRASH(buf, ~i, BUF_BUDDY_STAMP_OFFSET); + UNIV_MEM_TRASH(BUF_BUDDY_STAMP_OFFSET + 4 + + buf->stamp.bytes, ~i, + (BUF_BUDDY_LOW << i) + - (BUF_BUDDY_STAMP_OFFSET + 4)); + ut_ad(mach_read_from_4(buf->stamp.bytes + + BUF_BUDDY_STAMP_OFFSET) + == BUF_BUDDY_STAMP_NONFREE); } - return(bpage); + return(buf); } /**********************************************************************//** @@ -246,18 +445,17 @@ buf_buddy_alloc_from( /* Add the unused parts of the block to the free lists. */ while (j > i) { - buf_page_t* bpage; + buf_buddy_free_t* zip_buf; offs >>= 1; j--; - bpage = (buf_page_t*) ((byte*) buf + offs); - ut_d(memset(bpage, j, BUF_BUDDY_LOW << j)); - bpage->state = BUF_BLOCK_ZIP_FREE; - ut_d(BUF_BUDDY_LIST_VALIDATE(buf_pool, i)); - buf_buddy_add_to_free(buf_pool, bpage, j); + zip_buf = reinterpret_cast<buf_buddy_free_t*>( + reinterpret_cast<byte*>(buf) + offs); + buf_buddy_add_to_free(buf_pool, zip_buf, j); } + buf_buddy_stamp_nonfree(reinterpret_cast<buf_buddy_free_t*>(buf), i); return(buf); } @@ -322,9 +520,9 @@ func_exit: /**********************************************************************//** Try to relocate a block. -@return TRUE if relocated */ +@return true if relocated */ static -ibool +bool buf_buddy_relocate( /*===============*/ buf_pool_t* buf_pool, /*!< in: buffer pool instance */ @@ -337,7 +535,7 @@ buf_buddy_relocate( const ulint size = BUF_BUDDY_LOW << i; ib_mutex_t* mutex; ulint space; - ulint page_no; + ulint offset; ut_ad(buf_pool_mutex_own(buf_pool)); ut_ad(!mutex_own(&buf_pool->zip_mutex)); @@ -346,32 +544,19 @@ buf_buddy_relocate( ut_ad(i >= buf_buddy_get_slot(UNIV_ZIP_SIZE_MIN)); UNIV_MEM_ASSERT_W(dst, size); - /* We assume that all memory from buf_buddy_alloc() - is used for compressed page frames. */ - - /* We look inside the allocated objects returned by - buf_buddy_alloc() and assume that each block is a compressed - page that contains a valid space_id and page_no in the page - header. Should the fields be invalid, we will be unable to - relocate the block. */ - - /* The src block may be split into smaller blocks, - some of which may be free. Thus, the - mach_read_from_4() calls below may attempt to read - from free memory. The memory is "owned" by the buddy - allocator (and it has been allocated from the buffer - pool), so there is nothing wrong about this. The - mach_read_from_4() calls here will only trigger bogus - Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */ space = mach_read_from_4((const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); - page_no = mach_read_from_4((const byte*) src + offset = mach_read_from_4((const byte*) src + FIL_PAGE_OFFSET); + /* Suppress Valgrind warnings about conditional jump on uninitialized value. */ UNIV_MEM_VALID(&space, sizeof space); - UNIV_MEM_VALID(&page_no, sizeof page_no); - bpage = buf_page_hash_get(buf_pool, space, page_no); + UNIV_MEM_VALID(&offset, sizeof offset); + + ut_ad(space != BUF_BUDDY_STAMP_FREE); + + bpage = buf_page_hash_get(buf_pool, space, offset); if (!bpage || bpage->zip.data != src) { /* The block has probably been freshly @@ -379,7 +564,7 @@ buf_buddy_relocate( added to buf_pool->page_hash yet. Obviously, it cannot be relocated. */ - return(FALSE); + return(false); } if (page_zip_get_size(&bpage->zip) != size) { @@ -388,7 +573,7 @@ buf_buddy_relocate( For the sake of simplicity, give up. */ ut_ad(page_zip_get_size(&bpage->zip) < size); - return(FALSE); + return(false); } /* The block must have been allocated, but it may @@ -406,19 +591,17 @@ buf_buddy_relocate( memcpy(dst, src, size); bpage->zip.data = (page_zip_t*) dst; mutex_exit(mutex); - UNIV_MEM_INVALID(src, size); - { - buf_buddy_stat_t* buddy_stat - = &buf_pool->buddy_stat[i]; - buddy_stat->relocated++; - buddy_stat->relocated_usec - += ut_time_us(NULL) - usec; - } - return(TRUE); + buf_buddy_mem_invalid( + reinterpret_cast<buf_buddy_free_t*>(src), i); + + buf_buddy_stat_t* buddy_stat = &buf_pool->buddy_stat[i]; + buddy_stat->relocated++; + buddy_stat->relocated_usec += ut_time_us(NULL) - usec; + return(true); } mutex_exit(mutex); - return(FALSE); + return(false); } /**********************************************************************//** @@ -433,8 +616,7 @@ buf_buddy_free_low( ulint i) /*!< in: index of buf_pool->zip_free[], or BUF_BUDDY_SIZES */ { - buf_page_t* bpage; - buf_page_t* buddy; + buf_buddy_free_t* buddy; ut_ad(buf_pool_mutex_own(buf_pool)); ut_ad(!mutex_own(&buf_pool->zip_mutex)); @@ -445,7 +627,6 @@ buf_buddy_free_low( buf_pool->buddy_stat[i].used--; recombine: UNIV_MEM_ASSERT_AND_ALLOC(buf, BUF_BUDDY_LOW << i); - ((buf_page_t*) buf)->state = BUF_BLOCK_ZIP_FREE; if (i == BUF_BUDDY_SIZES) { buf_buddy_block_free(buf_pool, buf); @@ -464,73 +645,54 @@ recombine: } /* Try to combine adjacent blocks. */ - buddy = (buf_page_t*) buf_buddy_get(((byte*) buf), BUF_BUDDY_LOW << i); - -#ifndef UNIV_DEBUG_VALGRIND - /* When Valgrind instrumentation is not enabled, we can read - buddy->state to quickly determine that a block is not free. - When the block is not free, buddy->state belongs to a compressed - page frame that may be flagged uninitialized in our Valgrind - instrumentation. */ - - if (buddy->state != BUF_BLOCK_ZIP_FREE) { - - goto buddy_nonfree; - } -#endif /* !UNIV_DEBUG_VALGRIND */ - - for (bpage = UT_LIST_GET_FIRST(buf_pool->zip_free[i]); bpage; ) { - ut_ad(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_FREE); - - if (bpage == buddy) { - /* The buddy is free: recombine */ - buf_buddy_remove_from_free(buf_pool, bpage, i); + buddy = reinterpret_cast<buf_buddy_free_t*>( + buf_buddy_get(reinterpret_cast<byte*>(buf), + BUF_BUDDY_LOW << i)); + + switch (buf_buddy_is_free(buddy, i)) { + case BUF_BUDDY_STATE_FREE: + /* The buddy is free: recombine */ + buf_buddy_remove_from_free(buf_pool, buddy, i); buddy_is_free: - ut_ad(buf_page_get_state(buddy) == BUF_BLOCK_ZIP_FREE); - ut_ad(!buf_pool_contains_zip(buf_pool, buddy)); - i++; - buf = ut_align_down(buf, BUF_BUDDY_LOW << i); + ut_ad(!buf_pool_contains_zip(buf_pool, buddy)); + i++; + buf = ut_align_down(buf, BUF_BUDDY_LOW << i); - goto recombine; - } + goto recombine; - ut_a(bpage != buf); - UNIV_MEM_ASSERT_W(bpage, BUF_BUDDY_LOW << i); - bpage = UT_LIST_GET_NEXT(list, bpage); - } - -#ifndef UNIV_DEBUG_VALGRIND -buddy_nonfree: -#endif /* !UNIV_DEBUG_VALGRIND */ - - ut_d(BUF_BUDDY_LIST_VALIDATE(buf_pool, i)); + case BUF_BUDDY_STATE_USED: + ut_d(BUF_BUDDY_LIST_VALIDATE(buf_pool, i)); - /* The buddy is not free. Is there a free block of this size? */ - bpage = UT_LIST_GET_FIRST(buf_pool->zip_free[i]); + /* The buddy is not free. Is there a free block of + this size? */ + if (buf_buddy_free_t* zip_buf = + UT_LIST_GET_FIRST(buf_pool->zip_free[i])) { - if (bpage) { + /* Remove the block from the free list, because + a successful buf_buddy_relocate() will overwrite + zip_free->list. */ + buf_buddy_remove_from_free(buf_pool, zip_buf, i); - /* Remove the block from the free list, because a successful - buf_buddy_relocate() will overwrite bpage->list. */ - buf_buddy_remove_from_free(buf_pool, bpage, i); + /* Try to relocate the buddy of buf to the free + block. */ + if (buf_buddy_relocate(buf_pool, buddy, zip_buf, i)) { - /* Try to relocate the buddy of buf to the free block. */ - if (buf_buddy_relocate(buf_pool, buddy, bpage, i)) { + goto buddy_is_free; + } - buddy->state = BUF_BLOCK_ZIP_FREE; - goto buddy_is_free; + buf_buddy_add_to_free(buf_pool, zip_buf, i); } - buf_buddy_add_to_free(buf_pool, bpage, i); + break; + case BUF_BUDDY_STATE_PARTIALLY_USED: + /* Some sub-blocks in the buddy are still in use. + Relocation will fail. No need to try. */ + break; } func_exit: /* Free the block to the buddy list. */ - bpage = (buf_page_t*) buf; - - /* Fill large blocks with a constant pattern. */ - ut_d(memset(bpage, i, BUF_BUDDY_LOW << i)); - UNIV_MEM_INVALID(bpage, BUF_BUDDY_LOW << i); - bpage->state = BUF_BLOCK_ZIP_FREE; - buf_buddy_add_to_free(buf_pool, bpage, i); + buf_buddy_add_to_free(buf_pool, + reinterpret_cast<buf_buddy_free_t*>(buf), + i); } diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 913f0a40ef4..a8e833b5fa3 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -496,14 +496,13 @@ buf_page_is_corrupted( } #ifndef UNIV_HOTBACKUP - if (recv_lsn_checks_on) { + if (check_lsn && recv_lsn_checks_on) { lsn_t current_lsn; /* Since we are going to reset the page LSN during the import phase it makes no sense to spam the log with error messages. */ - if (check_lsn - && log_peek_lsn(¤t_lsn) + if (log_peek_lsn(¤t_lsn) && current_lsn < mach_read_from_8(read_buf + FIL_PAGE_LSN)) { ut_print_timestamp(stderr); @@ -1167,7 +1166,7 @@ buf_chunk_not_freed( ibool ready; switch (buf_block_get_state(block)) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: /* The uncompressed buffer pool should never @@ -1492,7 +1491,7 @@ buf_relocate( ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage)); #ifdef UNIV_DEBUG switch (buf_page_get_state(bpage)) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_FILE_PAGE: @@ -1964,7 +1963,7 @@ buf_block_try_discard_uncompressed( bpage = buf_page_hash_get(buf_pool, space, offset); if (bpage) { - buf_LRU_free_block(bpage, FALSE); + buf_LRU_free_page(bpage, false); } buf_pool_mutex_exit(buf_pool); @@ -2014,7 +2013,7 @@ lookup: buf_read_page(space, zip_size, offset); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(++buf_dbg_counter % 37 || buf_validate()); + ut_a(++buf_dbg_counter % 5771 || buf_validate()); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ } @@ -2030,11 +2029,11 @@ err_exit: ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage)); switch (buf_page_get_state(bpage)) { + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_MEMORY: case BUF_BLOCK_REMOVE_HASH: - case BUF_BLOCK_ZIP_FREE: break; case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: @@ -2240,7 +2239,7 @@ buf_block_align_instance( mutex_enter(&block->mutex); switch (buf_block_get_state(block)) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: /* These types should only be used in @@ -2436,7 +2435,6 @@ buf_page_get_gen( ibool must_read; rw_lock_t* hash_lock; ib_mutex_t* block_mutex; - buf_page_t* hash_bpage; ulint retries = 0; buf_pool_t* buf_pool = buf_pool_get(space, offset); @@ -2489,7 +2487,6 @@ loop: block = guess = NULL; } else { ut_ad(!block->page.in_zip_hash); - ut_ad(block->page.in_page_hash); } } @@ -2543,6 +2540,10 @@ loop: retries = 0; } else if (retries < BUF_PAGE_READ_MAX_RETRIES) { ++retries; + DBUG_EXECUTE_IF( + "innodb_page_corruption_retries", + retries = BUF_PAGE_READ_MAX_RETRIES; + ); } else { fprintf(stderr, "InnoDB: Error: Unable" " to read tablespace %lu page no" @@ -2564,7 +2565,7 @@ loop: } #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(++buf_dbg_counter % 37 || buf_validate()); + ut_a(++buf_dbg_counter % 5771 || buf_validate()); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ goto loop; } @@ -2590,6 +2591,7 @@ got_block: /* The page is being read to buffer pool, but we cannot wait around for the read to complete. */ +null_exit: mutex_exit(block_mutex); return(NULL); @@ -2603,6 +2605,14 @@ got_block: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: + if (mode == BUF_PEEK_IF_IN_POOL) { + /* This mode is only used for dropping an + adaptive hash index. There cannot be an + adaptive hash index for a compressed-only + page, so do not bother decompressing the page. */ + goto null_exit; + } + bpage = &block->page; if (bpage->buf_fix_count @@ -2735,7 +2745,7 @@ wait_until_unfixed: break; - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_MEMORY: @@ -2780,7 +2790,7 @@ wait_until_unfixed: relocated or enter or exit the buf_pool while we are holding the buf_pool->mutex. */ - if (buf_LRU_free_block(&block->page, TRUE)) { + if (buf_LRU_free_page(&block->page, true)) { buf_pool_mutex_exit(buf_pool); rw_lock_x_lock(hash_lock); @@ -3728,7 +3738,7 @@ buf_page_create( memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(++buf_dbg_counter % 357 || buf_validate()); + ut_a(++buf_dbg_counter % 5771 || buf_validate()); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ #ifdef UNIV_IBUF_COUNT_DEBUG ut_a(ibuf_count_get(buf_block_get_space(block), @@ -4196,7 +4206,7 @@ buf_pool_invalidate_instance( pool invalidation to proceed we must ensure there is NO write activity happening. */ if (buf_pool->n_flush[i] > 0) { - enum buf_flush type = static_cast<enum buf_flush>(i); + buf_flush_t type = static_cast<buf_flush_t>(i); buf_pool_mutex_exit(buf_pool); buf_flush_wait_batch_end(buf_pool, type); @@ -4285,7 +4295,7 @@ buf_pool_validate_instance( mutex_enter(&block->mutex); switch (buf_block_get_state(block)) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: /* These should only occur on @@ -4378,7 +4388,7 @@ assert_s_latched: /* All clean blocks should be I/O-unfixed. */ break; case BUF_IO_READ: - /* In buf_LRU_free_block(), we temporarily set + /* In buf_LRU_free_page(), we temporarily set b->io_fix = BUF_IO_READ for a newly allocated control block in order to prevent buf_page_get_gen() from decompressing the block. */ @@ -4437,7 +4447,7 @@ assert_s_latched: case BUF_BLOCK_FILE_PAGE: /* uncompressed page */ break; - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: @@ -4720,7 +4730,7 @@ buf_get_latched_pages_number_instance( case BUF_BLOCK_FILE_PAGE: /* uncompressed page */ break; - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: @@ -5015,7 +5025,7 @@ buf_print_io_instance( "Old database pages %lu\n" "Modified db pages %lu\n" "Pending reads %lu\n" - "Pending writes: LRU %lu, flush list %lu single page %lu\n", + "Pending writes: LRU %lu, flush list %lu, single page %lu\n", pool_info->pool_size, pool_info->free_list_len, pool_info->lru_len, diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index fb853fe1543..2b2483fde6d 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -38,11 +38,6 @@ Created 2011/12/19 #ifndef UNIV_HOTBACKUP -/** Time in milliseconds that we sleep when unable to find a slot in -the doublewrite buffer or when we have to wait for a running batch -to end. */ -#define TRX_DOUBLEWRITE_BATCH_POLL_DELAY 10000 - #ifdef UNIV_PFS_MUTEX /* Key to register the mutex with performance schema */ UNIV_INTERN mysql_pfs_key_t buf_dblwr_mutex_key; @@ -104,6 +99,25 @@ buf_dblwr_get( return(buf_block_get_frame(block) + TRX_SYS_DOUBLEWRITE); } +/********************************************************************//** +Flush a batch of writes to the datafiles that have already been +written to the dblwr buffer on disk. */ +UNIV_INLINE +void +buf_dblwr_sync_datafiles() +/*======================*/ +{ + /* Wake possible simulated aio thread to actually post the + writes to the operating system */ + os_aio_simulated_wake_handler_threads(); + + /* Wait that all async writes to tablespaces have been posted to + the OS */ + os_aio_wait_until_no_pending_writes(); + + /* Now we flush the data to disk (for example, with fsync) */ + fil_flush_file_spaces(FIL_TABLESPACE); +} /****************************************************************//** Creates or initialializes the doublewrite buffer at a database start. */ @@ -131,6 +145,8 @@ buf_dblwr_init( mutex_create(buf_dblwr_mutex_key, &buf_dblwr->mutex, SYNC_DOUBLEWRITE); + buf_dblwr->b_event = os_event_create(); + buf_dblwr->s_event = os_event_create(); buf_dblwr->first_free = 0; buf_dblwr->s_reserved = 0; buf_dblwr->b_reserved = 0; @@ -140,8 +156,8 @@ buf_dblwr_init( buf_dblwr->block2 = mach_read_from_4( doublewrite + TRX_SYS_DOUBLEWRITE_BLOCK2); - buf_dblwr->in_use = static_cast<ibool*>( - mem_zalloc(buf_size * sizeof(ibool))); + buf_dblwr->in_use = static_cast<bool*>( + mem_zalloc(buf_size * sizeof(bool))); buf_dblwr->write_buf_unaligned = static_cast<byte*>( ut_malloc((1 + buf_size) * UNIV_PAGE_SIZE)); @@ -365,7 +381,7 @@ buf_dblwr_init_or_restore_pages( /* Read the trx sys header to check if we are using the doublewrite buffer */ - fil_io(OS_FILE_READ, TRUE, TRX_SYS_SPACE, 0, TRX_SYS_PAGE_NO, 0, + fil_io(OS_FILE_READ, true, TRX_SYS_SPACE, 0, TRX_SYS_PAGE_NO, 0, UNIV_PAGE_SIZE, read_buf, NULL); doublewrite = read_buf + TRX_SYS_DOUBLEWRITE; @@ -400,10 +416,10 @@ buf_dblwr_init_or_restore_pages( /* Read the pages from the doublewrite buffer to memory */ - fil_io(OS_FILE_READ, TRUE, TRX_SYS_SPACE, 0, block1, 0, + fil_io(OS_FILE_READ, true, TRX_SYS_SPACE, 0, block1, 0, TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE, buf, NULL); - fil_io(OS_FILE_READ, TRUE, TRX_SYS_SPACE, 0, block2, 0, + fil_io(OS_FILE_READ, true, TRX_SYS_SPACE, 0, block2, 0, TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE, buf + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE, NULL); @@ -433,7 +449,7 @@ buf_dblwr_init_or_restore_pages( + i - TRX_SYS_DOUBLEWRITE_BLOCK_SIZE; } - fil_io(OS_FILE_WRITE, TRUE, 0, 0, source_page_no, 0, + fil_io(OS_FILE_WRITE, true, 0, 0, source_page_no, 0, UNIV_PAGE_SIZE, page, NULL); } else { @@ -473,7 +489,7 @@ buf_dblwr_init_or_restore_pages( ulint zip_size = fil_space_get_zip_size(space_id); /* Read in the actual page from the file */ - fil_io(OS_FILE_READ, TRUE, space_id, zip_size, + fil_io(OS_FILE_READ, true, space_id, zip_size, page_no, 0, zip_size ? zip_size : UNIV_PAGE_SIZE, read_buf, NULL); @@ -525,7 +541,7 @@ buf_dblwr_init_or_restore_pages( doublewrite buffer to the intended position */ - fil_io(OS_FILE_WRITE, TRUE, space_id, + fil_io(OS_FILE_WRITE, true, space_id, zip_size, page_no, 0, zip_size ? zip_size : UNIV_PAGE_SIZE, page, NULL); @@ -557,6 +573,8 @@ buf_dblwr_free(void) ut_ad(buf_dblwr->s_reserved == 0); ut_ad(buf_dblwr->b_reserved == 0); + os_event_free(buf_dblwr->b_event); + os_event_free(buf_dblwr->s_event); ut_free(buf_dblwr->write_buf_unaligned); buf_dblwr->write_buf_unaligned = NULL; @@ -572,38 +590,68 @@ buf_dblwr_free(void) } /********************************************************************//** -Updates the doublewrite buffer when an IO request that is part of an -LRU or flush batch is completed. */ +Updates the doublewrite buffer when an IO request is completed. */ UNIV_INTERN void -buf_dblwr_update(void) -/*==================*/ +buf_dblwr_update( +/*=============*/ + const buf_page_t* bpage, /*!< in: buffer block descriptor */ + buf_flush_t flush_type)/*!< in: flush type */ { if (!srv_use_doublewrite_buf || buf_dblwr == NULL) { return; } - mutex_enter(&buf_dblwr->mutex); + switch (flush_type) { + case BUF_FLUSH_LIST: + case BUF_FLUSH_LRU: + mutex_enter(&buf_dblwr->mutex); - ut_ad(buf_dblwr->batch_running); - ut_ad(buf_dblwr->b_reserved > 0); - ut_ad(buf_dblwr->b_reserved <= buf_dblwr->first_free); + ut_ad(buf_dblwr->batch_running); + ut_ad(buf_dblwr->b_reserved > 0); + ut_ad(buf_dblwr->b_reserved <= buf_dblwr->first_free); - buf_dblwr->b_reserved--; - if (buf_dblwr->b_reserved == 0) { + buf_dblwr->b_reserved--; + + if (buf_dblwr->b_reserved == 0) { + mutex_exit(&buf_dblwr->mutex); + /* This will finish the batch. Sync data files + to the disk. */ + fil_flush_file_spaces(FIL_TABLESPACE); + mutex_enter(&buf_dblwr->mutex); + + /* We can now reuse the doublewrite memory buffer: */ + buf_dblwr->first_free = 0; + buf_dblwr->batch_running = false; + os_event_set(buf_dblwr->b_event); + } mutex_exit(&buf_dblwr->mutex); - /* This will finish the batch. Sync data files - to the disk. */ - fil_flush_file_spaces(FIL_TABLESPACE); - mutex_enter(&buf_dblwr->mutex); + break; + case BUF_FLUSH_SINGLE_PAGE: + { + const ulint size = 2 * TRX_SYS_DOUBLEWRITE_BLOCK_SIZE; + ulint i; + mutex_enter(&buf_dblwr->mutex); + for (i = srv_doublewrite_batch_size; i < size; ++i) { + if (buf_dblwr->buf_block_arr[i] == bpage) { + buf_dblwr->s_reserved--; + buf_dblwr->buf_block_arr[i] = NULL; + buf_dblwr->in_use[i] = false; + break; + } + } - /* We can now reuse the doublewrite memory buffer: */ - buf_dblwr->first_free = 0; - buf_dblwr->batch_running = FALSE; + /* The block we are looking for must exist as a + reserved block. */ + ut_a(i < size); + } + os_event_set(buf_dblwr->s_event); + mutex_exit(&buf_dblwr->mutex); + break; + case BUF_FLUSH_N_TYPES: + ut_error; } - - mutex_exit(&buf_dblwr->mutex); } /********************************************************************//** @@ -698,18 +746,19 @@ static void buf_dblwr_write_block_to_datafile( /*==============================*/ - const buf_page_t* bpage) /*!< in: page to write */ + const buf_page_t* bpage, /*!< in: page to write */ + bool sync) /*!< in: true if sync IO + is requested */ { ut_a(bpage); ut_a(buf_page_in_file(bpage)); - /* Increment the counter of I/O operations used - for selecting LRU policy. */ - buf_LRU_stat_inc_io(); + const ulint flags = sync + ? OS_FILE_WRITE + : OS_FILE_WRITE | OS_AIO_SIMULATED_WAKE_LATER; if (bpage->zip.data) { - fil_io(OS_FILE_WRITE | OS_AIO_SIMULATED_WAKE_LATER, - FALSE, buf_page_get_space(bpage), + fil_io(flags, sync, buf_page_get_space(bpage), buf_page_get_zip_size(bpage), buf_page_get_page_no(bpage), 0, buf_page_get_zip_size(bpage), @@ -724,8 +773,7 @@ buf_dblwr_write_block_to_datafile( ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); buf_dblwr_check_page_lsn(block->frame); - fil_io(OS_FILE_WRITE | OS_AIO_SIMULATED_WAKE_LATER, - FALSE, buf_block_get_space(block), 0, + fil_io(flags, sync, buf_block_get_space(block), 0, buf_block_get_page_no(block), 0, UNIV_PAGE_SIZE, (void*) block->frame, (void*) block); } @@ -747,12 +795,12 @@ buf_dblwr_flush_buffered_writes(void) if (!srv_use_doublewrite_buf || buf_dblwr == NULL) { /* Sync the writes to the disk. */ - buf_flush_sync_datafiles(); + buf_dblwr_sync_datafiles(); return; } try_again: - mutex_enter(&(buf_dblwr->mutex)); + mutex_enter(&buf_dblwr->mutex); /* Write first to doublewrite buffer blocks. We use synchronous aio and thus know that file write has been completed when the @@ -760,17 +808,18 @@ try_again: if (buf_dblwr->first_free == 0) { - mutex_exit(&(buf_dblwr->mutex)); + mutex_exit(&buf_dblwr->mutex); return; } if (buf_dblwr->batch_running) { - mutex_exit(&buf_dblwr->mutex); - /* Another thread is running the batch right now. Wait for it to finish. */ - os_thread_sleep(TRX_DOUBLEWRITE_BATCH_POLL_DELAY); + ib_int64_t sig_count = os_event_reset(buf_dblwr->b_event); + mutex_exit(&buf_dblwr->mutex); + + os_event_wait_low(buf_dblwr->b_event, sig_count); goto try_again; } @@ -779,7 +828,7 @@ try_again: /* Disallow anyone else to post to doublewrite buffer or to start another batch of flushing. */ - buf_dblwr->batch_running = TRUE; + buf_dblwr->batch_running = true; first_free = buf_dblwr->first_free; /* Now safe to release the mutex. Note that though no other @@ -818,7 +867,7 @@ try_again: len = ut_min(TRX_SYS_DOUBLEWRITE_BLOCK_SIZE, buf_dblwr->first_free) * UNIV_PAGE_SIZE; - fil_io(OS_FILE_WRITE, TRUE, TRX_SYS_SPACE, 0, + fil_io(OS_FILE_WRITE, true, TRX_SYS_SPACE, 0, buf_dblwr->block1, 0, len, (void*) write_buf, NULL); @@ -834,7 +883,7 @@ try_again: write_buf = buf_dblwr->write_buf + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE; - fil_io(OS_FILE_WRITE, TRUE, TRX_SYS_SPACE, 0, + fil_io(OS_FILE_WRITE, true, TRX_SYS_SPACE, 0, buf_dblwr->block2, 0, len, (void*) write_buf, NULL); @@ -864,7 +913,7 @@ flush: ut_ad(first_free == buf_dblwr->first_free); for (ulint i = 0; i < first_free; i++) { buf_dblwr_write_block_to_datafile( - buf_dblwr->buf_block_arr[i]); + buf_dblwr->buf_block_arr[i], false); } /* Wake possible simulated aio thread to actually post the @@ -889,12 +938,11 @@ buf_dblwr_add_to_batch( ut_a(buf_page_in_file(bpage)); try_again: - mutex_enter(&(buf_dblwr->mutex)); + mutex_enter(&buf_dblwr->mutex); ut_a(buf_dblwr->first_free <= srv_doublewrite_batch_size); if (buf_dblwr->batch_running) { - mutex_exit(&buf_dblwr->mutex); /* This not nearly as bad as it looks. There is only page_cleaner thread which does background flushing @@ -902,7 +950,10 @@ try_again: point. The only exception is when a user thread is forced to do a flush batch because of a sync checkpoint. */ - os_thread_sleep(TRX_DOUBLEWRITE_BATCH_POLL_DELAY); + ib_int64_t sig_count = os_event_reset(buf_dblwr->b_event); + mutex_exit(&buf_dblwr->mutex); + + os_event_wait_low(buf_dblwr->b_event, sig_count); goto try_again; } @@ -967,7 +1018,8 @@ UNIV_INTERN void buf_dblwr_write_single_page( /*========================*/ - buf_page_t* bpage) /*!< in: buffer block to write */ + buf_page_t* bpage, /*!< in: buffer block to write */ + bool sync) /*!< in: true if sync IO requested */ { ulint n_slots; ulint size; @@ -1004,11 +1056,12 @@ retry: mutex_enter(&buf_dblwr->mutex); if (buf_dblwr->s_reserved == n_slots) { + /* All slots are reserved. */ + ib_int64_t sig_count = + os_event_reset(buf_dblwr->s_event); mutex_exit(&buf_dblwr->mutex); - /* All slots are reserved. Since it involves two IOs - during the processing a sleep of 10ms should be - enough. */ - os_thread_sleep(TRX_DOUBLEWRITE_BATCH_POLL_DELAY); + os_event_wait_low(buf_dblwr->s_event, sig_count); + goto retry; } @@ -1021,9 +1074,14 @@ retry: /* We are guaranteed to find a slot. */ ut_a(i < size); - buf_dblwr->in_use[i] = TRUE; + buf_dblwr->in_use[i] = true; buf_dblwr->s_reserved++; buf_dblwr->buf_block_arr[i] = bpage; + + /* increment the doublewrite flushed pages counter */ + srv_stats.dblwr_pages_written.inc(); + srv_stats.dblwr_writes.inc(); + mutex_exit(&buf_dblwr->mutex); /* Lets see if we are going to write in the first or second @@ -1053,14 +1111,14 @@ retry: memset(buf_dblwr->write_buf + UNIV_PAGE_SIZE * i + zip_size, 0, UNIV_PAGE_SIZE - zip_size); - fil_io(OS_FILE_WRITE, TRUE, TRX_SYS_SPACE, 0, + fil_io(OS_FILE_WRITE, true, TRX_SYS_SPACE, 0, offset, 0, UNIV_PAGE_SIZE, (void*) (buf_dblwr->write_buf + UNIV_PAGE_SIZE * i), NULL); } else { /* It is a regular page. Write it directly to the doublewrite buffer */ - fil_io(OS_FILE_WRITE, TRUE, TRX_SYS_SPACE, 0, + fil_io(OS_FILE_WRITE, true, TRX_SYS_SPACE, 0, offset, 0, UNIV_PAGE_SIZE, (void*) ((buf_block_t*) bpage)->frame, NULL); @@ -1072,22 +1130,6 @@ retry: /* We know that the write has been flushed to disk now and during recovery we will find it in the doublewrite buffer blocks. Next do the write to the intended position. */ - buf_dblwr_write_block_to_datafile(bpage); - - /* Sync the writes to the disk. */ - buf_flush_sync_datafiles(); - - mutex_enter(&buf_dblwr->mutex); - - buf_dblwr->s_reserved--; - buf_dblwr->buf_block_arr[i] = NULL; - buf_dblwr->in_use[i] = FALSE; - - /* increment the doublewrite flushed pages counter */ - srv_stats.dblwr_pages_written.inc(); - srv_stats.dblwr_writes.inc(); - - mutex_exit(&(buf_dblwr->mutex)); - + buf_dblwr_write_block_to_datafile(bpage, sync); } #endif /* !UNIV_HOTBACKUP */ diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 542c1669667..3af434b77f4 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -130,6 +130,60 @@ buf_flush_validate_skip( } #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ +/*******************************************************************//** +Sets hazard pointer during flush_list iteration. */ +UNIV_INLINE +void +buf_flush_set_hp( +/*=============*/ + buf_pool_t* buf_pool,/*!< in/out: buffer pool instance */ + const buf_page_t* bpage) /*!< in: buffer control block */ +{ + ut_ad(buf_flush_list_mutex_own(buf_pool)); + ut_ad(buf_pool->flush_list_hp == NULL || bpage == NULL); + ut_ad(!bpage || buf_page_in_file(bpage)); + ut_ad(!bpage || bpage->in_flush_list); + ut_ad(!bpage || buf_pool_from_bpage(bpage) == buf_pool); + + buf_pool->flush_list_hp = bpage; +} + +/*******************************************************************//** +Checks if the given block is a hazard pointer +@return true if bpage is hazard pointer */ +UNIV_INLINE +bool +buf_flush_is_hp( +/*============*/ + buf_pool_t* buf_pool,/*!< in: buffer pool instance */ + const buf_page_t* bpage) /*!< in: buffer control block */ +{ + ut_ad(buf_flush_list_mutex_own(buf_pool)); + + return(buf_pool->flush_list_hp == bpage); +} + +/*******************************************************************//** +Whenever we move a block in flush_list (either to remove it or to +relocate it) we check the hazard pointer set by some other thread +doing the flush list scan. If the hazard pointer is the same as the +one we are about going to move then we set it to NULL to force a rescan +in the thread doing the batch. */ +UNIV_INLINE +void +buf_flush_update_hp( +/*================*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + buf_page_t* bpage) /*!< in: buffer control block */ +{ + ut_ad(buf_flush_list_mutex_own(buf_pool)); + + if (buf_flush_is_hp(buf_pool, bpage)) { + buf_flush_set_hp(buf_pool, NULL); + MONITOR_INC(MONITOR_FLUSH_HP_RESCAN); + } +} + /******************************************************************//** Insert a block in the flush_rbt and returns a pointer to its predecessor or NULL if no predecessor. The ordering is maintained @@ -471,34 +525,35 @@ buf_flush_ready_for_replace( } /********************************************************************//** -Returns TRUE if the block is modified and ready for flushing. -@return TRUE if can flush immediately */ -UNIV_INLINE -ibool +Returns true if the block is modified and ready for flushing. +@return true if can flush immediately */ +UNIV_INTERN +bool buf_flush_ready_for_flush( /*======================*/ buf_page_t* bpage, /*!< in: buffer control block, must be buf_page_in_file(bpage) */ - enum buf_flush flush_type)/*!< in: type of flush */ + buf_flush_t flush_type)/*!< in: type of flush */ { #ifdef UNIV_DEBUG buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); ut_ad(buf_pool_mutex_own(buf_pool)); -#endif +#endif /* UNIV_DEBUG */ + ut_a(buf_page_in_file(bpage)); ut_ad(mutex_own(buf_page_get_mutex(bpage))); ut_ad(flush_type < BUF_FLUSH_N_TYPES); if (bpage->oldest_modification == 0 || buf_page_get_io_fix(bpage) != BUF_IO_NONE) { - return(FALSE); + return(false); } ut_ad(bpage->in_flush_list); switch (flush_type) { case BUF_FLUSH_LIST: - return(TRUE); + return(true); case BUF_FLUSH_LRU: case BUF_FLUSH_SINGLE_PAGE: @@ -514,7 +569,7 @@ buf_flush_ready_for_flush( } ut_error; - return(FALSE); + return(false); } /********************************************************************//** @@ -535,9 +590,9 @@ buf_flush_remove( buf_flush_list_mutex_enter(buf_pool); switch (buf_page_get_state(bpage)) { + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: /* Clean compressed pages should not be on the flush list */ - case BUF_BLOCK_ZIP_FREE: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_MEMORY: @@ -574,6 +629,7 @@ buf_flush_remove( ut_a(buf_flush_validate_skip(buf_pool)); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ + buf_flush_update_hp(buf_pool, bpage); buf_flush_list_mutex_exit(buf_pool); } @@ -652,6 +708,7 @@ buf_flush_relocate_on_flush_list( ut_a(buf_flush_validate_low(buf_pool)); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ + buf_flush_update_hp(buf_pool, bpage); buf_flush_list_mutex_exit(buf_pool); } @@ -663,7 +720,7 @@ buf_flush_write_complete( /*=====================*/ buf_page_t* bpage) /*!< in: pointer to the block in question */ { - enum buf_flush flush_type; + buf_flush_t flush_type; buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); ut_ad(bpage); @@ -684,18 +741,7 @@ buf_flush_write_complete( os_event_set(buf_pool->no_flush[flush_type]); } - switch (flush_type) { - case BUF_FLUSH_LIST: - case BUF_FLUSH_LRU: - buf_dblwr_update(); - break; - case BUF_FLUSH_SINGLE_PAGE: - /* Single page flushes are synchronous. No need - to update doublewrite */ - break; - case BUF_FLUSH_N_TYPES: - ut_error; - } + buf_dblwr_update(bpage, flush_type); } #endif /* !UNIV_HOTBACKUP */ @@ -827,28 +873,6 @@ buf_flush_init_for_writing( #ifndef UNIV_HOTBACKUP /********************************************************************//** -Flush a batch of writes to the datafiles that have already been -written by the OS. */ -UNIV_INTERN -void -buf_flush_sync_datafiles(void) -/*==========================*/ -{ - /* Wake possible simulated aio thread to actually post the - writes to the operating system */ - os_aio_simulated_wake_handler_threads(); - - /* Wait that all async writes to tablespaces have been posted to - the OS */ - os_aio_wait_until_no_pending_writes(); - - /* Now we flush the data to disk (for example, with fsync) */ - fil_flush_file_spaces(FIL_TABLESPACE); - - return; -} - -/********************************************************************//** Does an asynchronous write of a buffer page. NOTE: in simulated aio and also when the doublewrite buffer is used, we must call buf_dblwr_flush_buffered_writes after we have posted a batch of @@ -858,7 +882,8 @@ void buf_flush_write_block_low( /*======================*/ buf_page_t* bpage, /*!< in: buffer block to write */ - enum buf_flush flush_type) /*!< in: type of flush */ + buf_flush_t flush_type, /*!< in: type of flush */ + bool sync) /*!< in: true if sync IO request */ { ulint zip_size = buf_page_get_zip_size(bpage); page_t* frame = NULL; @@ -903,7 +928,7 @@ buf_flush_write_block_low( log_write_up_to(bpage->newest_modification, LOG_WAIT_ALL_GROUPS, TRUE); #endif switch (buf_page_get_state(bpage)) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: /* The page should be dirty. */ case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: @@ -935,15 +960,29 @@ buf_flush_write_block_low( if (!srv_use_doublewrite_buf || !buf_dblwr) { fil_io(OS_FILE_WRITE | OS_AIO_SIMULATED_WAKE_LATER, - FALSE, buf_page_get_space(bpage), zip_size, + sync, buf_page_get_space(bpage), zip_size, buf_page_get_page_no(bpage), 0, zip_size ? zip_size : UNIV_PAGE_SIZE, frame, bpage); } else if (flush_type == BUF_FLUSH_SINGLE_PAGE) { - buf_dblwr_write_single_page(bpage); + buf_dblwr_write_single_page(bpage, sync); } else { + ut_ad(!sync); buf_dblwr_add_to_batch(bpage); } + + /* When doing single page flushing the IO is done synchronously + and we flush the changes to disk only for the tablespace we + are working on. */ + if (sync) { + ut_ad(flush_type == BUF_FLUSH_SINGLE_PAGE); + fil_flush(buf_page_get_space(bpage)); + buf_page_io_complete(bpage); + } + + /* Increment the counter of I/O operations used + for selecting LRU policy. */ + buf_LRU_stat_inc_io(); } /********************************************************************//** @@ -959,7 +998,8 @@ buf_flush_page( /*===========*/ buf_pool_t* buf_pool, /*!< in: buffer pool instance */ buf_page_t* bpage, /*!< in: buffer control block */ - buf_flush flush_type) /*!< in: type of flush */ + buf_flush_t flush_type, /*!< in: type of flush */ + bool sync) /*!< in: true if sync IO request */ { ib_mutex_t* block_mutex; ibool is_uncompressed; @@ -967,6 +1007,7 @@ buf_flush_page( ut_ad(flush_type < BUF_FLUSH_N_TYPES); ut_ad(buf_pool_mutex_own(buf_pool)); ut_ad(buf_page_in_file(bpage)); + ut_ad(!sync || flush_type == BUF_FLUSH_SINGLE_PAGE); block_mutex = buf_page_get_mutex(bpage); ut_ad(mutex_own(block_mutex)); @@ -1062,7 +1103,7 @@ buf_flush_page( flush_type, bpage->space, bpage->offset); } #endif /* UNIV_DEBUG */ - buf_flush_write_block_low(bpage, flush_type); + buf_flush_write_block_low(bpage, flush_type, sync); } # if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG @@ -1089,8 +1130,7 @@ buf_flush_page_try( /* The following call will release the buffer pool and block mutex. */ - buf_flush_page(buf_pool, &block->page, BUF_FLUSH_SINGLE_PAGE); - buf_flush_sync_datafiles(); + buf_flush_page(buf_pool, &block->page, BUF_FLUSH_SINGLE_PAGE, true); return(TRUE); } # endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ @@ -1103,7 +1143,7 @@ buf_flush_check_neighbor( /*=====================*/ ulint space, /*!< in: space id */ ulint offset, /*!< in: page offset */ - enum buf_flush flush_type) /*!< in: BUF_FLUSH_LRU or + buf_flush_t flush_type) /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ { buf_page_t* bpage; @@ -1153,7 +1193,7 @@ buf_flush_try_neighbors( /*====================*/ ulint space, /*!< in: space id */ ulint offset, /*!< in: page offset */ - enum buf_flush flush_type, /*!< in: BUF_FLUSH_LRU or + buf_flush_t flush_type, /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ ulint n_flushed, /*!< in: number of pages flushed so far in this batch */ @@ -1274,7 +1314,7 @@ buf_flush_try_neighbors( doublewrite buffer before we start waiting. */ - buf_flush_page(buf_pool, bpage, flush_type); + buf_flush_page(buf_pool, bpage, flush_type, false); ut_ad(!mutex_own(block_mutex)); ut_ad(!buf_pool_mutex_own(buf_pool)); count++; @@ -1311,7 +1351,7 @@ buf_flush_page_and_try_neighbors( buf_page_t* bpage, /*!< in: buffer control block, must be buf_page_in_file(bpage) */ - enum buf_flush flush_type, /*!< in: BUF_FLUSH_LRU + buf_flush_t flush_type, /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ ulint n_to_flush, /*!< in: number of pages to flush */ @@ -1396,7 +1436,7 @@ buf_free_from_unzip_LRU_list_batch( && lru_len > UT_LIST_GET_LEN(buf_pool->LRU) / 10) { ++scanned; - if (buf_LRU_free_block(&block->page, FALSE)) { + if (buf_LRU_free_page(&block->page, false)) { /* Block was freed. buf_pool->mutex potentially released and reacquired */ ++count; @@ -1473,7 +1513,7 @@ buf_flush_LRU_list_batch( of the flushed pages then the scan becomes O(n*n). */ if (evict) { - if (buf_LRU_free_block(bpage, TRUE)) { + if (buf_LRU_free_page(bpage, true)) { /* buf_pool->mutex was potentially released and reacquired. */ bpage = UT_LIST_GET_LAST(buf_pool->LRU); @@ -1561,82 +1601,62 @@ buf_do_flush_list_batch( their number does not exceed min_n) */ { - ulint len; - buf_page_t* bpage; ulint count = 0; ulint scanned = 0; ut_ad(buf_pool_mutex_own(buf_pool)); - /* If we have flushed enough, leave the loop */ - do { - /* Start from the end of the list looking for a suitable - block to be flushed. */ - - buf_flush_list_mutex_enter(buf_pool); - - /* We use len here because theoretically insertions can - happen in the flush_list below while we are traversing - it for a suitable candidate for flushing. We'd like to - set a limit on how farther we are willing to traverse - the list. */ - len = UT_LIST_GET_LEN(buf_pool->flush_list); - bpage = UT_LIST_GET_LAST(buf_pool->flush_list); + /* Start from the end of the list looking for a suitable + block to be flushed. */ + buf_flush_list_mutex_enter(buf_pool); + ulint len = UT_LIST_GET_LEN(buf_pool->flush_list); - if (bpage) { - ut_a(bpage->oldest_modification > 0); - } + /* In order not to degenerate this scan to O(n*n) we attempt + to preserve pointer of previous block in the flush list. To do + so we declare it a hazard pointer. Any thread working on the + flush list must check the hazard pointer and if it is removing + the same block then it must reset it. */ + for (buf_page_t* bpage = UT_LIST_GET_LAST(buf_pool->flush_list); + count < min_n && bpage != NULL && len > 0 + && bpage->oldest_modification < lsn_limit; + ++scanned) { - if (!bpage || bpage->oldest_modification >= lsn_limit) { - - /* We have flushed enough */ - buf_flush_list_mutex_exit(buf_pool); - break; - } + buf_page_t* prev; ut_a(bpage->oldest_modification > 0); - ut_ad(bpage->in_flush_list); - buf_flush_list_mutex_exit(buf_pool); + prev = UT_LIST_GET_PREV(list, bpage); + buf_flush_set_hp(buf_pool, prev); - /* The list may change during the flushing and we cannot - safely preserve within this function a pointer to a - block in the list! */ - while (bpage != NULL - && len > 0 - && !buf_flush_page_and_try_neighbors( - bpage, BUF_FLUSH_LIST, min_n, &count)) { - - ++scanned; - buf_flush_list_mutex_enter(buf_pool); - - /* If we are here that means that buf_pool->mutex - was not released in buf_flush_page_and_try_neighbors() - above and this guarantees that bpage didn't get - relocated since we released the flush_list - mutex above. There is a chance, however, that - the bpage got removed from flush_list (not - currently possible because flush_list_remove() - also obtains buf_pool mutex but that may change - in future). To avoid this scenario we check - the oldest_modification and if it is zero - we start all over again. */ - if (bpage->oldest_modification == 0) { - buf_flush_list_mutex_exit(buf_pool); - break; - } + buf_flush_list_mutex_exit(buf_pool); - bpage = UT_LIST_GET_PREV(list, bpage); +#ifdef UNIV_DEBUG + bool flushed = +#endif /* UNIV_DEBUG */ + buf_flush_page_and_try_neighbors( + bpage, BUF_FLUSH_LIST, min_n, &count); - ut_ad(!bpage || bpage->in_flush_list); + buf_flush_list_mutex_enter(buf_pool); - buf_flush_list_mutex_exit(buf_pool); + ut_ad(flushed || buf_flush_is_hp(buf_pool, prev)); + if (!buf_flush_is_hp(buf_pool, prev)) { + /* The hazard pointer was reset by some other + thread. Restart the scan. */ + ut_ad(buf_flush_is_hp(buf_pool, NULL)); + bpage = UT_LIST_GET_LAST(buf_pool->flush_list); + len = UT_LIST_GET_LEN(buf_pool->flush_list); + } else { + bpage = prev; --len; + buf_flush_set_hp(buf_pool, NULL); } - } while (count < min_n && bpage != NULL && len > 0); + ut_ad(!bpage || bpage->in_flush_list); + } + + buf_flush_list_mutex_exit(buf_pool); MONITOR_INC_VALUE_CUMULATIVE(MONITOR_FLUSH_BATCH_SCANNED, MONITOR_FLUSH_BATCH_SCANNED_NUM_CALL, @@ -1660,7 +1680,7 @@ ulint buf_flush_batch( /*============*/ buf_pool_t* buf_pool, /*!< in: buffer pool instance */ - enum buf_flush flush_type, /*!< in: BUF_FLUSH_LRU or + buf_flush_t flush_type, /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST; if BUF_FLUSH_LIST, then the caller must not own any latches on pages */ @@ -1716,7 +1736,7 @@ static void buf_flush_common( /*=============*/ - enum buf_flush flush_type, /*!< in: type of flush */ + buf_flush_t flush_type, /*!< in: type of flush */ ulint page_count) /*!< in: number of pages flushed */ { buf_dblwr_flush_buffered_writes(); @@ -1742,7 +1762,7 @@ ibool buf_flush_start( /*============*/ buf_pool_t* buf_pool, /*!< buffer pool instance */ - enum buf_flush flush_type) /*!< in: BUF_FLUSH_LRU + buf_flush_t flush_type) /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ { buf_pool_mutex_enter(buf_pool); @@ -1771,7 +1791,7 @@ void buf_flush_end( /*==========*/ buf_pool_t* buf_pool, /*!< buffer pool instance */ - enum buf_flush flush_type) /*!< in: BUF_FLUSH_LRU + buf_flush_t flush_type) /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ { buf_pool_mutex_enter(buf_pool); @@ -1797,7 +1817,7 @@ void buf_flush_wait_batch_end( /*=====================*/ buf_pool_t* buf_pool, /*!< buffer pool instance */ - enum buf_flush type) /*!< in: BUF_FLUSH_LRU + buf_flush_t type) /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ { ut_ad(type == BUF_FLUSH_LRU || type == BUF_FLUSH_LIST); @@ -1967,7 +1987,7 @@ buf_flush_single_page_from_LRU( buf_page_t* bpage; ib_mutex_t* block_mutex; ibool freed; - ibool evict_zip; + bool evict_zip; buf_pool_mutex_enter(buf_pool); @@ -2000,9 +2020,7 @@ buf_flush_single_page_from_LRU( /* The following call will release the buffer pool and block mutex. */ - buf_flush_page(buf_pool, bpage, BUF_FLUSH_SINGLE_PAGE); - - buf_flush_sync_datafiles(); + buf_flush_page(buf_pool, bpage, BUF_FLUSH_SINGLE_PAGE, true); /* At this point the page has been written to the disk. As we are not holding buffer pool or block mutex therefore @@ -2037,7 +2055,7 @@ buf_flush_single_page_from_LRU( evict_zip = !buf_LRU_evict_from_unzip_LRU(buf_pool);; - freed = buf_LRU_free_block(bpage, evict_zip); + freed = buf_LRU_free_page(bpage, evict_zip); buf_pool_mutex_exit(buf_pool); return(freed); @@ -2060,12 +2078,21 @@ buf_flush_LRU_tail(void) for (ulint i = 0; i < srv_buf_pool_instances; i++) { buf_pool_t* buf_pool = buf_pool_from_array(i); + ulint scan_depth; + + /* srv_LRU_scan_depth can be arbitrarily large value. + We cap it with current LRU size. */ + buf_pool_mutex_enter(buf_pool); + scan_depth = UT_LIST_GET_LEN(buf_pool->LRU); + buf_pool_mutex_exit(buf_pool); + + scan_depth = ut_min(srv_LRU_scan_depth, scan_depth); /* We divide LRU flush into smaller chunks because there may be user threads waiting for the flush to end in buf_LRU_get_free_block(). */ for (ulint j = 0; - j < srv_LRU_scan_depth; + j < scan_depth; j += PAGE_CLEANER_LRU_BATCH_CHUNK_SIZE) { ulint n_flushed = 0; @@ -2074,11 +2101,22 @@ buf_flush_LRU_tail(void) that can trigger an LRU flush. It is possible that a batch triggered during last iteration is still running, */ - buf_flush_LRU(buf_pool, - PAGE_CLEANER_LRU_BATCH_CHUNK_SIZE, - &n_flushed); + if (buf_flush_LRU(buf_pool, + PAGE_CLEANER_LRU_BATCH_CHUNK_SIZE, + &n_flushed)) { + + /* Allowed only one batch per + buffer pool instance. */ + buf_flush_wait_batch_end( + buf_pool, BUF_FLUSH_LRU); + } - total_flushed += n_flushed; + if (n_flushed) { + total_flushed += n_flushed; + } else { + /* Nothing to flush */ + break; + } } } @@ -2272,9 +2310,9 @@ page_cleaner_flush_pages_if_needed(void) oldest_lsn = buf_pool_get_oldest_modification(); - ut_ad(oldest_lsn <= cur_lsn); + ut_ad(oldest_lsn <= log_get_lsn()); - age = cur_lsn - oldest_lsn; + age = cur_lsn > oldest_lsn ? cur_lsn - oldest_lsn : 0; pct_for_dirty = af_get_pct_for_dirty(); pct_for_lsn = af_get_pct_for_lsn(age); diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc index 270263d95f1..bc73119c227 100644 --- a/storage/innobase/buf/buf0lru.cc +++ b/storage/innobase/buf/buf0lru.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -137,19 +137,19 @@ The caller must hold buf_pool->mutex, the buf_page_get_mutex() mutex and the appropriate hash_lock. This function will release the buf_page_get_mutex() and the hash_lock. -If a compressed page or a compressed-only block descriptor is freed, -other compressed pages or compressed-only block descriptors may be -relocated. -@return the new state of the block (BUF_BLOCK_ZIP_FREE if the state -was BUF_BLOCK_ZIP_PAGE, or BUF_BLOCK_REMOVE_HASH otherwise) */ -static -enum buf_page_state -buf_LRU_block_remove_hashed_page( -/*=============================*/ +If a compressed page is freed other compressed pages may be relocated. +@retval true if BUF_BLOCK_FILE_PAGE was removed from page_hash. The +caller needs to free the page to the free list +@retval false if BUF_BLOCK_ZIP_PAGE was removed from page_hash. In +this case the block is already returned to the buddy allocator. */ +static __attribute__((nonnull, warn_unused_result)) +bool +buf_LRU_block_remove_hashed( +/*========================*/ buf_page_t* bpage, /*!< in: block, must contain a file page and be in a state where it can be freed; there may or may not be a hash index to the page */ - ibool zip); /*!< in: TRUE if should remove also the + bool zip); /*!< in: true if should remove also the compressed page of an uncompressed page */ /******************************************************************//** Puts a file page whose has no hash index to the free list. */ @@ -460,14 +460,9 @@ buf_flush_or_remove_page( don't remove else remove without flushing to disk */ { - ib_mutex_t* block_mutex; - bool processed = false; - ut_ad(buf_pool_mutex_own(buf_pool)); ut_ad(buf_flush_list_mutex_own(buf_pool)); - block_mutex = buf_page_get_mutex(bpage); - /* bpage->space and bpage->io_fix are protected by buf_pool->mutex and block_mutex. It is safe to check them while holding buf_pool->mutex only. */ @@ -477,63 +472,60 @@ buf_flush_or_remove_page( /* We cannot remove this page during this scan yet; maybe the system is currently reading it in, or flushing the modifications to the file */ + return(false); - } else { - - /* We have to release the flush_list_mutex to obey the - latching order. We are however guaranteed that the page - will stay in the flush_list because buf_flush_remove() - needs buf_pool->mutex as well (for the non-flush case). */ - - buf_flush_list_mutex_exit(buf_pool); - - mutex_enter(block_mutex); - - ut_ad(bpage->oldest_modification != 0); + } - if (bpage->buf_fix_count > 0) { + ib_mutex_t* block_mutex = buf_page_get_mutex(bpage); + bool processed = false; - mutex_exit(block_mutex); + /* We have to release the flush_list_mutex to obey the + latching order. We are however guaranteed that the page + will stay in the flush_list and won't be relocated because + buf_flush_remove() and buf_flush_relocate_on_flush_list() + need buf_pool->mutex as well. */ - /* We cannot remove this page yet; - maybe the system is currently reading - it in, or flushing the modifications - to the file */ + buf_flush_list_mutex_exit(buf_pool); - } else if (!flush) { + mutex_enter(block_mutex); - buf_flush_remove(bpage); + ut_ad(bpage->oldest_modification != 0); - mutex_exit(block_mutex); + if (!flush) { - processed = true; + buf_flush_remove(bpage); - } else if (buf_page_get_io_fix(bpage) != BUF_IO_NONE) { + mutex_exit(block_mutex); - /* Check the status again after releasing the flush - list mutex and acquiring the block mutex. The background - flush thread may be in the process of flushing this - page when we released the flush list mutex. */ + processed = true; - /* The following call will release the buffer pool - and block mutex. */ - buf_flush_page(buf_pool, bpage, BUF_FLUSH_SINGLE_PAGE); + } else if (buf_flush_ready_for_flush(bpage, + BUF_FLUSH_SINGLE_PAGE)) { - /* Wake possible simulated aio thread to actually - post the writes to the operating system */ - os_aio_simulated_wake_handler_threads(); + /* The following call will release the buffer pool + and block mutex. */ + buf_flush_page(buf_pool, bpage, BUF_FLUSH_SINGLE_PAGE, false); + ut_ad(!mutex_own(block_mutex)); - buf_pool_mutex_enter(buf_pool); + /* Wake possible simulated aio thread to actually + post the writes to the operating system */ + os_aio_simulated_wake_handler_threads(); - processed = true; - } else { - mutex_exit(block_mutex); - } + buf_pool_mutex_enter(buf_pool); - buf_flush_list_mutex_enter(buf_pool); + processed = true; + } else { + /* Not ready for flush. It can't be IO fixed because we + checked for that at the start of the function. It must + be buffer fixed. */ + ut_ad(bpage->buf_fix_count > 0); + mutex_exit(block_mutex); } + buf_flush_list_mutex_enter(buf_pool); + ut_ad(!mutex_own(block_mutex)); + ut_ad(buf_pool_mutex_own(buf_pool)); return(processed); } @@ -562,10 +554,12 @@ buf_flush_or_remove_pages( buf_page_t* prev; buf_page_t* bpage; ulint processed = 0; - bool all_freed = true; buf_flush_list_mutex_enter(buf_pool); +rescan: + bool all_freed = true; + for (bpage = UT_LIST_GET_LAST(buf_pool->flush_list); bpage != NULL; bpage = prev) { @@ -585,9 +579,33 @@ buf_flush_or_remove_pages( } else if (!buf_flush_or_remove_page(buf_pool, bpage, flush)) { /* Remove was unsuccessful, we have to try again - by scanning the entire list from the end. */ + by scanning the entire list from the end. + This also means that we never released the + buf_pool mutex. Therefore we can trust the prev + pointer. + buf_flush_or_remove_page() released the + flush list mutex but not the buf_pool mutex. + Therefore it is possible that a new page was + added to the flush list. For example, in case + where we are at the head of the flush list and + prev == NULL. That is OK because we have the + tablespace quiesced and no new pages for this + space-id should enter flush_list. This is + because the only callers of this function are + DROP TABLE and FLUSH TABLE FOR EXPORT. + We know that we'll have to do at least one more + scan but we don't break out of loop here and + try to do as much work as we can in this + iteration. */ all_freed = false; + } else if (flush) { + + /* The processing was successful. And during the + processing we have released the buf_pool mutex + when calling buf_page_flush(). We cannot trust + prev pointer. */ + goto rescan; } ++processed; @@ -649,7 +667,7 @@ buf_flush_dirty_pages( ut_ad(buf_flush_validate(buf_pool)); if (err == DB_FAIL) { - os_thread_sleep(20000); + os_thread_sleep(2000); } /* DB_FAIL is a soft error, it means that the task wasn't @@ -658,6 +676,9 @@ buf_flush_dirty_pages( ut_ad(buf_flush_validate(buf_pool)); } while (err == DB_FAIL); + + ut_ad(err == DB_INTERRUPTED + || buf_pool_get_dirty_pages_count(buf_pool, id) == 0); } /******************************************************************//** @@ -778,22 +799,16 @@ scan_again: /* Remove from the LRU list. */ - if (buf_LRU_block_remove_hashed_page(bpage, TRUE) - != BUF_BLOCK_ZIP_FREE) { - + if (buf_LRU_block_remove_hashed(bpage, true)) { buf_LRU_block_free_hashed_page((buf_block_t*) bpage); - } else { - /* The block_mutex should have been released - by buf_LRU_block_remove_hashed_page() when it - returns BUF_BLOCK_ZIP_FREE. */ ut_ad(block_mutex == &buf_pool->zip_mutex); } ut_ad(!mutex_own(block_mutex)); #ifdef UNIV_SYNC_DEBUG - /* buf_LRU_block_remove_hashed_page() releases the hash_lock */ + /* buf_LRU_block_remove_hashed() releases the hash_lock */ ut_ad(!rw_lock_own(hash_lock, RW_LOCK_EX)); ut_ad(!rw_lock_own(hash_lock, RW_LOCK_SHARED)); #endif /* UNIV_SYNC_DEBUG */ @@ -835,15 +850,11 @@ buf_LRU_remove_pages( case BUF_REMOVE_FLUSH_NO_WRITE: ut_a(trx == 0); buf_flush_dirty_pages(buf_pool, id, false, NULL); - ut_ad(trx_is_interrupted(trx) - || buf_pool_get_dirty_pages_count(buf_pool, id) == 0); break; case BUF_REMOVE_FLUSH_WRITE: ut_a(trx != 0); buf_flush_dirty_pages(buf_pool, id, true, trx); - ut_ad(trx_is_interrupted(trx) - || buf_pool_get_dirty_pages_count(buf_pool, id) == 0); /* Ensure that all asynchronous IO is completed. */ os_aio_wait_until_no_pending_writes(); fil_flush(id); @@ -880,10 +891,14 @@ buf_LRU_flush_or_remove_pages( switch (buf_remove) { case BUF_REMOVE_ALL_NO_WRITE: - case BUF_REMOVE_FLUSH_NO_WRITE: buf_LRU_drop_page_hash_for_tablespace(buf_pool, id); break; + case BUF_REMOVE_FLUSH_NO_WRITE: + /* It is a DROP TABLE for a single table + tablespace. No AHI entries exist because + we already dealt with them when freeing up + extents. */ case BUF_REMOVE_FLUSH_WRITE: /* We allow read-only queries against the table, there is no need to drop the AHI entries. */ @@ -892,13 +907,6 @@ buf_LRU_flush_or_remove_pages( buf_LRU_remove_pages(buf_pool, id, buf_remove, trx); } - -#ifdef UNIV_DEBUG - if (trx != 0 && id != 0) { - ut_ad(trx_is_interrupted(trx) - || buf_flush_get_dirty_pages_count(id) == 0); - } -#endif /* UNIV_DEBUG */ } #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG @@ -972,7 +980,7 @@ buf_LRU_free_from_unzip_LRU_list( ut_ad(block->in_unzip_LRU_list); ut_ad(block->page.in_LRU_list); - freed = buf_LRU_free_block(&block->page, FALSE); + freed = buf_LRU_free_page(&block->page, false); block = prev_block; } @@ -1017,7 +1025,7 @@ buf_LRU_free_from_common_LRU_list( ut_ad(bpage->in_LRU_list); accessed = buf_page_is_accessed(bpage); - freed = buf_LRU_free_block(bpage, TRUE); + freed = buf_LRU_free_page(bpage, true); if (freed && !accessed) { /* Keep track of pages that are evicted without ever being accessed. This gives us a measure of @@ -1788,24 +1796,23 @@ buf_LRU_make_block_old( Try to free a block. If bpage is a descriptor of a compressed-only page, the descriptor object will be freed as well. -NOTE: If this function returns TRUE, it will temporarily +NOTE: If this function returns true, it will temporarily release buf_pool->mutex. Furthermore, the page frame will no longer be accessible via bpage. The caller must hold buf_pool->mutex and must not hold any buf_page_get_mutex() when calling this function. -@return TRUE if freed, FALSE otherwise. */ +@return true if freed, false otherwise. */ UNIV_INTERN -ibool -buf_LRU_free_block( +bool +buf_LRU_free_page( /*===============*/ buf_page_t* bpage, /*!< in: block to be freed */ - ibool zip) /*!< in: TRUE if should remove also the + bool zip) /*!< in: true if should remove also the compressed page of an uncompressed page */ { buf_page_t* b = NULL; buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); - enum buf_page_state page_state; const ulint fold = buf_page_address_fold(bpage->space, bpage->offset); rw_lock_t* hash_lock = buf_page_hash_lock_get(buf_pool, fold); @@ -1853,7 +1860,7 @@ buf_LRU_free_block( func_exit: rw_lock_x_unlock(hash_lock); mutex_exit(block_mutex); - return(FALSE); + return(false); } else if (buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE) { b = buf_page_alloc_descriptor(); @@ -1885,20 +1892,16 @@ func_exit: #endif /* UNIV_SYNC_DEBUG */ ut_ad(buf_page_can_relocate(bpage)); - page_state = buf_LRU_block_remove_hashed_page(bpage, zip); + if (!buf_LRU_block_remove_hashed(bpage, zip)) { + return(true); + } #ifdef UNIV_SYNC_DEBUG - /* buf_LRU_block_remove_hashed_page() releases the hash_lock */ + /* buf_LRU_block_remove_hashed() releases the hash_lock */ ut_ad(!rw_lock_own(hash_lock, RW_LOCK_EX) && !rw_lock_own(hash_lock, RW_LOCK_SHARED)); #endif /* UNIV_SYNC_DEBUG */ - if (page_state == BUF_BLOCK_ZIP_FREE) { - return(TRUE); - } - - ut_ad(page_state == BUF_BLOCK_REMOVE_HASH); - /* We have just freed a BUF_BLOCK_FILE_PAGE. If b != NULL then it was a compressed page with an uncompressed frame and we are interested in freeing only the uncompressed frame. @@ -1926,7 +1929,7 @@ func_exit: /* The fields in_page_hash and in_LRU_list of the to-be-freed block descriptor should have been cleared in - buf_LRU_block_remove_hashed_page(), which + buf_LRU_block_remove_hashed(), which invokes buf_LRU_remove_block(). */ ut_ad(!bpage->in_page_hash); ut_ad(!bpage->in_LRU_list); @@ -1935,7 +1938,7 @@ func_exit: ut_ad(!((buf_block_t*) bpage)->in_unzip_LRU_list); /* The fields of bpage were copied to b before - buf_LRU_block_remove_hashed_page() was invoked. */ + buf_LRU_block_remove_hashed() was invoked. */ ut_ad(!b->in_zip_hash); ut_ad(b->in_page_hash); ut_ad(b->in_LRU_list); @@ -2037,7 +2040,7 @@ func_exit: /* Remove possible adaptive hash index on the page. The page was declared uninitialized by - buf_LRU_block_remove_hashed_page(). We need to flag + buf_LRU_block_remove_hashed(). We need to flag the contents of the page valid (which it still is) in order to avoid bogus Valgrind warnings.*/ @@ -2073,7 +2076,7 @@ func_exit: mutex_exit(block_mutex); buf_LRU_block_free_hashed_page((buf_block_t*) bpage); - return(TRUE); + return(true); } /******************************************************************//** @@ -2147,19 +2150,19 @@ The caller must hold buf_pool->mutex, the buf_page_get_mutex() mutex and the appropriate hash_lock. This function will release the buf_page_get_mutex() and the hash_lock. -If a compressed page or a compressed-only block descriptor is freed, -other compressed pages or compressed-only block descriptors may be -relocated. -@return the new state of the block (BUF_BLOCK_ZIP_FREE if the state -was BUF_BLOCK_ZIP_PAGE, or BUF_BLOCK_REMOVE_HASH otherwise) */ +If a compressed page is freed other compressed pages may be relocated. +@retval true if BUF_BLOCK_FILE_PAGE was removed from page_hash. The +caller needs to free the page to the free list +@retval false if BUF_BLOCK_ZIP_PAGE was removed from page_hash. In +this case the block is already returned to the buddy allocator. */ static -enum buf_page_state -buf_LRU_block_remove_hashed_page( -/*=============================*/ +bool +buf_LRU_block_remove_hashed( +/*========================*/ buf_page_t* bpage, /*!< in: block, must contain a file page and be in a state where it can be freed; there may or may not be a hash index to the page */ - ibool zip) /*!< in: TRUE if should remove also the + bool zip) /*!< in: true if should remove also the compressed page of an uncompressed page */ { ulint fold; @@ -2252,7 +2255,7 @@ buf_LRU_block_remove_hashed_page( UNIV_MEM_ASSERT_W(bpage->zip.data, page_zip_get_size(&bpage->zip)); break; - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_DIRTY: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: @@ -2319,7 +2322,7 @@ buf_LRU_block_remove_hashed_page( buf_pool_mutex_exit_allow(buf_pool); buf_page_free_descriptor(bpage); - return(BUF_BLOCK_ZIP_FREE); + return(false); case BUF_BLOCK_FILE_PAGE: memset(((buf_block_t*) bpage)->frame @@ -2370,9 +2373,9 @@ buf_LRU_block_remove_hashed_page( page_zip_set_size(&bpage->zip, 0); } - return(BUF_BLOCK_REMOVE_HASH); + return(true); - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_DIRTY: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: @@ -2382,7 +2385,7 @@ buf_LRU_block_remove_hashed_page( } ut_error; - return(BUF_BLOCK_ZIP_FREE); + return(false); } /******************************************************************//** @@ -2427,12 +2430,11 @@ buf_LRU_free_one_page( rw_lock_x_lock(hash_lock); mutex_enter(block_mutex); - if (buf_LRU_block_remove_hashed_page(bpage, TRUE) - != BUF_BLOCK_ZIP_FREE) { + if (buf_LRU_block_remove_hashed(bpage, true)) { buf_LRU_block_free_hashed_page((buf_block_t*) bpage); } - /* buf_LRU_block_remove_hashed_page() releases hash_lock and block_mutex */ + /* buf_LRU_block_remove_hashed() releases hash_lock and block_mutex */ #ifdef UNIV_SYNC_DEBUG ut_ad(!rw_lock_own(hash_lock, RW_LOCK_EX) && !rw_lock_own(hash_lock, RW_LOCK_SHARED)); @@ -2606,7 +2608,7 @@ buf_LRU_validate_instance( bpage = UT_LIST_GET_NEXT(LRU, bpage)) { switch (buf_page_get_state(bpage)) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_MEMORY: diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index 3a579e251ff..7c8369c0c09 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -107,7 +107,7 @@ buf_read_page_low( dberr_t* err, /*!< out: DB_SUCCESS or DB_TABLESPACE_DELETED if we are trying to read from a non-existent tablespace, or a tablespace which is just now being dropped */ - ibool sync, /*!< in: TRUE if synchronous aio is desired */ + bool sync, /*!< in: true if synchronous aio is desired */ ulint mode, /*!< in: BUF_READ_IBUF_PAGES_ONLY, ..., ORed to OS_AIO_SIMULATED_WAKE_LATER (see below at read-ahead functions) */ @@ -152,7 +152,7 @@ buf_read_page_low( syncronous i/o, to make sure they do not get involved in thread deadlocks. */ - sync = TRUE; + sync = true; } /* The following call will also check if the tablespace does not exist @@ -169,15 +169,17 @@ buf_read_page_low( #ifdef UNIV_DEBUG if (buf_debug_prints) { fprintf(stderr, - "Posting read request for page %lu, sync %lu\n", - (ulong) offset, - (ulong) sync); + "Posting read request for page %lu, sync %s\n", + (ulong) offset, sync ? "true" : "false"); } #endif ut_ad(buf_page_in_file(bpage)); - thd_wait_begin(NULL, THD_WAIT_DISKIO); + if (sync) { + thd_wait_begin(NULL, THD_WAIT_DISKIO); + } + if (zip_size) { *err = fil_io(OS_FILE_READ | wake_later | ignore_nonexistent_pages, @@ -191,7 +193,10 @@ buf_read_page_low( sync, space, 0, offset, 0, UNIV_PAGE_SIZE, ((buf_block_t*) bpage)->frame, bpage); } - thd_wait_end(NULL); + + if (sync) { + thd_wait_end(NULL); + } if (*err != DB_SUCCESS) { if (ignore_nonexistent_pages || *err == DB_TABLESPACE_DELETED) { @@ -337,7 +342,7 @@ read_ahead: if (!ibuf_bitmap_page(zip_size, i)) { count += buf_read_page_low( - &err, FALSE, + &err, false, ibuf_mode | OS_AIO_SIMULATED_WAKE_LATER, space, zip_size, FALSE, tablespace_version, i); @@ -401,7 +406,7 @@ buf_read_page( /* We do the i/o in the synchronous aio mode to save thread switches: hence TRUE */ - count = buf_read_page_low(&err, TRUE, BUF_READ_ANY_PAGE, space, + count = buf_read_page_low(&err, true, BUF_READ_ANY_PAGE, space, zip_size, FALSE, tablespace_version, offset); srv_stats.buf_pool_reads.add(count); @@ -447,7 +452,7 @@ buf_read_page_async( tablespace_version = fil_space_get_version(space); - count = buf_read_page_low(&err, TRUE, BUF_READ_ANY_PAGE + count = buf_read_page_low(&err, true, BUF_READ_ANY_PAGE | OS_AIO_SIMULATED_WAKE_LATER | BUF_READ_IGNORE_NONEXISTENT_PAGES, space, zip_size, FALSE, @@ -708,7 +713,7 @@ buf_read_ahead_linear( if (!ibuf_bitmap_page(zip_size, i)) { count += buf_read_page_low( - &err, FALSE, + &err, false, ibuf_mode, space, zip_size, FALSE, tablespace_version, i); if (err == DB_TABLESPACE_DELETED) { @@ -754,7 +759,7 @@ UNIV_INTERN void buf_read_ibuf_merge_pages( /*======================*/ - ibool sync, /*!< in: TRUE if the caller + bool sync, /*!< in: true if the caller wants this function to wait for the highest address page to get read in, before this @@ -893,11 +898,11 @@ buf_read_recv_pages( os_aio_print_debug = FALSE; if ((i + 1 == n_stored) && sync) { - buf_read_page_low(&err, TRUE, BUF_READ_ANY_PAGE, space, + buf_read_page_low(&err, true, BUF_READ_ANY_PAGE, space, zip_size, TRUE, tablespace_version, page_nos[i]); } else { - buf_read_page_low(&err, FALSE, BUF_READ_ANY_PAGE + buf_read_page_low(&err, false, BUF_READ_ANY_PAGE | OS_AIO_SIMULATED_WAKE_LATER, space, zip_size, TRUE, tablespace_version, page_nos[i]); diff --git a/storage/innobase/compile-innodb b/storage/innobase/compile-innodb index 6b0b2df66da..77d2244f2bb 100644..100755 --- a/storage/innobase/compile-innodb +++ b/storage/innobase/compile-innodb @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2013, 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 diff --git a/storage/innobase/dict/dict0boot.cc b/storage/innobase/dict/dict0boot.cc index eea10759fcd..1a1dd29a202 100644 --- a/storage/innobase/dict/dict0boot.cc +++ b/storage/innobase/dict/dict0boot.cc @@ -32,7 +32,6 @@ Created 4/18/1996 Heikki Tuuri #include "dict0crea.h" #include "btr0btr.h" #include "dict0load.h" -#include "dict0load.h" #include "trx0trx.h" #include "srv0srv.h" #include "ibuf0ibuf.h" diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc index 864150b324a..eba5417dc76 100644 --- a/storage/innobase/dict/dict0crea.cc +++ b/storage/innobase/dict/dict0crea.cc @@ -44,6 +44,7 @@ Created 1/8/1996 Heikki Tuuri #include "ut0vec.h" #include "dict0priv.h" #include "fts0priv.h" +#include "ha_prototypes.h" /*****************************************************************//** Based on a table object, this function builds the entry to be inserted @@ -802,6 +803,7 @@ dict_truncate_index_tree( const byte* ptr; ulint len; dict_index_t* index; + bool has_been_dropped = false; ut_ad(mutex_own(&(dict_sys->mutex))); ut_a(!dict_table_is_comp(dict_sys->sys_indexes)); @@ -814,11 +816,7 @@ dict_truncate_index_tree( root_page_no = mtr_read_ulint(ptr, MLOG_4BYTES, mtr); if (drop && root_page_no == FIL_NULL) { - /* The tree has been freed. */ - - ut_print_timestamp(stderr); - fprintf(stderr, " InnoDB: Trying to TRUNCATE" - " a missing index of table %s!\n", table->name); + has_been_dropped = true; drop = FALSE; } @@ -891,11 +889,22 @@ create: for (index = UT_LIST_GET_FIRST(table->indexes); index; index = UT_LIST_GET_NEXT(indexes, index)) { - if (index->id == index_id && !(index->type & DICT_FTS)) { - root_page_no = btr_create(type, space, zip_size, - index_id, index, mtr); - index->page = (unsigned int) root_page_no; - return(root_page_no); + if (index->id == index_id) { + if (index->type & DICT_FTS) { + return(FIL_NULL); + } else { + if (has_been_dropped) { + fprintf(stderr, " InnoDB: Trying to" + " TRUNCATE a missing index of" + " table %s!\n", + index->table->name); + } + + root_page_no = btr_create(type, space, zip_size, + index_id, index, mtr); + index->page = (unsigned int) root_page_no; + return(root_page_no); + } } } @@ -1453,11 +1462,11 @@ static __attribute__((nonnull, warn_unused_result)) dberr_t dict_foreign_eval_sql( /*==================*/ - pars_info_t* info, /*!< in: info struct, or NULL */ + pars_info_t* info, /*!< in: info struct */ const char* sql, /*!< in: SQL string to evaluate */ - dict_table_t* table, /*!< in: table */ - dict_foreign_t* foreign,/*!< in: foreign */ - trx_t* trx) /*!< in: transaction */ + const char* name, /*!< in: table name (for diagnostics) */ + const char* id, /*!< in: foreign key id */ + trx_t* trx) /*!< in/out: transaction */ { dberr_t error; FILE* ef = dict_foreign_err_file; @@ -1470,9 +1479,9 @@ dict_foreign_eval_sql( ut_print_timestamp(ef); fputs(" Error in foreign key constraint creation for table ", ef); - ut_print_name(ef, trx, TRUE, table->name); + ut_print_name(ef, trx, TRUE, name); fputs(".\nA foreign key constraint of name ", ef); - ut_print_name(ef, trx, TRUE, foreign->id); + ut_print_name(ef, trx, TRUE, id); fputs("\nalready exists." " (Note that internally InnoDB adds 'databasename'\n" "in front of the user-defined constraint name.)\n" @@ -1499,7 +1508,7 @@ dict_foreign_eval_sql( ut_print_timestamp(ef); fputs(" Internal error in foreign key constraint creation" " for table ", ef); - ut_print_name(ef, trx, TRUE, table->name); + ut_print_name(ef, trx, TRUE, name); fputs(".\n" "See the MySQL .err log in the datadir" " for more information.\n", ef); @@ -1519,10 +1528,10 @@ static __attribute__((nonnull, warn_unused_result)) dberr_t dict_create_add_foreign_field_to_dictionary( /*========================================*/ - ulint field_nr, /*!< in: foreign field number */ - dict_table_t* table, /*!< in: table */ - dict_foreign_t* foreign, /*!< in: foreign */ - trx_t* trx) /*!< in: transaction */ + ulint field_nr, /*!< in: field number */ + const char* table_name, /*!< in: table name */ + const dict_foreign_t* foreign, /*!< in: foreign */ + trx_t* trx) /*!< in/out: transaction */ { pars_info_t* info = pars_info_create(); @@ -1543,48 +1552,26 @@ dict_create_add_foreign_field_to_dictionary( "INSERT INTO SYS_FOREIGN_COLS VALUES" "(:id, :pos, :for_col_name, :ref_col_name);\n" "END;\n", - table, foreign, trx)); + table_name, foreign->id, trx)); } /********************************************************************//** -Add a single foreign key definition to the data dictionary tables in the -database. We also generate names to constraints that were not named by the -user. A generated constraint has a name of the format -databasename/tablename_ibfk_NUMBER, where the numbers start from 1, and -are given locally for this table, that is, the number is not global, as in -the old format constraints < 4.0.18 it used to be. +Add a foreign key definition to the data dictionary tables. @return error code or DB_SUCCESS */ UNIV_INTERN dberr_t dict_create_add_foreign_to_dictionary( /*==================================*/ - ulint* id_nr, /*!< in/out: number to use in id generation; - incremented if used */ - dict_table_t* table, /*!< in: table */ - dict_foreign_t* foreign,/*!< in: foreign */ - trx_t* trx) /*!< in/out: dictionary transaction */ + const char* name, /*!< in: table name */ + const dict_foreign_t* foreign,/*!< in: foreign key */ + trx_t* trx) /*!< in/out: dictionary transaction */ { dberr_t error; - ulint i; - pars_info_t* info = pars_info_create(); - if (foreign->id == NULL) { - /* Generate a new constraint id */ - char* id; - ulint namelen = strlen(table->name); - - id = static_cast<char*>(mem_heap_alloc( - foreign->heap, namelen + 20)); - - /* no overflow if number < 1e13 */ - sprintf(id, "%s_ibfk_%lu", table->name, (ulong) (*id_nr)++); - foreign->id = id; - } - pars_info_add_str_literal(info, "id", foreign->id); - pars_info_add_str_literal(info, "for_name", table->name); + pars_info_add_str_literal(info, "for_name", name); pars_info_add_str_literal(info, "ref_name", foreign->referenced_table_name); @@ -1598,16 +1585,16 @@ dict_create_add_foreign_to_dictionary( "INSERT INTO SYS_FOREIGN VALUES" "(:id, :for_name, :ref_name, :n_cols);\n" "END;\n" - , table, foreign, trx); + , name, foreign->id, trx); if (error != DB_SUCCESS) { return(error); } - for (i = 0; i < foreign->n_fields; i++) { + for (ulint i = 0; i < foreign->n_fields; i++) { error = dict_create_add_foreign_field_to_dictionary( - i, table, foreign, trx); + i, name, foreign, trx); if (error != DB_SUCCESS) { @@ -1654,7 +1641,15 @@ dict_create_add_foreigns_to_dictionary( foreign; foreign = UT_LIST_GET_NEXT(foreign_list, foreign)) { - error = dict_create_add_foreign_to_dictionary(&number, table, + error = dict_create_add_foreign_id(&number, table->name, + foreign); + + if (error != DB_SUCCESS) { + + return(error); + } + + error = dict_create_add_foreign_to_dictionary(table->name, foreign, trx); if (error != DB_SUCCESS) { diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 5bcc3c58802..1769807dd6a 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -413,7 +413,8 @@ dict_table_try_drop_aborted( trx_set_dict_operation(trx, TRX_DICT_OP_INDEX); if (table == NULL) { - table = dict_table_open_on_id_low(table_id); + table = dict_table_open_on_id_low( + table_id, DICT_ERR_IGNORE_NONE); } else { ut_ad(table->id == table_id); } @@ -786,9 +787,7 @@ dict_table_open_on_id( /*==================*/ table_id_t table_id, /*!< in: table id */ ibool dict_locked, /*!< in: TRUE=data dictionary locked */ - ibool try_drop) /*!< in: TRUE=try to drop any orphan - indexes after an aborted online - index creation */ + dict_table_op_t table_op) /*!< in: operation to perform */ { dict_table_t* table; @@ -798,7 +797,11 @@ dict_table_open_on_id( ut_ad(mutex_own(&dict_sys->mutex)); - table = dict_table_open_on_id_low(table_id); + table = dict_table_open_on_id_low( + table_id, + table_op == DICT_TABLE_OP_LOAD_TABLESPACE + ? DICT_ERR_IGNORE_RECOVER_LOCK + : DICT_ERR_IGNORE_NONE); if (table != NULL) { @@ -812,7 +815,8 @@ dict_table_open_on_id( } if (!dict_locked) { - dict_table_try_drop_aborted_and_mutex_exit(table, try_drop); + dict_table_try_drop_aborted_and_mutex_exit( + table, table_op == DICT_TABLE_OP_DROP_ORPHAN); } return(table); @@ -1446,8 +1450,8 @@ dict_table_rename_in_cache( ibool exists; char* filepath; - ut_ad(table->space != TRX_SYS_SPACE);
-
+ ut_ad(table->space != TRX_SYS_SPACE); + if (DICT_TF_HAS_DATA_DIR(table->flags)) { dict_get_and_save_data_dir_path(table, true); @@ -1459,12 +1463,13 @@ dict_table_rename_in_cache( filepath = fil_make_ibd_name(table->name, false); } - fil_delete_tablespace(table->space, BUF_REMOVE_FLUSH_NO_WRITE);
+ fil_delete_tablespace(table->space, BUF_REMOVE_ALL_NO_WRITE); /* Delete any temp file hanging around. */ if (os_file_status(filepath, &exists, &type) && exists - && !os_file_delete_if_exists(filepath)) { + && !os_file_delete_if_exists(innodb_file_temp_key, + filepath)) { ib_logf(IB_LOG_LEVEL_INFO, "Delete of %s failed.", filepath); @@ -1606,22 +1611,78 @@ dict_table_rename_in_cache( dict_mem_foreign_table_name_lookup_set(foreign, FALSE); } if (strchr(foreign->id, '/')) { + /* This is a >= 4.0.18 format id */ + ulint db_len; char* old_id; + char old_name_cs_filename[MAX_TABLE_NAME_LEN+20]; + uint errors = 0; + + /* All table names are internally stored in charset + my_charset_filename (except the temp tables and the + partition identifier suffix in partition tables). The + foreign key constraint names are internally stored + in UTF-8 charset. The variable fkid here is used + to store foreign key constraint name in charset + my_charset_filename for comparison further below. */ + char fkid[MAX_TABLE_NAME_LEN+20]; + ibool on_tmp = FALSE; + + /* The old table name in my_charset_filename is stored + in old_name_cs_filename */ + + strncpy(old_name_cs_filename, old_name, + MAX_TABLE_NAME_LEN); + if (strstr(old_name, TEMP_TABLE_PATH_PREFIX) == NULL) { + + innobase_convert_to_system_charset( + strchr(old_name_cs_filename, '/') + 1, + strchr(old_name, '/') + 1, + MAX_TABLE_NAME_LEN, &errors); + + if (errors) { + /* There has been an error to convert + old table into UTF-8. This probably + means that the old table name is + actually in UTF-8. */ + innobase_convert_to_filename_charset( + strchr(old_name_cs_filename, + '/') + 1, + strchr(old_name, '/') + 1, + MAX_TABLE_NAME_LEN); + } else { + /* Old name already in + my_charset_filename */ + strncpy(old_name_cs_filename, old_name, + MAX_TABLE_NAME_LEN); + } + } - /* This is a >= 4.0.18 format id */ + strncpy(fkid, foreign->id, MAX_TABLE_NAME_LEN); + + if (strstr(fkid, TEMP_TABLE_PATH_PREFIX) == NULL) { + innobase_convert_to_filename_charset( + strchr(fkid, '/') + 1, + strchr(foreign->id, '/') + 1, + MAX_TABLE_NAME_LEN+20); + } else { + on_tmp = TRUE; + } old_id = mem_strdup(foreign->id); - if (ut_strlen(foreign->id) > ut_strlen(old_name) + if (ut_strlen(fkid) > ut_strlen(old_name_cs_filename) + ((sizeof dict_ibfk) - 1) - && !memcmp(foreign->id, old_name, - ut_strlen(old_name)) - && !memcmp(foreign->id + ut_strlen(old_name), + && !memcmp(fkid, old_name_cs_filename, + ut_strlen(old_name_cs_filename)) + && !memcmp(fkid + ut_strlen(old_name_cs_filename), dict_ibfk, (sizeof dict_ibfk) - 1)) { /* This is a generated >= 4.0.18 format id */ + char table_name[MAX_TABLE_NAME_LEN] = ""; + uint errors = 0; + if (strlen(table->name) > strlen(old_name)) { foreign->id = static_cast<char*>( mem_heap_alloc( @@ -1630,11 +1691,36 @@ dict_table_rename_in_cache( + strlen(old_id) + 1)); } + /* Convert the table name to UTF-8 */ + strncpy(table_name, table->name, + MAX_TABLE_NAME_LEN); + innobase_convert_to_system_charset( + strchr(table_name, '/') + 1, + strchr(table->name, '/') + 1, + MAX_TABLE_NAME_LEN, &errors); + + if (errors) { + /* Table name could not be converted + from charset my_charset_filename to + UTF-8. This means that the table name + is already in UTF-8 (#mysql#50). */ + strncpy(table_name, table->name, + MAX_TABLE_NAME_LEN); + } + /* Replace the prefix 'databasename/tablename' with the new names */ - strcpy(foreign->id, table->name); - strcat(foreign->id, - old_id + ut_strlen(old_name)); + strcpy(foreign->id, table_name); + if (on_tmp) { + strcat(foreign->id, + old_id + ut_strlen(old_name)); + } else { + sprintf(strchr(foreign->id, '/') + 1, + "%s%s", + strchr(table_name, '/') +1, + strstr(old_id, "_ibfk_") ); + } + } else { /* This is a >= 4.0.18 format id where the user gave the id name */ @@ -2033,6 +2119,10 @@ dict_index_too_big_for_tree( return(false); } + DBUG_EXECUTE_IF( + "ib_force_create_table", + return(FALSE);); + comp = dict_table_is_comp(table); zip_size = dict_table_zip_size(table); @@ -2047,7 +2137,10 @@ dict_index_too_big_for_tree( number in the page modification log. The maximum allowed node pointer size is half that. */ page_rec_max = page_zip_empty_size(new_index->n_fields, - zip_size) - 1; + zip_size); + if (page_rec_max) { + page_rec_max--; + } page_ptr_max = page_rec_max / 2; /* On a compressed page, there is a two-byte entry in the dense page directory for every record. But there @@ -3117,13 +3210,16 @@ dict_index_t* dict_foreign_find_index( /*====================*/ const dict_table_t* table, /*!< in: table */ + const char** col_names, + /*!< in: column names, or NULL + to use table->col_names */ const char** columns,/*!< in: array of column names */ ulint n_cols, /*!< in: number of columns */ const dict_index_t* types_idx, /*!< in: NULL or an index whose types the column types must match */ - ibool check_charsets, + bool check_charsets, /*!< in: whether to check charsets. only has an effect if types_idx != NULL */ @@ -3139,20 +3235,16 @@ dict_foreign_find_index( index = dict_table_get_first_index(table); while (index != NULL) { - /* Ignore matches that refer to the same instance - (or the index is to be dropped) */ - if (types_idx == index || index->type & DICT_FTS - || index->to_be_dropped) { - - goto next_rec; - - } else if (dict_foreign_qualify_index( - table, columns, n_cols, index, types_idx, - check_charsets, check_null)) { + if (types_idx != index + && !(index->type & DICT_FTS) + && !index->to_be_dropped + && dict_foreign_qualify_index( + table, col_names, columns, n_cols, + index, types_idx, + check_charsets, check_null)) { return(index); } -next_rec: index = dict_table_get_next_index(index); } @@ -3163,6 +3255,8 @@ dict_index_t* wsrep_dict_foreign_find_index( /*====================*/ dict_table_t* table, /*!< in: table */ + const char** col_names, /*!< in: column names, or NULL + to use table->col_names */ const char** columns,/*!< in: array of column names */ ulint n_cols, /*!< in: number of columns */ dict_index_t* types_idx, /*!< in: NULL or an index to whose types the @@ -3175,7 +3269,8 @@ wsrep_dict_foreign_find_index( be declared NOT NULL */ { return dict_foreign_find_index( - table, columns, n_cols, types_idx, check_charsets, check_null); + table, col_names, columns, n_cols, types_idx, check_charsets, + check_null); } #endif /* WITH_WSREP */ /**********************************************************************//** @@ -3230,9 +3325,16 @@ UNIV_INTERN dberr_t dict_foreign_add_to_cache( /*======================*/ - dict_foreign_t* foreign, /*!< in, own: foreign key constraint */ - ibool check_charsets) /*!< in: TRUE=check charset - compatibility */ + dict_foreign_t* foreign, + /*!< in, own: foreign key constraint */ + const char** col_names, + /*!< in: column names, or NULL to use + foreign->foreign_table->col_names */ + bool check_charsets, + /*!< in: whether to check charset + compatibility */ + dict_err_ignore_t ignore_err) + /*!< in: error to be ignored */ { dict_table_t* for_table; dict_table_t* ref_table; @@ -3265,14 +3367,15 @@ dict_foreign_add_to_cache( for_in_cache = foreign; } - if (for_in_cache->referenced_table == NULL && ref_table) { + if (ref_table && !for_in_cache->referenced_table) { index = dict_foreign_find_index( - ref_table, + ref_table, NULL, for_in_cache->referenced_col_names, for_in_cache->n_fields, for_in_cache->foreign_index, - check_charsets, FALSE); + check_charsets, false); - if (index == NULL) { + if (index == NULL + && !(ignore_err & DICT_ERR_IGNORE_FK_NOKEY)) { dict_foreign_error_report( ef, for_in_cache, "there is no index in referenced table" @@ -3297,9 +3400,9 @@ dict_foreign_add_to_cache( added_to_referenced_list = TRUE; } - if (for_in_cache->foreign_table == NULL && for_table) { + if (for_table && !for_in_cache->foreign_table) { index = dict_foreign_find_index( - for_table, + for_table, col_names, for_in_cache->foreign_col_names, for_in_cache->n_fields, for_in_cache->referenced_index, check_charsets, @@ -3307,7 +3410,8 @@ dict_foreign_add_to_cache( & (DICT_FOREIGN_ON_DELETE_SET_NULL | DICT_FOREIGN_ON_UPDATE_SET_NULL)); - if (index == NULL) { + if (index == NULL + && !(ignore_err & DICT_ERR_IGNORE_FK_NOKEY)) { dict_foreign_error_report( ef, for_in_cache, "there is no index in the table" @@ -3369,14 +3473,27 @@ dict_scan_to( const char* string) /*!< in: look for this */ { char quote = '\0'; + bool escape = false; for (; *ptr; ptr++) { if (*ptr == quote) { /* Closing quote character: do not look for starting quote or the keyword. */ - quote = '\0'; + + /* If the quote character is escaped by a + backslash, ignore it. */ + if (escape) { + escape = false; + } else { + quote = '\0'; + } } else if (quote) { /* Within quotes: do nothing. */ + if (escape) { + escape = false; + } else if (*ptr == '\\') { + escape = true; + } } else if (*ptr == '`' || *ptr == '"' || *ptr == '\'') { /* Starting quote: remember the quote character. */ quote = *ptr; @@ -3791,6 +3908,11 @@ dict_strip_comments( char* ptr; /* unclosed quote character (0 if none) */ char quote = 0; + bool escape = false; + + DBUG_ENTER("dict_strip_comments"); + + DBUG_PRINT("dict_strip_comments", ("%s", sql_string)); str = static_cast<char*>(mem_alloc(sql_length + 1)); @@ -3805,16 +3927,29 @@ end_of_string: ut_a(ptr <= str + sql_length); - return(str); + DBUG_PRINT("dict_strip_comments", ("%s", str)); + DBUG_RETURN(str); } if (*sptr == quote) { /* Closing quote character: do not look for starting quote or comments. */ - quote = 0; + + /* If the quote character is escaped by a + backslash, ignore it. */ + if (escape) { + escape = false; + } else { + quote = 0; + } } else if (quote) { /* Within quotes: do not look for starting quotes or comments. */ + if (escape) { + escape = false; + } else if (*sptr == '\\') { + escape = true; + } } else if (*sptr == '"' || *sptr == '`' || *sptr == '\'') { /* Starting quote: remember the quote character. */ quote = *sptr; @@ -4125,18 +4260,45 @@ loop: goto loop; } + if (my_isspace(cs, *ptr)) { + ptr1 = dict_accept(cs, ptr, "IF", &success); + + if (success) { + if (!my_isspace(cs, *ptr1)) { + goto loop; + } + ptr1 = dict_accept(cs, ptr1, "NOT", &success); + if (!success) { + goto loop; + } + ptr1 = dict_accept(cs, ptr1, "EXISTS", &success); + if (!success) { + goto loop; + } + ptr = ptr1; + } + } + ptr = dict_accept(cs, ptr, "(", &success); if (!success) { - /* MySQL allows also an index id before the '('; we - skip it */ - ptr = dict_skip_word(cs, ptr, &success); - - if (!success) { - dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + if (constraint_name) { + /* MySQL allows also an index id before the '('; we + skip it */ + ptr = dict_skip_word(cs, ptr, &success); + if (!success) { + dict_foreign_report_syntax_err( + name, start_of_latest_foreign, ptr); + return(DB_CANNOT_ADD_CONSTRAINT); + } + } + else { + while (my_isspace(cs, *ptr)) { + ptr++; + } - return(DB_CANNOT_ADD_CONSTRAINT); + ptr = dict_scan_id(cs, ptr, heap, + &constraint_name, FALSE, FALSE); } ptr = dict_accept(cs, ptr, "(", &success); @@ -4183,10 +4345,13 @@ col_loop1: } /* Try to find an index which contains the columns - as the first fields and in the right order */ + as the first fields and in the right order. There is + no need to check column type match (on types_idx), since + the referenced table can be NULL if foreign_key_checks is + set to 0 */ - index = dict_foreign_find_index(table, column_names, i, - NULL, TRUE, FALSE); + index = dict_foreign_find_index( + table, NULL, column_names, i, NULL, TRUE, FALSE); if (!index) { mutex_enter(&dict_foreign_err_mutex); @@ -4458,7 +4623,7 @@ try_find_index: foreign->foreign_index */ if (referenced_table) { - index = dict_foreign_find_index(referenced_table, + index = dict_foreign_find_index(referenced_table, NULL, column_names, i, foreign->foreign_index, TRUE, FALSE); @@ -4607,6 +4772,7 @@ dict_foreign_parse_drop_constraints( char* str; size_t len; const char* ptr; + const char* ptr1; const char* id; struct charset_info_st* cs; @@ -4657,6 +4823,16 @@ loop: goto syntax_error; } + ptr1 = dict_accept(cs, ptr, "IF", &success); + + if (success && my_isspace(cs, *ptr1)) { + ptr1 = dict_accept(cs, ptr1, "EXISTS", &success); + if (success) { + + ptr = ptr1; + } + } + ptr = dict_scan_id(cs, ptr, heap, &id, FALSE, TRUE); if (id == NULL) { @@ -5654,38 +5830,42 @@ dict_table_get_index_on_name( /**********************************************************************//** Replace the index passed in with another equivalent index in the -foreign key lists of the table. */ +foreign key lists of the table. +@return whether all replacements were found */ UNIV_INTERN -void +bool dict_foreign_replace_index( /*=======================*/ dict_table_t* table, /*!< in/out: table */ - const dict_index_t* index, /*!< in: index to be replaced */ - const trx_t* trx) /*!< in: transaction handle */ + const char** col_names, + /*!< in: column names, or NULL + to use table->col_names */ + const dict_index_t* index) /*!< in: index to be replaced */ { + bool found = true; dict_foreign_t* foreign; ut_ad(index->to_be_dropped); + ut_ad(index->table == table); for (foreign = UT_LIST_GET_FIRST(table->foreign_list); foreign; foreign = UT_LIST_GET_NEXT(foreign_list, foreign)) { - dict_index_t* new_index; - if (foreign->foreign_index == index) { ut_ad(foreign->foreign_table == index->table); - new_index = dict_foreign_find_index( - foreign->foreign_table, + dict_index_t* new_index = dict_foreign_find_index( + foreign->foreign_table, col_names, foreign->foreign_col_names, foreign->n_fields, index, /*check_charsets=*/TRUE, /*check_null=*/FALSE); - /* There must exist an alternative index, - since this must have been checked earlier. */ - ut_a(new_index || !trx->check_foreigns); - ut_ad(!new_index || new_index->table == index->table); - ut_ad(!new_index || !new_index->to_be_dropped); + if (new_index) { + ut_ad(new_index->table == index->table); + ut_ad(!new_index->to_be_dropped); + } else { + found = false; + } foreign->foreign_index = new_index; } @@ -5695,25 +5875,28 @@ dict_foreign_replace_index( foreign; foreign = UT_LIST_GET_NEXT(referenced_list, foreign)) { - dict_index_t* new_index; - if (foreign->referenced_index == index) { ut_ad(foreign->referenced_table == index->table); - new_index = dict_foreign_find_index( - foreign->referenced_table, + dict_index_t* new_index = dict_foreign_find_index( + foreign->referenced_table, NULL, foreign->referenced_col_names, foreign->n_fields, index, /*check_charsets=*/TRUE, /*check_null=*/FALSE); /* There must exist an alternative index, since this must have been checked earlier. */ - ut_a(new_index || !trx->check_foreigns); - ut_ad(!new_index || new_index->table == index->table); - ut_ad(!new_index || !new_index->to_be_dropped); + if (new_index) { + ut_ad(new_index->table == index->table); + ut_ad(!new_index->to_be_dropped); + } else { + found = false; + } foreign->referenced_index = new_index; } } + + return(found); } /**********************************************************************//** @@ -6137,7 +6320,7 @@ dict_close(void) } } -# ifdef UNIV_DEBUG +#ifdef UNIV_DEBUG /**********************************************************************//** Validate the dictionary table LRU list. @return TRUE if valid */ @@ -6222,7 +6405,7 @@ dict_non_lru_find_table( return(FALSE); } -# endif /* UNIV_DEBUG */ +#endif /* UNIV_DEBUG */ /*********************************************************************//** Check an index to see whether its first fields are the columns in the array, in the same order and is not marked for deletion and is not the same @@ -6232,67 +6415,66 @@ UNIV_INTERN bool dict_foreign_qualify_index( /*=======================*/ - const dict_table_t* table, /*!< in: table */ - const char** columns,/*!< in: array of column names */ - ulint n_cols, /*!< in: number of columns */ - const dict_index_t* index, /*!< in: index to check */ - const dict_index_t* types_idx, - /*!< in: NULL or an index - whose types the column types - must match */ - ibool check_charsets, - /*!< in: whether to check - charsets. only has an effect - if types_idx != NULL */ - ulint check_null) - /*!< in: nonzero if none of - the columns must be declared - NOT NULL */ + const dict_table_t* table, /*!< in: table */ + const char** col_names, + /*!< in: column names, or NULL + to use table->col_names */ + const char** columns,/*!< in: array of column names */ + ulint n_cols, /*!< in: number of columns */ + const dict_index_t* index, /*!< in: index to check */ + const dict_index_t* types_idx, + /*!< in: NULL or an index + whose types the column types + must match */ + bool check_charsets, + /*!< in: whether to check + charsets. only has an effect + if types_idx != NULL */ + ulint check_null) + /*!< in: nonzero if none of + the columns must be declared + NOT NULL */ { - ulint i; - - if (dict_index_get_n_fields(index) < n_cols) { - return(false); - } - - for (i= 0; i < n_cols; i++) { - dict_field_t* field; - const char* col_name; - - field = dict_index_get_nth_field(index, i); - - col_name = dict_table_get_col_name( - table, dict_col_get_no(field->col)); + if (dict_index_get_n_fields(index) < n_cols) { + return(false); + } - if (field->prefix_len != 0) { - /* We do not accept column prefix - indexes here */ + for (ulint i = 0; i < n_cols; i++) { + dict_field_t* field; + const char* col_name; + ulint col_no; - break; - } + field = dict_index_get_nth_field(index, i); + col_no = dict_col_get_no(field->col); - if (0 != innobase_strcasecmp(columns[i], - col_name)) { - break; - } + if (field->prefix_len != 0) { + /* We do not accept column prefix + indexes here */ + return(false); + } - if (check_null - && (field->col->prtype & DATA_NOT_NULL)) { + if (check_null + && (field->col->prtype & DATA_NOT_NULL)) { + return(false); + } - break; - } + col_name = col_names + ? col_names[col_no] + : dict_table_get_col_name(table, col_no); - if (types_idx && !cmp_cols_are_equal( - dict_index_get_nth_col(index, i), - dict_index_get_nth_col(types_idx, - i), - check_charsets)) { + if (0 != innobase_strcasecmp(columns[i], col_name)) { + return(false); + } - break; - } - } + if (types_idx && !cmp_cols_are_equal( + dict_index_get_nth_col(index, i), + dict_index_get_nth_col(types_idx, i), + check_charsets)) { + return(false); + } + } - return((i == n_cols) ? true : false); + return(true); } /*********************************************************************//** diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index d423a3b7304..81ab765b524 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -960,7 +960,7 @@ UNIV_INTERN void dict_check_tablespaces_and_store_max_id( /*====================================*/ - ibool in_crash_recovery) /*!< in: are we doing a crash recovery */ + dict_check_t dict_check) /*!< in: how to check */ { dict_table_t* sys_tables; dict_index_t* sys_index; @@ -1039,7 +1039,7 @@ loop: ib_logf(IB_LOG_LEVEL_ERROR, "Table '%s' in InnoDB data dictionary" " has unknown type %lx", table_name, flags); - + mem_free(name); goto loop; } @@ -1085,15 +1085,36 @@ loop: if (space_id == 0) { /* The system tablespace always exists. */ ut_ad(!discarded); - } else if (in_crash_recovery) { + goto next_tablespace; + } + + switch (dict_check) { + case DICT_CHECK_ALL_LOADED: /* All tablespaces should have been found in fil_load_single_table_tablespaces(). */ fil_space_for_table_exists_in_mem( space_id, name, TRUE, !(is_temp || discarded), false, NULL, 0); + break; - } else if (!discarded) { + case DICT_CHECK_SOME_LOADED: + /* Some tablespaces may have been opened in + trx_resurrect_table_locks(). */ + if (fil_space_for_table_exists_in_mem( + space_id, name, FALSE, FALSE, + false, NULL, 0)) { + break; + } + /* fall through */ + case DICT_CHECK_NONE_LOADED: + if (discarded) { + ib_logf(IB_LOG_LEVEL_INFO, + "DISCARD flag set for table '%s'," + " ignored.", + table_name); + break; + } /* It is a normal database startup: create the space object and check that the .ibd file exists. @@ -1127,18 +1148,16 @@ loop: if (filepath) { mem_free(filepath); } - } else { - ib_logf(IB_LOG_LEVEL_INFO, - "DISCARD flag set for table '%s', ignored.", - table_name); - } - mem_free(name); + break; + } if (space_id > max_space_id) { max_space_id = space_id; } +next_tablespace: + mem_free(name); mtr_start(&mtr); btr_pcur_restore_position(BTR_SEARCH_LEAF, &pcur, &mtr); @@ -1339,7 +1358,7 @@ dict_load_columns( BTR_SEARCH_LEAF, &pcur, &mtr); for (i = 0; i + DATA_N_SYS_COLS < (ulint) table->n_cols; i++) { const char* err_msg; - const char* name; + const char* name = NULL; rec = btr_pcur_get_rec(&pcur); @@ -1808,6 +1827,23 @@ dict_load_indexes( rec = btr_pcur_get_rec(&pcur); + if ((ignore_err & DICT_ERR_IGNORE_RECOVER_LOCK) + && rec_get_n_fields_old(rec) + == DICT_NUM_FIELDS__SYS_INDEXES) { + const byte* field; + ulint len; + field = rec_get_nth_field_old( + rec, DICT_FLD__SYS_INDEXES__NAME, &len); + + if (len != UNIV_SQL_NULL + && char(*field) == char(TEMP_INDEX_PREFIX)) { + /* Skip indexes whose name starts with + TEMP_INDEX_PREFIX, because they will + be dropped during crash recovery. */ + goto next_rec; + } + } + err_msg = dict_load_index_low(buf, table->name, heap, rec, TRUE, &index); ut_ad((index == NULL && err_msg != NULL) @@ -2317,11 +2353,14 @@ err_exit: table->ibd_file_missing = TRUE; } else { - ib_logf(IB_LOG_LEVEL_ERROR, - "Failed to find tablespace for table '%s' " - "in the cache. Attempting to load the " - "tablespace with space id %lu.", - table_name, (ulong) table->space); + if (!(ignore_err & DICT_ERR_IGNORE_RECOVER_LOCK)) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Failed to find tablespace for " + "table '%s' in the cache. " + "Attempting to load the tablespace " + "with space id %lu.", + table_name, (ulong) table->space); + } /* Use the remote filepath if needed. */ if (DICT_TF_HAS_DATA_DIR(table->flags)) { @@ -2368,13 +2407,15 @@ err_exit: /* If there is no tablespace for the table then we only need to load the index definitions. So that we can IMPORT the tablespace - later. */ - if (table->ibd_file_missing) { - err = dict_load_indexes( - table, heap, DICT_ERR_IGNORE_ALL); - } else { - err = dict_load_indexes(table, heap, ignore_err); - } + later. When recovering table locks for resurrected incomplete + transactions, the tablespace should exist, because DDL operations + were not allowed while the table is being locked by a transaction. */ + dict_err_ignore_t index_load_err = + !(ignore_err & DICT_ERR_IGNORE_RECOVER_LOCK) + && table->ibd_file_missing + ? DICT_ERR_IGNORE_ALL + : ignore_err; + err = dict_load_indexes(table, heap, index_load_err); if (err == DB_INDEX_CORRUPT) { /* Refuse to load the table if the table has a corrupted @@ -2411,9 +2452,16 @@ err_exit: if (!cached || table->ibd_file_missing) { /* Don't attempt to load the indexes from disk. */ } else if (err == DB_SUCCESS) { - err = dict_load_foreigns(table->name, TRUE, TRUE); + err = dict_load_foreigns(table->name, NULL, true, true, + ignore_err); if (err != DB_SUCCESS) { + ib_logf(IB_LOG_LEVEL_WARN, + "Load table '%s' failed, the table has missing " + "foreign key indexes. Turn off " + "'foreign_key_checks' and try again.", + table->name); + dict_table_remove_from_cache(table); table = NULL; } else { @@ -2474,7 +2522,9 @@ UNIV_INTERN dict_table_t* dict_load_table_on_id( /*==================*/ - table_id_t table_id) /*!< in: table id */ + table_id_t table_id, /*!< in: table id */ + dict_err_ignore_t ignore_err) /*!< in: errors to ignore + when loading the table */ { byte id_buf[8]; btr_pcur_t pcur; @@ -2551,7 +2601,7 @@ check_rec: table = dict_load_table( mem_heap_strdupl( heap, (char*) field, len), - TRUE, DICT_ERR_IGNORE_NONE); + TRUE, ignore_err); } } } @@ -2710,18 +2760,25 @@ dict_load_foreign_cols( /***********************************************************************//** Loads a foreign key constraint to the dictionary cache. @return DB_SUCCESS or error code */ -static __attribute__((nonnull, warn_unused_result)) +static __attribute__((nonnull(1), warn_unused_result)) dberr_t dict_load_foreign( /*==============*/ - const char* id, /*!< in: foreign constraint id, must be + const char* id, + /*!< in: foreign constraint id, must be '\0'-terminated */ - ibool check_charsets, - /*!< in: TRUE=check charset compatibility */ - ibool check_recursive) - /*!< in: Whether to record the foreign table + const char** col_names, + /*!< in: column names, or NULL + to use foreign->foreign_table->col_names */ + bool check_recursive, + /*!< in: whether to record the foreign table parent count to avoid unlimited recursive load of chained foreign tables */ + bool check_charsets, + /*!< in: whether to check charset + compatibility */ + dict_err_ignore_t ignore_err) + /*!< in: error to be ignored */ { dict_foreign_t* foreign; dict_table_t* sys_foreign; @@ -2890,7 +2947,8 @@ dict_load_foreign( a new foreign key constraint but loading one from the data dictionary. */ - return(dict_foreign_add_to_cache(foreign, check_charsets)); + return(dict_foreign_add_to_cache(foreign, col_names, check_charsets, + ignore_err)); } /***********************************************************************//** @@ -2903,12 +2961,16 @@ already in the dictionary cache. UNIV_INTERN dberr_t dict_load_foreigns( + const char* table_name, /*!< in: table name */ + const char** col_names, /*!< in: column names, or NULL + to use table->col_names */ + bool check_recursive,/*!< in: Whether to check + recursive load of tables + chained by FK */ + bool check_charsets, /*!< in: whether to check + charset compatibility */ + dict_err_ignore_t ignore_err) /*!< in: error to be ignored */ /*===============*/ - const char* table_name, /*!< in: table name */ - ibool check_recursive,/*!< in: Whether to check recursive - load of tables chained by FK */ - ibool check_charsets) /*!< in: TRUE=check charset - compatibility */ { ulint tuple_buf[(DTUPLE_EST_ALLOC(1) + sizeof(ulint) - 1) / sizeof(ulint)]; @@ -2992,13 +3054,12 @@ loop: may not be the same case, but the previous comparison showed that they match with no-case. */ - if ((innobase_get_lower_case_table_names() != 2) - && (0 != ut_memcmp(field, table_name, len))) { + if (rec_get_deleted_flag(rec, 0)) { goto next_rec; } - if (rec_get_deleted_flag(rec, 0)) { - + if ((innobase_get_lower_case_table_names() != 2) + && (0 != ut_memcmp(field, table_name, len))) { goto next_rec; } @@ -3020,7 +3081,8 @@ loop: /* Load the foreign constraint definition to the dictionary cache */ - err = dict_load_foreign(fk_id, check_charsets, check_recursive); + err = dict_load_foreign(fk_id, col_names, + check_recursive, check_charsets, ignore_err); if (err != DB_SUCCESS) { btr_pcur_close(&pcur); diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc index 116a6a6d96a..565a46b1832 100644 --- a/storage/innobase/dict/dict0mem.cc +++ b/storage/innobase/dict/dict0mem.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -53,10 +53,6 @@ Created 1/8/1996 Heikki Tuuri UNIV_INTERN mysql_pfs_key_t autoinc_mutex_key; #endif /* UNIV_PFS_MUTEX */ -/** Prefix for tmp tables, adopted from sql/table.h */ -#define tmp_file_prefix "#sql" -#define tmp_file_prefix_length 4 - /**********************************************************************//** Creates a table memory object. @return own: table object */ @@ -143,10 +139,12 @@ dict_mem_table_free( || DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID) || DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_ADD_DOC_ID)) { if (table->fts) { + if (table->cached) { + fts_optimize_remove_table(table); + } + fts_free(table); } - - fts_optimize_remove_table(table); } #ifndef UNIV_HOTBACKUP mutex_free(&(table->autoinc_mutex)); diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index 25bcc87d93c..8bf02f9785c 100644 --- a/storage/innobase/dict/dict0stats.cc +++ b/storage/innobase/dict/dict0stats.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2009, 2013, 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 @@ -34,7 +34,6 @@ Created Jan 06, 2010 Vasil Dimov #include "dict0stats.h" #include "data0type.h" /* dtype_t */ #include "db0err.h" /* dberr_t */ -#include "dyn0dyn.h" /* dyn_array* */ #include "page0page.h" /* page_align() */ #include "pars0pars.h" /* pars_info_create() */ #include "pars0types.h" /* pars_info_t */ @@ -47,6 +46,8 @@ Created Jan 06, 2010 Vasil Dimov #include "ut0rnd.h" /* ut_rnd_interval() */ #include "ut0ut.h" /* ut_format_name(), ut_time() */ +#include <vector> + /* Sampling algorithm description @{ The algorithm is controlled by one number - N_SAMPLE_PAGES(index), @@ -135,12 +136,18 @@ descending to lower levels and fetch N_SAMPLE_PAGES(index) records from that level */ #define N_DIFF_REQUIRED(index) (N_SAMPLE_PAGES(index) * 10) +/* A dynamic array where we store the boundaries of each distinct group +of keys. For example if a btree level is: +index: 0,1,2,3,4,5,6,7,8,9,10,11,12 +data: b,b,b,b,b,b,g,g,j,j,j, x, y +then we would store 5,7,10,11,12 in the array. */ +typedef std::vector<ib_uint64_t> boundaries_t; + /*********************************************************************//** Checks whether an index should be ignored in stats manipulations: * stats fetch * stats recalc * stats save -dict_stats_should_ignore_index() @{ @return true if exists and all tables are ok */ UNIV_INLINE bool @@ -153,12 +160,10 @@ dict_stats_should_ignore_index( || index->to_be_dropped || *index->name == TEMP_INDEX_PREFIX); } -/* @} */ /*********************************************************************//** Checks whether the persistent statistics storage exists and that all tables have the proper structure. -dict_stats_persistent_storage_check() @{ @return true if exists and all tables are ok */ static bool @@ -260,7 +265,6 @@ dict_stats_persistent_storage_check( return(true); } -/* @} */ /*********************************************************************//** Executes a given SQL statement using the InnoDB internal SQL parser @@ -463,8 +467,7 @@ dict_stats_table_clone_create( /*********************************************************************//** Free the resources occupied by an object returned by -dict_stats_table_clone_create(). -dict_stats_table_clone_free() @{ */ +dict_stats_table_clone_create(). */ static void dict_stats_table_clone_free( @@ -473,14 +476,12 @@ dict_stats_table_clone_free( { mem_heap_free(t->heap); } -/* @} */ /*********************************************************************//** Write all zeros (or 1 where it makes sense) into an index statistics members. The resulting stats correspond to an empty index. The caller must own index's table stats latch in X mode -(dict_table_stats_lock(table, RW_X_LATCH)) -dict_stats_empty_index() @{ */ +(dict_table_stats_lock(table, RW_X_LATCH)) */ static void dict_stats_empty_index( @@ -501,12 +502,10 @@ dict_stats_empty_index( index->stat_index_size = 1; index->stat_n_leaf_pages = 1; } -/* @} */ /*********************************************************************//** Write all zeros (or 1 where it makes sense) into a table and its indexes' -statistics members. The resulting stats correspond to an empty table. -dict_stats_empty_table() @{ */ +statistics members. The resulting stats correspond to an empty table. */ static void dict_stats_empty_table( @@ -543,7 +542,6 @@ dict_stats_empty_table( dict_table_stats_unlock(table, RW_X_LATCH); } -/* @} */ /*********************************************************************//** Check whether index's stats are initialized (assert if they are not). */ @@ -573,6 +571,7 @@ dict_stats_assert_initialized_index( &index->stat_n_leaf_pages, sizeof(index->stat_n_leaf_pages)); } + /*********************************************************************//** Check whether table's stats are initialized (assert if they are not). */ static @@ -760,8 +759,7 @@ dict_stats_snapshot_create( /*********************************************************************//** Free the resources occupied by an object returned by -dict_stats_snapshot_create(). -dict_stats_snapshot_free() @{ */ +dict_stats_snapshot_create(). */ static void dict_stats_snapshot_free( @@ -770,24 +768,33 @@ dict_stats_snapshot_free( { dict_stats_table_clone_free(t); } -/* @} */ /*********************************************************************//** Calculates new estimates for index statistics. This function is relatively quick and is used to calculate transient statistics that are not saved on disk. This was the only way to calculate statistics -before the Persistent Statistics feature was introduced. -dict_stats_update_transient_for_index() @{ */ +before the Persistent Statistics feature was introduced. */ static void dict_stats_update_transient_for_index( /*==================================*/ dict_index_t* index) /*!< in/out: index */ { - if (UNIV_LIKELY - (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE - || (srv_force_recovery < SRV_FORCE_NO_LOG_REDO - && dict_index_is_clust(index)))) { + if (srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO + && (srv_force_recovery >= SRV_FORCE_NO_LOG_REDO + || !dict_index_is_clust(index))) { + /* If we have set a high innodb_force_recovery + level, do not calculate statistics, as a badly + corrupted index can cause a crash in it. + Initialize some bogus index cardinality + statistics, so that the data can be queried in + various means, also via secondary indexes. */ + dict_stats_empty_index(index); +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + } else if (ibuf_debug && !dict_index_is_clust(index)) { + dict_stats_empty_index(index); +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + } else { mtr_t mtr; ulint size; mtr_start(&mtr); @@ -816,25 +823,15 @@ dict_stats_update_transient_for_index( index->stat_n_leaf_pages = size; btr_estimate_number_of_different_key_vals(index); - } else { - /* If we have set a high innodb_force_recovery - level, do not calculate statistics, as a badly - corrupted index can cause a crash in it. - Initialize some bogus index cardinality - statistics, so that the data can be queried in - various means, also via secondary indexes. */ - dict_stats_empty_index(index); } } -/* @} */ /*********************************************************************//** Calculates new estimates for table and index statistics. This function is relatively quick and is used to calculate transient statistics that are not saved on disk. This was the only way to calculate statistics before the -Persistent Statistics feature was introduced. -dict_stats_update_transient() @{ */ +Persistent Statistics feature was introduced. */ UNIV_INTERN void dict_stats_update_transient( @@ -900,7 +897,6 @@ dict_stats_update_transient( table->stat_initialized = TRUE; } -/* @} */ /* @{ Pseudo code about the relation between the following functions @@ -938,7 +934,7 @@ dict_stats_analyze_index_level( distinct keys for all prefixes */ ib_uint64_t* total_recs, /*!< out: total number of records */ ib_uint64_t* total_pages, /*!< out: total number of pages */ - dyn_array_t* n_diff_boundaries,/*!< out: boundaries of the groups + boundaries_t* n_diff_boundaries,/*!< out: boundaries of the groups of distinct keys */ mtr_t* mtr) /*!< in/out: mini-transaction */ { @@ -983,9 +979,9 @@ dict_stats_analyze_index_level( /* reset the dynamic arrays n_diff_boundaries[0..n_uniq-1] */ if (n_diff_boundaries != NULL) { for (i = 0; i < n_uniq; i++) { - dyn_array_free(&n_diff_boundaries[i]); - - dyn_array_create(&n_diff_boundaries[i]); + n_diff_boundaries[i].erase( + n_diff_boundaries[i].begin(), + n_diff_boundaries[i].end()); } } @@ -1113,7 +1109,6 @@ dict_stats_analyze_index_level( record, that is - the last one from a group of equal keys */ - void* p; ib_uint64_t idx; /* the index of the current record @@ -1126,11 +1121,7 @@ dict_stats_analyze_index_level( total_recs >= 2 */ idx = *total_recs - 2; - p = dyn_array_push( - &n_diff_boundaries[i], - sizeof(ib_uint64_t)); - - memcpy(p, &idx, sizeof(ib_uint64_t)); + n_diff_boundaries[i].push_back(idx); } /* increment the number of different keys @@ -1191,15 +1182,11 @@ dict_stats_analyze_index_level( last one from the last group of equal keys; this holds for all possible prefixes */ for (i = 0; i < n_uniq; i++) { - void* p; ib_uint64_t idx; idx = *total_recs - 1; - p = dyn_array_push(&n_diff_boundaries[i], - sizeof(ib_uint64_t)); - - memcpy(p, &idx, sizeof(ib_uint64_t)); + n_diff_boundaries[i].push_back(idx); } } @@ -1226,9 +1213,7 @@ dict_stats_analyze_index_level( for (j = 0; j < n_diff[i]; j++) { ib_uint64_t idx; - idx = *(ib_uint64_t*) dyn_array_get_element( - &n_diff_boundaries[i], - j * sizeof(ib_uint64_t)); + idx = n_diff_boundaries[i][j]; DEBUG_PRINTF(UINT64PF "=" UINT64PF ", ", j, idx); @@ -1273,8 +1258,7 @@ to the right, which means that in the case of QUIT_ON_FIRST_NON_BORING the returned n_diff can either be 0 (empty page), 1 (the whole page has all keys equal) or 2 (the function found a non-boring record and returned). @return offsets1 or offsets2 (the offsets of *out_rec), -or NULL if the page is empty and does not contain user records. -dict_stats_scan_page() @{ */ +or NULL if the page is empty and does not contain user records. */ UNIV_INLINE __attribute__((nonnull)) ulint* dict_stats_scan_page( @@ -1382,13 +1366,11 @@ func_exit: *out_rec = rec; return(offsets_rec); } -/* @} */ /*********************************************************************//** Dive below the current position of a cursor and calculate the number of distinct records on the leaf page, when looking at the fist n_prefix columns. -dict_stats_analyze_index_below_cur() @{ @return number of distinct records on the leaf page */ static ib_uint64_t @@ -1511,7 +1493,6 @@ dict_stats_analyze_index_below_cur( return(n_diff); } -/* @} */ /*********************************************************************//** For a given level in an index select N_SAMPLE_PAGES(index) @@ -1536,7 +1517,7 @@ dict_stats_analyze_index_for_n_prefix( records on the given level, when looking at the first n_prefix columns */ - dyn_array_t* boundaries, /*!< in: array that contains + boundaries_t* boundaries, /*!< in: array that contains n_diff_for_this_prefix integers each of which represents the index (on the @@ -1602,8 +1583,7 @@ dict_stats_analyze_index_for_n_prefix( == !(REC_INFO_MIN_REC_FLAG & rec_get_info_bits( btr_pcur_get_rec(&pcur), page_is_comp(page)))); - last_idx_on_level = *(ib_uint64_t*) dyn_array_get_element(boundaries, - (ulint) ((n_diff_for_this_prefix - 1) * sizeof(ib_uint64_t))); + last_idx_on_level = boundaries->at(n_diff_for_this_prefix - 1); rec_idx = 0; @@ -1619,7 +1599,7 @@ dict_stats_analyze_index_for_n_prefix( ib_uint64_t dive_below_idx; /* there are n_diff_for_this_prefix elements - in the array boundaries[] and we divide those elements + in 'boundaries' and we divide those elements into n_recs_to_dive_below segments, for example: let n_diff_for_this_prefix=100, n_recs_to_dive_below=4, then: @@ -1658,9 +1638,7 @@ dict_stats_analyze_index_for_n_prefix( ib_uint64_t could be bigger than ulint */ rnd = ut_rnd_interval(0, (ulint) (right - left)); - dive_below_idx = *(ib_uint64_t*) dyn_array_get_element( - boundaries, (ulint) ((left + rnd) - * sizeof(ib_uint64_t))); + dive_below_idx = boundaries->at(left + rnd); #if 0 DEBUG_PRINTF(" %s(): dive below record with index=" @@ -1769,9 +1747,13 @@ dict_stats_analyze_index( ib_uint64_t* n_diff_on_level; ib_uint64_t total_recs; ib_uint64_t total_pages; - dyn_array_t* n_diff_boundaries; + boundaries_t* n_diff_boundaries; mtr_t mtr; ulint size; + DBUG_ENTER("dict_stats_analyze_index"); + + DBUG_PRINT("info", ("index: %s, online status: %d", index->name, + dict_index_get_online_status(index))); DEBUG_PRINTF(" %s(index=%s)\n", __func__, index->name); @@ -1794,7 +1776,7 @@ dict_stats_analyze_index( switch (size) { case ULINT_UNDEFINED: dict_stats_assert_initialized_index(index); - return; + DBUG_VOID_RETURN; case 0: /* The root node of the tree is a leaf */ size = 1; @@ -1848,20 +1830,14 @@ dict_stats_analyze_index( mtr_commit(&mtr); dict_stats_assert_initialized_index(index); - return; + DBUG_VOID_RETURN; } /* set to zero */ n_diff_on_level = reinterpret_cast<ib_uint64_t*> (mem_zalloc(n_uniq * sizeof(ib_uint64_t))); - n_diff_boundaries = reinterpret_cast<dyn_array_t*> - (mem_alloc(n_uniq * sizeof(dyn_array_t))); - - for (ulint i = 0; i < n_uniq; i++) { - /* initialize the dynamic arrays */ - dyn_array_create(&n_diff_boundaries[i]); - } + n_diff_boundaries = new boundaries_t[n_uniq]; /* total_recs is also used to estimate the number of pages on one level below, so at the start we have 1 page (the root) */ @@ -2011,15 +1987,12 @@ found_level: mtr_commit(&mtr); - for (ulint i = 0; i < n_uniq; i++) { - dyn_array_free(&n_diff_boundaries[i]); - } - - mem_free(n_diff_boundaries); + delete[] n_diff_boundaries; mem_free(n_diff_on_level); dict_stats_assert_initialized_index(index); + DBUG_VOID_RETURN; } /*********************************************************************//** @@ -2109,7 +2082,6 @@ dict_stats_update_persistent( /*********************************************************************//** Save an individual index's statistic into the persistent statistics storage. -dict_stats_save_index_stat() @{ @return DB_SUCCESS or error code */ static dberr_t @@ -2232,11 +2204,9 @@ dict_stats_save_index_stat( return(ret); } -/* @} */ /*********************************************************************//** Save the table's statistics into the persistent statistics storage. -dict_stats_save() @{ @return DB_SUCCESS or error code */ static dberr_t @@ -2401,14 +2371,12 @@ end: return(ret); } -/* @} */ /*********************************************************************//** Called for the row that is selected by SELECT ... FROM mysql.innodb_table_stats WHERE table='...' The second argument is a pointer to the table and the fetched stats are written to it. -dict_stats_fetch_table_stats_step() @{ @return non-NULL dummy */ static ibool @@ -2485,7 +2453,6 @@ dict_stats_fetch_table_stats_step( /* XXX this is not used but returning non-NULL is necessary */ return(TRUE); } -/* @} */ /** Aux struct used to pass a table and a boolean to dict_stats_fetch_index_stats_step(). */ @@ -2511,7 +2478,6 @@ This can be improved if we sort table->indexes in a temporary area just once and then search in that sorted list. Then the complexity will be O(N*log(N)). We assume a table will not have more than 100 indexes, so we go with the simpler N^2 algorithm. -dict_stats_fetch_index_stats_step() @{ @return non-NULL dummy */ static ibool @@ -2752,11 +2718,9 @@ dict_stats_fetch_index_stats_step( /* XXX this is not used but returning non-NULL is necessary */ return(TRUE); } -/* @} */ /*********************************************************************//** Read table's statistics from the persistent statistics storage. -dict_stats_fetch_from_ps() @{ @return DB_SUCCESS or error code */ static dberr_t @@ -2877,17 +2841,17 @@ dict_stats_fetch_from_ps( return(ret); } -/* @} */ /*********************************************************************//** -Fetches or calculates new estimates for index statistics. -dict_stats_update_for_index() @{ */ +Fetches or calculates new estimates for index statistics. */ UNIV_INTERN void dict_stats_update_for_index( /*========================*/ dict_index_t* index) /*!< in/out: index */ { + DBUG_ENTER("dict_stats_update_for_index"); + ut_ad(!mutex_own(&dict_sys->mutex)); if (dict_stats_is_persistent_enabled(index->table)) { @@ -2897,7 +2861,7 @@ dict_stats_update_for_index( dict_stats_analyze_index(index); dict_table_stats_unlock(index->table, RW_X_LATCH); dict_stats_save(index->table); - return; + DBUG_VOID_RETURN; } /* else */ @@ -2920,8 +2884,9 @@ dict_stats_update_for_index( dict_table_stats_lock(index->table, RW_X_LATCH); dict_stats_update_transient_for_index(index); dict_table_stats_unlock(index->table, RW_X_LATCH); + + DBUG_VOID_RETURN; } -/* @} */ /*********************************************************************//** Calculates new estimates for table and index statistics. The statistics @@ -2962,7 +2927,9 @@ dict_stats_update( switch (stats_upd_option) { case DICT_STATS_RECALC_PERSISTENT: - ut_ad(!srv_read_only_mode); + if (srv_read_only_mode) { + goto transient; + } /* Persistent recalculation requested, called from 1) ANALYZE TABLE, or @@ -3063,8 +3030,6 @@ dict_stats_update( dict_table_t* t; - ut_ad(!srv_read_only_mode); - /* Create a dummy table object with the same name and indexes, suitable for fetching the stats into it. */ t = dict_stats_table_clone_create(table); @@ -3098,6 +3063,10 @@ dict_stats_update( dict_stats_table_clone_free(t); + if (srv_read_only_mode) { + goto transient; + } + if (dict_stats_auto_recalc_is_enabled(table)) { return(dict_stats_update( table, @@ -3162,7 +3131,6 @@ rolling back dict transactions. marko: If ibuf merges are not disabled, we need to scan the *.ibd files. But we shouldn't open *.ibd files before we have rolled back dict transactions and opened the SYS_* records for the *.ibd files. -dict_stats_drop_index() @{ @return DB_SUCCESS or error code */ UNIV_INTERN dberr_t @@ -3244,14 +3212,12 @@ dict_stats_drop_index( return(ret); } -/* @} */ /*********************************************************************//** Executes DELETE FROM mysql.innodb_table_stats WHERE database_name = '...' AND table_name = '...'; Creates its own transaction and commits it. -dict_stats_delete_from_table_stats() @{ @return DB_SUCCESS or error code */ UNIV_INLINE dberr_t @@ -3265,7 +3231,7 @@ dict_stats_delete_from_table_stats( #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); -#endif /* UNIV_STAT */ +#endif /* UNIV_SYNC_DEBUG */ ut_ad(mutex_own(&dict_sys->mutex)); pinfo = pars_info_create(); @@ -3284,14 +3250,12 @@ dict_stats_delete_from_table_stats( return(ret); } -/* @} */ /*********************************************************************//** Executes DELETE FROM mysql.innodb_index_stats WHERE database_name = '...' AND table_name = '...'; Creates its own transaction and commits it. -dict_stats_delete_from_index_stats() @{ @return DB_SUCCESS or error code */ UNIV_INLINE dberr_t @@ -3305,7 +3269,7 @@ dict_stats_delete_from_index_stats( #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); -#endif /* UNIV_STAT */ +#endif /* UNIV_SYNC_DEBUG */ ut_ad(mutex_own(&dict_sys->mutex)); pinfo = pars_info_create(); @@ -3324,13 +3288,11 @@ dict_stats_delete_from_index_stats( return(ret); } -/* @} */ /*********************************************************************//** Removes the statistics for a table and all of its indexes from the persistent statistics storage if it exists and if there is data stored for the table. This function creates its own transaction and commits it. -dict_stats_drop_table() @{ @return DB_SUCCESS or error code */ UNIV_INTERN dberr_t @@ -3347,7 +3309,7 @@ dict_stats_drop_table( #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); -#endif /* UNIV_STAT */ +#endif /* UNIV_SYNC_DEBUG */ ut_ad(mutex_own(&dict_sys->mutex)); /* skip tables that do not contain a database name @@ -3403,7 +3365,6 @@ dict_stats_drop_table( return(ret); } -/* @} */ /*********************************************************************//** Executes @@ -3411,7 +3372,6 @@ UPDATE mysql.innodb_table_stats SET database_name = '...', table_name = '...' WHERE database_name = '...' AND table_name = '...'; Creates its own transaction and commits it. -dict_stats_rename_in_table_stats() @{ @return DB_SUCCESS or error code */ UNIV_INLINE dberr_t @@ -3427,7 +3387,7 @@ dict_stats_rename_in_table_stats( #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); -#endif /* UNIV_STAT */ +#endif /* UNIV_SYNC_DEBUG */ ut_ad(mutex_own(&dict_sys->mutex)); pinfo = pars_info_create(); @@ -3451,7 +3411,6 @@ dict_stats_rename_in_table_stats( return(ret); } -/* @} */ /*********************************************************************//** Executes @@ -3459,7 +3418,6 @@ UPDATE mysql.innodb_index_stats SET database_name = '...', table_name = '...' WHERE database_name = '...' AND table_name = '...'; Creates its own transaction and commits it. -dict_stats_rename_in_index_stats() @{ @return DB_SUCCESS or error code */ UNIV_INLINE dberr_t @@ -3475,7 +3433,7 @@ dict_stats_rename_in_index_stats( #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); -#endif /* UNIV_STAT */ +#endif /* UNIV_SYNC_DEBUG */ ut_ad(mutex_own(&dict_sys->mutex)); pinfo = pars_info_create(); @@ -3499,12 +3457,10 @@ dict_stats_rename_in_index_stats( return(ret); } -/* @} */ /*********************************************************************//** Renames a table in InnoDB persistent stats storage. This function creates its own transaction and commits it. -dict_stats_rename_table() @{ @return DB_SUCCESS or error code */ UNIV_INTERN dberr_t @@ -3524,7 +3480,7 @@ dict_stats_rename_table( #ifdef UNIV_SYNC_DEBUG ut_ad(!rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); -#endif /* UNIV_STAT */ +#endif /* UNIV_SYNC_DEBUG */ ut_ad(!mutex_own(&dict_sys->mutex)); /* skip innodb_table_stats and innodb_index_stats themselves */ @@ -3658,7 +3614,6 @@ dict_stats_rename_table( return(ret); } -/* @} */ /* tests @{ */ #ifdef UNIV_COMPILE_TEST_FUNCS @@ -4050,5 +4005,3 @@ test_dict_stats_all() /* @} */ #endif /* UNIV_HOTBACKUP */ - -/* vim: set foldmethod=marker foldmarker=@{,@}: */ diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc index 9a10d995360..ecd723ca39a 100644 --- a/storage/innobase/dict/dict0stats_bg.cc +++ b/storage/innobase/dict/dict0stats_bg.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2013, 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 @@ -28,6 +28,10 @@ Created Apr 25, 2012 Vasil Dimov #include "dict0stats.h" #include "dict0stats_bg.h" +#ifdef UNIV_NONINL +# include "dict0stats_bg.ic" +#endif + #include <vector> /** Minimum time interval between stats recalc for a given table */ @@ -95,8 +99,7 @@ Add a table to the recalc pool, which is processed by the background stats gathering thread. Only the table id is added to the list, so the table can be closed after being enqueued and it will be opened when needed. If the table does not exist later (has been DROPped), -then it will be removed from the pool and skipped. -dict_stats_recalc_pool_add() @{ */ +then it will be removed from the pool and skipped. */ UNIV_INTERN void dict_stats_recalc_pool_add( @@ -124,12 +127,10 @@ dict_stats_recalc_pool_add( os_event_set(dict_stats_event); } -/* @} */ /*****************************************************************//** Get a table from the auto recalc pool. The returned table id is removed from the pool. -dict_stats_recalc_pool_get() @{ @return true if the pool was non-empty and "id" was set, false otherwise */ static bool @@ -155,7 +156,6 @@ dict_stats_recalc_pool_get( return(true); } -/* @} */ /*****************************************************************//** Delete a given table from the auto recalc pool. @@ -188,46 +188,30 @@ dict_stats_recalc_pool_del( } /*****************************************************************//** -Wait until background stats thread has stopped using the specified table(s). +Wait until background stats thread has stopped using the specified table. The caller must have locked the data dictionary using row_mysql_lock_data_dictionary() and this function may unlock it temporarily and restore the lock before it exits. -The background stats thead is guaranteed not to start using the specified -tables after this function returns and before the caller unlocks the data +The background stats thread is guaranteed not to start using the specified +table after this function returns and before the caller unlocks the data dictionary because it sets the BG_STAT_IN_PROGRESS bit in table->stats_bg_flag -under dict_sys->mutex. -dict_stats_wait_bg_to_stop_using_table() @{ */ +under dict_sys->mutex. */ UNIV_INTERN void -dict_stats_wait_bg_to_stop_using_tables( -/*====================================*/ - dict_table_t* table1, /*!< in/out: table1 */ - dict_table_t* table2, /*!< in/out: table2, could be NULL */ +dict_stats_wait_bg_to_stop_using_table( +/*===================================*/ + dict_table_t* table, /*!< in/out: table */ trx_t* trx) /*!< in/out: transaction to use for unlocking/locking the data dict */ { - ut_ad(!srv_read_only_mode); - - while ((table1->stats_bg_flag & BG_STAT_IN_PROGRESS) - || (table2 != NULL - && (table2->stats_bg_flag & BG_STAT_IN_PROGRESS))) { - - table1->stats_bg_flag |= BG_STAT_SHOULD_QUIT; - if (table2 != NULL) { - table2->stats_bg_flag |= BG_STAT_SHOULD_QUIT; - } - - row_mysql_unlock_data_dictionary(trx); - os_thread_sleep(250000); - row_mysql_lock_data_dictionary(trx); + while (!dict_stats_stop_bg(table)) { + DICT_STATS_BG_YIELD(trx); } } -/* @} */ /*****************************************************************//** Initialize global variables needed for the operation of dict_stats_thread() -Must be called before dict_stats_thread() is started. -dict_stats_thread_init() @{ */ +Must be called before dict_stats_thread() is started. */ UNIV_INTERN void dict_stats_thread_init() @@ -255,12 +239,10 @@ dict_stats_thread_init() dict_stats_recalc_pool_init(); } -/* @} */ /*****************************************************************//** Free resources allocated by dict_stats_thread_init(), must be called -after dict_stats_thread() has exited. -dict_stats_thread_deinit() @{ */ +after dict_stats_thread() has exited. */ UNIV_INTERN void dict_stats_thread_deinit() @@ -277,12 +259,10 @@ dict_stats_thread_deinit() os_event_free(dict_stats_event); dict_stats_event = NULL; } -/* @} */ /*****************************************************************//** Get the first table that has been added for auto recalc and eventually -update its stats. -dict_stats_process_entry_from_recalc_pool() @{ */ +update its stats. */ static void dict_stats_process_entry_from_recalc_pool() @@ -302,7 +282,7 @@ dict_stats_process_entry_from_recalc_pool() mutex_enter(&dict_sys->mutex); - table = dict_table_open_on_id(table_id, TRUE, FALSE); + table = dict_table_open_on_id(table_id, TRUE, DICT_TABLE_OP_NORMAL); if (table == NULL) { /* table does not exist, must have been DROPped @@ -351,13 +331,11 @@ dict_stats_process_entry_from_recalc_pool() mutex_exit(&dict_sys->mutex); } -/* @} */ /*****************************************************************//** This is the thread for background stats gathering. It pops tables, from the auto recalc list and proceeds them, eventually recalculating their statistics. -dict_stats_thread() @{ @return this function does not return, it calls os_thread_exit() */ extern "C" UNIV_INTERN os_thread_ret_t @@ -397,6 +375,3 @@ DECLARE_THREAD(dict_stats_thread)( OS_THREAD_DUMMY_RETURN; } -/* @} */ - -/* vim: set foldmethod=marker foldmarker=@{,@}: */ diff --git a/storage/innobase/dyn/dyn0dyn.cc b/storage/innobase/dyn/dyn0dyn.cc index b157c7707f4..3ef5297a7c9 100644 --- a/storage/innobase/dyn/dyn0dyn.cc +++ b/storage/innobase/dyn/dyn0dyn.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -35,7 +35,7 @@ UNIV_INTERN dyn_block_t* dyn_array_add_block( /*================*/ - dyn_array_t* arr) /*!< in: dyn array */ + dyn_array_t* arr) /*!< in/out: dyn array */ { mem_heap_t* heap; dyn_block_t* block; diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 1779ae86c46..b8357951667 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -147,6 +147,8 @@ struct fil_node_t { char* name; /*!< path to the file */ ibool open; /*!< TRUE if file open */ os_file_t handle; /*!< OS handle to the file, if file open */ + os_event_t sync_event;/*!< Condition event to group and + serialize calls to fsync */ ibool is_raw_disk;/*!< TRUE if the 'file' is actually a raw device or a raw disk partition */ ulint size; /*!< size of the file in database pages, 0 if @@ -374,9 +376,10 @@ NOTE: you must call fil_mutex_enter_and_prepare_for_io() first! Prepares a file node for i/o. Opens the file if it is closed. Updates the pending i/o's field in the node and the system appropriately. Takes the node off the LRU list if it is in the LRU list. The caller must hold the fil_sys -mutex. */ +mutex. +@return false if the file can't be opened, otherwise true */ static -void +bool fil_node_prepare_for_io( /*====================*/ fil_node_t* node, /*!< in: file node */ @@ -416,7 +419,7 @@ UNIV_INLINE dberr_t fil_read( /*=====*/ - ibool sync, /*!< in: TRUE if synchronous aio is desired */ + bool sync, /*!< in: true if synchronous aio is desired */ ulint space_id, /*!< in: space id */ ulint zip_size, /*!< in: compressed page size in bytes; 0 for uncompressed pages */ @@ -445,7 +448,7 @@ UNIV_INLINE dberr_t fil_write( /*======*/ - ibool sync, /*!< in: TRUE if synchronous aio is desired */ + bool sync, /*!< in: true if synchronous aio is desired */ ulint space_id, /*!< in: space id */ ulint zip_size, /*!< in: compressed page size in bytes; 0 for uncompressed pages */ @@ -649,6 +652,7 @@ fil_node_create( ut_a(!is_raw || srv_start_raw_disk_in_use); + node->sync_event = os_event_create(); node->is_raw_disk = is_raw; node->size = size; node->magic_n = FIL_NODE_MAGIC_N; @@ -689,9 +693,10 @@ fil_node_create( /********************************************************************//** Opens a file of a node of a tablespace. The caller must own the fil_system -mutex. */ +mutex. +@return false if the file can't be opened, otherwise true */ static -void +bool fil_node_open_file( /*===============*/ fil_node_t* node, /*!< in: file node */ @@ -729,12 +734,12 @@ fil_node_open_file( ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Fatal error: cannot open %s\n." - "InnoDB: Have you deleted .ibd files" - " under a running mysqld server?\n", + ib_logf(IB_LOG_LEVEL_WARN, "InnoDB: Error: cannot " + "open %s\n. InnoDB: Have you deleted .ibd " + "files under a running mysqld server?\n", node->name); - ut_a(0); + + return(false); } size_bytes = os_file_get_size(node->handle); @@ -879,6 +884,8 @@ add_size: /* Put the node to the LRU list */ UT_LIST_ADD_FIRST(LRU, system->LRU, node); } + + return(true); } /**********************************************************************//** @@ -1150,6 +1157,7 @@ fil_node_free( there are no unflushed modifications in the file */ node->modification_counter = node->flush_counter; + os_event_set(node->sync_event); if (fil_buffering_disabled(space)) { @@ -1173,6 +1181,7 @@ fil_node_free( UT_LIST_REMOVE(chain, space->chain, node); + os_event_free(node->sync_event); mem_free(node->name); mem_free(node); } @@ -1242,7 +1251,8 @@ fil_space_create( if (space != 0) { ib_logf(IB_LOG_LEVEL_WARN, "Tablespace '%s' exists in the cache " - "with id %lu", name, (ulong) id); + "with id %lu != %lu", + name, (ulong) space->id, (ulong) id); if (id == 0 || purpose != FIL_TABLESPACE) { @@ -1481,6 +1491,21 @@ fil_space_get_space( if (space->size == 0 && space->purpose == FIL_TABLESPACE) { ut_a(id != 0); + mutex_exit(&fil_system->mutex); + + /* It is possible that the space gets evicted at this point + before the fil_mutex_enter_and_prepare_for_io() acquires + the fil_system->mutex. Check for this after completing the + call to fil_mutex_enter_and_prepare_for_io(). */ + fil_mutex_enter_and_prepare_for_io(id); + + /* We are still holding the fil_system->mutex. Check if + the space is still in memory cache. */ + space = fil_space_get_by_id(id); + if (space == NULL) { + return(NULL); + } + /* The following code must change when InnoDB supports multiple datafiles per tablespace. */ ut_a(1 == UT_LIST_GET_LEN(space->chain)); @@ -1491,7 +1516,11 @@ fil_space_get_space( the file yet; the following calls will open it and update the size fields */ - fil_node_prepare_for_io(node, fil_system, space); + if (!fil_node_prepare_for_io(node, fil_system, space)) { + /* The single-table tablespace can't be opened, + because the ibd file is missing. */ + return(NULL); + } fil_node_complete_io(node, fil_system, OS_FILE_READ); } @@ -1552,8 +1581,7 @@ fil_space_get_size( ulint size; ut_ad(fil_system); - - fil_mutex_enter_and_prepare_for_io(id); + mutex_enter(&fil_system->mutex); space = fil_space_get_space(id); @@ -1583,7 +1611,7 @@ fil_space_get_flags( return(0); } - fil_mutex_enter_and_prepare_for_io(id); + mutex_enter(&fil_system->mutex); space = fil_space_get_space(id); @@ -1700,7 +1728,15 @@ fil_open_log_and_system_tablespace_files(void) node = UT_LIST_GET_NEXT(chain, node)) { if (!node->open) { - fil_node_open_file(node, fil_system, space); + if (!fil_node_open_file(node, fil_system, + space)) { + /* This func is called during server's + startup. If some file of log or system + tablespace is missing, the server + can't start successfully. So we should + assert for it. */ + ut_a(0); + } } if (fil_system->max_n_open < 10 + fil_system->n_open) { @@ -1930,10 +1966,63 @@ fil_write_flushed_lsn_to_data_files( } /*******************************************************************//** +Checks the consistency of the first data page of a tablespace +at database startup. +@retval NULL on success, or if innodb_force_recovery is set +@return pointer to an error message string */ +static __attribute__((warn_unused_result)) +const char* +fil_check_first_page( +/*=================*/ + const page_t* page) /*!< in: data page */ +{ + ulint space_id; + ulint flags; + + if (srv_force_recovery >= SRV_FORCE_IGNORE_CORRUPT) { + return(NULL); + } + + space_id = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_ID + page); + flags = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page); + + if (UNIV_PAGE_SIZE != fsp_flags_get_page_size(flags)) { + return("innodb-page-size mismatch"); + } + + if (!space_id && !flags) { + ulint nonzero_bytes = UNIV_PAGE_SIZE; + const byte* b = page; + + while (!*b && --nonzero_bytes) { + b++; + } + + if (!nonzero_bytes) { + return("space header page consists of zero bytes"); + } + } + + if (buf_page_is_corrupted( + false, page, fsp_flags_get_zip_size(flags))) { + return("checksum mismatch"); + } + + if (page_get_space_id(page) == space_id + && page_get_page_no(page) == 0) { + return(NULL); + } + + return("inconsistent data in space header"); +} + +/*******************************************************************//** Reads the flushed lsn, arch no, and tablespace flag fields from a data -file at database startup. */ +file at database startup. +@retval NULL on success, or if innodb_force_recovery is set +@return pointer to an error message string */ UNIV_INTERN -void +const char* fil_read_first_page( /*================*/ os_file_t data_file, /*!< in: open data file */ @@ -1953,9 +2042,10 @@ fil_read_first_page( lsn_t* max_flushed_lsn) /*!< out: max of flushed lsn values in data files */ { - byte* buf; - byte* page; - lsn_t flushed_lsn; + byte* buf; + byte* page; + lsn_t flushed_lsn; + const char* check_msg = NULL; buf = static_cast<byte*>(ut_malloc(2 * UNIV_PAGE_SIZE)); @@ -1971,8 +2061,16 @@ fil_read_first_page( flushed_lsn = mach_read_from_8(page + FIL_PAGE_FILE_FLUSH_LSN); + if (!one_read_already) { + check_msg = fil_check_first_page(page); + } + ut_free(buf); + if (check_msg) { + return(check_msg); + } + if (!one_read_already) { *min_flushed_lsn = flushed_lsn; *max_flushed_lsn = flushed_lsn; @@ -1980,7 +2078,7 @@ fil_read_first_page( *min_arch_log_no = arch_log_no; *max_arch_log_no = arch_log_no; #endif /* UNIV_LOG_ARCHIVE */ - return; + return(NULL); } if (*min_flushed_lsn > flushed_lsn) { @@ -1997,6 +2095,8 @@ fil_read_first_page( *max_arch_log_no = arch_log_no; } #endif /* UNIV_LOG_ARCHIVE */ + + return(NULL); } /*================ SINGLE-TABLE TABLESPACES ==========================*/ @@ -2567,7 +2667,7 @@ fil_close_tablespace( char* cfg_name = fil_make_cfg_name(path); - os_file_delete_if_exists(cfg_name); + os_file_delete_if_exists(innodb_file_data_key, cfg_name); mem_free(path); mem_free(cfg_name); @@ -2650,7 +2750,7 @@ fil_delete_tablespace( when we drop the database the remove directory will fail. */ { char* cfg_name = fil_make_cfg_name(path); - os_file_delete_if_exists(cfg_name); + os_file_delete_if_exists(innodb_file_data_key, cfg_name); mem_free(cfg_name); } @@ -2678,7 +2778,8 @@ fil_delete_tablespace( if (err != DB_SUCCESS) { rw_lock_x_unlock(&space->latch); - } else if (!os_file_delete(path) && !os_file_delete_if_exists(path)) { + } else if (!os_file_delete(innodb_file_data_key, path) + && !os_file_delete_if_exists(innodb_file_data_key, path)) { /* Note: This is because we have removed the tablespace instance from the cache. */ @@ -3147,7 +3248,7 @@ fil_delete_link_file( { char* link_filepath = fil_make_isl_name(tablename); - os_file_delete_if_exists(link_filepath); + os_file_delete_if_exists(innodb_file_data_key, link_filepath); mem_free(link_filepath); } @@ -3458,7 +3559,7 @@ error_exit_1: error_exit_2: os_file_close(file); if (err != DB_SUCCESS) { - os_file_delete(path); + os_file_delete(innodb_file_data_key, path); } error_exit_3: mem_free(path); @@ -3473,12 +3574,25 @@ static void fil_report_bad_tablespace( /*======================*/ - char* filepath, /*!< in: filepath */ + const char* filepath, /*!< in: filepath */ + const char* check_msg, /*!< in: fil_check_first_page() */ ulint found_id, /*!< in: found space ID */ ulint found_flags, /*!< in: found flags */ ulint expected_id, /*!< in: expected space id */ ulint expected_flags) /*!< in: expected flags */ { + if (check_msg) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Error %s in file '%s'," + "tablespace id=%lu, flags=%lu. " + "Please refer to " + REFMAN "innodb-troubleshooting-datadict.html " + "for how to resolve the issue.", + check_msg, filepath, + (ulong) expected_id, (ulong) expected_flags); + return; + } + ib_logf(IB_LOG_LEVEL_ERROR, "In file '%s', tablespace id and flags are %lu and %lu, " "but in the InnoDB data dictionary they are %lu and %lu. " @@ -3493,6 +3607,7 @@ fil_report_bad_tablespace( struct fsp_open_info { ibool success; /*!< Has the tablespace been opened? */ + const char* check_msg; /*!< fil_check_first_page() message */ ibool valid; /*!< Is the tablespace valid? */ os_file_t file; /*!< File handle */ char* filepath; /*!< File path to open */ @@ -3635,48 +3750,50 @@ fil_open_single_table_tablespace( /* Read the first page of the datadir tablespace, if found. */ if (def.success) { - fil_read_first_page( + def.check_msg = fil_read_first_page( def.file, FALSE, &def.flags, &def.id, #ifdef UNIV_LOG_ARCHIVE &space_arch_log_no, &space_arch_log_no, #endif /* UNIV_LOG_ARCHIVE */ &def.lsn, &def.lsn); + def.valid = !def.check_msg; /* Validate this single-table-tablespace with SYS_TABLES, but do not compare the DATA_DIR flag, in case the tablespace was relocated. */ - ulint mod_def_flags = def.flags & ~FSP_FLAGS_MASK_DATA_DIR; - if (def.id == id && mod_def_flags == mod_flags) { + if (def.valid && def.id == id + && (def.flags & ~FSP_FLAGS_MASK_DATA_DIR) == mod_flags) { valid_tablespaces_found++; - def.valid = TRUE; } else { + def.valid = false; /* Do not use this tablespace. */ fil_report_bad_tablespace( - def.filepath, def.id, + def.filepath, def.check_msg, def.id, def.flags, id, flags); } } /* Read the first page of the remote tablespace */ if (remote.success) { - fil_read_first_page( + remote.check_msg = fil_read_first_page( remote.file, FALSE, &remote.flags, &remote.id, #ifdef UNIV_LOG_ARCHIVE &remote.arch_log_no, &remote.arch_log_no, #endif /* UNIV_LOG_ARCHIVE */ &remote.lsn, &remote.lsn); + remote.valid = !remote.check_msg; /* Validate this single-table-tablespace with SYS_TABLES, but do not compare the DATA_DIR flag, in case the tablespace was relocated. */ - ulint mod_remote_flags = remote.flags & ~FSP_FLAGS_MASK_DATA_DIR; - if (remote.id == id && mod_remote_flags == mod_flags) { + if (remote.valid && remote.id == id + && (remote.flags & ~FSP_FLAGS_MASK_DATA_DIR) == mod_flags) { valid_tablespaces_found++; - remote.valid = TRUE; } else { + remote.valid = false; /* Do not use this linked tablespace. */ fil_report_bad_tablespace( - remote.filepath, remote.id, + remote.filepath, remote.check_msg, remote.id, remote.flags, id, flags); link_file_is_bad = true; } @@ -3684,24 +3801,25 @@ fil_open_single_table_tablespace( /* Read the first page of the datadir tablespace, if found. */ if (dict.success) { - fil_read_first_page( + dict.check_msg = fil_read_first_page( dict.file, FALSE, &dict.flags, &dict.id, #ifdef UNIV_LOG_ARCHIVE &dict.arch_log_no, &dict.arch_log_no, #endif /* UNIV_LOG_ARCHIVE */ &dict.lsn, &dict.lsn); + dict.valid = !dict.check_msg; /* Validate this single-table-tablespace with SYS_TABLES, but do not compare the DATA_DIR flag, in case the tablespace was relocated. */ - ulint mod_dict_flags = dict.flags & ~FSP_FLAGS_MASK_DATA_DIR; - if (dict.id == id && mod_dict_flags == mod_flags) { + if (dict.valid && dict.id == id + && (dict.flags & ~FSP_FLAGS_MASK_DATA_DIR) == mod_flags) { valid_tablespaces_found++; - dict.valid = TRUE; } else { + dict.valid = false; /* Do not use this tablespace. */ fil_report_bad_tablespace( - dict.filepath, dict.id, + dict.filepath, dict.check_msg, dict.id, dict.flags, id, flags); } } @@ -3914,17 +4032,23 @@ fil_validate_single_table_tablespace( const char* tablename, /*!< in: database/tablename */ fsp_open_info* fsp) /*!< in/out: tablespace info */ { - fil_read_first_page( - fsp->file, FALSE, &fsp->flags, &fsp->id, + if (const char* check_msg = fil_read_first_page( + fsp->file, FALSE, &fsp->flags, &fsp->id, #ifdef UNIV_LOG_ARCHIVE - &fsp->arch_log_no, &fsp->arch_log_no, + &fsp->arch_log_no, &fsp->arch_log_no, #endif /* UNIV_LOG_ARCHIVE */ - &fsp->lsn, &fsp->lsn); + &fsp->lsn, &fsp->lsn)) { + ib_logf(IB_LOG_LEVEL_ERROR, + "%s in tablespace %s (table %s)", + check_msg, fsp->filepath, tablename); + fsp->success = FALSE; + return; + } if (fsp->id == ULINT_UNDEFINED || fsp->id == 0) { - fprintf(stderr, - " InnoDB: Error: Tablespace is not sensible;" - " Table: %s Space ID: %lu Filepath: %s\n", + ib_logf(IB_LOG_LEVEL_ERROR, + "Tablespace is not sensible;" + " Table: %s Space ID: %lu Filepath: %s\n", tablename, (ulong) fsp->id, fsp->filepath); fsp->success = FALSE; return; @@ -4051,6 +4175,19 @@ fil_load_single_table_tablespace( fprintf(stderr, "InnoDB: Error: could not open single-table" " tablespace file %s\n", def.filepath); + + if (!strncmp(filename, + tmp_file_prefix, tmp_file_prefix_length)) { + /* Ignore errors for #sql tablespaces. */ + mem_free(tablename); + if (remote.filepath) { + mem_free(remote.filepath); + } + if (def.filepath) { + mem_free(def.filepath); + } + return; + } no_good_file: fprintf(stderr, "InnoDB: We do not continue the crash recovery," @@ -4075,10 +4212,12 @@ no_good_file: " recovery here.\n"); will_not_choose: mem_free(tablename); - if (remote.success) { + if (remote.filepath) { mem_free(remote.filepath); } - mem_free(def.filepath); + if (def.filepath) { + mem_free(def.filepath); + } if (srv_force_recovery > 0) { ib_logf(IB_LOG_LEVEL_INFO, @@ -4089,9 +4228,6 @@ will_not_choose: return; } - /* If debug code, cause a core dump and call stack. For - release builds just exit and rely on the messages above. */ - ut_ad(0); exit(1); } @@ -4167,7 +4303,7 @@ will_not_choose: new_path = fil_make_ibbackup_old_name(fsp->filepath); bool success = os_file_rename( - innodb_file_data_key, fsp->filepath, new_path)); + innodb_file_data_key, fsp->filepath, new_path); ut_a(success); @@ -4772,7 +4908,13 @@ retry: goto retry; } - fil_node_prepare_for_io(node, fil_system, space); + if (!fil_node_prepare_for_io(node, fil_system, space)) { + /* The tablespace data file, such as .ibd file, is missing */ + node->being_extended = false; + mutex_exit(&fil_system->mutex); + + return(false); + } /* At this point it is safe to release fil_system mutex. No other thread can rename, delete or close the file because @@ -5044,9 +5186,10 @@ NOTE: you must call fil_mutex_enter_and_prepare_for_io() first! Prepares a file node for i/o. Opens the file if it is closed. Updates the pending i/o's field in the node and the system appropriately. Takes the node off the LRU list if it is in the LRU list. The caller must hold the fil_sys -mutex. */ +mutex. +@return false if the file can't be opened, otherwise true */ static -void +bool fil_node_prepare_for_io( /*====================*/ fil_node_t* node, /*!< in: file node */ @@ -5068,7 +5211,10 @@ fil_node_prepare_for_io( if (node->open == FALSE) { /* File is closed: open it */ ut_a(node->n_pending == 0); - fil_node_open_file(node, system, space); + + if (!fil_node_open_file(node, system, space)) { + return(false); + } } if (node->n_pending == 0 && fil_space_belongs_in_lru(space)) { @@ -5080,6 +5226,8 @@ fil_node_prepare_for_io( } node->n_pending++; + + return(true); } /********************************************************************//** @@ -5177,7 +5325,7 @@ fil_io( because i/os are not actually handled until all have been posted: use with great caution! */ - ibool sync, /*!< in: TRUE if synchronous aio is desired */ + bool sync, /*!< in: true if synchronous aio is desired */ ulint space_id, /*!< in: space id */ ulint zip_size, /*!< in: compressed page size in bytes; 0 for uncompressed pages */ @@ -5296,7 +5444,7 @@ fil_io( ut_error; - } else if (fil_is_user_tablespace_id(space->id) + } else if (fil_is_user_tablespace_id(space->id) && node->size == 0) { /* We do not know the size of a single-table tablespace @@ -5312,7 +5460,28 @@ fil_io( } /* Open file if closed */ - fil_node_prepare_for_io(node, fil_system, space); + if (!fil_node_prepare_for_io(node, fil_system, space)) { + if (space->purpose == FIL_TABLESPACE + && fil_is_user_tablespace_id(space->id)) { + mutex_exit(&fil_system->mutex); + + ib_logf(IB_LOG_LEVEL_ERROR, + "Trying to do i/o to a tablespace which " + "exists without .ibd data file. " + "i/o type %lu, space id %lu, page no %lu, " + "i/o length %lu bytes", + (ulong) type, (ulong) space_id, + (ulong) block_offset, (ulong) len); + + return(DB_TABLESPACE_DELETED); + } + + /* The tablespace is for log. Currently, we just assert here + to prevent handling errors along the way fil_io returns. + Also, if the log files are missing, it would be hard to + promise the server can continue running. */ + ut_a(0); + } /* Check that at least the start offset is within the bounds of a single-table tablespace, including rollback tablespaces. */ @@ -5475,7 +5644,7 @@ fil_flush( fil_space_t* space; fil_node_t* node; os_file_t file; - ib_int64_t old_mod_counter; + mutex_enter(&fil_system->mutex); @@ -5511,87 +5680,88 @@ fil_flush( space->n_pending_flushes++; /*!< prevent dropping of the space while we are flushing */ - node = UT_LIST_GET_FIRST(space->chain); + for (node = UT_LIST_GET_FIRST(space->chain); + node != NULL; + node = UT_LIST_GET_NEXT(chain, node)) { - while (node) { - if (node->modification_counter > node->flush_counter) { - ut_a(node->open); + ib_int64_t old_mod_counter = node->modification_counter;; + + if (old_mod_counter <= node->flush_counter) { + continue; + } - /* We want to flush the changes at least up to - old_mod_counter */ - old_mod_counter = node->modification_counter; + ut_a(node->open); - if (space->purpose == FIL_TABLESPACE) { - fil_n_pending_tablespace_flushes++; - } else { - fil_n_pending_log_flushes++; - fil_n_log_flushes++; - } + if (space->purpose == FIL_TABLESPACE) { + fil_n_pending_tablespace_flushes++; + } else { + fil_n_pending_log_flushes++; + fil_n_log_flushes++; + } #ifdef __WIN__ - if (node->is_raw_disk) { + if (node->is_raw_disk) { - goto skip_flush; - } + goto skip_flush; + } #endif /* __WIN__ */ retry: - if (node->n_pending_flushes > 0) { - /* We want to avoid calling os_file_flush() on - the file twice at the same time, because we do - not know what bugs OS's may contain in file - i/o; sleep for a while */ + if (node->n_pending_flushes > 0) { + /* We want to avoid calling os_file_flush() on + the file twice at the same time, because we do + not know what bugs OS's may contain in file + i/o */ - mutex_exit(&fil_system->mutex); + ib_int64_t sig_count = + os_event_reset(node->sync_event); - os_thread_sleep(20000); + mutex_exit(&fil_system->mutex); - mutex_enter(&fil_system->mutex); + os_event_wait_low(node->sync_event, sig_count); - if (node->flush_counter >= old_mod_counter) { + mutex_enter(&fil_system->mutex); - goto skip_flush; - } + if (node->flush_counter >= old_mod_counter) { - goto retry; + goto skip_flush; } - ut_a(node->open); - file = node->handle; - node->n_pending_flushes++; + goto retry; + } - mutex_exit(&fil_system->mutex); + ut_a(node->open); + file = node->handle; + node->n_pending_flushes++; - /* fprintf(stderr, "Flushing to file %s\n", - node->name); */ + mutex_exit(&fil_system->mutex); - os_file_flush(file); + os_file_flush(file); - mutex_enter(&fil_system->mutex); + mutex_enter(&fil_system->mutex); - node->n_pending_flushes--; -skip_flush: - if (node->flush_counter < old_mod_counter) { - node->flush_counter = old_mod_counter; + os_event_set(node->sync_event); - if (space->is_in_unflushed_spaces - && fil_space_is_flushed(space)) { + node->n_pending_flushes--; +skip_flush: + if (node->flush_counter < old_mod_counter) { + node->flush_counter = old_mod_counter; - space->is_in_unflushed_spaces = false; + if (space->is_in_unflushed_spaces + && fil_space_is_flushed(space)) { - UT_LIST_REMOVE( - unflushed_spaces, - fil_system->unflushed_spaces, - space); - } - } + space->is_in_unflushed_spaces = false; - if (space->purpose == FIL_TABLESPACE) { - fil_n_pending_tablespace_flushes--; - } else { - fil_n_pending_log_flushes--; + UT_LIST_REMOVE( + unflushed_spaces, + fil_system->unflushed_spaces, + space); } } - node = UT_LIST_GET_NEXT(chain, node); + if (space->purpose == FIL_TABLESPACE) { + fil_n_pending_tablespace_flushes--; + } else { + fil_n_pending_log_flushes--; + } } space->n_pending_flushes--; @@ -6131,11 +6301,11 @@ fil_delete_file( ib_logf(IB_LOG_LEVEL_INFO, "Deleting %s", ibd_name); - os_file_delete_if_exists(ibd_name); + os_file_delete_if_exists(innodb_file_data_key, ibd_name); char* cfg_name = fil_make_cfg_name(ibd_name); - os_file_delete_if_exists(cfg_name); + os_file_delete_if_exists(innodb_file_data_key, cfg_name); mem_free(cfg_name); } @@ -6198,15 +6368,17 @@ fil_mtr_rename_log( ulint new_space_id, /*!< in: tablespace id of the new table */ const char* new_name, /*!< in: new table name */ - const char* tmp_name) /*!< in: temp table name used while + const char* tmp_name, /*!< in: temp table name used while swapping */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { - mtr_t mtr; - mtr_start(&mtr); - fil_op_write_log(MLOG_FILE_RENAME, old_space_id, - 0, 0, old_name, tmp_name, &mtr); - fil_op_write_log(MLOG_FILE_RENAME, new_space_id, - 0, 0, new_name, old_name, &mtr); - mtr_commit(&mtr); -} + if (old_space_id != TRX_SYS_SPACE) { + fil_op_write_log(MLOG_FILE_RENAME, old_space_id, + 0, 0, old_name, tmp_name, mtr); + } + if (new_space_id != TRX_SYS_SPACE) { + fil_op_write_log(MLOG_FILE_RENAME, new_space_id, + 0, 0, new_name, old_name, mtr); + } +} diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc index dc843a89fb9..d1bb22ed7a9 100644 --- a/storage/innobase/fsp/fsp0fsp.cc +++ b/storage/innobase/fsp/fsp0fsp.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -1035,6 +1035,11 @@ fsp_try_extend_data_file( success = fil_extend_space_to_desired_size(&actual_size, space, size + size_increase); + if (!success) { + + return(false); + } + /* We ignore any fragments of a full megabyte when storing the size to the space header */ diff --git a/storage/innobase/fts/fts0ast.cc b/storage/innobase/fts/fts0ast.cc index 972f5acf461..3a03fc63303 100644 --- a/storage/innobase/fts/fts0ast.cc +++ b/storage/innobase/fts/fts0ast.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2013, 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 @@ -26,6 +26,18 @@ Created 2007/3/16 Sunny Bains. #include "mem0mem.h" #include "fts0ast.h" #include "fts0pars.h" +#include "fts0fts.h" + +/* The FTS ast visit pass. */ +enum fts_ast_visit_pass_t { + FTS_PASS_FIRST, /*!< First visit pass, + process operators excluding + FTS_EXIST and FTS_IGNORE */ + FTS_PASS_EXIST, /*!< Exist visit pass, + process operator FTS_EXIST */ + FTS_PASS_IGNORE /*!< Ignore visit pass, + process operator FTS_IGNORE */ +}; /******************************************************************//** Create an empty fts_ast_node_t. @@ -66,7 +78,7 @@ fts_ast_create_node_oper( /******************************************************************//** This function takes ownership of the ptr and is responsible for free'ing it -@return new node */ +@return new node or a node list with tokenized words */ UNIV_INTERN fts_ast_node_t* fts_ast_create_node_term( @@ -74,17 +86,68 @@ fts_ast_create_node_term( void* arg, /*!< in: ast state instance */ const char* ptr) /*!< in: ast term string */ { - ulint len = strlen(ptr); - fts_ast_node_t* node = fts_ast_node_create(); + fts_ast_state_t* state = static_cast<fts_ast_state_t*>(arg); + ulint len = strlen(ptr); + ulint cur_pos = 0; + fts_ast_node_t* node = NULL; + fts_ast_node_t* node_list = NULL; + fts_ast_node_t* first_node = NULL; + + /* Scan the incoming string and filter out any "non-word" characters */ + while (cur_pos < len) { + fts_string_t str; + ulint offset; + ulint cur_len; + + cur_len = innobase_mysql_fts_get_token( + state->charset, + reinterpret_cast<const byte*>(ptr) + cur_pos, + reinterpret_cast<const byte*>(ptr) + len, &str, &offset); + + if (cur_len == 0) { + break; + } - node->type = FTS_AST_TERM; + cur_pos += cur_len; - node->term.ptr = static_cast<byte*>(ut_malloc(len + 1)); - memcpy(node->term.ptr, ptr, len + 1); + if (str.f_n_char > 0) { + /* If the subsequent term (after the first one)'s size + is less than fts_min_token_size, we shall ignore + that. This is to make consistent with MyISAM behavior */ + if (first_node && (str.f_n_char < fts_min_token_size)) { + continue; + } - fts_ast_state_add_node((fts_ast_state_t*) arg, node); + node = fts_ast_node_create(); - return(node); + node->type = FTS_AST_TERM; + + node->term.ptr = static_cast<byte*>(ut_malloc( + str.f_len + 1)); + memcpy(node->term.ptr, str.f_str, str.f_len); + node->term.ptr[str.f_len] = '\0'; + + fts_ast_state_add_node( + static_cast<fts_ast_state_t*>(arg), node); + + if (first_node) { + /* There is more than one word, create + a list to organize them */ + if (!node_list) { + node_list = fts_ast_create_node_list( + static_cast<fts_ast_state_t*>( + arg), + first_node); + } + + fts_ast_add_node(node_list, node); + } else { + first_node = node; + } + } + } + + return((node_list != NULL) ? node_list : first_node); } /******************************************************************//** @@ -101,11 +164,19 @@ fts_ast_create_node_text( ulint len = strlen(ptr); fts_ast_node_t* node = NULL; - ut_ad(len >= 2); - if (len == 2) { + ut_ad(len >= 1); + + if (len <= 2) { + /* There is a way to directly supply null terminator + in the query string (by using 0x220022) and get here, + and certainly it would not make a valid query text */ ut_ad(ptr[0] == '\"'); - ut_ad(ptr[1] == '\"'); + + if (len == 2) { + ut_ad(ptr[1] == '\"'); + } + return(NULL); } @@ -297,6 +368,16 @@ fts_ast_term_set_wildcard( fts_ast_node_t* node) /*!< in/out: set attribute of a term node */ { + if (!node) { + return; + } + + /* If it's a node list, the wildcard should be set to the tail node*/ + if (node->type == FTS_AST_LIST) { + ut_ad(node->list.tail != NULL); + node = node->list.tail; + } + ut_a(node->type == FTS_AST_TERM); ut_a(!node->term.wildcard); @@ -393,9 +474,9 @@ fts_ast_node_print( } /******************************************************************//** -Traverse the AST - in-order traversal, except for the FTS_IGNORE -nodes, which will be ignored in the first pass of each level, and -visited in a second pass after all other nodes in the same level are visited. +Traverse the AST - in-order traversal, except for the FTX_EXIST and FTS_IGNORE +nodes, which will be ignored in the first pass of each level, and visited in a +second and third pass after all other nodes in the same level are visited. @return DB_SUCCESS if all went well */ UNIV_INTERN dberr_t @@ -407,85 +488,142 @@ fts_ast_visit( void* arg, /*!< in: arg for callback */ bool* has_ignore) /*!< out: true, if the operator was ignored during processing, - currently we only ignore - FTS_IGNORE operator */ + currently we ignore FTS_EXIST + and FTS_IGNORE operators */ { dberr_t error = DB_SUCCESS; fts_ast_node_t* oper_node = NULL; fts_ast_node_t* start_node; bool revisit = false; bool will_be_ignored = false; + fts_ast_visit_pass_t visit_pass = FTS_PASS_FIRST; start_node = node->list.head; ut_a(node->type == FTS_AST_LIST || node->type == FTS_AST_SUBEXP_LIST); + if (oper == FTS_EXIST_SKIP) { + visit_pass = FTS_PASS_EXIST; + } else if (oper == FTS_IGNORE_SKIP) { + visit_pass = FTS_PASS_IGNORE; + } + /* In the first pass of the tree, at the leaf level of the - tree, FTS_IGNORE operation will be ignored. It will be - repeated at the level above the leaf level */ + tree, FTS_EXIST and FTS_IGNORE operation will be ignored. + It will be repeated at the level above the leaf level. + + The basic idea here is that when we encounter FTS_EXIST or + FTS_IGNORE, we will change the operator node into FTS_EXIST_SKIP + or FTS_IGNORE_SKIP, and term node & text node with the operators + is ignored in the first pass. We have two passes during the revisit: + We process nodes with FTS_EXIST_SKIP in the exist pass, and then + process nodes with FTS_IGNORE_SKIP in the ignore pass. + + The order should be restrictly followed, or we will get wrong results. + For example, we have a query 'a +b -c d +e -f'. + first pass: process 'a' and 'd' by union; + exist pass: process '+b' and '+e' by intersection; + ignore pass: process '-c' and '-f' by difference. */ + for (node = node->list.head; node && (error == DB_SUCCESS); node = node->next) { - if (node->type == FTS_AST_LIST) { + switch(node->type) { + case FTS_AST_LIST: + if (visit_pass != FTS_PASS_FIRST) { + break; + } + error = fts_ast_visit(oper, node, visitor, arg, &will_be_ignored); /* If will_be_ignored is set to true, then - we encountered and ignored a FTS_IGNORE operator, - and a second pass is needed to process FTS_IGNORE - operator */ + we encountered and ignored a FTS_EXIST or FTS_IGNORE + operator. */ if (will_be_ignored) { revisit = true; + /* Remember oper for list in case '-abc&def', + ignored oper is from previous node of list.*/ + node->oper = oper; + } + + break; + + case FTS_AST_SUBEXP_LIST: + if (visit_pass != FTS_PASS_FIRST) { + break; } - } else if (node->type == FTS_AST_SUBEXP_LIST) { + error = fts_ast_visit_sub_exp(node, visitor, arg); - } else if (node->type == FTS_AST_OPER) { + break; + + case FTS_AST_OPER: oper = node->oper; oper_node = node; - } else { + + /* Change the operator for revisit */ + if (oper == FTS_EXIST) { + oper_node->oper = FTS_EXIST_SKIP; + } else if (oper == FTS_IGNORE) { + oper_node->oper = FTS_IGNORE_SKIP; + } + + break; + + default: if (node->visited) { continue; } ut_a(oper == FTS_NONE || !oper_node - || oper_node->oper == oper); + || oper_node->oper == oper + || oper_node->oper == FTS_EXIST_SKIP + || oper_node->oper == FTS_IGNORE_SKIP); - if (oper == FTS_IGNORE) { + if (oper== FTS_EXIST || oper == FTS_IGNORE) { *has_ignore = true; - /* Change the operator to FTS_IGNORE_SKIP, - so that it is processed in the second pass */ - oper_node->oper = FTS_IGNORE_SKIP; continue; } - if (oper == FTS_IGNORE_SKIP) { - /* This must be the second pass, now we process - the FTS_IGNORE operator */ - visitor(FTS_IGNORE, node, arg); - } else { - visitor(oper, node, arg); + /* Process leaf node accroding to its pass.*/ + if (oper == FTS_EXIST_SKIP + && visit_pass == FTS_PASS_EXIST) { + error = visitor(FTS_EXIST, node, arg); + node->visited = true; + } else if (oper == FTS_IGNORE_SKIP + && visit_pass == FTS_PASS_IGNORE) { + error = visitor(FTS_IGNORE, node, arg); + node->visited = true; + } else if (visit_pass == FTS_PASS_FIRST) { + error = visitor(oper, node, arg); + node->visited = true; } - - node->visited = true; } } - /* Second pass to process the skipped FTS_IGNORE operation. - It is only performed at the level above leaf level */ if (revisit) { + /* Exist pass processes the skipped FTS_EXIST operation. */ + for (node = start_node; + node && error == DB_SUCCESS; + node = node->next) { + + if (node->type == FTS_AST_LIST + && node->oper != FTS_IGNORE) { + error = fts_ast_visit(FTS_EXIST_SKIP, node, + visitor, arg, &will_be_ignored); + } + } + + /* Ignore pass processes the skipped FTS_IGNORE operation. */ for (node = start_node; node && error == DB_SUCCESS; node = node->next) { if (node->type == FTS_AST_LIST) { - /* In this pass, it will process all those - operators ignored in the first pass, and those - whose operators are set to FTS_IGNORE_SKIP */ - error = fts_ast_visit( - oper, node, visitor, arg, - &will_be_ignored); + error = fts_ast_visit(FTS_IGNORE_SKIP, node, + visitor, arg, &will_be_ignored); } } } diff --git a/storage/innobase/fts/fts0blex.cc b/storage/innobase/fts/fts0blex.cc index 1abd737ec06..dccedac0212 100644 --- a/storage/innobase/fts/fts0blex.cc +++ b/storage/innobase/fts/fts0blex.cc @@ -52,7 +52,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -185,7 +185,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -247,7 +247,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0b_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner YY_BUFFER_STATE fts0b_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE fts0b_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); -void *fts0balloc (yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); -void *fts0brealloc (void *,yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); -void fts0bfree (void * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +void *fts0balloc (yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +void *fts0brealloc (void *,yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +void fts0bfree (void * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); #define yy_new_buffer fts0b_create_buffer @@ -347,7 +347,7 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. @@ -579,11 +579,11 @@ extern int fts0bwrap (yyscan_t yyscanner ); #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); +static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); +static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); #endif #ifndef YY_NO_INPUT @@ -1609,7 +1609,7 @@ YY_BUFFER_STATE fts0b_scan_bytes (yyconst char * yybytes, int _yybytes_len , y #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); @@ -1910,7 +1910,7 @@ int fts0blex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { register int i; for ( i = 0; i < n; ++i ) @@ -1919,7 +1919,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t y #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { register int n; for ( n = 0; s[n]; ++n ) @@ -1929,12 +1929,12 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute } #endif -void *fts0balloc (yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +void *fts0balloc (yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { return (void *) malloc( size ); } -void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those @@ -1946,7 +1946,7 @@ void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attr return (void *) realloc( (char *) ptr, size ); } -void fts0bfree (void * ptr , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) +void fts0bfree (void * ptr , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { free( (char *) ptr ); /* see fts0brealloc() for (char *) cast */ } diff --git a/storage/innobase/fts/fts0config.cc b/storage/innobase/fts/fts0config.cc index 9cac680101c..c5cf38ca7f9 100644 --- a/storage/innobase/fts/fts0config.cc +++ b/storage/innobase/fts/fts0config.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2013, 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 @@ -105,7 +105,7 @@ fts_config_get_value( fts_table, info, "DECLARE FUNCTION my_func;\n" - "DECLARE CURSOR c IS SELECT value FROM %s" + "DECLARE CURSOR c IS SELECT value FROM \"%s\"" " WHERE key = :name;\n" "BEGIN\n" "" @@ -221,7 +221,7 @@ fts_config_set_value( graph = fts_parse_sql( fts_table, info, - "BEGIN UPDATE %s SET value = :value WHERE key = :name;"); + "BEGIN UPDATE \"%s\" SET value = :value WHERE key = :name;"); trx->op_info = "setting FTS config value"; @@ -246,7 +246,7 @@ fts_config_set_value( graph = fts_parse_sql( fts_table, info, "BEGIN\n" - "INSERT INTO %s VALUES(:name, :value);"); + "INSERT INTO \"%s\" VALUES(:name, :value);"); trx->op_info = "inserting FTS config value"; @@ -481,7 +481,7 @@ fts_config_increment_value( graph = fts_parse_sql( fts_table, info, "DECLARE FUNCTION my_func;\n" - "DECLARE CURSOR c IS SELECT value FROM %s" + "DECLARE CURSOR c IS SELECT value FROM \"%s\"" " WHERE key = :name FOR UPDATE;\n" "BEGIN\n" "" diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index a81d3043e9c..41f20c1dbb9 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2013, 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 @@ -48,6 +48,17 @@ Full Text Search interface a configurable variable */ UNIV_INTERN ulong fts_max_cache_size; +/** Whether the total memory used for FTS cache is exhausted, and we will +need a sync to free some memory */ +UNIV_INTERN bool fts_need_sync = false; + +/** Variable specifying the total memory allocated for FTS cache */ +UNIV_INTERN ulong fts_max_total_cache_size; + +/** This is FTS result cache limit for each query and would be +a configurable variable */ +UNIV_INTERN ulong fts_result_cache_limit; + /** Variable specifying the maximum FTS max token size */ UNIV_INTERN ulong fts_max_token_size; @@ -81,6 +92,7 @@ UNIV_INTERN mysql_pfs_key_t fts_delete_mutex_key; UNIV_INTERN mysql_pfs_key_t fts_optimize_mutex_key; UNIV_INTERN mysql_pfs_key_t fts_bg_threads_mutex_key; UNIV_INTERN mysql_pfs_key_t fts_doc_id_mutex_key; +UNIV_INTERN mysql_pfs_key_t fts_pll_tokenize_mutex_key; #endif /* UNIV_PFS_MUTEX */ /** variable to record innodb_fts_internal_tbl_name for information @@ -146,74 +158,65 @@ struct fts_aux_table_t { static const char* fts_create_common_tables_sql = { "BEGIN\n" "" - "CREATE TABLE %s_ADDED (\n" + "CREATE TABLE \"%s_DELETED\" (\n" " doc_id BIGINT UNSIGNED\n" ") COMPACT;\n" - "CREATE UNIQUE CLUSTERED INDEX IND ON %s_ADDED(doc_id);\n" + "CREATE UNIQUE CLUSTERED INDEX IND ON \"%s_DELETED\"(doc_id);\n" "" - "CREATE TABLE %s_DELETED (\n" - " doc_id BIGINT UNSIGNED\n" - ") COMPACT;\n" - "CREATE UNIQUE CLUSTERED INDEX IND ON %s_DELETED(doc_id);\n" - "" - "CREATE TABLE %s_DELETED_CACHE (\n" + "CREATE TABLE \"%s_DELETED_CACHE\" (\n" " doc_id BIGINT UNSIGNED\n" ") COMPACT;\n" "CREATE UNIQUE CLUSTERED INDEX IND " - "ON %s_DELETED_CACHE(doc_id);\n" + "ON \"%s_DELETED_CACHE\"(doc_id);\n" "" - "CREATE TABLE %s_BEING_DELETED (\n" + "CREATE TABLE \"%s_BEING_DELETED\" (\n" " doc_id BIGINT UNSIGNED\n" ") COMPACT;\n" "CREATE UNIQUE CLUSTERED INDEX IND " - "ON %s_BEING_DELETED(doc_id);\n" + "ON \"%s_BEING_DELETED\"(doc_id);\n" "" - "CREATE TABLE %s_BEING_DELETED_CACHE (\n" + "CREATE TABLE \"%s_BEING_DELETED_CACHE\" (\n" " doc_id BIGINT UNSIGNED\n" ") COMPACT;\n" "CREATE UNIQUE CLUSTERED INDEX IND " - "ON %s_BEING_DELETED_CACHE(doc_id);\n" + "ON \"%s_BEING_DELETED_CACHE\"(doc_id);\n" "" - "CREATE TABLE %s_CONFIG (\n" + "CREATE TABLE \"%s_CONFIG\" (\n" " key CHAR(50),\n" " value CHAR(50) NOT NULL\n" ") COMPACT;\n" - "CREATE UNIQUE CLUSTERED INDEX IND ON %s_CONFIG(key);\n" - "" - "CREATE TABLE %s_STOPWORDS (\n" - " word CHAR\n" - ") COMPACT;\n" - "CREATE UNIQUE CLUSTERED INDEX IND ON %s_STOPWORDS(word);\n", + "CREATE UNIQUE CLUSTERED INDEX IND ON \"%s_CONFIG\"(key);\n" }; -/** Template for creating the FTS auxiliary index specific tables. */ +#ifdef FTS_DOC_STATS_DEBUG +/** Template for creating the FTS auxiliary index specific tables. This is +mainly designed for the statistics work in the future */ static const char* fts_create_index_tables_sql = { "BEGIN\n" "" - "CREATE TABLE %s_DOC_ID (\n" + "CREATE TABLE \"%s_DOC_ID\" (\n" " doc_id BIGINT UNSIGNED,\n" " word_count INTEGER UNSIGNED NOT NULL\n" ") COMPACT;\n" - "CREATE UNIQUE CLUSTERED INDEX IND ON %s_DOC_ID(doc_id);\n" + "CREATE UNIQUE CLUSTERED INDEX IND ON \"%s_DOC_ID\"(doc_id);\n" }; +#endif /** Template for creating the ancillary FTS tables word index tables. */ static const char* fts_create_index_sql = { "BEGIN\n" "" "CREATE UNIQUE CLUSTERED INDEX FTS_INDEX_TABLE_IND " - "ON %s(word, first_doc_id);\n" + "ON \"%s\"(word, first_doc_id);\n" }; /** FTS auxiliary table suffixes that are common to all FT indexes. */ static const char* fts_common_tables[] = { - "ADDED", "BEING_DELETED", "BEING_DELETED_CACHE", "CONFIG", "DELETED", "DELETED_CACHE", - "STOPWORDS", NULL }; @@ -232,19 +235,19 @@ const fts_index_selector_t fts_index_selector[] = { static const char* fts_config_table_insert_values_sql = "BEGIN\n" "\n" - "INSERT INTO %s VALUES('" + "INSERT INTO \"%s\" VALUES('" FTS_MAX_CACHE_SIZE_IN_MB "', '256');\n" "" - "INSERT INTO %s VALUES('" + "INSERT INTO \"%s\" VALUES('" FTS_OPTIMIZE_LIMIT_IN_SECS "', '180');\n" "" - "INSERT INTO %s VALUES ('" + "INSERT INTO \"%s\" VALUES ('" FTS_SYNCED_DOC_ID "', '0');\n" "" - "INSERT INTO %s VALUES ('" + "INSERT INTO \"%s\" VALUES ('" FTS_TOTAL_DELETED_COUNT "', '0');\n" "" /* Note: 0 == FTS_TABLE_STATE_RUNNING */ - "INSERT INTO %s VALUES ('" + "INSERT INTO \"%s\" VALUES ('" FTS_TABLE_STATE "', '0');\n"; /****************************************************************//** @@ -355,6 +358,13 @@ fts_load_default_stopword( allocator = stopword_info->heap; heap = static_cast<mem_heap_t*>(allocator->arg); + + if (!stopword_info->cached_stopword) { + /* For default stopword, we always use fts_utf8_string_cmp() */ + stopword_info->cached_stopword = rbt_create( + sizeof(fts_tokenizer_word_t), fts_utf8_string_cmp); + } + stop_words = stopword_info->cached_stopword; str.f_n_char = 0; @@ -468,9 +478,17 @@ fts_load_user_stopword( /* Validate the user table existence and in the right format */ - if (!fts_valid_stopword_table(stopword_table_name)) { + stopword_info->charset = fts_valid_stopword_table(stopword_table_name); + if (!stopword_info->charset) { ret = FALSE; goto cleanup; + } else if (!stopword_info->cached_stopword) { + /* Create the stopword RB tree with the stopword column + charset. All comparison will use this charset */ + stopword_info->cached_stopword = rbt_create_arg_cmp( + sizeof(fts_tokenizer_word_t), innobase_fts_text_cmp, + (void*)stopword_info->charset); + } info = pars_info_create(); @@ -638,6 +656,8 @@ fts_cache_create( cache->sync_heap = ib_heap_allocator_create(heap); cache->sync_heap->arg = NULL; + fts_need_sync = false; + cache->sync = static_cast<fts_sync_t*>( mem_heap_zalloc(heap, sizeof(fts_sync_t))); @@ -649,10 +669,8 @@ fts_cache_create( fts_cache_init(cache); - /* Create stopword RB tree. The stopword tree will - remain in cache for the duration of FTS cache's lifetime */ - cache->stopword_info.cached_stopword = rbt_create( - sizeof(fts_tokenizer_word_t), fts_utf8_string_cmp); + cache->stopword_info.cached_stopword = NULL; + cache->stopword_info.charset = NULL; cache->stopword_info.heap = cache->self_heap; @@ -859,7 +877,7 @@ fts_drop_index( current_doc_id = table->fts->cache->next_doc_id; first_doc_id = table->fts->cache->first_doc_id; - fts_cache_clear(table->fts->cache, TRUE); + fts_cache_clear(table->fts->cache); fts_cache_destroy(table->fts->cache); table->fts->cache = fts_cache_create(table); table->fts->cache->next_doc_id = current_doc_id; @@ -922,6 +940,8 @@ fts_que_graph_free_check_lock( mutex_enter(&dict_sys->mutex); } + ut_ad(mutex_own(&dict_sys->mutex)); + que_graph_free(graph); if (!has_dict) { @@ -1060,16 +1080,12 @@ fts_words_free( } /*********************************************************************//** -Clear cache. If the shutdown flag is TRUE then the cache can contain -data that needs to be freed. For regular clear as part of normal -working we assume the caller has freed all resources. */ +Clear cache. */ UNIV_INTERN void fts_cache_clear( /*============*/ - fts_cache_t* cache, /*!< in: cache */ - ibool free_words) /*!< in: TRUE if free in memory - word cache. */ + fts_cache_t* cache) /*!< in: cache */ { ulint i; @@ -1080,11 +1096,7 @@ fts_cache_clear( index_cache = static_cast<fts_index_cache_t*>( ib_vector_get(cache->indexes, i)); - if (free_words) { - fts_words_free(index_cache->words); - } - - ut_a(rbt_empty(index_cache->words)); + fts_words_free(index_cache->words); rbt_free(index_cache->words); @@ -1199,7 +1211,10 @@ fts_cache_destroy( mutex_free(&cache->optimize_lock); mutex_free(&cache->deleted_lock); mutex_free(&cache->doc_id_lock); - rbt_free(cache->stopword_info.cached_stopword); + + if (cache->stopword_info.cached_stopword) { + rbt_free(cache->stopword_info.cached_stopword); + } if (cache->sync_heap->arg) { mem_heap_free(static_cast<mem_heap_t*>(cache->sync_heap->arg)); @@ -1501,6 +1516,112 @@ fts_drop_table( } /****************************************************************//** +Rename a single auxiliary table due to database name change. +@return DB_SUCCESS or error code */ +static __attribute__((nonnull, warn_unused_result)) +dberr_t +fts_rename_one_aux_table( +/*=====================*/ + const char* new_name, /*!< in: new parent tbl name */ + const char* fts_table_old_name, /*!< in: old aux tbl name */ + trx_t* trx) /*!< in: transaction */ +{ + char fts_table_new_name[MAX_TABLE_NAME_LEN]; + ulint new_db_name_len = dict_get_db_name_len(new_name); + ulint old_db_name_len = dict_get_db_name_len(fts_table_old_name); + ulint table_new_name_len = strlen(fts_table_old_name) + + new_db_name_len - old_db_name_len; + + /* Check if the new and old database names are the same, if so, + nothing to do */ + ut_ad((new_db_name_len != old_db_name_len) + || strncmp(new_name, fts_table_old_name, old_db_name_len) != 0); + + /* Get the database name from "new_name", and table name + from the fts_table_old_name */ + strncpy(fts_table_new_name, new_name, new_db_name_len); + strncpy(fts_table_new_name + new_db_name_len, + strchr(fts_table_old_name, '/'), + table_new_name_len - new_db_name_len); + fts_table_new_name[table_new_name_len] = 0; + + return(row_rename_table_for_mysql( + fts_table_old_name, fts_table_new_name, trx, false)); +} + +/****************************************************************//** +Rename auxiliary tables for all fts index for a table. This(rename) +is due to database name change +@return DB_SUCCESS or error code */ + +dberr_t +fts_rename_aux_tables( +/*==================*/ + dict_table_t* table, /*!< in: user Table */ + const char* new_name, /*!< in: new table name */ + trx_t* trx) /*!< in: transaction */ +{ + ulint i; + fts_table_t fts_table; + + FTS_INIT_FTS_TABLE(&fts_table, NULL, FTS_COMMON_TABLE, table); + + /* Rename common auxiliary tables */ + for (i = 0; fts_common_tables[i] != NULL; ++i) { + char* old_table_name; + dberr_t err = DB_SUCCESS; + + fts_table.suffix = fts_common_tables[i]; + + old_table_name = fts_get_table_name(&fts_table); + + err = fts_rename_one_aux_table(new_name, old_table_name, trx); + + mem_free(old_table_name); + + if (err != DB_SUCCESS) { + return(err); + } + } + + fts_t* fts = table->fts; + + /* Rename index specific auxiliary tables */ + for (i = 0; fts->indexes != 0 && i < ib_vector_size(fts->indexes); + ++i) { + dict_index_t* index; + + index = static_cast<dict_index_t*>( + ib_vector_getp(fts->indexes, i)); + + FTS_INIT_INDEX_TABLE(&fts_table, NULL, FTS_INDEX_TABLE, index); + + for (ulint j = 0; fts_index_selector[j].value; ++j) { + dberr_t err; + char* old_table_name; + + fts_table.suffix = fts_get_suffix(j); + + old_table_name = fts_get_table_name(&fts_table); + + err = fts_rename_one_aux_table( + new_name, old_table_name, trx); + + DBUG_EXECUTE_IF("fts_rename_failure", + err = DB_DEADLOCK;); + + mem_free(old_table_name); + + if (err != DB_SUCCESS) { + return(err); + } + } + } + + return(DB_SUCCESS); +} + +/****************************************************************//** Drops the common ancillary tables needed for supporting an FTS index on the given table. row_mysql_lock_data_dictionary must have been called before this. @@ -1586,13 +1707,15 @@ fts_drop_index_tables( trx_t* trx, /*!< in: transaction */ dict_index_t* index) /*!< in: Index to drop */ { - fts_table_t fts_table; dberr_t error = DB_SUCCESS; +#ifdef FTS_DOC_STATS_DEBUG + fts_table_t fts_table; static const char* index_tables[] = { "DOC_ID", NULL }; +#endif /* FTS_DOC_STATS_DEBUG */ dberr_t err = fts_drop_index_split_tables(trx, index); @@ -1601,6 +1724,7 @@ fts_drop_index_tables( error = err; } +#ifdef FTS_DOC_STATS_DEBUG FTS_INIT_INDEX_TABLE(&fts_table, NULL, FTS_INDEX_TABLE, index); for (ulint i = 0; index_tables[i] != NULL; ++i) { @@ -1619,6 +1743,7 @@ fts_drop_index_tables( mem_free(table_name); } +#endif /* FTS_DOC_STATS_DEBUG */ return(error); } @@ -1884,7 +2009,6 @@ fts_create_index_tables_low( { ulint i; - char* sql; que_t* graph; fts_table_t fts_table; dberr_t error = DB_SUCCESS; @@ -1896,6 +2020,9 @@ fts_create_index_tables_low( fts_table.parent = table_name; fts_table.table = NULL; +#ifdef FTS_DOC_STATS_DEBUG + char* sql; + /* Create the FTS auxiliary tables that are specific to an FTS index. */ sql = fts_prepare_sql(&fts_table, fts_create_index_tables_sql); @@ -1905,6 +2032,7 @@ fts_create_index_tables_low( error = fts_eval_sql(trx, graph); que_graph_free(graph); +#endif /* FTS_DOC_STATS_DEBUG */ for (i = 0; fts_index_selector[i].value && error == DB_SUCCESS; ++i) { dict_table_t* new_table; @@ -2187,7 +2315,7 @@ fts_trx_table_clone( ftt->rows = rbt_create(sizeof(fts_trx_row_t), fts_trx_row_doc_id_cmp); /* Copy the rb tree values to the new savepoint. */ - rbt_merge_uniq(ftt_src->rows, ftt->rows); + rbt_merge_uniq(ftt->rows, ftt_src->rows); /* These are only added on commit. At this stage we only have the updated row state. */ @@ -2501,12 +2629,14 @@ fts_get_next_doc_id( /* Otherwise, simply increment the value in cache */ mutex_enter(&cache->doc_id_lock); - ++cache->next_doc_id; + *doc_id = ++cache->next_doc_id; + mutex_exit(&cache->doc_id_lock); + } else { + mutex_enter(&cache->doc_id_lock); + *doc_id = cache->next_doc_id; mutex_exit(&cache->doc_id_lock); } - *doc_id = cache->next_doc_id; - return(DB_SUCCESS); } @@ -2555,7 +2685,7 @@ retry: graph = fts_parse_sql( &fts_table, info, "DECLARE FUNCTION my_func;\n" - "DECLARE CURSOR c IS SELECT value FROM %s" + "DECLARE CURSOR c IS SELECT value FROM \"%s\"" " WHERE key = 'synced_doc_id' FOR UPDATE;\n" "BEGIN\n" "" @@ -2677,7 +2807,7 @@ fts_update_sync_doc_id( graph = fts_parse_sql( &fts_table, info, "BEGIN " - "UPDATE %s SET value = :doc_id" + "UPDATE \"%s\" SET value = :doc_id" " WHERE key = 'synced_doc_id';"); error = fts_eval_sql(trx, graph); @@ -2841,7 +2971,7 @@ fts_delete( graph = fts_parse_sql( &fts_table, info, - "BEGIN INSERT INTO %s VALUES (:doc_id);"); + "BEGIN INSERT INTO \"%s\" VALUES (:doc_id);"); error = fts_eval_sql(trx, graph); @@ -3404,7 +3534,13 @@ fts_add_doc_by_id( rw_lock_x_unlock(&table->fts->cache->lock); - if (cache->total_size > fts_max_cache_size) { + DBUG_EXECUTE_IF( + "fts_instrument_sync", + fts_sync(cache->sync); + ); + + if (cache->total_size > fts_max_cache_size + || fts_need_sync) { fts_sync(cache->sync); } @@ -3492,7 +3628,7 @@ fts_get_max_doc_id( btr_pcur_open_at_index_side( false, index, BTR_SEARCH_LEAF, &pcur, true, 0, &mtr); - if (page_get_n_recs(btr_pcur_get_page(&pcur)) > 0) { + if (!page_is_empty(btr_pcur_get_page(&pcur))) { const rec_t* rec = NULL; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; @@ -3711,7 +3847,7 @@ fts_write_node( fts_table, info, "BEGIN\n" - "INSERT INTO %s VALUES " + "INSERT INTO \"%s\" VALUES " "(:token, :first_doc_id," " :last_doc_id, :doc_count, :ilist);"); } @@ -3756,7 +3892,7 @@ fts_sync_add_deleted_cache( graph = fts_parse_sql( &fts_table, info, - "BEGIN INSERT INTO %s VALUES (:doc_id);"); + "BEGIN INSERT INTO \"%s\" VALUES (:doc_id);"); for (i = 0; i < n_elems && error == DB_SUCCESS; ++i) { fts_update_t* update; @@ -3937,7 +4073,7 @@ fts_sync_write_doc_stat( *graph = fts_parse_sql( &fts_table, info, - "BEGIN INSERT INTO %s VALUES (:doc_id, :count);"); + "BEGIN INSERT INTO \"%s\" VALUES (:doc_id, :count);"); } for (;;) { @@ -4078,7 +4214,7 @@ fts_is_word_in_index( "DECLARE FUNCTION my_func;\n" "DECLARE CURSOR c IS" " SELECT doc_count\n" - " FROM %s\n" + " FROM \"%s\"\n" " WHERE word = :word " " ORDER BY first_doc_id;\n" "BEGIN\n" @@ -4220,10 +4356,8 @@ fts_sync_commit( } /* We need to do this within the deleted lock since fts_delete() can - attempt to add a deleted doc id to the cache deleted id array. Set - the shutdown flag to FALSE, signifying that we don't want to release - all resources. */ - fts_cache_clear(cache, FALSE); + attempt to add a deleted doc id to the cache deleted id array. */ + fts_cache_clear(cache); fts_cache_init(cache); rw_lock_x_unlock(&cache->lock); @@ -4295,6 +4429,10 @@ fts_sync( index_cache = static_cast<fts_index_cache_t*>( ib_vector_get(cache->indexes, i)); + if (index_cache->index->to_be_dropped) { + continue; + } + error = fts_sync_index(sync, index_cache); if (error != DB_SUCCESS && !sync->interrupted) { @@ -4303,6 +4441,11 @@ fts_sync( } } + DBUG_EXECUTE_IF("fts_instrument_sync_interrupted", + sync->interrupted = true; + error = DB_INTERRUPTED; + ); + if (error == DB_SUCCESS && !sync->interrupted) { error = fts_sync_commit(sync); } else { @@ -4327,16 +4470,20 @@ fts_sync( Run SYNC on the table, i.e., write out data from the cache to the FTS auxiliary INDEX table and clear the cache at the end. */ UNIV_INTERN -void +dberr_t fts_sync_table( /*===========*/ dict_table_t* table) /*!< in: table */ { + dberr_t err = DB_SUCCESS; + ut_ad(table->fts); if (table->fts->cache) { - fts_sync(table->fts->cache->sync); + err = fts_sync(table->fts->cache->sync); } + + return(err); } /******************************************************************** @@ -4553,7 +4700,7 @@ fts_get_docs_clear( } /*********************************************************************//** -Get the initial Doc ID by consulting the ADDED and the CONFIG table +Get the initial Doc ID by consulting the CONFIG table @return initial Doc ID */ UNIV_INTERN doc_id_t @@ -4656,7 +4803,7 @@ fts_get_rows_count( "DECLARE FUNCTION my_func;\n" "DECLARE CURSOR c IS" " SELECT COUNT(*) " - " FROM %s;\n" + " FROM \"%s\";\n" "BEGIN\n" "\n" "OPEN c;\n" @@ -4892,20 +5039,20 @@ fts_get_doc_id_from_rec( ulint len; const byte* data; ulint col_no; - ulint* offsets; doc_id_t doc_id = 0; dict_index_t* clust_index; ulint offsets_[REC_OFFS_NORMAL_SIZE]; + ulint* offsets = offsets_; + mem_heap_t* my_heap = heap; ut_a(table->fts->doc_col != ULINT_UNDEFINED); - offsets = offsets_; clust_index = dict_table_get_first_index(table); - offsets_[0] = UT_ARR_SIZE(offsets_); + rec_offs_init(offsets_); offsets = rec_get_offsets( - rec, clust_index, offsets, ULINT_UNDEFINED, &heap); + rec, clust_index, offsets, ULINT_UNDEFINED, &my_heap); col_no = dict_col_get_clust_pos( &table->cols[table->fts->doc_col], clust_index); @@ -4917,6 +5064,10 @@ fts_get_doc_id_from_rec( ut_ad(8 == sizeof(doc_id)); doc_id = static_cast<doc_id_t>(mach_read_from_8(data)); + if (my_heap && !heap) { + mem_heap_free(my_heap); + } + return(doc_id); } @@ -5216,7 +5367,7 @@ fts_free( ut_ad(!fts->add_wq); if (fts->cache) { - fts_cache_clear(fts->cache, TRUE); + fts_cache_clear(fts->cache); fts_cache_destroy(fts->cache); fts->cache = NULL; } @@ -5395,9 +5546,21 @@ fts_savepoint_release( /* Only if we found and element to release. */ if (i < ib_vector_size(savepoints)) { + fts_savepoint_t* last_savepoint; + fts_savepoint_t* top_savepoint; + ib_rbt_t* tables; ut_a(top_of_stack < ib_vector_size(savepoints)); + /* Exchange tables between last savepoint and top savepoint */ + last_savepoint = static_cast<fts_savepoint_t*>( + ib_vector_last(trx->fts_trx->savepoints)); + top_savepoint = static_cast<fts_savepoint_t*>( + ib_vector_get(savepoints, top_of_stack)); + tables = top_savepoint->tables; + top_savepoint->tables = last_savepoint->tables; + last_savepoint->tables = tables; + /* Skip the implied savepoint. */ for (i = ib_vector_size(savepoints) - 1; i > top_of_stack; @@ -5608,6 +5771,9 @@ fts_savepoint_rollback( /* Make sure we don't delete the implied savepoint. */ ut_a(ib_vector_size(savepoints) > 0); + + /* Restore the savepoint. */ + fts_savepoint_take(trx, name); } } @@ -5794,7 +5960,7 @@ fts_check_and_drop_orphaned_tables( ib_vector_get(tables, i)); table = dict_table_open_on_id( - aux_table->parent_id, TRUE, FALSE); + aux_table->parent_id, TRUE, DICT_TABLE_OP_NORMAL); if (table == NULL || table->fts == NULL) { @@ -5844,7 +6010,8 @@ fts_check_and_drop_orphaned_tables( path = fil_make_ibd_name( aux_table->name, false); - os_file_delete_if_exists(path); + os_file_delete_if_exists(innodb_file_data_key, + path); mem_free(path); } @@ -5995,18 +6162,19 @@ fts_drop_orphaned_tables(void) /**********************************************************************//** Check whether user supplied stopword table is of the right format. Caller is responsible to hold dictionary locks. -@return TRUE if the table qualifies */ +@return the stopword column charset if qualifies */ UNIV_INTERN -ibool +CHARSET_INFO* fts_valid_stopword_table( /*=====================*/ const char* stopword_table_name) /*!< in: Stopword table name */ { dict_table_t* table; + dict_col_t* col = NULL; if (!stopword_table_name) { - return(FALSE); + return(NULL); } table = dict_table_get_low(stopword_table_name); @@ -6016,9 +6184,8 @@ fts_valid_stopword_table( "InnoDB: user stopword table %s does not exist.\n", stopword_table_name); - return(FALSE); + return(NULL); } else { - dict_col_t* col; const char* col_name; col_name = dict_table_get_col_name(table, 0); @@ -6029,22 +6196,27 @@ fts_valid_stopword_table( "table %s. Its first column must be named as " "'value'.\n", stopword_table_name); - return(FALSE); + return(NULL); } col = dict_table_get_nth_col(table, 0); - if (col->mtype != DATA_VARCHAR) { + if (col->mtype != DATA_VARCHAR + && col->mtype != DATA_VARMYSQL) { fprintf(stderr, "InnoDB: invalid column type for stopword " "table %s. Its first column must be of " "varchar type\n", stopword_table_name); - return(FALSE); + return(NULL); } } - return(TRUE); + ut_ad(col); + + return(innobase_get_fts_charset( + static_cast<int>(col->prtype & DATA_MYSQL_TYPE_MASK), + static_cast<ulint>(dtype_get_charset_coll(col->prtype)))); } /**********************************************************************//** @@ -6109,7 +6281,7 @@ fts_load_stopword( } /* If stopword is turned off, no need to continue to load the - stopword into cache */ + stopword into cache, but still need to do initialization */ if (!use_stopword) { cache->stopword_info.status = STOPWORD_OFF; goto cleanup; @@ -6166,6 +6338,11 @@ cleanup: trx_free_for_background(trx); } + if (!cache->stopword_info.cached_stopword) { + cache->stopword_info.cached_stopword = rbt_create( + sizeof(fts_tokenizer_word_t), fts_utf8_string_cmp); + } + return(error == DB_SUCCESS); } @@ -6329,7 +6506,6 @@ fts_init_index( dict_index_t* index; doc_id_t start_doc; fts_get_doc_t* get_doc = NULL; - ibool has_fts = TRUE; fts_cache_t* cache = table->fts->cache; bool need_init = false; @@ -6367,11 +6543,15 @@ fts_init_index( ut_a(index); - has_fts = FALSE; fts_doc_fetch_by_doc_id(NULL, start_doc, index, FTS_FETCH_DOC_BY_ID_LARGE, fts_init_get_doc_id, cache); } else { + if (table->fts->cache->stopword_info.status + & STOPWORD_NOT_INIT) { + fts_load_stopword(table, NULL, NULL, NULL, TRUE, TRUE); + } + for (ulint i = 0; i < ib_vector_size(cache->get_docs); ++i) { get_doc = static_cast<fts_get_doc_t*>( ib_vector_get(cache->get_docs, i)); @@ -6384,13 +6564,6 @@ fts_init_index( } } - if (has_fts) { - if (table->fts->cache->stopword_info.status - & STOPWORD_NOT_INIT) { - fts_load_stopword(table, NULL, NULL, NULL, TRUE, TRUE); - } - } - table->fts->fts_status |= ADDED_TABLE_SYNCED; fts_get_docs_clear(cache->get_docs); diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index 9abeeccac91..7cdad522564 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2013, 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 @@ -54,6 +54,12 @@ static const ulint FTS_OPTIMIZE_INTERVAL_IN_SECS = 300; /** Server is shutting down, so does we exiting the optimize thread */ static bool fts_opt_start_shutdown = false; +/** Initial size of nodes in fts_word_t. */ +static const ulint FTS_WORD_NODES_INIT_SIZE = 64; + +/** Last time we did check whether system need a sync */ +static ib_time_t last_check_sync_time; + #if 0 /** Check each table in round robin to see whether they'd need to be "optimized" */ @@ -241,23 +247,23 @@ static ib_time_t fts_optimize_time_limit = 0; static const char* fts_init_delete_sql = "BEGIN\n" "\n" - "INSERT INTO %s_BEING_DELETED\n" - "SELECT doc_id FROM %s_DELETED;\n" + "INSERT INTO \"%s_BEING_DELETED\"\n" + "SELECT doc_id FROM \"%s_DELETED\";\n" "\n" - "INSERT INTO %s_BEING_DELETED_CACHE\n" - "SELECT doc_id FROM %s_DELETED_CACHE;\n"; + "INSERT INTO \"%s_BEING_DELETED_CACHE\"\n" + "SELECT doc_id FROM \"%s_DELETED_CACHE\";\n"; static const char* fts_delete_doc_ids_sql = "BEGIN\n" "\n" - "DELETE FROM %s_DELETED WHERE doc_id = :doc_id1;\n" - "DELETE FROM %s_DELETED_CACHE WHERE doc_id = :doc_id2;\n"; + "DELETE FROM \"%s_DELETED\" WHERE doc_id = :doc_id1;\n" + "DELETE FROM \"%s_DELETED_CACHE\" WHERE doc_id = :doc_id2;\n"; static const char* fts_end_delete_sql = "BEGIN\n" "\n" - "DELETE FROM %s_BEING_DELETED;\n" - "DELETE FROM %s_BEING_DELETED_CACHE;\n"; + "DELETE FROM \"%s_BEING_DELETED\";\n" + "DELETE FROM \"%s_BEING_DELETED_CACHE\";\n"; /**********************************************************************//** Initialize fts_zip_t. */ @@ -354,7 +360,7 @@ fts_word_init( word->heap_alloc = ib_heap_allocator_create(heap); word->nodes = ib_vector_create( - word->heap_alloc, sizeof(fts_node_t), 64); + word->heap_alloc, sizeof(fts_node_t), FTS_WORD_NODES_INIT_SIZE); return(word); } @@ -432,6 +438,8 @@ fts_optimize_index_fetch_node( dfield_t* dfield = que_node_get_val(exp); void* data = dfield_get_data(dfield); ulint dfield_len = dfield_get_len(dfield); + fts_node_t* node; + bool is_word_init = false; ut_a(dfield_len <= FTS_MAX_WORD_LEN); @@ -439,6 +447,7 @@ fts_optimize_index_fetch_node( word = static_cast<fts_word_t*>(ib_vector_push(words, NULL)); fts_word_init(word, (byte*) data, dfield_len); + is_word_init = true; } word = static_cast<fts_word_t*>(ib_vector_last(words)); @@ -448,9 +457,23 @@ fts_optimize_index_fetch_node( word = static_cast<fts_word_t*>(ib_vector_push(words, NULL)); fts_word_init(word, (byte*) data, dfield_len); + is_word_init = true; + } + + node = fts_optimize_read_node(word, que_node_get_next(exp)); + + fetch->total_memory += node->ilist_size; + if (is_word_init) { + fetch->total_memory += sizeof(fts_word_t) + + sizeof(ib_alloc_t) + sizeof(ib_vector_t) + dfield_len + + sizeof(fts_node_t) * FTS_WORD_NODES_INIT_SIZE; + } else if (ib_vector_size(words) > FTS_WORD_NODES_INIT_SIZE) { + fetch->total_memory += sizeof(fts_node_t); } - fts_optimize_read_node(word, que_node_get_next(exp)); + if (fetch->total_memory >= fts_result_cache_limit) { + return(FALSE); + } return(TRUE); } @@ -500,7 +523,7 @@ fts_index_fetch_nodes( "DECLARE CURSOR c IS" " SELECT word, doc_count, first_doc_id, last_doc_id, " "ilist\n" - " FROM %s\n" + " FROM \"%s\"\n" " WHERE word LIKE :word\n" " ORDER BY first_doc_id;\n" "BEGIN\n" @@ -824,7 +847,7 @@ fts_index_fetch_words( "DECLARE FUNCTION my_func;\n" "DECLARE CURSOR c IS" " SELECT word\n" - " FROM %s\n" + " FROM \"%s\"\n" " WHERE word > :word\n" " ORDER BY word;\n" "BEGIN\n" @@ -984,7 +1007,7 @@ fts_table_fetch_doc_ids( info, "DECLARE FUNCTION my_func;\n" "DECLARE CURSOR c IS" - " SELECT doc_id FROM %s;\n" + " SELECT doc_id FROM \"%s\";\n" "BEGIN\n" "\n" "OPEN c;\n" @@ -1457,7 +1480,7 @@ fts_optimize_write_word( graph = fts_parse_sql( fts_table, info, - "BEGIN DELETE FROM %s WHERE word = :word;"); + "BEGIN DELETE FROM \"%s\" WHERE word = :word;"); error = fts_eval_sql(trx, graph); @@ -1788,9 +1811,11 @@ fts_optimize_words( selected = fts_select_index(charset, word->f_str, word->f_len); /* Read the index records to optimize. */ + fetch.total_memory = 0; error = fts_index_fetch_nodes( trx, &graph, &optim->fts_index_table, word, &fetch); + ut_ad(fetch.total_memory < fts_result_cache_limit); if (error == DB_SUCCESS) { /* There must be some nodes to read. */ @@ -2813,6 +2838,43 @@ fts_optimize_how_many( return(n_tables); } +/**********************************************************************//** +Check if the total memory used by all FTS table exceeds the maximum limit. +@return true if a sync is needed, false otherwise */ +static +bool +fts_is_sync_needed( +/*===============*/ + const ib_vector_t* tables) /*!< in: registered tables + vector*/ +{ + ulint total_memory = 0; + double time_diff = difftime(ut_time(), last_check_sync_time); + + if (fts_need_sync || time_diff < 5) { + return(false); + } + + last_check_sync_time = ut_time(); + + for (ulint i = 0; i < ib_vector_size(tables); ++i) { + const fts_slot_t* slot; + + slot = static_cast<const fts_slot_t*>( + ib_vector_get_const(tables, i)); + + if (slot->table && slot->table->fts) { + total_memory += slot->table->fts->cache->total_size; + } + + if (total_memory > fts_max_total_cache_size) { + return(true); + } + } + + return(false); +} + #if 0 /*********************************************************************//** Check whether a table needs to be optimized. */ @@ -2933,6 +2995,10 @@ fts_optimize_thread( /* Timeout ? */ if (msg == NULL) { + if (fts_is_sync_needed(tables)) { + fts_need_sync = true; + } + continue; } @@ -3055,6 +3121,7 @@ fts_optimize_init(void) fts_optimize_wq = ib_wqueue_create(); ut_a(fts_optimize_wq != NULL); + last_check_sync_time = ut_time(); os_thread_create(fts_optimize_thread, fts_optimize_wq, NULL); } diff --git a/storage/innobase/fts/fts0pars.cc b/storage/innobase/fts/fts0pars.cc index dd2984b1beb..a4009106c83 100644 --- a/storage/innobase/fts/fts0pars.cc +++ b/storage/innobase/fts/fts0pars.cc @@ -1,21 +1,19 @@ +/* A Bison parser, made by GNU Bison 2.5. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + 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, see <http://www.gnu.org/licenses/>. */ @@ -28,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -46,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -75,7 +73,7 @@ /* Copy the first part of user declarations. */ -/* Line 189 of yacc.c */ +/* Line 268 of yacc.c */ #line 26 "fts0pars.y" @@ -112,8 +110,8 @@ struct fts_lexer_t { -/* Line 189 of yacc.c */ -#line 117 "fts0pars.cc" +/* Line 268 of yacc.c */ +#line 115 "fts0pars.cc" /* Enabling traces. */ #ifndef YYDEBUG @@ -153,7 +151,7 @@ struct fts_lexer_t { typedef union YYSTYPE { -/* Line 214 of yacc.c */ +/* Line 293 of yacc.c */ #line 61 "fts0pars.y" int oper; @@ -162,8 +160,8 @@ typedef union YYSTYPE -/* Line 214 of yacc.c */ -#line 167 "fts0pars.cc" +/* Line 293 of yacc.c */ +#line 165 "fts0pars.cc" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -174,8 +172,8 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ -#line 179 "fts0pars.cc" +/* Line 343 of yacc.c */ +#line 177 "fts0pars.cc" #ifdef short # undef short @@ -225,7 +223,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -278,11 +276,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -305,26 +303,26 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) -void free (void*); /* INFRINGES ON USER NAME SPACE */ +void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif @@ -351,23 +349,7 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -387,19 +369,39 @@ union yyalloc #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 43 +#define YYLAST 52 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 16 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 8 /* YYNRULES -- Number of rules. */ -#define YYNRULES 23 +#define YYNRULES 24 /* YYNRULES -- Number of states. */ -#define YYNSTATES 31 +#define YYNSTATES 33 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -447,7 +449,7 @@ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 6, 9, 12, 16, 21, 23, 25, 28, 32, 36, 39, 44, 47, 49, 51, 53, - 55, 57, 59, 61 + 55, 57, 59, 61, 64 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -459,7 +461,7 @@ static const yytype_int8 yyrhs[] = 6, -1, 21, 22, 14, -1, 21, 22, -1, 21, 23, 15, 6, -1, 21, 23, -1, 8, -1, 7, -1, 9, -1, 10, -1, 11, -1, 5, -1, 6, - -1, 4, -1 + -1, 14, 22, -1, 4, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -467,7 +469,7 @@ static const yytype_uint8 yyrline[] = { 0, 79, 79, 85, 89, 99, 111, 115, 124, 128, 132, 136, 141, 147, 152, 159, 165, 169, 173, 177, - 181, 186, 191, 198 + 181, 186, 191, 197, 202 }; #endif @@ -498,7 +500,7 @@ static const yytype_uint8 yyr1[] = { 0, 16, 17, 18, 18, 18, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, - 21, 22, 22, 23 + 21, 22, 22, 22, 23 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -506,24 +508,24 @@ static const yytype_uint8 yyr2[] = { 0, 2, 1, 0, 2, 2, 3, 4, 1, 1, 2, 3, 3, 2, 4, 2, 1, 1, 1, 1, - 1, 1, 1, 1 + 1, 1, 1, 2, 1 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { - 3, 0, 2, 1, 23, 21, 22, 17, 16, 18, - 19, 20, 3, 5, 4, 0, 8, 9, 0, 3, - 13, 15, 10, 0, 6, 0, 12, 0, 11, 7, - 14 + 3, 0, 2, 1, 24, 21, 22, 17, 16, 18, + 19, 20, 3, 0, 5, 4, 0, 8, 9, 0, + 23, 3, 13, 15, 10, 0, 6, 0, 12, 0, + 11, 7, 14 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 1, 2, 13, 14, 15, 16, 17 + -1, 1, 2, 14, 15, 16, 17, 18 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing @@ -531,39 +533,46 @@ static const yytype_int8 yydefgoto[] = #define YYPACT_NINF -5 static const yytype_int8 yypact[] = { - -5, 33, 16, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, 25, 21, 19, -4, -5, - 22, 23, -5, 34, -5, 6, -5, 35, -5, -5, - -5 + -5, 38, 18, -5, -5, -5, -5, -5, -5, -5, + -5, -5, -5, 31, -5, -5, 29, 30, 32, -4, + -5, -5, 34, 35, -5, 40, -5, 7, -5, 43, + -5, -5, -5 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -5, -5, 20, -5, -5, -5, 27, 28 + -5, -5, 19, -5, -5, -5, 26, 36 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ + number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { - 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 29, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, - 5, 6, 18, 3, 23, 22, 26, 19, 27, 25, - 28, 30, 20, 21 + 4, 5, 6, 7, 8, 9, 10, 11, 12, 26, + 13, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 31, 13, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 19, 13, 4, 5, 6, 5, 6, 3, 20, + 27, 21, 22, 13, 24, 13, 30, 25, 28, 32, + 29, 0, 23 }; -static const yytype_uint8 yycheck[] = +#define yypact_value_is_default(yystate) \ + ((yystate) == (-5)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + +static const yytype_int8 yycheck[] = { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, - 5, 6, 12, 0, 15, 14, 14, 12, 15, 19, - 6, 6, 15, 15 + 14, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 12, 14, 4, 5, 6, 5, 6, 0, 13, + 21, 12, 16, 14, 14, 14, 6, 15, 14, 6, + 15, -1, 16 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -571,9 +580,9 @@ static const yytype_uint8 yycheck[] = static const yytype_uint8 yystos[] = { 0, 17, 18, 0, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 19, 20, 21, 22, 23, 18, 12, - 22, 23, 14, 15, 13, 18, 14, 15, 6, 13, - 6 + 10, 11, 12, 14, 19, 20, 21, 22, 23, 18, + 22, 12, 22, 23, 14, 15, 13, 18, 14, 15, + 6, 13, 6 }; #define yyerrok (yyerrstatus = 0) @@ -588,9 +597,18 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ #define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif #define YYRECOVERING() (!!yyerrstatus) @@ -600,7 +618,6 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -642,19 +659,10 @@ while (YYID (0)) #endif -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ +/* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif @@ -847,7 +855,6 @@ int yydebug; #endif - #if YYERROR_VERBOSE # ifndef yystrlen @@ -949,116 +956,143 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } - if (yysize_overflow) - return YYSIZE_MAXIMUM; + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ @@ -1090,6 +1124,7 @@ yydestruct (yymsg, yytype, yyvaluep) } } + /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -1106,12 +1141,9 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1259,7 +1291,7 @@ YYSTYPE yylval; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); @@ -1298,7 +1330,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -1329,8 +1361,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1385,26 +1417,26 @@ yyreduce: { case 2: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 79 "fts0pars.y" { (yyval.node) = (yyvsp[(1) - (1)].node); ((fts_ast_state_t*) state)->root = (yyval.node); - ;} + } break; case 3: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 85 "fts0pars.y" { (yyval.node) = NULL; - ;} + } break; case 4: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 89 "fts0pars.y" { (yyval.node) = (yyvsp[(1) - (2)].node); @@ -1414,12 +1446,12 @@ yyreduce: } else { fts_ast_add_node((yyval.node), (yyvsp[(2) - (2)].node)); } - ;} + } break; case 5: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 99 "fts0pars.y" { (yyval.node) = (yyvsp[(1) - (2)].node); @@ -1430,21 +1462,21 @@ yyreduce: } else { fts_ast_add_node((yyval.node), (yyvsp[(2) - (2)].node)); } - ;} + } break; case 6: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 111 "fts0pars.y" { (yyval.node) = (yyvsp[(2) - (3)].node); - ;} + } break; case 7: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 115 "fts0pars.y" { (yyval.node) = fts_ast_create_node_subexp_list(state, (yyvsp[(1) - (4)].node)); @@ -1452,170 +1484,190 @@ yyreduce: if ((yyvsp[(3) - (4)].node)) { fts_ast_add_node((yyval.node), (yyvsp[(3) - (4)].node)); } - ;} + } break; case 8: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 124 "fts0pars.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 9: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 128 "fts0pars.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 10: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 132 "fts0pars.y" { fts_ast_term_set_wildcard((yyvsp[(1) - (2)].node)); - ;} + } break; case 11: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 136 "fts0pars.y" { fts_ast_term_set_distance((yyvsp[(1) - (3)].node), strtoul((yyvsp[(3) - (3)].token), NULL, 10)); free((yyvsp[(3) - (3)].token)); - ;} + } break; case 12: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 141 "fts0pars.y" { (yyval.node) = fts_ast_create_node_list(state, (yyvsp[(1) - (3)].node)); fts_ast_add_node((yyval.node), (yyvsp[(2) - (3)].node)); fts_ast_term_set_wildcard((yyvsp[(2) - (3)].node)); - ;} + } break; case 13: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 147 "fts0pars.y" { (yyval.node) = fts_ast_create_node_list(state, (yyvsp[(1) - (2)].node)); fts_ast_add_node((yyval.node), (yyvsp[(2) - (2)].node)); - ;} + } break; case 14: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 152 "fts0pars.y" { (yyval.node) = fts_ast_create_node_list(state, (yyvsp[(1) - (4)].node)); fts_ast_add_node((yyval.node), (yyvsp[(2) - (4)].node)); fts_ast_term_set_distance((yyvsp[(2) - (4)].node), strtoul((yyvsp[(4) - (4)].token), NULL, 10)); free((yyvsp[(4) - (4)].token)); - ;} + } break; case 15: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 159 "fts0pars.y" { (yyval.node) = fts_ast_create_node_list(state, (yyvsp[(1) - (2)].node)); fts_ast_add_node((yyval.node), (yyvsp[(2) - (2)].node)); - ;} + } break; case 16: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 165 "fts0pars.y" { (yyval.node) = fts_ast_create_node_oper(state, FTS_IGNORE); - ;} + } break; case 17: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 169 "fts0pars.y" { (yyval.node) = fts_ast_create_node_oper(state, FTS_EXIST); - ;} + } break; case 18: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 173 "fts0pars.y" { (yyval.node) = fts_ast_create_node_oper(state, FTS_NEGATE); - ;} + } break; case 19: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 177 "fts0pars.y" { (yyval.node) = fts_ast_create_node_oper(state, FTS_DECR_RATING); - ;} + } break; case 20: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 181 "fts0pars.y" { (yyval.node) = fts_ast_create_node_oper(state, FTS_INCR_RATING); - ;} + } break; case 21: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 186 "fts0pars.y" { (yyval.node) = fts_ast_create_node_term(state, (yyvsp[(1) - (1)].token)); free((yyvsp[(1) - (1)].token)); - ;} + } break; case 22: -/* Line 1455 of yacc.c */ +/* Line 1806 of yacc.c */ #line 191 "fts0pars.y" { (yyval.node) = fts_ast_create_node_term(state, (yyvsp[(1) - (1)].token)); free((yyvsp[(1) - (1)].token)); - ;} + } break; case 23: -/* Line 1455 of yacc.c */ -#line 198 "fts0pars.y" +/* Line 1806 of yacc.c */ +#line 197 "fts0pars.y" + { + (yyval.node) = (yyvsp[(2) - (2)].node); + } + break; + + case 24: + +/* Line 1806 of yacc.c */ +#line 202 "fts0pars.y" { (yyval.node) = fts_ast_create_node_text(state, (yyvsp[(1) - (1)].token)); free((yyvsp[(1) - (1)].token)); - ;} + } break; -/* Line 1455 of yacc.c */ -#line 1617 "fts0pars.cc" +/* Line 1806 of yacc.c */ +#line 1658 "fts0pars.cc" default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -1643,6 +1695,10 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -1650,37 +1706,36 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char*) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } @@ -1739,7 +1794,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -1798,8 +1853,13 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -1824,8 +1884,8 @@ yyreturn: -/* Line 1675 of yacc.c */ -#line 203 "fts0pars.y" +/* Line 2067 of yacc.c */ +#line 207 "fts0pars.y" /******************************************************************** @@ -1835,7 +1895,7 @@ ftserror( /*=====*/ const char* p) { - fprintf(stderr, "%s\n", p); + my_printf_error(ER_PARSE_ERROR, "%s", MYF(0), p); return(0); } diff --git a/storage/innobase/fts/fts0pars.y b/storage/innobase/fts/fts0pars.y index fe644d84eea..73d71bc87c5 100644 --- a/storage/innobase/fts/fts0pars.y +++ b/storage/innobase/fts/fts0pars.y @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2013, 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 @@ -193,6 +193,10 @@ term : FTS_TERM { free($1); } + /* Ignore leading '*' */ + | '*' term { + $$ = $2; + } ; text : FTS_TEXT { diff --git a/storage/innobase/fts/fts0que.cc b/storage/innobase/fts/fts0que.cc index 5c757b4f176..a70c742da0c 100644 --- a/storage/innobase/fts/fts0que.cc +++ b/storage/innobase/fts/fts0que.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2013, 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 @@ -40,6 +40,10 @@ Completed 2011/7/10 Sunny and Jimmy Yang #include "fts0vlc.ic" #endif +#include <string> +#include <vector> +#include <map> + #define FTS_ELEM(t, n, i, j) (t[(i) * n + (j)]) #define RANK_DOWNGRADE (-1.0F) @@ -50,13 +54,20 @@ FIXME, this limitation can be removed easily. Need to see if we want to enforce such limitation */ #define MAX_PROXIMITY_ITEM 128 +/* Memory used by rbt itself for create and node add */ +#define SIZEOF_RBT_CREATE sizeof(ib_rbt_t) + sizeof(ib_rbt_node_t) * 2 +#define SIZEOF_RBT_NODE_ADD sizeof(ib_rbt_node_t) + +/*Initial byte length for 'words' in fts_ranking_t */ +#define RANKING_WORDS_INIT_LEN 4 + /* Coeffecient to use for normalize relevance ranking. */ static const double FTS_NORMALIZE_COEFF = 0.0115F; // FIXME: Need to have a generic iterator that traverses the ilist. -/* For parsing the search phrase */ -static const char* FTS_PHRASE_DELIMITER = "\t "; +typedef std::map<std::string, ulint> word_map_t; +typedef std::vector<std::string> word_vector_t; struct fts_word_freq_t; @@ -72,6 +83,8 @@ struct fts_query_t { fts_table_t fts_index_table;/*!< FTS auxiliary index table def */ + ulint total_size; /*!< total memory size used by query */ + fts_doc_ids_t* deleted; /*!< Deleted doc ids that need to be filtered from the output */ @@ -79,6 +92,12 @@ struct fts_query_t { fts_ast_node_t* cur_node; /*!< Current tree node */ + word_map_t* word_map; /*!< Matched word map for + searching by word*/ + + word_vector_t* word_vector; /*!< Matched word vector for + searching by index */ + ib_rbt_t* doc_ids; /*!< The current set of matching doc ids, elements are of type fts_ranking_t */ @@ -113,7 +132,7 @@ struct fts_query_t { doc_id_t upper_doc_id; /*!< Highest doc id in doc_ids */ - ibool boolean_mode; /*!< TRUE if boolean mode query */ + bool boolean_mode; /*!< TRUE if boolean mode query */ ib_vector_t* matched; /*!< Array of matching documents (fts_match_t) to search for a phrase */ @@ -133,9 +152,7 @@ struct fts_query_t { document, its elements are of type fts_word_freq_t */ - ibool inited; /*!< Flag to test whether the query - processing has started or not */ - ibool multi_exist; /*!< multiple FTS_EXIST oper */ + bool multi_exist; /*!< multiple FTS_EXIST oper */ }; /** For phrase matching, first we collect the documents and the positions @@ -237,7 +254,7 @@ fts_query_index_fetch_nodes( Read and filter nodes. @return fts_node_t instance */ static -void +dberr_t fts_query_filter_doc_ids( /*=====================*/ fts_query_t* query, /*!< in: query instance */ @@ -318,7 +335,7 @@ static ulint fts_query_terms_in_document( /*========================*/ - /*!< out: DB_SUCCESS if all went well + /*!< out: DB_SUCCESS if all go well else error code */ fts_query_t* query, /*!< in: FTS query state */ doc_id_t doc_id, /*!< in: the word to check */ @@ -430,22 +447,6 @@ fts_query_lcs( #endif /*******************************************************************//** -Compare two byte* arrays. -@return 0 if p1 == p2, < 0 if p1 < p2, > 0 if p1 > p2 */ -static -int -fts_query_strcmp( -/*=============*/ - const void* p1, /*!< in: pointer to elem */ - const void* p2) /*!< in: pointer to elem */ -{ - void* temp = const_cast<void*>(p2); - - return(strcmp(static_cast<const char*>(p1), - *(static_cast <char**>(temp)))); -} - -/*******************************************************************//** Compare two fts_ranking_t instance on their rank value and doc ids in descending order on the rank and ascending order on doc id. @return 0 if p1 == p2, < 0 if p1 < p2, > 0 if p1 > p2 */ @@ -537,6 +538,127 @@ fts_utf8_strcmp( #endif /*******************************************************************//** +Create words in ranking */ +static +void +fts_ranking_words_create( +/*=====================*/ + fts_query_t* query, /*!< in: query instance */ + fts_ranking_t* ranking) /*!< in: ranking instance */ +{ + ranking->words = static_cast<byte*>( + mem_heap_zalloc(query->heap, RANKING_WORDS_INIT_LEN)); + ranking->words_len = RANKING_WORDS_INIT_LEN; +} + +/* +The optimization here is using a char array(bitmap) to replace words rb tree +in fts_ranking_t. + +It can save lots of memory except in some cases of QUERY EXPANSION. + +'word_map' is used as a word dictionary, in which the key is a word, the value +is a number. In 'fts_ranking_words_add', we first check if the word is in 'word_map'. +if not, we add it into 'word_map', and give it a position(actually a number). +then we set the corresponding bit to '1' at the position in the char array 'words'. + +'word_vector' is a useful backup of 'word_map', and we can get a word by its position, +more quickly than searching by value in 'word_map'. we use 'word_vector' +in 'fts_query_calculate_ranking' and 'fts_expand_query'. In the two functions, we need +to scan the bitmap 'words', and get a word when a bit is '1', then we get word_freq +by the word. +*/ + +/*******************************************************************//** +Add a word into ranking */ +static +void +fts_ranking_words_add( +/*==================*/ + fts_query_t* query, /*!< in: query instance */ + fts_ranking_t* ranking, /*!< in: ranking instance */ + const char* word) /*!< in: term/word to add */ +{ + ulint pos; + ulint byte_offset; + ulint bit_offset; + word_map_t::iterator it; + + /* Note: we suppose the word map and vector are append-only */ + /* Check if need to add it to word map */ + it = query->word_map->lower_bound(word); + if (it != query->word_map->end() + && !query->word_map->key_comp()(word, it->first)) { + pos = it->second; + } else { + pos = query->word_map->size(); + query->word_map->insert(it, + std::pair<std::string, ulint>(word, pos)); + + query->word_vector->push_back(word); + } + + /* Check words len */ + byte_offset = pos / CHAR_BIT; + if (byte_offset >= ranking->words_len) { + byte* words = ranking->words; + ulint words_len = ranking->words_len; + + while (byte_offset >= words_len) { + words_len *= 2; + } + + ranking->words = static_cast<byte*>( + mem_heap_zalloc(query->heap, words_len)); + ut_memcpy(ranking->words, words, ranking->words_len); + ranking->words_len = words_len; + } + + /* Set ranking words */ + ut_ad(byte_offset < ranking->words_len); + bit_offset = pos % CHAR_BIT; + ranking->words[byte_offset] |= 1 << bit_offset; +} + +/*******************************************************************//** +Get a word from a ranking +@return true if it's successful */ +static +bool +fts_ranking_words_get_next( +/*=======================*/ + const fts_query_t* query, /*!< in: query instance */ + fts_ranking_t* ranking,/*!< in: ranking instance */ + ulint* pos, /*!< in/out: word start pos */ + byte** word) /*!< in/out: term/word to add */ +{ + bool ret = false; + ulint max_pos = ranking->words_len * CHAR_BIT; + + /* Search for next word */ + while (*pos < max_pos) { + ulint byte_offset = *pos / CHAR_BIT; + ulint bit_offset = *pos % CHAR_BIT; + + if (ranking->words[byte_offset] & (1 << bit_offset)) { + ret = true; + break; + } + + *pos += 1; + }; + + /* Get next word from word vector */ + if (ret) { + ut_ad(*pos < query->word_vector->size()); + *word = (byte*)query->word_vector->at((size_t)*pos).c_str(); + *pos += 1; + } + + return ret; +} + +/*******************************************************************//** Add a word if it doesn't exist, to the term freq RB tree. We store a pointer to the word that is passed in as the argument. @return pointer to word */ @@ -569,6 +691,11 @@ fts_query_add_word_freq( parent.last = rbt_add_node( query->word_freqs, &parent, &word_freq); + + query->total_size += len + + SIZEOF_RBT_CREATE + + SIZEOF_RBT_NODE_ADD + + sizeof(fts_word_freq_t); } return(rbt_value(fts_word_freq_t, parent.last)); @@ -581,6 +708,7 @@ static fts_doc_freq_t* fts_query_add_doc_freq( /*===================*/ + fts_query_t* query, /*!< in: query instance */ ib_rbt_t* doc_freqs, /*!< in: rb tree of fts_doc_freq_t */ doc_id_t doc_id) /*!< in: doc id to add */ { @@ -596,6 +724,9 @@ fts_query_add_doc_freq( doc_freq.doc_id = doc_id; parent.last = rbt_add_node(doc_freqs, &parent, &doc_freq); + + query->total_size += SIZEOF_RBT_NODE_ADD + + sizeof(fts_doc_freq_t); } return(rbt_value(fts_doc_freq_t, parent.last)); @@ -625,9 +756,12 @@ fts_query_union_doc_id( ranking.rank = rank; ranking.doc_id = doc_id; - ranking.words = rbt_create(sizeof(byte*), fts_query_strcmp); + fts_ranking_words_create(query, &ranking); rbt_add_node(query->doc_ids, &parent, &ranking); + + query->total_size += SIZEOF_RBT_NODE_ADD + + sizeof(fts_ranking_t) + RANKING_WORDS_INIT_LEN; } } @@ -648,13 +782,12 @@ fts_query_remove_doc_id( /* Check if the doc id is deleted and it's in our set. */ if (fts_bsearch(array, 0, size, doc_id) < 0 && rbt_search(query->doc_ids, &parent, &doc_id) == 0) { - - fts_ranking_t* ranking; - - ranking = rbt_value(fts_ranking_t, parent.last); - rbt_free(ranking->words); - ut_free(rbt_remove_node(query->doc_ids, parent.last)); + + ut_ad(query->total_size >= + SIZEOF_RBT_NODE_ADD + sizeof(fts_ranking_t)); + query->total_size -= SIZEOF_RBT_NODE_ADD + + sizeof(fts_ranking_t); } } @@ -712,57 +845,69 @@ fts_query_intersect_doc_id( ib_rbt_bound_t parent; ulint size = ib_vector_size(query->deleted->doc_ids); fts_update_t* array = (fts_update_t*) query->deleted->doc_ids->data; - fts_ranking_t* ranking; + fts_ranking_t* ranking= NULL; + + /* There are three types of intersect: + 1. '+a': doc_ids is empty, add doc into intersect if it matches 'a'. + 2. 'a +b': docs match 'a' is in doc_ids, add doc into intersect + if it matches 'b'. if the doc is also in doc_ids, then change the + doc's rank, and add 'a' in doc's words. + 3. '+a +b': docs matching '+a' is in doc_ids, add doc into intsersect + if it matches 'b' and it's in doc_ids.(multi_exist = true). */ /* Check if the doc id is deleted and it's in our set */ if (fts_bsearch(array, 0, size, doc_id) < 0) { - /* If this is the first FTS_EXIST we encountered, all of its - value must be in intersect list */ - if (!query->multi_exist) { - fts_ranking_t new_ranking; - - if (rbt_search(query->doc_ids, &parent, &doc_id) == 0) { - ranking = rbt_value(fts_ranking_t, parent.last); - rank += (ranking->rank > 0) - ? ranking->rank : RANK_UPGRADE; - if (rank >= 1.0F) { - rank = 1.0F; - } - } + fts_ranking_t new_ranking; - new_ranking.rank = rank; - new_ranking.doc_id = doc_id; - new_ranking.words = rbt_create( - sizeof(byte*), fts_query_strcmp); - ranking = &new_ranking; - - if (rbt_search(query->intersection, &parent, - ranking) != 0) { - rbt_add_node(query->intersection, - &parent, ranking); + if (rbt_search(query->doc_ids, &parent, &doc_id) != 0) { + if (query->multi_exist) { + return; } else { - rbt_free(new_ranking.words); + new_ranking.words = NULL; } } else { + ranking = rbt_value(fts_ranking_t, parent.last); - if (rbt_search(query->doc_ids, &parent, &doc_id) != 0) { + /* We've just checked the doc id before */ + if (ranking->words == NULL) { + ut_ad(rbt_search(query->intersection, &parent, + ranking) == 0); return; } - ranking = rbt_value(fts_ranking_t, parent.last); + /* Merge rank */ + rank += ranking->rank; + if (rank >= 1.0F) { + rank = 1.0F; + } else if (rank <= -1.0F) { + rank = -1.0F; + } + + /* Take words */ + new_ranking.words = ranking->words; + new_ranking.words_len = ranking->words_len; + } - ranking->rank = rank; + new_ranking.rank = rank; + new_ranking.doc_id = doc_id; - if (ranking->words != NULL - && rbt_search(query->intersection, &parent, - ranking) != 0) { - rbt_add_node(query->intersection, &parent, - ranking); + if (rbt_search(query->intersection, &parent, + &new_ranking) != 0) { + if (new_ranking.words == NULL) { + fts_ranking_words_create(query, &new_ranking); + query->total_size += RANKING_WORDS_INIT_LEN; + } else { /* Note that the intersection has taken ownership of the ranking data. */ ranking->words = NULL; } + + rbt_add_node(query->intersection, + &parent, &new_ranking); + + query->total_size += SIZEOF_RBT_NODE_ADD + + sizeof(fts_ranking_t); } } } @@ -773,6 +918,7 @@ static void fts_query_free_doc_ids( /*===================*/ + fts_query_t* query, /*!< in: query instance */ ib_rbt_t* doc_ids) /*!< in: rb tree to free */ { const ib_rbt_node_t* node; @@ -784,14 +930,21 @@ fts_query_free_doc_ids( ranking = rbt_value(fts_ranking_t, node); if (ranking->words) { - rbt_free(ranking->words); ranking->words = NULL; } ut_free(rbt_remove_node(doc_ids, node)); + + ut_ad(query->total_size >= + SIZEOF_RBT_NODE_ADD + sizeof(fts_ranking_t)); + query->total_size -= SIZEOF_RBT_NODE_ADD + + sizeof(fts_ranking_t); } rbt_free(doc_ids); + + ut_ad(query->total_size >= SIZEOF_RBT_CREATE); + query->total_size -= SIZEOF_RBT_CREATE; } /*******************************************************************//** @@ -808,6 +961,10 @@ fts_query_add_word_to_document( ib_rbt_bound_t parent; fts_ranking_t* ranking = NULL; + if (query->flags == FTS_OPT_RANKING) { + return; + } + /* First we search the intersection RB tree as it could have taken ownership of the words rb tree instance. */ if (query->intersection @@ -823,23 +980,7 @@ fts_query_add_word_to_document( } if (ranking != NULL) { - ulint len; - byte* term; - - len = ut_strlen((char*) word) + 1; - - term = static_cast<byte*>(mem_heap_alloc(query->heap, len)); - - /* Need to copy the NUL character too. */ - memcpy(term, (char*) word, len); - - /* The current set must have ownership of the RB tree. */ - ut_a(ranking->words != NULL); - - /* If the word doesn't exist in the words "list" we add it. */ - if (rbt_search(ranking->words, &parent, term) != 0) { - rbt_add_node(ranking->words, &parent, &term); - } + fts_ranking_words_add(query, ranking, (char*)word); } } @@ -874,9 +1015,9 @@ fts_query_check_node( word_freqs = rbt_value(fts_word_freq_t, parent.last); - fts_query_filter_doc_ids( - query, token->f_str, word_freqs, node, - node->ilist, ilist_size, TRUE); + query->error = fts_query_filter_doc_ids( + query, token->f_str, word_freqs, node, + node->ilist, ilist_size, TRUE); } } @@ -940,10 +1081,14 @@ fts_cache_find_wildcard( fts_word_freq_t, freq_parent.last); - fts_query_filter_doc_ids( + query->error = fts_query_filter_doc_ids( query, srch_text.f_str, word_freqs, node, node->ilist, node->ilist_size, TRUE); + + if (query->error != DB_SUCCESS) { + return(0); + } } num_word++; @@ -976,7 +1121,7 @@ cont_search: /*****************************************************************//** Set difference. -@return DB_SUCCESS if all went well */ +@return DB_SUCCESS if all go well */ static __attribute__((nonnull, warn_unused_result)) dberr_t fts_query_difference( @@ -1007,6 +1152,7 @@ fts_query_difference( const fts_index_cache_t*index_cache; que_t* graph = NULL; fts_cache_t* cache = table->fts->cache; + dberr_t error; rw_lock_x_lock(&cache->lock); @@ -1023,7 +1169,8 @@ fts_query_difference( } else { nodes = fts_cache_find_word(index_cache, token); - for (i = 0; nodes && i < ib_vector_size(nodes); ++i) { + for (i = 0; nodes && i < ib_vector_size(nodes) + && query->error == DB_SUCCESS; ++i) { const fts_node_t* node; node = static_cast<const fts_node_t*>( @@ -1035,14 +1182,26 @@ fts_query_difference( rw_lock_x_unlock(&cache->lock); + /* error is passed by 'query->error' */ + if (query->error != DB_SUCCESS) { + ut_ad(query->error == DB_FTS_EXCEED_RESULT_CACHE_LIMIT); + return(query->error); + } + /* Setup the callback args for filtering and consolidating the ilist. */ fetch.read_arg = query; fetch.read_record = fts_query_index_fetch_nodes; - query->error = fts_index_fetch_nodes( + error = fts_index_fetch_nodes( trx, &graph, &query->fts_index_table, token, &fetch); + /* DB_FTS_EXCEED_RESULT_CACHE_LIMIT passed by 'query->error' */ + ut_ad(!(query->error != DB_SUCCESS && error != DB_SUCCESS)); + if (error != DB_SUCCESS) { + query->error = error; + } + fts_que_graph_free(graph); } @@ -1054,7 +1213,7 @@ fts_query_difference( /*****************************************************************//** Intersect the token doc ids with the current set. -@return DB_SUCCESS if all went well */ +@return DB_SUCCESS if all go well */ static __attribute__((nonnull, warn_unused_result)) dberr_t fts_query_intersect( @@ -1062,7 +1221,6 @@ fts_query_intersect( fts_query_t* query, /*!< in: query instance */ const fts_string_t* token) /*!< in: the token to search */ { - ulint n_doc_ids = 0; trx_t* trx = query->trx; dict_table_t* table = query->index->table; @@ -1073,41 +1231,28 @@ fts_query_intersect( (int) token->f_len, token->f_str); #endif - if (!query->inited) { - - ut_a(rbt_empty(query->doc_ids)); - - /* Since this is the first time we need to convert this - intersection query into a union query. Otherwise we - will end up with an empty set. */ - query->oper = FTS_NONE; - query->inited = TRUE; - } - - if (query->doc_ids) { - n_doc_ids = rbt_size(query->doc_ids); - } - - /* If the words set is not empty or this is the first time. */ - - if (!rbt_empty(query->doc_ids) || query->oper == FTS_NONE) { + /* If the words set is not empty and multi exist is true, + we know the intersection set is empty in advance. */ + if (!(rbt_empty(query->doc_ids) && query->multi_exist)) { + ulint n_doc_ids = 0; ulint i; fts_fetch_t fetch; const ib_vector_t* nodes; const fts_index_cache_t*index_cache; que_t* graph = NULL; fts_cache_t* cache = table->fts->cache; + dberr_t error; ut_a(!query->intersection); - /* Only if this is not the first time. */ - if (query->oper != FTS_NONE) { + n_doc_ids = rbt_size(query->doc_ids); - /* Create the rb tree that will hold the doc ids of - the intersection. */ - query->intersection = rbt_create( - sizeof(fts_ranking_t), fts_ranking_doc_id_cmp); - } + /* Create the rb tree that will hold the doc ids of + the intersection. */ + query->intersection = rbt_create( + sizeof(fts_ranking_t), fts_ranking_doc_id_cmp); + + query->total_size += SIZEOF_RBT_CREATE; /* This is to avoid decompressing the ilist if the node's ilist doc ids are out of range. */ @@ -1144,7 +1289,8 @@ fts_query_intersect( } else { nodes = fts_cache_find_word(index_cache, token); - for (i = 0; nodes && i < ib_vector_size(nodes); ++i) { + for (i = 0; nodes && i < ib_vector_size(nodes) + && query->error == DB_SUCCESS; ++i) { const fts_node_t* node; node = static_cast<const fts_node_t*>( @@ -1156,48 +1302,48 @@ fts_query_intersect( rw_lock_x_unlock(&cache->lock); + /* error is passed by 'query->error' */ + if (query->error != DB_SUCCESS) { + ut_ad(query->error == DB_FTS_EXCEED_RESULT_CACHE_LIMIT); + return(query->error); + } + /* Setup the callback args for filtering and consolidating the ilist. */ fetch.read_arg = query; fetch.read_record = fts_query_index_fetch_nodes; - query->error = fts_index_fetch_nodes( + error = fts_index_fetch_nodes( trx, &graph, &query->fts_index_table, token, &fetch); + /* DB_FTS_EXCEED_RESULT_CACHE_LIMIT passed by 'query->error' */ + ut_ad(!(query->error != DB_SUCCESS && error != DB_SUCCESS)); + if (error != DB_SUCCESS) { + query->error = error; + } + fts_que_graph_free(graph); if (query->error == DB_SUCCESS) { - if (query->oper == FTS_EXIST) { - - /* The size can't increase. */ - ut_a(rbt_size(query->doc_ids) <= n_doc_ids); - } - /* Make the intesection (rb tree) the current doc id set and free the old set. */ - if (query->intersection) { - fts_query_free_doc_ids(query->doc_ids); - query->doc_ids = query->intersection; - query->intersection = NULL; - } + fts_query_free_doc_ids(query, query->doc_ids); + query->doc_ids = query->intersection; + query->intersection = NULL; - /* Reset the set operation to intersect. */ - query->oper = FTS_EXIST; + ut_a(!query->multi_exist || (query->multi_exist + && rbt_size(query->doc_ids) <= n_doc_ids)); } } - if (!query->multi_exist) { - query->multi_exist = TRUE; - } - return(query->error); } /*****************************************************************//** Query index cache. -@return DB_SUCCESS if all went well */ +@return DB_SUCCESS if all go well */ static -ulint +dberr_t fts_query_cache( /*============*/ fts_query_t* query, /*!< in/out: query instance */ @@ -1227,7 +1373,8 @@ fts_query_cache( nodes = fts_cache_find_word(index_cache, token); - for (i = 0; nodes && i < ib_vector_size(nodes); ++i) { + for (i = 0; nodes && i < ib_vector_size(nodes) + && query->error == DB_SUCCESS; ++i) { const fts_node_t* node; node = static_cast<const fts_node_t*>( @@ -1239,12 +1386,12 @@ fts_query_cache( rw_lock_x_unlock(&cache->lock); - return(DB_SUCCESS); + return(query->error); } /*****************************************************************//** Set union. -@return DB_SUCCESS if all went well */ +@return DB_SUCCESS if all go well */ static __attribute__((nonnull, warn_unused_result)) dberr_t fts_query_union( @@ -1256,6 +1403,7 @@ fts_query_union( ulint n_doc_ids = 0; trx_t* trx = query->trx; que_t* graph = NULL; + dberr_t error; ut_a(query->oper == FTS_NONE || query->oper == FTS_DECR_RATING || query->oper == FTS_NEGATE || query->oper == FTS_INCR_RATING); @@ -1265,8 +1413,6 @@ fts_query_union( (int) token->f_len, token->f_str); #endif - query->error = DB_SUCCESS; - if (query->doc_ids) { n_doc_ids = rbt_size(query->doc_ids); } @@ -1287,9 +1433,15 @@ fts_query_union( fetch.read_record = fts_query_index_fetch_nodes; /* Read the nodes from disk. */ - query->error = fts_index_fetch_nodes( + error = fts_index_fetch_nodes( trx, &graph, &query->fts_index_table, token, &fetch); + /* DB_FTS_EXCEED_RESULT_CACHE_LIMIT passed by 'query->error' */ + ut_ad(!(query->error != DB_SUCCESS && error != DB_SUCCESS)); + if (error != DB_SUCCESS) { + query->error = error; + } + fts_que_graph_free(graph); if (query->error == DB_SUCCESS) { @@ -1302,22 +1454,17 @@ fts_query_union( if (query->doc_ids) { n_doc_ids = rbt_size(query->doc_ids) - n_doc_ids; } - - /* In case there were no matching docs then we reset the - state, otherwise intersection will not be able to detect - that it's being called for the first time. */ - if (!rbt_empty(query->doc_ids)) { - query->inited = TRUE; - } } return(query->error); } /*****************************************************************//** -Depending upon the current query operator process the doc id. */ +Depending upon the current query operator process the doc id. +return DB_SUCCESS if all go well +or return DB_FTS_EXCEED_RESULT_CACHE_LIMIT */ static -void +dberr_t fts_query_process_doc_id( /*=====================*/ fts_query_t* query, /*!< in: query instance */ @@ -1325,6 +1472,10 @@ fts_query_process_doc_id( fts_rank_t rank) /*!< in: if non-zero, it is the rank associated with the doc_id */ { + if (query->flags == FTS_OPT_RANKING) { + return(DB_SUCCESS); + } + switch (query->oper) { case FTS_NONE: fts_query_union_doc_id(query, doc_id, rank); @@ -1355,12 +1506,18 @@ fts_query_process_doc_id( default: ut_error; } + + if (query->total_size > fts_result_cache_limit) { + return(DB_FTS_EXCEED_RESULT_CACHE_LIMIT); + } else { + return(DB_SUCCESS); + } } /*****************************************************************//** Merge two result sets. */ static -void +dberr_t fts_merge_doc_ids( /*==============*/ fts_query_t* query, /*!< in,out: query instance */ @@ -1377,25 +1534,42 @@ fts_merge_doc_ids( query->intersection = rbt_create( sizeof(fts_ranking_t), fts_ranking_doc_id_cmp); + + query->total_size += SIZEOF_RBT_CREATE; } /* Merge the elements to the result set. */ for (node = rbt_first(doc_ids); node; node = rbt_next(doc_ids, node)) { fts_ranking_t* ranking; + ulint pos = 0; + byte* word = NULL; ranking = rbt_value(fts_ranking_t, node); - fts_query_process_doc_id( - query, ranking->doc_id, ranking->rank); + query->error = fts_query_process_doc_id( + query, ranking->doc_id, ranking->rank); + + if (query->error != DB_SUCCESS) { + return(query->error); + } + + /* Merge words. Don't need to take operator into account. */ + ut_a(ranking->words); + while (fts_ranking_words_get_next(query, ranking, &pos, &word)) { + fts_query_add_word_to_document(query, ranking->doc_id, + word); + } } /* If it is an intersection operation, reset query->doc_ids to query->intersection and free the old result list. */ if (query->oper == FTS_EXIST && query->intersection != NULL) { - fts_query_free_doc_ids(query->doc_ids); + fts_query_free_doc_ids(query, query->doc_ids); query->doc_ids = query->intersection; query->intersection = NULL; } + + return(DB_SUCCESS); } /*****************************************************************//** @@ -1827,7 +2001,7 @@ fts_query_select( /******************************************************************** Read the rows from the FTS index, that match word and where the doc id is between first and last doc id. -@return DB_SUCCESS if all went well else error code */ +@return DB_SUCCESS if all go well else error code */ static __attribute__((nonnull, warn_unused_result)) dberr_t fts_query_find_term( @@ -1882,7 +2056,7 @@ fts_query_find_term( "DECLARE FUNCTION my_func;\n" "DECLARE CURSOR c IS" " SELECT doc_count, ilist\n" - " FROM %s\n" + " FROM \"%s\"\n" " WHERE word LIKE :word AND " " first_doc_id <= :min_doc_id AND " " last_doc_id >= :max_doc_id\n" @@ -1967,7 +2141,7 @@ fts_query_sum( /******************************************************************** Calculate the total documents that contain a particular word (term). -@return DB_SUCCESS if all went well else error code */ +@return DB_SUCCESS if all go well else error code */ static __attribute__((nonnull, warn_unused_result)) dberr_t fts_query_total_docs_containing_term( @@ -2046,7 +2220,7 @@ fts_query_total_docs_containing_term( /******************************************************************** Get the total number of words in a documents. -@return DB_SUCCESS if all went well else error code */ +@return DB_SUCCESS if all go well else error code */ static __attribute__((nonnull, warn_unused_result)) dberr_t fts_query_terms_in_document( @@ -2081,7 +2255,7 @@ fts_query_terms_in_document( "DECLARE FUNCTION my_func;\n" "DECLARE CURSOR c IS" " SELECT count\n" - " FROM %s\n" + " FROM \"%s\"\n" " WHERE doc_id = :doc_id " "BEGIN\n" "\n" @@ -2233,8 +2407,14 @@ static __attribute__((nonnull, warn_unused_result)) dberr_t fts_query_search_phrase( /*====================*/ - fts_query_t* query, /*!< in: query instance */ - ib_vector_t* tokens) /*!< in: tokens to search */ + fts_query_t* query, /*!< in: query instance */ + ib_vector_t* orig_tokens, /*!< in: tokens to search, + with any stopwords in the + original phrase */ + ib_vector_t* tokens) /*!< in: tokens that does + not include stopwords and + can be used to calculate + ranking */ { ulint i; fts_get_doc_t get_doc; @@ -2275,14 +2455,18 @@ fts_query_search_phrase( if (match->doc_id != 0) { query->error = fts_query_match_document( - tokens, &get_doc, + orig_tokens, &get_doc, match, query->distance, &found); if (query->error == DB_SUCCESS && found) { ulint z; - fts_query_process_doc_id(query, + query->error = fts_query_process_doc_id(query, match->doc_id, 0); + if (query->error != DB_SUCCESS) { + goto func_exit; + } + for (z = 0; z < ib_vector_size(tokens); z++) { fts_string_t* token; token = static_cast<fts_string_t*>( @@ -2295,6 +2479,7 @@ fts_query_search_phrase( } } +func_exit: /* Free the prepared statement. */ if (get_doc.get_document_graph) { fts_que_graph_free(get_doc.get_document_graph); @@ -2314,17 +2499,21 @@ fts_query_phrase_search( fts_query_t* query, /*!< in: query instance */ const fts_string_t* phrase) /*!< in: token to search */ { - char* src; - char* state; /* strtok_r internal state */ ib_vector_t* tokens; + ib_vector_t* orig_tokens; mem_heap_t* heap = mem_heap_create(sizeof(fts_string_t)); - char* utf8 = strdup((char*) phrase->f_str); + ulint len = phrase->f_len; + ulint cur_pos = 0; ib_alloc_t* heap_alloc; ulint num_token; + CHARSET_INFO* charset; + + charset = query->fts_index_table.charset; heap_alloc = ib_heap_allocator_create(heap); tokens = ib_vector_create(heap_alloc, sizeof(fts_string_t), 4); + orig_tokens = ib_vector_create(heap_alloc, sizeof(fts_string_t), 4); if (query->distance != ULINT_UNDEFINED && query->distance > 0) { query->flags = FTS_PROXIMITY; @@ -2333,26 +2522,65 @@ fts_query_phrase_search( } /* Split the phrase into tokens. */ - for (src = utf8; /* No op */; src = NULL) { + while (cur_pos < len) { + fts_cache_t* cache = query->index->table->fts->cache; + ib_rbt_bound_t parent; + ulint offset; + ulint cur_len; + fts_string_t result_str; + + cur_len = innobase_mysql_fts_get_token( + charset, + reinterpret_cast<const byte*>(phrase->f_str) + cur_pos, + reinterpret_cast<const byte*>(phrase->f_str) + len, + &result_str, &offset); + + if (cur_len == 0) { + break; + } + + cur_pos += cur_len; + + if (result_str.f_n_char == 0) { + continue; + } + fts_string_t* token = static_cast<fts_string_t*>( ib_vector_push(tokens, NULL)); - token->f_str = (byte*) strtok_r( - src, FTS_PHRASE_DELIMITER, &state); + token->f_str = static_cast<byte*>( + mem_heap_alloc(heap, result_str.f_len + 1)); + ut_memcpy(token->f_str, result_str.f_str, result_str.f_len); + + token->f_len = result_str.f_len; + token->f_str[token->f_len] = 0; - if (token->f_str) { + if (cache->stopword_info.cached_stopword + && rbt_search(cache->stopword_info.cached_stopword, + &parent, token) != 0 + && result_str.f_n_char >= fts_min_token_size + && result_str.f_n_char <= fts_max_token_size) { /* Add the word to the RB tree so that we can calculate it's frequencey within a document. */ fts_query_add_word_freq(query, token->f_str); - - token->f_len = ut_strlen((char*) token->f_str); } else { ib_vector_pop(tokens); - break; + } + + /* we will start to store all words including stopwords + in the "orig_tokens" vector, but skip any leading words + that are stopwords */ + if (!ib_vector_is_empty(tokens)) { + fts_string_t* orig_token = static_cast<fts_string_t*>( + ib_vector_push(orig_tokens, NULL)); + + orig_token->f_str = token->f_str; + orig_token->f_len = token->f_len; } } num_token = ib_vector_size(tokens); + ut_ad(ib_vector_size(orig_tokens) >= num_token); /* Ignore empty strings. */ if (num_token > 0) { @@ -2362,19 +2590,7 @@ fts_query_phrase_search( fts_ast_oper_t oper = query->oper; que_t* graph = NULL; ulint i; - - /* Create the rb tree for storing the words read form disk. */ - if (!query->inited) { - - /* Since this is the first time, we need to convert - this intersection query into a union query. Otherwise - we will end up with an empty set. */ - if (query->oper == FTS_EXIST) { - query->oper = FTS_NONE; - } - - query->inited = TRUE; - } + dberr_t error; /* Create the vector for storing matching document ids and the positions of the first token of the phrase. */ @@ -2422,10 +2638,16 @@ fts_query_phrase_search( query->matched = query->match_array[i]; } - fts_index_fetch_nodes( + error = fts_index_fetch_nodes( trx, &graph, &query->fts_index_table, token, &fetch); + /* DB_FTS_EXCEED_RESULT_CACHE_LIMIT passed by 'query->error' */ + ut_ad(!(query->error != DB_SUCCESS && error != DB_SUCCESS)); + if (error != DB_SUCCESS) { + query->error = error; + } + fts_que_graph_free(graph); graph = NULL; @@ -2438,12 +2660,15 @@ fts_query_phrase_search( /* If any of the token can't be found, no need to continue match */ - if (ib_vector_is_empty(query->match_array[i])) { + if (ib_vector_is_empty(query->match_array[i]) + || query->error != DB_SUCCESS) { goto func_exit; } } - if (num_token == 1 + /* Just a single word, no need to fetch the original + documents to do phrase matching */ + if (ib_vector_size(orig_tokens) == 1 && !ib_vector_is_empty(query->match_array[0])) { fts_match_t* match; ulint n_matched; @@ -2455,8 +2680,11 @@ fts_query_phrase_search( ib_vector_get( query->match_array[0], i)); - fts_query_process_doc_id( - query, match->doc_id, 0); + query->error = fts_query_process_doc_id( + query, match->doc_id, 0); + if (query->error != DB_SUCCESS) { + goto func_exit; + } fts_query_add_word_to_document( query, match->doc_id, token->f_str); @@ -2484,18 +2712,21 @@ fts_query_phrase_search( /* Read the actual text in and search for the phrase. */ if (matched) { - query->error = DB_SUCCESS; + ut_ad(query->error == DB_SUCCESS); query->error = fts_query_search_phrase( - query, tokens); + query, orig_tokens, tokens); } } /* Restore original operation. */ query->oper = oper; + + if (query->error != DB_SUCCESS) { + goto func_exit; + } } func_exit: - free(utf8); mem_heap_free(heap); /* Don't need it anymore. */ @@ -2506,7 +2737,7 @@ func_exit: /*****************************************************************//** Find the word and evaluate. -@return DB_SUCCESS if all went well */ +@return DB_SUCCESS if all go well */ static __attribute__((nonnull, warn_unused_result)) dberr_t fts_query_execute( @@ -2578,7 +2809,7 @@ fts_query_get_token( /*****************************************************************//** Visit every node of the AST. */ static -ulint +dberr_t fts_query_visitor( /*==============*/ fts_ast_oper_t oper, /*!< in: current operator */ @@ -2602,11 +2833,8 @@ fts_query_visitor( token.f_str = node->text.ptr; token.f_len = ut_strlen((char*) token.f_str); - /* "first second third" is treated as first & second - & third. Create the rb tree that will hold the doc ids - of the intersection. */ - if (!query->intersection && query->oper == FTS_EXIST) { - + if (query->oper == FTS_EXIST) { + ut_ad(query->intersection == NULL); query->intersection = rbt_create( sizeof(fts_ranking_t), fts_ranking_doc_id_cmp); } @@ -2621,10 +2849,8 @@ fts_query_visitor( query->collect_positions = FALSE; - /* Make the intesection (rb tree) the current doc id - set and free the old set. */ - if (query->intersection) { - fts_query_free_doc_ids(query->doc_ids); + if (query->oper == FTS_EXIST) { + fts_query_free_doc_ids(query, query->doc_ids); query->doc_ids = query->intersection; query->intersection = NULL; } @@ -2649,6 +2875,10 @@ fts_query_visitor( ut_error; } + if (query->oper == FTS_EXIST) { + query->multi_exist = true; + } + return(query->error); } @@ -2656,7 +2886,7 @@ fts_query_visitor( Process (nested) sub-expression, create a new result set to store the sub-expression result by processing nodes under current sub-expression list. Merge the sub-expression result with that of parent expression list. -@return DB_SUCCESS if all went well */ +@return DB_SUCCESS if all well */ UNIV_INTERN dberr_t fts_ast_visit_sub_exp( @@ -2670,8 +2900,8 @@ fts_ast_visit_sub_exp( ib_rbt_t* parent_doc_ids; ib_rbt_t* subexpr_doc_ids; dberr_t error = DB_SUCCESS; - ibool inited = query->inited; bool will_be_ignored = false; + bool multi_exist; ut_a(node->type == FTS_AST_SUBEXP_LIST); @@ -2691,45 +2921,34 @@ fts_ast_visit_sub_exp( query->doc_ids = rbt_create(sizeof(fts_ranking_t), fts_ranking_doc_id_cmp); - /* Reset the query start flag because the sub-expression result - set is independent of any previous results. The state flag - reset is needed for not making an intersect operation on an empty - set in the first call to fts_query_intersect() for the first term. */ - query->inited = FALSE; + query->total_size += SIZEOF_RBT_CREATE; + multi_exist = query->multi_exist; + query->multi_exist = false; /* Process nodes in current sub-expression and store its result set in query->doc_ids we created above. */ error = fts_ast_visit(FTS_NONE, node->next, visitor, arg, &will_be_ignored); /* Reinstate parent node state and prepare for merge. */ - query->inited = inited; + query->multi_exist = multi_exist; query->oper = cur_oper; subexpr_doc_ids = query->doc_ids; /* Restore current result set. */ query->doc_ids = parent_doc_ids; - if (query->oper == FTS_EXIST && !query->inited) { - ut_a(rbt_empty(query->doc_ids)); - /* Since this is the first time we need to convert this - intersection query into a union query. Otherwise we - will end up with an empty set. */ - query->oper = FTS_NONE; - query->inited = TRUE; - } - /* Merge the sub-expression result with the parent result set. */ if (error == DB_SUCCESS && !rbt_empty(subexpr_doc_ids)) { - fts_merge_doc_ids(query, subexpr_doc_ids); + error = fts_merge_doc_ids(query, subexpr_doc_ids); } if (query->oper == FTS_EXIST) { - query->multi_exist = TRUE; + query->multi_exist = true; } /* Free current result set. Result already merged into parent. */ - fts_query_free_doc_ids(subexpr_doc_ids); + fts_query_free_doc_ids(query, subexpr_doc_ids); return(error); } @@ -2808,9 +3027,10 @@ fts_query_find_doc_id( /*****************************************************************//** Read and filter nodes. -@return fts_node_t instance */ +@return DB_SUCCESS if all go well, +or return DB_FTS_EXCEED_RESULT_CACHE_LIMIT */ static -void +dberr_t fts_query_filter_doc_ids( /*=====================*/ fts_query_t* query, /*!< in: query instance */ @@ -2863,6 +3083,10 @@ fts_query_filter_doc_ids( parent container. */ match->positions = ib_vector_create( heap_alloc, sizeof(ulint), 64); + + query->total_size += sizeof(fts_match_t) + + sizeof(ib_vector_t) + + sizeof(ulint) * 64; } /* Unpack the positions within the document. */ @@ -2888,7 +3112,7 @@ fts_query_filter_doc_ids( /* Add the doc id to the doc freq rb tree, if the doc id doesn't exist it will be created. */ - doc_freq = fts_query_add_doc_freq(doc_freqs, doc_id); + doc_freq = fts_query_add_doc_freq(query, doc_freqs, doc_id); /* Avoid duplicating frequency tally. */ if (doc_freq->freq == 0) { @@ -2904,21 +3128,29 @@ fts_query_filter_doc_ids( /* We simply collect the matching documents and the positions here and match later. */ if (!query->collect_positions) { + /* We ignore error here and will check it later */ fts_query_process_doc_id(query, doc_id, 0); - } - /* Add the word to the document's matched RB tree. */ - fts_query_add_word_to_document(query, doc_id, word); + /* Add the word to the document's matched RB tree. */ + fts_query_add_word_to_document(query, doc_id, word); + } } /* Some sanity checks. */ ut_a(doc_id == node->last_doc_id); + + if (query->total_size > fts_result_cache_limit) { + return(DB_FTS_EXCEED_RESULT_CACHE_LIMIT); + } else { + return(DB_SUCCESS); + } } /*****************************************************************//** -Read the FTS INDEX row. */ +Read the FTS INDEX row. +@return DB_SUCCESS if all go well. */ static -void +dberr_t fts_query_read_node( /*================*/ fts_query_t* query, /*!< in: query instance */ @@ -2932,6 +3164,7 @@ fts_query_read_node( fts_word_freq_t* word_freq; ibool skip = FALSE; byte term[FTS_MAX_WORD_LEN + 1]; + dberr_t error = DB_SUCCESS; ut_a(query->cur_node->type == FTS_AST_TERM || query->cur_node->type == FTS_AST_TEXT); @@ -3005,9 +3238,9 @@ fts_query_read_node( case 4: /* ILIST */ - fts_query_filter_doc_ids( - query, word_freq->word, word_freq, - &node, data, len, FALSE); + error = fts_query_filter_doc_ids( + query, word_freq->word, word_freq, + &node, data, len, FALSE); break; @@ -3021,6 +3254,8 @@ fts_query_read_node( ut_a(i == 5); } + + return error; } /*****************************************************************//** @@ -3047,9 +3282,15 @@ fts_query_index_fetch_nodes( ut_a(dfield_len <= FTS_MAX_WORD_LEN); - fts_query_read_node(query, &key, que_node_get_next(exp)); + /* Note: we pass error out by 'query->error' */ + query->error = fts_query_read_node(query, &key, que_node_get_next(exp)); - return(TRUE); + if (query->error != DB_SUCCESS) { + ut_ad(query->error == DB_FTS_EXCEED_RESULT_CACHE_LIMIT); + return(FALSE); + } else { + return(TRUE); + } } /*****************************************************************//** @@ -3107,27 +3348,22 @@ fts_query_calculate_ranking( const fts_query_t* query, /*!< in: query state */ fts_ranking_t* ranking) /*!< in: Document to rank */ { - const ib_rbt_node_t* node; + ulint pos = 0; + byte* word = NULL; /* At this stage, ranking->rank should not exceed the 1.0 bound */ ut_ad(ranking->rank <= 1.0 && ranking->rank >= -1.0); + ut_ad(query->word_map->size() == query->word_vector->size()); - for (node = rbt_first(ranking->words); - node; - node = rbt_first(ranking->words)) { - + while (fts_ranking_words_get_next(query, ranking, &pos, &word)) { int ret; - const byte* word; - const byte** wordp; ib_rbt_bound_t parent; double weight; fts_doc_freq_t* doc_freq; fts_word_freq_t* word_freq; - wordp = rbt_value(const byte*, node); - word = *wordp; - + ut_ad(word != NULL); ret = rbt_search(query->word_freqs, &parent, word); /* It must exist. */ @@ -3146,8 +3382,6 @@ fts_query_calculate_ranking( weight = (double) doc_freq->freq * word_freq->idf; ranking->rank += (fts_rank_t) (weight * word_freq->idf); - - ut_free(rbt_remove_node(ranking->words, node)); } } @@ -3157,6 +3391,7 @@ static void fts_query_add_ranking( /*==================*/ + fts_query_t* query, /*!< in: query state */ ib_rbt_t* ranking_tree, /*!< in: ranking tree */ const fts_ranking_t* new_ranking) /*!< in: ranking of a document */ { @@ -3173,6 +3408,9 @@ fts_query_add_ranking( ut_a(ranking->words == NULL); } else { rbt_add_node(ranking_tree, &parent, new_ranking); + + query->total_size += SIZEOF_RBT_NODE_ADD + + sizeof(fts_ranking_t); } } @@ -3213,14 +3451,13 @@ static fts_result_t* fts_query_prepare_result( /*=====================*/ - const fts_query_t* query, /*!< in: Query state */ - fts_result_t* result) /*!< in: result this can contain - data from a previous search on - another FTS index */ + fts_query_t* query, /*!< in: Query state */ + fts_result_t* result) /*!< in: result this can contain + data from a previous search on + another FTS index */ { const ib_rbt_node_t* node; - - ut_a(rbt_size(query->doc_ids) > 0); + bool result_is_null = false; if (result == NULL) { result = static_cast<fts_result_t*>(ut_malloc(sizeof(*result))); @@ -3229,8 +3466,55 @@ fts_query_prepare_result( result->rankings_by_id = rbt_create( sizeof(fts_ranking_t), fts_ranking_doc_id_cmp); + + query->total_size += sizeof(fts_result_t) + SIZEOF_RBT_CREATE; + result_is_null = true; + } + + if (query->flags == FTS_OPT_RANKING) { + fts_word_freq_t* word_freq; + ulint size = ib_vector_size(query->deleted->doc_ids); + fts_update_t* array = + (fts_update_t*) query->deleted->doc_ids->data; + + node = rbt_first(query->word_freqs); + ut_ad(node); + word_freq = rbt_value(fts_word_freq_t, node); + + for (node = rbt_first(word_freq->doc_freqs); + node; + node = rbt_next(word_freq->doc_freqs, node)) { + fts_doc_freq_t* doc_freq; + fts_ranking_t ranking; + + doc_freq = rbt_value(fts_doc_freq_t, node); + + /* Don't put deleted docs into result */ + if (fts_bsearch(array, 0, size, doc_freq->doc_id) + >= 0) { + continue; + } + + ranking.doc_id = doc_freq->doc_id; + ranking.rank = doc_freq->freq * word_freq->idf + * word_freq->idf; + ranking.words = NULL; + + fts_query_add_ranking(query, result->rankings_by_id, + &ranking); + + if (query->total_size > fts_result_cache_limit) { + query->error = DB_FTS_EXCEED_RESULT_CACHE_LIMIT; + fts_query_free_result(result); + return(NULL); + } + } + + return(result); } + ut_a(rbt_size(query->doc_ids) > 0); + for (node = rbt_first(query->doc_ids); node; node = rbt_next(query->doc_ids, node)) { @@ -3245,11 +3529,24 @@ fts_query_prepare_result( // different FTS indexes. /* We don't need these anymore free the resources. */ - ut_a(rbt_empty(ranking->words)); - rbt_free(ranking->words); ranking->words = NULL; - fts_query_add_ranking(result->rankings_by_id, ranking); + if (!result_is_null) { + fts_query_add_ranking(query, result->rankings_by_id, ranking); + + if (query->total_size > fts_result_cache_limit) { + query->error = DB_FTS_EXCEED_RESULT_CACHE_LIMIT; + fts_query_free_result(result); + return(NULL); + } + } + } + + if (result_is_null) { + /* Use doc_ids directly */ + rbt_free(result->rankings_by_id); + result->rankings_by_id = query->doc_ids; + query->doc_ids = NULL; } return(result); @@ -3261,10 +3558,10 @@ static fts_result_t* fts_query_get_result( /*=================*/ - const fts_query_t* query, /*!< in: query instance */ + fts_query_t* query, /*!< in: query instance */ fts_result_t* result) /*!< in: result */ { - if (rbt_size(query->doc_ids) > 0) { + if (rbt_size(query->doc_ids) > 0 || query->flags == FTS_OPT_RANKING) { /* Copy the doc ids to the result. */ result = fts_query_prepare_result(query, result); } else { @@ -3298,7 +3595,7 @@ fts_query_free( } if (query->doc_ids) { - fts_query_free_doc_ids(query->doc_ids); + fts_query_free_doc_ids(query, query->doc_ids); } if (query->word_freqs) { @@ -3327,6 +3624,14 @@ fts_query_free( mem_heap_free(query->heap); } + if (query->word_map) { + delete query->word_map; + } + + if (query->word_vector) { + delete query->word_vector; + } + memset(query, 0, sizeof(*query)); } @@ -3342,12 +3647,13 @@ fts_query_parse( { int error; fts_ast_state_t state; - ibool mode = query->boolean_mode; + bool mode = query->boolean_mode; memset(&state, 0x0, sizeof(state)); /* Setup the scanner to use, this depends on the mode flag. */ state.lexer = fts_lexer_create(mode, query_str, query_len); + state.charset = query->fts_index_table.charset; error = fts_parse(&state); fts_lexer_free(state.lexer); state.lexer = NULL; @@ -3363,6 +3669,113 @@ fts_query_parse( return(state.root); } +/*******************************************************************//** +FTS Query optimization +Set FTS_OPT_RANKING if it is a simple term query */ +static +void +fts_query_can_optimize( +/*===================*/ + fts_query_t* query, /*!< in/out: query instance */ + uint flags) /*!< In: FTS search mode */ +{ + fts_ast_node_t* node = query->root; + + if (flags & FTS_EXPAND) { + return; + } + + /* Check if it has only a term without oper */ + ut_ad(node->type == FTS_AST_LIST); + node = node->list.head; + if (node != NULL && node->type == FTS_AST_TERM && node->next == NULL) { + query->flags = FTS_OPT_RANKING; + } +} + +/*******************************************************************//** +Pre-process the query string +1) make it lower case +2) in boolean mode, if there is '-' or '+' that is immediately proceeded +and followed by valid word, make it a space +@return the processed string */ +static +byte* +fts_query_str_preprocess( +/*=====================*/ + const byte* query_str, /*!< in: FTS query */ + ulint query_len, /*!< in: FTS query string len */ + ulint *result_len, /*!< out: result string length */ + CHARSET_INFO* charset, /*!< in: string charset */ + bool boolean_mode) /*!< in: is boolean mode */ +{ + ulint cur_pos = 0; + ulint str_len; + byte* str_ptr; + bool in_phrase = false; + + /* Convert the query string to lower case before parsing. We own + the ut_malloc'ed result and so remember to free it before return. */ + + str_len = query_len * charset->casedn_multiply + 1; + str_ptr = static_cast<byte*>(ut_malloc(str_len)); + + *result_len = innobase_fts_casedn_str( + charset, const_cast<char*>(reinterpret_cast<const char*>( + query_str)), query_len, + reinterpret_cast<char*>(str_ptr), str_len); + + ut_ad(*result_len < str_len); + + str_ptr[*result_len] = 0; + + /* If it is boolean mode, no need to check for '-/+' */ + if (!boolean_mode) { + return(str_ptr); + } + + /* Otherwise, we travese the string to find any '-/+' that are + immediately proceeded and followed by valid search word. + NOTE: we should not do so for CJK languages, this should + be taken care of in our CJK implementation */ + while (cur_pos < *result_len) { + fts_string_t str; + ulint offset; + ulint cur_len; + + cur_len = innobase_mysql_fts_get_token( + charset, str_ptr + cur_pos, str_ptr + *result_len, + &str, &offset); + + if (cur_len == 0 || str.f_str == NULL) { + /* No valid word found */ + break; + } + + /* Check if we are in a phrase, if so, no need to do + replacement of '-/+'. */ + for (byte* ptr = str_ptr + cur_pos; ptr < str.f_str; ptr++) { + if ((char) (*ptr) == '"' ) { + in_phrase = !in_phrase; + } + } + + /* Find those are not leading '-/+' and also not in a phrase */ + if (cur_pos > 0 && str.f_str - str_ptr - cur_pos == 1 + && !in_phrase) { + char* last_op = reinterpret_cast<char*>( + str_ptr + cur_pos); + + if (*last_op == '-' || *last_op == '+') { + *last_op = ' '; + } + } + + cur_pos += cur_len; + } + + return(str_ptr); +} /*******************************************************************//** FTS Query entry point. @@ -3382,9 +3795,8 @@ fts_query( fts_query_t query; dberr_t error = DB_SUCCESS; byte* lc_query_str; - ulint lc_query_str_len; ulint result_len; - ibool boolean_mode; + bool boolean_mode; trx_t* query_trx; CHARSET_INFO* charset; ulint start_time_ms; @@ -3401,7 +3813,6 @@ fts_query( query.trx = query_trx; query.index = index; - query.inited = FALSE; query.boolean_mode = boolean_mode; query.deleted = fts_doc_ids_create(); query.cur_node = NULL; @@ -3418,6 +3829,9 @@ fts_query( query.fts_index_table.parent = index->table->name; query.fts_index_table.charset = charset; + query.word_map = new word_map_t; + query.word_vector = new word_vector_t; + query.error = DB_SUCCESS; /* Setup the RB tree that will be used to collect per term statistics. */ @@ -3425,6 +3839,8 @@ fts_query( sizeof(fts_word_freq_t), innobase_fts_string_cmp, (void*) charset); + query.total_size += SIZEOF_RBT_CREATE; + query.total_docs = dict_table_get_n_rows(index->table); #ifdef FTS_DOC_STATS_DEBUG @@ -3467,6 +3883,7 @@ fts_query( /* Sort the vector so that we can do a binary search over the ids. */ ib_vector_sort(query.deleted->doc_ids, fts_update_doc_id_cmp); +#if 0 /* Convert the query string to lower case before parsing. We own the ut_malloc'ed result and so remember to free it before return. */ @@ -3481,16 +3898,30 @@ fts_query( lc_query_str[result_len] = 0; +#endif + + lc_query_str = fts_query_str_preprocess( + query_str, query_len, &result_len, charset, boolean_mode); + query.heap = mem_heap_create(128); /* Create the rb tree for the doc id (current) set. */ query.doc_ids = rbt_create( sizeof(fts_ranking_t), fts_ranking_doc_id_cmp); + query.total_size += SIZEOF_RBT_CREATE; + /* Parse the input query string. */ if (fts_query_parse(&query, lc_query_str, result_len)) { fts_ast_node_t* ast = query.root; + /* Optimize query to check if it's a single term */ + fts_query_can_optimize(&query, flags); + + DBUG_EXECUTE_IF("fts_instrument_result_cache_limit", + fts_result_cache_limit = 2048; + ); + /* Traverse the Abstract Syntax Tree (AST) and execute the query. */ query.error = fts_ast_visit( @@ -3500,11 +3931,13 @@ fts_query( /* If query expansion is requested, extend the search with first search pass result */ if (query.error == DB_SUCCESS && (flags & FTS_EXPAND)) { - query.error = fts_expand_query(index, &query); + query.error = fts_expand_query(index, &query); } /* Calculate the inverse document frequency of the terms. */ - fts_query_calculate_idf(&query); + if (query.error == DB_SUCCESS) { + fts_query_calculate_idf(&query); + } /* Copy the result from the query state, so that we can return it to the caller. */ @@ -3530,6 +3963,15 @@ fts_query( (*result)->rankings_by_id ? (int) rbt_size((*result)->rankings_by_id) : -1); + + /* Log memory consumption & result size */ + ib_logf(IB_LOG_LEVEL_INFO, + "Full Search Memory: " + "%lu (bytes), Row: %lu .", + query.total_size, + (*result)->rankings_by_id + ? rbt_size((*result)->rankings_by_id) + : 0); } func_exit: @@ -3608,30 +4050,24 @@ static void fts_print_doc_id( /*=============*/ - ib_rbt_t* doc_ids) /*!< in : tree that stores doc_ids.*/ + fts_query_t* query) /*!< in : tree that stores doc_ids.*/ { const ib_rbt_node_t* node; - const ib_rbt_node_t* node_word; /* Iterate each member of the doc_id set */ - for (node = rbt_first(doc_ids); + for (node = rbt_first(query->doc_ids); node; - node = rbt_next(doc_ids, node)) { + node = rbt_next(query->doc_ids, node)) { fts_ranking_t* ranking; ranking = rbt_value(fts_ranking_t, node); fprintf(stderr, "doc_ids info, doc_id: %ld \n", (ulint) ranking->doc_id); - for (node_word = rbt_first(ranking->words); - node_word; - node_word = rbt_next(ranking->words, node_word)) { - - const byte** value; - - value = rbt_value(const byte*, node_word); - - fprintf(stderr, "doc_ids info, value: %s \n", *value); + ulint pos = 0; + byte* value = NULL; + while (fts_ranking_words_get_next(query, ranking, &pos, &value)) { + fprintf(stderr, "doc_ids info, value: %s \n", value); } } } @@ -3676,8 +4112,9 @@ fts_expand_query( result_doc.charset = index_cache->charset; + query->total_size += SIZEOF_RBT_CREATE; #ifdef UNIV_DEBUG - fts_print_doc_id(query->doc_ids); + fts_print_doc_id(query); #endif for (node = rbt_first(query->doc_ids); @@ -3685,7 +4122,12 @@ fts_expand_query( node = rbt_next(query->doc_ids, node)) { fts_ranking_t* ranking; - const ib_rbt_node_t* node_word; + ulint pos; + byte* word; + ulint prev_token_size; + ulint estimate_size; + + prev_token_size = rbt_size(result_doc.tokens); ranking = rbt_value(fts_ranking_t, node); @@ -3702,16 +4144,15 @@ fts_expand_query( /* Remove words that have already been searched in the first pass */ - for (node_word = rbt_first(ranking->words); - node_word; - node_word = rbt_next(ranking->words, node_word)) { + pos = 0; + word = NULL; + while (fts_ranking_words_get_next(query, ranking, &pos, + &word)) { fts_string_t str; ibool ret; - const byte** strp; - strp = rbt_value(const byte*, node_word); /* FIXME: We are discarding a const qualifier here. */ - str.f_str = (byte*) *strp; + str.f_str = word; str.f_len = ut_strlen((const char*) str.f_str); ret = rbt_delete(result_doc.tokens, &str); @@ -3723,6 +4164,18 @@ fts_expand_query( (ulint) ranking->doc_id); } } + + /* Estimate memory used, see fts_process_token and fts_token_t. + We ignore token size here. */ + estimate_size = (rbt_size(result_doc.tokens) - prev_token_size) + * (SIZEOF_RBT_NODE_ADD + sizeof(fts_token_t) + + sizeof(ib_vector_t) + sizeof(ulint) * 32); + query->total_size += estimate_size; + + if (query->total_size > fts_result_cache_limit) { + error = DB_FTS_EXCEED_RESULT_CACHE_LIMIT; + goto func_exit; + } } /* Search the table the second time with expanded search list */ @@ -3740,6 +4193,7 @@ fts_expand_query( } } +func_exit: fts_doc_free(&result_doc); return(error); @@ -3857,8 +4311,12 @@ fts_phrase_or_proximity_search( if (fts_query_is_in_proximity_range( query, match, &qualified_pos)) { /* If so, mark we find a matching doc */ - fts_query_process_doc_id( + query->error = fts_query_process_doc_id( query, match[0]->doc_id, 0); + if (query->error != DB_SUCCESS) { + matched = FALSE; + goto func_exit; + } matched = TRUE; for (ulint z = 0; z < num_token; z++) { diff --git a/storage/innobase/fts/fts0tlex.cc b/storage/innobase/fts/fts0tlex.cc index 44434c4ea25..717ddb8a77e 100644 --- a/storage/innobase/fts/fts0tlex.cc +++ b/storage/innobase/fts/fts0tlex.cc @@ -52,7 +52,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -185,7 +185,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -247,7 +247,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0t_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner YY_BUFFER_STATE fts0t_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE fts0t_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); -void *fts0talloc (yy_size_t , yyscan_t yyscanner __attribute__((unused)) ); -void *fts0trealloc (void *,yy_size_t , yyscan_t yyscanner __attribute__((unused)) ); -void fts0tfree (void * , yyscan_t yyscanner __attribute__((unused)) ); +void *fts0talloc (yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +void *fts0trealloc (void *,yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); +void fts0tfree (void * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); #define yy_new_buffer fts0t_create_buffer @@ -347,7 +347,7 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner __attribute__((unused)) ); +static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. @@ -359,8 +359,8 @@ static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner __attribute_ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 6 -#define YY_END_OF_BUFFER 7 +#define YY_NUM_RULES 7 +#define YY_END_OF_BUFFER 8 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -370,7 +370,7 @@ struct yy_trans_info }; static yyconst flex_int16_t yy_accept[17] = { 0, - 4, 4, 7, 4, 1, 5, 1, 6, 6, 2, + 4, 4, 8, 4, 1, 6, 1, 5, 5, 2, 4, 1, 1, 0, 3, 0 } ; @@ -575,11 +575,11 @@ extern int fts0twrap (yyscan_t yyscanner ); #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner __attribute__((unused))); +static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner __attribute__((unused))); +static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))); #endif #ifndef YY_NO_INPUT @@ -816,17 +816,22 @@ YY_RULE_SETUP } YY_BREAK case 5: -/* rule 5 can match eol */ +YY_RULE_SETUP +#line 65 "fts0tlex.l" +; + YY_BREAK +case 6: +/* rule 6 can match eol */ YY_RULE_SETUP #line 66 "fts0tlex.l" YY_BREAK -case 6: +case 7: YY_RULE_SETUP #line 68 "fts0tlex.l" ECHO; YY_BREAK -#line 829 "fts0tlex.cc" +#line 834 "fts0tlex.cc" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1307,7 +1312,7 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner) YY_BUFFER_STATE fts0t_create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) fts0talloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in fts0t_create_buffer()" ); @@ -1373,7 +1378,7 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner) } b->yy_is_interactive = 0; - + errno = oerrno; } @@ -1479,9 +1484,9 @@ static void fts0tensure_buffer_stack (yyscan_t yyscanner) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in fts0tensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1515,7 +1520,7 @@ static void fts0tensure_buffer_stack (yyscan_t yyscanner) YY_BUFFER_STATE fts0t_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1551,7 +1556,7 @@ YY_BUFFER_STATE fts0t_scan_buffer (char * base, yy_size_t size , yyscan_t yysc */ YY_BUFFER_STATE fts0t_scan_string (yyconst char * yystr , yyscan_t yyscanner) { - + return fts0t_scan_bytes(yystr,strlen(yystr) ,yyscanner); } @@ -1568,7 +1573,7 @@ YY_BUFFER_STATE fts0t_scan_bytes (yyconst char * yybytes, int _yybytes_len , y char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) fts0talloc(n ,yyscanner ); @@ -1596,7 +1601,7 @@ YY_BUFFER_STATE fts0t_scan_bytes (yyconst char * yybytes, int _yybytes_len , y #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner __attribute__((unused))) +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); @@ -1636,10 +1641,10 @@ YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner) int fts0tget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yylineno; } @@ -1649,10 +1654,10 @@ int fts0tget_lineno (yyscan_t yyscanner) int fts0tget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yycolumn; } @@ -1714,7 +1719,7 @@ void fts0tset_lineno (int line_number , yyscan_t yyscanner) /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) yy_fatal_error( "fts0tset_lineno called with no buffer" , yyscanner); - + yylineno = line_number; } @@ -1729,7 +1734,7 @@ void fts0tset_column (int column_no , yyscan_t yyscanner) /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) yy_fatal_error( "fts0tset_column called with no buffer" , yyscanner); - + yycolumn = column_no; } @@ -1812,9 +1817,9 @@ int fts0tlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) fts0talloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; @@ -1823,9 +1828,9 @@ int fts0tlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + fts0tset_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -1897,7 +1902,7 @@ int fts0tlex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner __attribute__((unused))) +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { register int i; for ( i = 0; i < n; ++i ) @@ -1906,7 +1911,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysc #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute__((unused))) +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { register int n; for ( n = 0; s[n]; ++n ) @@ -1916,12 +1921,12 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute__( } #endif -void *fts0talloc (yy_size_t size , yyscan_t yyscanner __attribute__((unused))) +void *fts0talloc (yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { return (void *) malloc( size ); } -void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attribute__((unused))) +void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those @@ -1933,7 +1938,7 @@ void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attribu return (void *) realloc( (char *) ptr, size ); } -void fts0tfree (void * ptr , yyscan_t yyscanner __attribute__((unused))) +void fts0tfree (void * ptr , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused))) { free( (char *) ptr ); /* see fts0trealloc() for (char *) cast */ } diff --git a/storage/innobase/fts/fts0tlex.l b/storage/innobase/fts/fts0tlex.l index 8c42678ac7a..a18c2a55081 100644 --- a/storage/innobase/fts/fts0tlex.l +++ b/storage/innobase/fts/fts0tlex.l @@ -62,7 +62,7 @@ this program; if not, write to the Free Software Foundation, Inc., return(FTS_TERM); } - +. ; \n %% diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 8af1ed2279c..6cb664dcb05 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. Copyright (c) 2012, Facebook Inc. @@ -41,6 +41,7 @@ this program; if not, write to the Free Software Foundation, Inc., #include <mysys_err.h> #include <innodb_priv.h> #include <table_cache.h> +#include <my_check_opt.h> #ifdef _WIN32 #include <io.h> @@ -145,6 +146,13 @@ extern bool wsrep_prepare_key_for_innodb(const uchar *cache_key, extern handlerton * wsrep_hton; extern TC_LOG* tc_log; extern void wsrep_cleanup_transaction(THD *thd); +static int +wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, + my_bool signal); +static void +wsrep_fake_trx_id(handlerton* hton, THD *thd); +static int innobase_wsrep_set_checkpoint(handlerton* hton, const XID* xid); +static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid); #endif /* WITH_WSREP */ /** to protect innobase_open_files */ static mysql_mutex_t innobase_share_mutex; @@ -186,8 +194,6 @@ static uint innobase_old_blocks_pct; of the buffer pool. */ static uint innobase_change_buffer_max_size = CHANGE_BUFFER_DEFAULT_SIZE; -static ulong innobase_compression_level = DEFAULT_COMPRESSION_LEVEL; - /* The default values for the following char* start-up parameters are determined in innobase_init below: */ @@ -235,8 +241,6 @@ static char* internal_innobase_data_file_path = NULL; static char* innodb_version_str = (char*) INNODB_VERSION_STR; -static char* fts_server_stopword_table = NULL; - /** Possible values for system variable "innodb_stats_method". The values are defined the same as its corresponding MyISAM system variable "myisam_stats_method"(see "myisam_stats_method_names"), for better usability */ @@ -347,6 +351,7 @@ static PSI_mutex_info all_innodb_mutexes[] = { {&fts_delete_mutex_key, "fts_delete_mutex", 0}, {&fts_optimize_mutex_key, "fts_optimize_mutex", 0}, {&fts_doc_id_mutex_key, "fts_doc_id_mutex", 0}, + {&fts_pll_tokenize_mutex_key, "fts_pll_tokenize_mutex", 0}, {&log_flush_order_mutex_key, "log_flush_order_mutex", 0}, {&hash_table_mutex_key, "hash_table_mutex", 0}, {&ibuf_bitmap_mutex_key, "ibuf_bitmap_mutex", 0}, @@ -428,7 +433,7 @@ static PSI_rwlock_info all_innodb_rwlocks[] = { {&index_tree_rw_lock_key, "index_tree_rw_lock", 0}, {&index_online_log_key, "index_online_log", 0}, {&dict_table_stats_latch_key, "dict_table_stats", 0}, - {&hash_table_rw_lock_key, "hash table locks", 0} + {&hash_table_rw_lock_key, "hash_table_locks", 0} }; # endif /* UNIV_PFS_RWLOCK */ @@ -445,7 +450,7 @@ static PSI_thread_info all_innodb_threads[] = { {&srv_master_thread_key, "srv_master_thread", 0}, {&srv_purge_thread_key, "srv_purge_thread", 0}, {&buf_page_cleaner_thread_key, "page_cleaner_thread", 0}, - {&recv_writer_thread_key, "recovery writer thread", 0} + {&recv_writer_thread_key, "recv_writer_thread", 0} }; # endif /* UNIV_PFS_THREAD */ @@ -485,10 +490,18 @@ ib_cb_t innodb_api_cb[] = { (ib_cb_t) ib_clust_read_tuple_create, (ib_cb_t) ib_tuple_delete, (ib_cb_t) ib_tuple_copy, + (ib_cb_t) ib_tuple_read_u8, + (ib_cb_t) ib_tuple_write_u8, + (ib_cb_t) ib_tuple_read_u16, + (ib_cb_t) ib_tuple_write_u16, (ib_cb_t) ib_tuple_read_u32, (ib_cb_t) ib_tuple_write_u32, (ib_cb_t) ib_tuple_read_u64, (ib_cb_t) ib_tuple_write_u64, + (ib_cb_t) ib_tuple_read_i8, + (ib_cb_t) ib_tuple_write_i8, + (ib_cb_t) ib_tuple_read_i16, + (ib_cb_t) ib_tuple_write_i16, (ib_cb_t) ib_tuple_read_i32, (ib_cb_t) ib_tuple_write_i32, (ib_cb_t) ib_tuple_read_i64, @@ -521,7 +534,8 @@ ib_cb_t innodb_api_cb[] = { (ib_cb_t) ib_cursor_clear_trx, (ib_cb_t) ib_get_idx_field_name, (ib_cb_t) ib_trx_get_start_time, - (ib_cb_t) ib_cfg_bk_commit_interval + (ib_cb_t) ib_cfg_bk_commit_interval, + (ib_cb_t) ib_cursor_stmt_begin }; /*************************************************************//** @@ -552,6 +566,15 @@ innobase_map_isolation_level( /*=========================*/ enum_tx_isolation iso); /*!< in: MySQL isolation level code */ +/******************************************************************//** +Maps a MySQL trx isolation level code to the InnoDB isolation level code +@return InnoDB isolation level */ +static inline +ulint +innobase_map_isolation_level( +/*=========================*/ + enum_tx_isolation iso); /*!< in: MySQL isolation level code */ + static const char innobase_hton_name[]= "InnoDB"; static MYSQL_THDVAR_BOOL(support_xa, PLUGIN_VAR_OPCMDARG, @@ -1184,7 +1207,7 @@ innobase_srv_conc_enter_innodb( trx_t* trx) /*!< in: transaction handle */ { #ifdef WITH_WSREP - if (wsrep_on(trx->mysql_thd) && + if (wsrep_on(trx->mysql_thd) && wsrep_thd_is_brute_force(trx->mysql_thd)) return; #endif /* WITH_WSREP */ if (srv_thread_concurrency) { @@ -1222,7 +1245,7 @@ innobase_srv_conc_exit_innodb( ut_ad(!sync_thread_levels_nonempty_trx(trx->has_search_latch)); #endif /* UNIV_SYNC_DEBUG */ #ifdef WITH_WSREP - if (wsrep_on(trx->mysql_thd) && + if (wsrep_on(trx->mysql_thd) && wsrep_thd_is_brute_force(trx->mysql_thd)) return; #endif /* WITH_WSREP */ @@ -1353,7 +1376,7 @@ thd_to_trx_id( { return(thd_to_trx(thd)->id); } -#endif +#endif /* WITH_WSREP */ /********************************************************************//** Call this function when mysqld passes control to the client. That is to @@ -1383,15 +1406,6 @@ innobase_release_temporary_latches( return(0); } -#ifdef WITH_WSREP -static int -wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, - my_bool signal); -static void -wsrep_fake_trx_id(handlerton* hton, THD *thd); -static int innobase_wsrep_set_checkpoint(handlerton* hton, const XID* xid); -static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid); -#endif /********************************************************************//** Increments innobase_active_counter and every INNOBASE_WAKE_INTERVALth time calls srv_active_wake_master_thread. This function should be used @@ -1513,6 +1527,13 @@ convert_error_code_to_mysql( case DB_OUT_OF_FILE_SPACE: return(HA_ERR_RECORD_FILE_FULL); + case DB_TEMP_FILE_WRITE_FAILURE: + my_error(ER_GET_ERRMSG, MYF(0), + DB_TEMP_FILE_WRITE_FAILURE, + ut_strerr(DB_TEMP_FILE_WRITE_FAILURE), + "InnoDB"); + return(HA_ERR_INTERNAL_ERROR); + case DB_TABLE_IN_FK_CHECK: return(HA_ERR_TABLE_IN_FK_CHECK); @@ -1564,7 +1585,8 @@ convert_error_code_to_mysql( case DB_FTS_INVALID_DOCID: return(HA_FTS_INVALID_DOCID); - + case DB_FTS_EXCEED_RESULT_CACHE_LIMIT: + return(HA_ERR_OUT_OF_MEM); case DB_TOO_MANY_CONCURRENT_TRXS: return(HA_ERR_TOO_MANY_CONCURRENT_TRXS); case DB_UNSUPPORTED: @@ -1577,6 +1599,8 @@ convert_error_code_to_mysql( return(HA_ERR_OUT_OF_MEM); case DB_TABLESPACE_EXISTS: return(HA_ERR_TABLESPACE_EXISTS); + case DB_IDENTIFIER_TOO_LONG: + return(HA_ERR_INTERNAL_ERROR); } } @@ -1669,6 +1693,31 @@ innobase_convert_from_table_id( strconvert(cs, from, FN_REFLEN, &my_charset_filename, to, (uint) len, &errors); } +/********************************************************************** +Check if the length of the identifier exceeds the maximum allowed. +return true when length of identifier is too long. */ +UNIV_INTERN +my_bool +innobase_check_identifier_length( +/*=============================*/ + const char* id) /* in: FK identifier to check excluding the + database portion. */ +{ + int well_formed_error = 0; + CHARSET_INFO *cs = system_charset_info; + DBUG_ENTER("innobase_check_identifier_length"); + + uint res = cs->cset->well_formed_len(cs, id, id + strlen(id), + NAME_CHAR_LEN, + &well_formed_error); + + if (well_formed_error || res == NAME_CHAR_LEN) { + my_error(ER_TOO_LONG_IDENT, MYF(0), id); + DBUG_RETURN(true); + } + DBUG_RETURN(false); +} + /******************************************************************//** Converts an identifier to UTF-8. */ UNIV_INTERN @@ -1815,9 +1864,14 @@ innobase_mysql_tmpfile(void) os_event_wait(srv_allow_writes_event); #endif /* WITH_INNODB_DISALLOW_WRITES */ int fd2 = -1; - File fd = mysql_tmpfile("ib"); + File fd; - DBUG_EXECUTE_IF("innobase_tmpfile_creation_failure", return(-1);); + DBUG_EXECUTE_IF( + "innobase_tmpfile_creation_failure", + return(-1); + ); + + fd = mysql_tmpfile("ib"); if (fd >= 0) { /* Copy the file descriptor, so that the additional resources @@ -2185,13 +2239,13 @@ UNIV_INTERN void innobase_copy_frm_flags_from_create_info( /*=====================================*/ - dict_table_t* innodb_table, /*!< in/out: InnoDB table */ - HA_CREATE_INFO* create_info) /*!< in: create info */ + dict_table_t* innodb_table, /*!< in/out: InnoDB table */ + const HA_CREATE_INFO* create_info) /*!< in: create info */ { ibool ps_on; ibool ps_off; - if (dict_table_is_temporary(innodb_table) || srv_read_only_mode) { + if (dict_table_is_temporary(innodb_table)) { /* Temp tables do not use persistent stats. */ ps_on = FALSE; ps_off = TRUE; @@ -2221,13 +2275,13 @@ UNIV_INTERN void innobase_copy_frm_flags_from_table_share( /*=====================================*/ - dict_table_t* innodb_table, /*!< in/out: InnoDB table */ - TABLE_SHARE* table_share) /*!< in: table share */ + dict_table_t* innodb_table, /*!< in/out: InnoDB table */ + const TABLE_SHARE* table_share) /*!< in: table share */ { ibool ps_on; ibool ps_off; - if (dict_table_is_temporary(innodb_table) || srv_read_only_mode) { + if (dict_table_is_temporary(innodb_table)) { /* Temp tables do not use persistent stats */ ps_on = FALSE; ps_off = TRUE; @@ -2265,7 +2319,7 @@ ha_innobase::ha_innobase( HA_BINLOG_ROW_CAPABLE | HA_CAN_GEOMETRY | HA_PARTIAL_COLUMN_READ | HA_TABLE_SCAN_ON_INDEX | HA_CAN_FULLTEXT | - HA_CAN_FULLTEXT_EXT), + HA_CAN_FULLTEXT_EXT | HA_CAN_EXPORT), start_of_scan(0), num_write_row(0) {} @@ -2290,6 +2344,10 @@ ha_innobase::update_thd( { trx_t* trx; + DBUG_ENTER("ha_innobase::update_thd"); + DBUG_PRINT("ha_innobase::update_thd", ("user_thd: %p -> %p", + user_thd, thd)); + /* The table should have been opened in ha_innobase::open(). */ DBUG_ASSERT(prebuilt->table->n_ref_count > 0); @@ -2301,6 +2359,7 @@ ha_innobase::update_thd( } user_thd = thd; + DBUG_VOID_RETURN; } /*********************************************************************//** @@ -2540,21 +2599,18 @@ innobase_convert_identifier( ibool file_id)/*!< in: TRUE=id is a table or database name; FALSE=id is an UTF-8 string */ { - char nz[NAME_LEN + 1]; - char nz2[NAME_LEN + 1 + EXPLAIN_FILENAME_MAX_EXTRA_LENGTH]; - const char* s = id; int q; if (file_id) { + + char nz[MAX_TABLE_NAME_LEN + 1]; + char nz2[MAX_TABLE_NAME_LEN + 1]; + /* Decode the table name. The MySQL function expects a NUL-terminated string. The input and output strings buffers must not be shared. */ - - if (UNIV_UNLIKELY(idlen > (sizeof nz) - 1)) { - idlen = (sizeof nz) - 1; - } - + ut_a(idlen <= MAX_TABLE_NAME_LEN); memcpy(nz, id, idlen); nz[idlen] = 0; @@ -2812,7 +2868,8 @@ ha_innobase::init_table_handle_for_HANDLER(void) /****************************************************************//** Gives the file extension of an InnoDB single-table tablespace. */ static const char* ha_innobase_exts[] = { - ".ibd", + ".ibd", + ".isl", NullS }; @@ -2989,14 +3046,33 @@ mem_free_and_error: srv_normalize_path_for_win(srv_log_group_home_dir); - if (strchr(srv_log_group_home_dir, ';') - || innobase_mirrored_log_groups != 1) { - sql_print_error("syntax error in innodb_log_group_home_dir, " - "or a wrong number of mirrored log groups"); + if (strchr(srv_log_group_home_dir, ';')) { + sql_print_error("syntax error in innodb_log_group_home_dir"); + goto mem_free_and_error; + } + if (innobase_mirrored_log_groups == 1) { + sql_print_warning( + "innodb_mirrored_log_groups is an unimplemented " + "feature and the variable will be completely " + "removed in a future version."); + } + + if (innobase_mirrored_log_groups > 1) { + sql_print_error( + "innodb_mirrored_log_groups is an unimplemented feature and " + "the variable will be completely removed in a future version. " + "Using values other than 1 is not supported."); goto mem_free_and_error; } + if (innobase_mirrored_log_groups == 0) { + /* To throw a deprecation warning message when the option is + passed, the default was changed to '0' (as a workaround). Since + the only value accepted for this option is '1', reset it to 1 */ + innobase_mirrored_log_groups = 1; + } + /* Validate the file format by animal name */ if (innobase_file_format_name != NULL) { @@ -3053,12 +3129,6 @@ mem_free_and_error: goto mem_free_and_error; } - /* Remember stopword table name supplied at startup */ - if (innobase_server_stopword_table) { - fts_server_stopword_table = - my_strdup(innobase_server_stopword_table, MYF(0)); - } - if (innobase_change_buffering) { ulint use; @@ -3201,8 +3271,6 @@ innobase_change_buffering_inited_ok: srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; - page_compression_level = (ulint) innobase_compression_level; - if (!innobase_use_checksums) { ut_print_timestamp(stderr); fprintf(stderr, @@ -5009,17 +5077,17 @@ UNIV_INTERN int ha_innobase::open( /*==============*/ - const char* name, /*!< in: table name */ - int mode, /*!< in: not used */ - uint test_if_locked) /*!< in: not used */ -{ - dict_table_t* ib_table; - char norm_name[FN_REFLEN]; - THD* thd; - ulint retries = 0; - char* is_part = NULL; - ibool par_case_name_set = FALSE; - char par_case_name[FN_REFLEN]; + const char* name, /*!< in: table name */ + int mode, /*!< in: not used */ + uint test_if_locked) /*!< in: not used */ +{ + dict_table_t* ib_table; + char norm_name[FN_REFLEN]; + THD* thd; + char* is_part = NULL; + ibool par_case_name_set = FALSE; + char par_case_name[FN_REFLEN]; + dict_err_ignore_t ignore_err = DICT_ERR_IGNORE_NONE; DBUG_ENTER("ha_innobase::open"); @@ -5049,20 +5117,22 @@ ha_innobase::open( upd_buf_size = 0; /* We look for pattern #P# to see if the table is partitioned - MySQL table. The retry logic for partitioned tables is a - workaround for http://bugs.mysql.com/bug.php?id=33349. Look - at support issue https://support.mysql.com/view.php?id=21080 - for more details. */ + MySQL table. */ #ifdef __WIN__ is_part = strstr(norm_name, "#p#"); #else is_part = strstr(norm_name, "#P#"); #endif /* __WIN__ */ -retry: + /* Check whether FOREIGN_KEY_CHECKS is set to 0. If so, the table + can be opened even if some FK indexes are missing. If not, the table + can't be opened in the same situation */ + if (thd_test_options(thd, OPTION_NO_FOREIGN_KEY_CHECKS)) { + ignore_err = DICT_ERR_IGNORE_FK_NOKEY; + } + /* Get pointer to a table object in InnoDB dictionary cache */ - ib_table = dict_table_open_on_name(norm_name, FALSE, TRUE, - DICT_ERR_IGNORE_NONE); + ib_table = dict_table_open_on_name(norm_name, FALSE, TRUE, ignore_err); if (ib_table && ((!DICT_TF2_FLAG_IS_SET(ib_table, DICT_TF2_FTS_HAS_DOC_ID) @@ -5088,7 +5158,7 @@ retry: } if (NULL == ib_table) { - if (is_part && retries < 10) { + if (is_part) { /* MySQL partition engine hard codes the file name separator as "#P#". The text case is fixed even if lower_case_table_names is set to 1 or 2. This is true @@ -5128,14 +5198,10 @@ retry: ib_table = dict_table_open_on_name( par_case_name, FALSE, TRUE, - DICT_ERR_IGNORE_NONE); + ignore_err); } - if (!ib_table) { - ++retries; - os_thread_sleep(100000); - goto retry; - } else { + if (ib_table) { #ifndef __WIN__ sql_print_warning("Partition table %s opened " "after converting to lower " @@ -5161,9 +5227,8 @@ retry: } if (is_part) { - sql_print_error("Failed to open table %s after " - "%lu attempts.\n", norm_name, - retries); + sql_print_error("Failed to open table %s.\n", + norm_name); } ib_logf(IB_LOG_LEVEL_WARN, @@ -5406,8 +5471,6 @@ ha_innobase::clone( mem_root)); if (new_handler) { DBUG_ASSERT(new_handler->prebuilt != NULL); - DBUG_ASSERT(new_handler->user_thd == user_thd); - DBUG_ASSERT(new_handler->prebuilt->trx == prebuilt->trx); new_handler->prebuilt->select_lock_type = prebuilt->select_lock_type; @@ -5480,6 +5543,7 @@ get_field_offset( { return((uint) (field->ptr - table->record[0])); } + #ifdef WITH_WSREP UNIV_INTERN void @@ -5574,7 +5638,8 @@ wsrep_innobase_mysql_sort( return; } -#endif // WITH_WSREP +#endif /* WITH_WSREP */ + /*************************************************************//** InnoDB uses this function to compare two data fields for which the data type is such that we must use MySQL code to compare them. NOTE that the prototype @@ -5881,8 +5946,8 @@ ulint innobase_mysql_fts_get_token( /*=========================*/ CHARSET_INFO* cs, /*!< in: Character set */ - byte* start, /*!< in: start of text */ - byte* end, /*!< in: one character past end of + const byte* start, /*!< in: start of text */ + const byte* end, /*!< in: one character past end of text */ fts_string_t* token, /*!< out: token's text */ ulint* offset) /*!< out: offset to token, @@ -5890,64 +5955,57 @@ innobase_mysql_fts_get_token( 'start' */ { int mbl; - uchar* doc = start; + const uchar* doc = start; ut_a(cs); token->f_n_char = token->f_len = 0; + token->f_str = NULL; - do { - for (;;) { - - if (doc >= end) { - return(doc - start); - } + for (;;) { - int ctype; + if (doc >= end) { + return(doc - start); + } - mbl = cs->cset->ctype( - cs, &ctype, (uchar*) doc, (uchar*) end); + int ctype; - if (true_word_char(ctype, *doc)) { - break; - } + mbl = cs->cset->ctype( + cs, &ctype, doc, (const uchar*) end); - doc += mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1); + if (true_word_char(ctype, *doc)) { + break; } - ulint mwc = 0; - ulint length = 0; - - token->f_str = doc; - - while (doc < end) { + doc += mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1); + } - int ctype; + ulint mwc = 0; + ulint length = 0; - mbl = cs->cset->ctype( - cs, &ctype, (uchar*) doc, (uchar*) end); + token->f_str = const_cast<byte*>(doc); - if (true_word_char(ctype, *doc)) { - mwc = 0; - } else if (!misc_word_char(*doc) || mwc) { - break; - } else { - ++mwc; - } + while (doc < end) { - ++length; + int ctype; - doc += mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1); + mbl = cs->cset->ctype( + cs, &ctype, (uchar*) doc, (uchar*) end); + if (true_word_char(ctype, *doc)) { + mwc = 0; + } else if (!misc_word_char(*doc) || mwc) { + break; + } else { + ++mwc; } - token->f_len = (uint) (doc - token->f_str) - mwc; - token->f_n_char = length; - - return(doc - start); + ++length; - } while (doc < end); + doc += mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1); + } - token->f_str[token->f_len] = 0; + token->f_len = (uint) (doc - token->f_str) - mwc; + token->f_n_char = length; return(doc - start); } @@ -6095,10 +6153,10 @@ innobase_read_from_2_little_endian( return((uint) ((ulint)(buf[0]) + 256 * ((ulint)(buf[1])))); } +#ifdef WITH_WSREP /*******************************************************************//** Stores a key value for a row to a buffer. @return key value length as stored in buff */ -#ifdef WITH_WSREP UNIV_INTERN uint wsrep_store_key_val_for_row( @@ -6117,10 +6175,10 @@ wsrep_store_key_val_for_row( char* buff_start = buff; enum_field_types mysql_type; Field* field; + + DBUG_ENTER("wsrep_store_key_val_for_row"); - DBUG_ENTER("store_key_val_for_row"); - - bzero(buff, buff_len); + memset(buff, 0, buff_len); *key_is_null = TRUE; for (; key_part != end; key_part++) { @@ -6149,7 +6207,7 @@ wsrep_store_key_val_for_row( const byte* data; ulint key_len; ulint true_len; - CHARSET_INFO* cs; + const CHARSET_INFO* cs; int error=0; key_len = key_part->length; @@ -6213,7 +6271,7 @@ wsrep_store_key_val_for_row( as BLOB data in innodb. */ || mysql_type == MYSQL_TYPE_GEOMETRY) { - CHARSET_INFO* cs; + const CHARSET_INFO* cs; ulint key_len; ulint true_len; int error=0; @@ -6282,7 +6340,7 @@ wsrep_store_key_val_for_row( value we store may be also in a column prefix index. */ - CHARSET_INFO* cs; + const CHARSET_INFO* cs = NULL; ulint true_len; ulint key_len; const uchar* src_start; @@ -7246,6 +7304,7 @@ ha_innobase::write_row( wsrep_thd_query(user_thd)); } #endif /* WITH_WSREP */ + /* ALTER TABLE is COMMITted at every 10000 copied rows. The IX table lock for the original table has to be re-issued. As this method will be called on a temporary table where the @@ -7345,11 +7404,12 @@ no_commit: /* Reset the error code before calling innobase_get_auto_increment(). */ prebuilt->autoinc_error = DB_SUCCESS; + #ifdef WITH_WSREP auto_inc_inserted= (table->next_number_field->val_int() == 0); #endif - if ((error_result = update_auto_increment())) { + if ((error_result = update_auto_increment())) { /* We don't want to mask autoinc overflow errors. */ /* Handle the case where the AUTOINC sub-system @@ -7444,13 +7504,15 @@ no_commit: error= DB_SUCCESS; wsrep_thd_set_conflict_state( current_thd, MUST_ABORT); - innobase_srv_conc_exit_innodb(prebuilt->trx); + innobase_srv_conc_exit_innodb( + prebuilt->trx); /* jump straight to func exit over * later wsrep hooks */ goto func_exit; } break; -#endif +#endif /* WITH_WSREP */ + default: break; } @@ -7509,6 +7571,7 @@ report_error: error_result = convert_error_code_to_mysql(error, prebuilt->table->flags, user_thd); + #ifdef WITH_WSREP if (!error_result && wsrep_thd_exec_mode(user_thd) == LOCAL_STATE && wsrep_on(user_thd) && !wsrep_consistency_check(user_thd) && @@ -7522,7 +7585,7 @@ report_error: } } wsrep_error: -#endif +#endif /* WITH_WSREP */ if (error_result == HA_FTS_INVALID_DOCID) { my_error(HA_FTS_INVALID_DOCID, MYF(0)); @@ -8044,7 +8107,8 @@ func_exit: } } wsrep_error: -#endif +#endif /* WITH_WSREP */ + DBUG_RETURN(err); } @@ -8128,6 +8192,12 @@ ha_innobase::unlock_row(void) DBUG_VOID_RETURN; } + /* Ideally, this assert must be in the beginning of the function. + But there are some calls to this function from the SQL layer when the + transaction is in state TRX_STATE_NOT_STARTED. The check on + prebuilt->select_lock_type above gets around this issue. */ + ut_ad(trx_state_eq(prebuilt->trx, TRX_STATE_ACTIVE)); + switch (prebuilt->row_read_type) { case ROW_READ_WITH_LOCKS: if (!srv_locks_unsafe_for_binlog @@ -8961,8 +9031,8 @@ ha_innobase::ft_init_ext( String* key) /* in: */ { trx_t* trx; - dict_table_t* table; - ulint error; + dict_table_t* ft_table; + dberr_t error; byte* query = (byte*) key->ptr(); ulint query_len = key->length(); const CHARSET_INFO* char_set = key->charset(); @@ -9011,17 +9081,24 @@ ha_innobase::ft_init_ext( ++trx->will_lock; } - table = prebuilt->table; + ft_table = prebuilt->table; /* Table does not have an FTS index */ - if (!table->fts || ib_vector_is_empty(table->fts->indexes)) { + if (!ft_table->fts || ib_vector_is_empty(ft_table->fts->indexes)) { my_error(ER_TABLE_HAS_NO_FT, MYF(0)); return(NULL); } + /* If tablespace is discarded, we should return here */ + if (dict_table_is_discarded(ft_table)) { + my_error(ER_NO_SUCH_TABLE, MYF(0), table->s->db.str, + table->s->table_name.str); + return(NULL); + } + if (keynr == NO_SUCH_KEY) { /* FIXME: Investigate the NO_SUCH_KEY usage */ - index = (dict_index_t*) ib_vector_getp(table->fts->indexes, 0); + index = (dict_index_t*) ib_vector_getp(ft_table->fts->indexes, 0); } else { index = innobase_get_index(keynr); } @@ -9031,31 +9108,32 @@ ha_innobase::ft_init_ext( return(NULL); } - if (!(table->fts->fts_status & ADDED_TABLE_SYNCED)) { - fts_init_index(table, FALSE); + if (!(ft_table->fts->fts_status & ADDED_TABLE_SYNCED)) { + fts_init_index(ft_table, FALSE); - table->fts->fts_status |= ADDED_TABLE_SYNCED; + ft_table->fts->fts_status |= ADDED_TABLE_SYNCED; } error = fts_query(trx, index, flags, query, query_len, &result); - // FIXME: Proper error handling and diagnostic if (error != DB_SUCCESS) { - fprintf(stderr, "Error processing query\n"); - } else { - /* Allocate FTS handler, and instantiate it before return */ - fts_hdl = (NEW_FT_INFO*) my_malloc(sizeof(NEW_FT_INFO), - MYF(0)); + my_error(convert_error_code_to_mysql(error, 0, NULL), + MYF(0)); + return(NULL); + } - fts_hdl->please = (struct _ft_vft*)(&ft_vft_result); - fts_hdl->could_you = (struct _ft_vft_ext*)(&ft_vft_ext_result); - fts_hdl->ft_prebuilt = prebuilt; - fts_hdl->ft_result = result; + /* Allocate FTS handler, and instantiate it before return */ + fts_hdl = static_cast<NEW_FT_INFO*>(my_malloc(sizeof(NEW_FT_INFO), + MYF(0))); - /* FIXME: Re-evluate the condition when Bug 14469540 - is resolved */ - prebuilt->in_fts_query = true; - } + fts_hdl->please = const_cast<_ft_vft*>(&ft_vft_result); + fts_hdl->could_you = const_cast<_ft_vft_ext*>(&ft_vft_ext_result); + fts_hdl->ft_prebuilt = prebuilt; + fts_hdl->ft_result = result; + + /* FIXME: Re-evluate the condition when Bug 14469540 + is resolved */ + prebuilt->in_fts_query = true; return((FT_INFO*) fts_hdl); } @@ -9256,6 +9334,7 @@ ha_innobase::ft_end() extern dict_index_t* wsrep_dict_foreign_find_index( dict_table_t* table, + const char** col_names, const char** columns, ulint n_cols, dict_index_t* types_idx, @@ -9278,7 +9357,7 @@ wsrep_append_foreign_key( ulint rcode = DB_SUCCESS; char cache_key[513] = {'\0'}; int cache_key_len; - bool const copy = true; + bool const copy = true; if (!wsrep_on(trx->mysql_thd) || wsrep_thd_exec_mode(thd) != LOCAL_STATE) @@ -9312,7 +9391,7 @@ wsrep_append_foreign_key( { foreign->referenced_index = wsrep_dict_foreign_find_index( - foreign->referenced_table, + foreign->referenced_table, NULL, foreign->referenced_col_names, foreign->n_fields, foreign->foreign_index, @@ -9328,7 +9407,7 @@ wsrep_append_foreign_key( { foreign->foreign_index = wsrep_dict_foreign_find_index( - foreign->foreign_table, + foreign->foreign_table, NULL, foreign->foreign_col_names, foreign->n_fields, foreign->referenced_index, @@ -9453,7 +9532,7 @@ wsrep_append_key( #ifdef WSREP_DEBUG_PRINT fprintf(stderr, "%s conn %ld, trx %llu, keylen %d, table %s ", (shared) ? "Shared" : "Exclusive", - wsrep_thd_thread_id(thd), trx->id, key_len, + wsrep_thd_thread_id(thd), (long long)trx->id, key_len, table_share->table_name.str); for (int i=0; i<key_len; i++) { fprintf(stderr, "%hhX, ", key[i]); @@ -9626,7 +9705,8 @@ ha_innobase::wsrep_append_keys( DBUG_RETURN(0); } -#endif +#endif /* WITH_WSREP */ + /*********************************************************************//** Stores a reference to the current row to 'ref' field of the handle. Note that in the case where we have generated the clustered index for the @@ -9948,6 +10028,9 @@ err_col: mem_heap_free(heap); + DBUG_EXECUTE_IF("ib_create_err_tablespace_exist", + err = DB_TABLESPACE_EXISTS;); + if (err == DB_DUPLICATE_KEY || err == DB_TABLESPACE_EXISTS) { char display_name[FN_REFLEN]; char* buf_end = innobase_convert_identifier( @@ -10386,7 +10469,7 @@ innobase_fts_load_stopword( THD* thd) /*!< in: current thread */ { return(fts_load_stopword(table, trx, - fts_server_stopword_table, + innobase_server_stopword_table, THDVAR(thd, ft_user_stopword_table), THDVAR(thd, ft_enable_stopword), FALSE)); } @@ -10541,6 +10624,11 @@ innobase_table_flags( DBUG_RETURN(false); } + if (key->flags & HA_USES_PARSER) { + my_error(ER_INNODB_NO_FT_USES_PARSER, MYF(0)); + DBUG_RETURN(false); + } + if (fts_doc_id_index_bad) { goto index_bad; } @@ -10863,7 +10951,7 @@ ha_innobase::create( /* Check whether there already exists FTS_DOC_ID_INDEX */ ret = innobase_fts_check_doc_id_index_in_def( - form->s->keys, form->s->key_info); + form->s->keys, form->key_info); switch (ret) { case FTS_INCORRECT_DOC_ID_INDEX: @@ -10919,6 +11007,16 @@ ha_innobase::create( } } + /* Cache all the FTS indexes on this table in the FTS specific + structure. They are used for FTS indexed column update handling. */ + if (flags2 & DICT_TF2_FTS) { + fts_t* fts = innobase_table->fts; + + ut_a(fts != NULL); + + dict_table_get_all_fts_indexes(innobase_table, fts->indexes); + } + stmt = innobase_get_stmt(thd, &stmt_len); if (stmt) { @@ -10957,15 +11055,6 @@ ha_innobase::create( goto cleanup; } } - /* Cache all the FTS indexes on this table in the FTS specific - structure. They are used for FTS indexed column update handling. */ - if (flags2 & DICT_TF2_FTS) { - fts_t* fts = innobase_table->fts; - - ut_a(fts != NULL); - - dict_table_get_all_fts_indexes(innobase_table, fts->indexes); - } innobase_commit_low(trx); @@ -11433,8 +11522,10 @@ innobase_rename_table( DEBUG_SYNC_C("innodb_rename_table_ready"); + trx_start_if_not_started(trx); + /* Serialize data dictionary operations with dictionary mutex: - no deadlocks can occur then in these operations */ + no deadlocks can occur then in these operations. */ row_mysql_lock_data_dictionary(trx); @@ -11472,6 +11563,7 @@ innobase_rename_table( normalize_table_name_low( par_case_name, from, FALSE); #endif + trx_start_if_not_started(trx); error = row_rename_table_for_mysql( par_case_name, norm_to, trx, TRUE); } @@ -11652,6 +11744,10 @@ ha_innobase::records_in_range( /* There exists possibility of not being able to find requested index due to inconsistency between MySQL and InoDB dictionary info. Necessary message should have been printed in innobase_get_index() */ + if (dict_table_is_discarded(prebuilt->table)) { + n_rows = HA_POS_ERROR; + goto func_exit; + } if (UNIV_UNLIKELY(!index)) { n_rows = HA_POS_ERROR; goto func_exit; @@ -12080,8 +12176,6 @@ ha_innobase::info_low( if (dict_stats_is_persistent_enabled(ib_table)) { - ut_ad(!srv_read_only_mode); - if (is_analyze) { opt = DICT_STATS_RECALC_PERSISTENT; } else { @@ -12489,13 +12583,12 @@ int ha_innobase::check( /*===============*/ THD* thd, /*!< in: user thread handle */ - HA_CHECK_OPT* check_opt) /*!< in: check options, currently - ignored */ + HA_CHECK_OPT* check_opt) /*!< in: check options */ { dict_index_t* index; ulint n_rows; ulint n_rows_in_table = ULINT_UNDEFINED; - ibool is_ok = TRUE; + bool is_ok = true; ulint old_isolation_level; ibool table_corrupted; @@ -12551,35 +12644,49 @@ ha_innobase::check( do additional check */ prebuilt->table->corrupted = FALSE; - /* Enlarge the fatal lock wait timeout during CHECK TABLE. */ - os_increment_counter_by_amount( - server_mutex, - srv_fatal_semaphore_wait_threshold, - SRV_SEMAPHORE_WAIT_EXTENSION); - for (index = dict_table_get_first_index(prebuilt->table); index != NULL; index = dict_table_get_next_index(index)) { char index_name[MAX_FULL_NAME_LEN + 1]; - /* If this is an index being created or dropped, break */ + /* If this is an index being created or dropped, skip */ if (*index->name == TEMP_INDEX_PREFIX) { - break; - } else if (!btr_validate_index(index, prebuilt->trx)) { - is_ok = FALSE; - - innobase_format_name( - index_name, sizeof index_name, - index->name, TRUE); - - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_NOT_KEYFILE, - "InnoDB: The B-tree of" - " index %s is corrupted.", - index_name); continue; } + if (!(check_opt->flags & T_QUICK)) { + /* Enlarge the fatal lock wait timeout during + CHECK TABLE. */ + os_increment_counter_by_amount( + server_mutex, + srv_fatal_semaphore_wait_threshold, + SRV_SEMAPHORE_WAIT_EXTENSION); + bool valid = btr_validate_index(index, prebuilt->trx); + + /* Restore the fatal lock wait timeout after + CHECK TABLE. */ + os_decrement_counter_by_amount( + server_mutex, + srv_fatal_semaphore_wait_threshold, + SRV_SEMAPHORE_WAIT_EXTENSION); + + if (!valid) { + is_ok = false; + + innobase_format_name( + index_name, sizeof index_name, + index->name, TRUE); + push_warning_printf( + thd, + Sql_condition::WARN_LEVEL_WARN, + ER_NOT_KEYFILE, + "InnoDB: The B-tree of" + " index %s is corrupted.", + index_name); + continue; + } + } + /* Instead of invoking change_active_index(), set up a dummy template for non-locking reads, disabling access to the clustered index. */ @@ -12601,7 +12708,7 @@ ha_innobase::check( "InnoDB: Index %s is marked as" " corrupted", index_name); - is_ok = FALSE; + is_ok = false; } else { push_warning_printf( thd, @@ -12628,14 +12735,15 @@ ha_innobase::check( index_name, sizeof index_name, index->name, TRUE); - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_NOT_KEYFILE, - "InnoDB: The B-tree of" - " index %s is corrupted.", - index_name); - is_ok = FALSE; + push_warning_printf( + thd, Sql_condition::WARN_LEVEL_WARN, + ER_NOT_KEYFILE, + "InnoDB: The B-tree of" + " index %s is corrupted.", + index_name); + is_ok = false; dict_set_corrupted( - index, prebuilt->trx, "CHECK TABLE"); + index, prebuilt->trx, "CHECK TABLE-check index"); } if (thd_kill_level(user_thd)) { @@ -12651,15 +12759,18 @@ ha_innobase::check( n_rows_in_table = n_rows; } else if (!(index->type & DICT_FTS) && (n_rows != n_rows_in_table)) { - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_NOT_KEYFILE, - "InnoDB: Index '%-.200s'" - " contains %lu entries," - " should be %lu.", - index->name, - (ulong) n_rows, - (ulong) n_rows_in_table); - is_ok = FALSE; + push_warning_printf( + thd, Sql_condition::WARN_LEVEL_WARN, + ER_NOT_KEYFILE, + "InnoDB: Index '%-.200s' contains %lu" + " entries, should be %lu.", + index->name, + (ulong) n_rows, + (ulong) n_rows_in_table); + is_ok = false; + dict_set_corrupted( + index, prebuilt->trx, + "CHECK TABLE; Wrong count"); } } @@ -12679,21 +12790,17 @@ ha_innobase::check( /* Restore the original isolation level */ prebuilt->trx->isolation_level = old_isolation_level; - /* We validate also the whole adaptive hash index for all tables - at every CHECK TABLE */ + /* We validate the whole adaptive hash index for all tables + at every CHECK TABLE only when QUICK flag is not present. */ - if (!btr_search_validate()) { +#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG + if (!(check_opt->flags & T_QUICK) && !btr_search_validate()) { push_warning(thd, Sql_condition::WARN_LEVEL_WARN, ER_NOT_KEYFILE, "InnoDB: The adaptive hash index is corrupted."); - is_ok = FALSE; + is_ok = false; } - - /* Restore the fatal lock wait timeout after CHECK TABLE. */ - os_decrement_counter_by_amount( - server_mutex, - srv_fatal_semaphore_wait_threshold, - SRV_SEMAPHORE_WAIT_EXTENSION); +#endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */ prebuilt->trx->op_info = ""; if (thd_kill_level(user_thd)) { @@ -13327,11 +13434,10 @@ ha_innobase::external_lock( && !(table_flags() & HA_BINLOG_STMT_CAPABLE) && thd_binlog_format(thd) == BINLOG_FORMAT_STMT && thd_binlog_filter_ok(thd) - && thd_sqlcom_can_generate_row_events(thd)) - { - int skip = 0; + && thd_sqlcom_can_generate_row_events(thd)) { + bool skip = 0; /* used by test case */ - DBUG_EXECUTE_IF("no_innodb_binlog_errors", skip = 1;); + DBUG_EXECUTE_IF("no_innodb_binlog_errors", skip = true;); if (!skip) { #ifdef WITH_WSREP if (!wsrep_on(thd) || wsrep_thd_exec_mode(thd) == LOCAL_STATE) @@ -13356,14 +13462,23 @@ ha_innobase::external_lock( || thd_sql_command(thd) == SQLCOM_DROP_TABLE || thd_sql_command(thd) == SQLCOM_ALTER_TABLE || thd_sql_command(thd) == SQLCOM_OPTIMIZE - || thd_sql_command(thd) == SQLCOM_CREATE_TABLE + || (thd_sql_command(thd) == SQLCOM_CREATE_TABLE + && lock_type == F_WRLCK) || thd_sql_command(thd) == SQLCOM_CREATE_INDEX || thd_sql_command(thd) == SQLCOM_DROP_INDEX || thd_sql_command(thd) == SQLCOM_DELETE)) { - ib_senderrf(thd, IB_LOG_LEVEL_WARN, ER_READ_ONLY_MODE); + if (thd_sql_command(thd) == SQLCOM_CREATE_TABLE) + { + ib_senderrf(thd, IB_LOG_LEVEL_WARN, + ER_READ_ONLY_MODE); + DBUG_RETURN(HA_ERR_TABLE_READONLY); + } else { + ib_senderrf(thd, IB_LOG_LEVEL_WARN, + ER_READ_ONLY_MODE); + DBUG_RETURN(HA_ERR_TABLE_READONLY); + } - DBUG_RETURN(HA_ERR_TABLE_READONLY); } trx = prebuilt->trx; @@ -13655,7 +13770,7 @@ innodb_show_status( const long MAX_STATUS_SIZE = 1048576; ulint trx_list_start = ULINT_UNDEFINED; ulint trx_list_end = ULINT_UNDEFINED; - bool res; + bool ret_val; DBUG_ENTER("innodb_show_status"); DBUG_ASSERT(hton == innodb_hton_ptr); @@ -13732,13 +13847,13 @@ innodb_show_status( mutex_exit(&srv_monitor_file_mutex); - res= stat_print(thd, innobase_hton_name, - (uint) strlen(innobase_hton_name), - STRING_WITH_LEN(""), str, flen); + ret_val= stat_print(thd, innobase_hton_name, + (uint) strlen(innobase_hton_name), + STRING_WITH_LEN(""), str, flen); my_free(str); - DBUG_RETURN(res); + DBUG_RETURN(ret_val); } /************************************************************************//** @@ -14084,7 +14199,9 @@ ha_innobase::store_lock( || sql_command == SQLCOM_DROP_TABLE || sql_command == SQLCOM_ALTER_TABLE || sql_command == SQLCOM_OPTIMIZE - || sql_command == SQLCOM_CREATE_TABLE + || (sql_command == SQLCOM_CREATE_TABLE + && (lock_type >= TL_WRITE_CONCURRENT_INSERT + && lock_type <= TL_WRITE)) || sql_command == SQLCOM_CREATE_INDEX || sql_command == SQLCOM_DROP_INDEX || sql_command == SQLCOM_DELETE)) { @@ -15417,44 +15534,6 @@ innodb_stopword_table_validate( return(ret); } -/****************************************************************//** -Update global variable fts_server_stopword_table with the "saved" -stopword table name value. This function is registered as a callback -with MySQL. */ -static -void -innodb_stopword_table_update( -/*=========================*/ - THD* thd, /*!< in: thread handle */ - struct st_mysql_sys_var* var, /*!< in: pointer to - system variable */ - void* var_ptr,/*!< out: where the - formal string goes */ - const void* save) /*!< in: immediate result - from check function */ -{ - const char* stopword_table_name; - char* old; - - ut_a(save != NULL); - ut_a(var_ptr != NULL); - - stopword_table_name = *static_cast<const char*const*>(save); - old = *(char**) var_ptr; - - if (stopword_table_name) { - *(char**) var_ptr = my_strdup(stopword_table_name, MYF(0)); - } else { - *(char**) var_ptr = NULL; - } - - if (old) { - my_free(old); - } - - fts_server_stopword_table = *(char**) var_ptr; -} - /*************************************************************//** Check whether valid argument given to "innodb_fts_internal_tbl_name" This function is registered as a callback with MySQL. @@ -16201,6 +16280,80 @@ innodb_srv_buf_dump_filename_validate( # define innodb_srv_buf_dump_filename_validate NULL #endif /* __WIN__ */ +#ifdef UNIV_DEBUG +static char* srv_buffer_pool_evict; + +/****************************************************************//** +Evict all uncompressed pages of compressed tables from the buffer pool. +Keep the compressed pages in the buffer pool. +@return whether all uncompressed pages were evicted */ +static __attribute__((warn_unused_result)) +bool +innodb_buffer_pool_evict_uncompressed(void) +/*=======================================*/ +{ + bool all_evicted = true; + + for (ulint i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool = &buf_pool_ptr[i]; + + buf_pool_mutex_enter(buf_pool); + + for (buf_block_t* block = UT_LIST_GET_LAST( + buf_pool->unzip_LRU); + block != NULL; ) { + buf_block_t* prev_block = UT_LIST_GET_PREV( + unzip_LRU, block); + ut_ad(buf_block_get_state(block) + == BUF_BLOCK_FILE_PAGE); + ut_ad(block->in_unzip_LRU_list); + ut_ad(block->page.in_LRU_list); + + if (!buf_LRU_free_page(&block->page, false)) { + all_evicted = false; + } + + block = prev_block; + } + + buf_pool_mutex_exit(buf_pool); + } + + return(all_evicted); +} + +/****************************************************************//** +Called on SET GLOBAL innodb_buffer_pool_evict=... +Handles some values specially, to evict pages from the buffer pool. +SET GLOBAL innodb_buffer_pool_evict='uncompressed' +evicts all uncompressed page frames of compressed tablespaces. */ +static +void +innodb_buffer_pool_evict_update( +/*============================*/ + THD* thd, /*!< in: thread handle */ + struct st_mysql_sys_var*var, /*!< in: pointer to system variable */ + void* var_ptr,/*!< out: ignored */ + const void* save) /*!< in: immediate result + from check function */ +{ + if (const char* op = *static_cast<const char*const*>(save)) { + if (!strcmp(op, "uncompressed")) { + for (uint tries = 0; tries < 10000; tries++) { + if (innodb_buffer_pool_evict_uncompressed()) { + return; + } + + os_thread_sleep(10000); + } + + /* We failed to evict all uncompressed pages. */ + ut_ad(0); + } + } +} +#endif /* UNIV_DEBUG */ + /****************************************************************//** Update the system variable innodb_monitor_enable and enable specified monitor counter. @@ -16278,29 +16431,6 @@ innodb_reset_all_monitor_update( } /****************************************************************//** -Update the system variable innodb_compression_level using the "saved" -value. This function is registered as a callback with MySQL. */ -static -void -innodb_compression_level_update( -/*============================*/ - THD* thd, /*!< in: thread handle */ - struct st_mysql_sys_var* var, /*!< in: pointer to - system variable */ - void* var_ptr,/*!< out: where the - formal string goes */ - const void* save) /*!< in: immediate result - from check function */ -{ - /* We have this call back just to avoid confusion between - ulong and ulint datatypes. */ - innobase_compression_level = - (*static_cast<const ulong*>(save)); - page_compression_level = - (static_cast<const ulint>(innobase_compression_level)); -} - -/****************************************************************//** Parse and enable InnoDB monitor counters during server startup. User can list the monitor counters/groups to be enable by specifying "loose-innodb_monitor_enable=monitor_name1;monitor_name2..." @@ -16477,6 +16607,7 @@ innobase_fts_find_ranking( #ifdef UNIV_DEBUG static my_bool innodb_purge_run_now = TRUE; static my_bool innodb_purge_stop_now = TRUE; +static my_bool innodb_log_checkpoint_now = TRUE; /****************************************************************//** Set the purge state to RUN. If purge is disabled then it @@ -16523,6 +16654,33 @@ purge_stop_now_set( trx_purge_stop(); } } + +/****************************************************************//** +Force innodb to checkpoint. */ +static +void +checkpoint_now_set( +/*===============*/ + THD* thd /*!< in: thread handle */ + __attribute__((unused)), + struct st_mysql_sys_var* var /*!< in: pointer to system + variable */ + __attribute__((unused)), + void* var_ptr /*!< out: where the formal + string goes */ + __attribute__((unused)), + const void* save) /*!< in: immediate result from + check function */ +{ + if (*(my_bool*) save) { + while (log_sys->last_checkpoint_lsn < log_sys->lsn) { + log_make_checkpoint_at(LSN_MAX, TRUE); + fil_flush_file_spaces(FIL_LOG); + } + fil_write_flushed_lsn_to_data_files(log_sys->lsn, 0); + fil_flush_file_spaces(FIL_TABLESPACE); + } +} #endif /* UNIV_DEBUG */ /*********************************************************************** @@ -16969,6 +17127,7 @@ wsrep_fake_trx_id( } #endif /* WITH_WSREP */ + /* plugin options */ static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm, @@ -17050,6 +17209,11 @@ static MYSQL_SYSVAR_BOOL(purge_stop_now, innodb_purge_stop_now, PLUGIN_VAR_OPCMDARG, "Set purge state to STOP", NULL, purge_stop_now_set, FALSE); + +static MYSQL_SYSVAR_BOOL(log_checkpoint_now, innodb_log_checkpoint_now, + PLUGIN_VAR_OPCMDARG, + "Force checkpoint now", + NULL, checkpoint_now_set, FALSE); #endif /* UNIV_DEBUG */ static MYSQL_SYSVAR_ULONG(purge_batch_size, srv_purge_batch_size, @@ -17069,7 +17233,7 @@ static MYSQL_SYSVAR_ULONG(purge_threads, srv_n_purge_threads, 32, 0); /* Maximum value */ static MYSQL_SYSVAR_ULONG(sync_array_size, srv_sync_array_size, - PLUGIN_VAR_OPCMDARG, + PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, "Size of the mutex/lock wait array.", NULL, NULL, 1, /* Default setting */ @@ -17115,10 +17279,10 @@ static MYSQL_SYSVAR_STR(file_format_max, innobase_file_format_max, innodb_file_format_max_update, "Antelope"); static MYSQL_SYSVAR_STR(ft_server_stopword_table, innobase_server_stopword_table, - PLUGIN_VAR_OPCMDARG, + PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_MEMALLOC, "The user supplied stopword table name.", innodb_stopword_table_validate, - innodb_stopword_table_update, + NULL, NULL); static MYSQL_SYSVAR_UINT(flush_log_at_timeout, srv_flush_log_at_timeout, @@ -17277,12 +17441,20 @@ static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay, "innodb_thread_concurrency is reached (0 by default)", NULL, NULL, 0, 0, ~0UL, 0); -static MYSQL_SYSVAR_ULONG(compression_level, innobase_compression_level, +static MYSQL_SYSVAR_UINT(compression_level, page_zip_level, PLUGIN_VAR_RQCMDARG, "Compression level used for compressed row format. 0 is no compression" ", 1 is fastest, 9 is best compression and default is 6.", - NULL, innodb_compression_level_update, - DEFAULT_COMPRESSION_LEVEL, 0, 9, 0); + NULL, NULL, DEFAULT_COMPRESSION_LEVEL, 0, 9, 0); + +static MYSQL_SYSVAR_BOOL(log_compressed_pages, page_zip_log_pages, + PLUGIN_VAR_OPCMDARG, + "Enables/disables the logging of entire compressed page images." + " InnoDB logs the compressed pages to prevent corruption if" + " the zlib compression algorithm changes." + " When turned OFF, InnoDB will assume that the zlib" + " compression algorithm doesn't change.", + NULL, NULL, TRUE); static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_size, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, @@ -17334,6 +17506,13 @@ static MYSQL_SYSVAR_BOOL(buffer_pool_dump_at_shutdown, srv_buffer_pool_dump_at_s "Dump the buffer pool into a file named @@innodb_buffer_pool_filename", NULL, NULL, FALSE); +#ifdef UNIV_DEBUG +static MYSQL_SYSVAR_STR(buffer_pool_evict, srv_buffer_pool_evict, + PLUGIN_VAR_RQCMDARG, + "Evict pages from the buffer pool", + NULL, innodb_buffer_pool_evict_update, ""); +#endif /* UNIV_DEBUG */ + static MYSQL_SYSVAR_BOOL(buffer_pool_load_now, innodb_buffer_pool_load_now, PLUGIN_VAR_RQCMDARG, "Trigger an immediate load of the buffer pool from a file named @@innodb_buffer_pool_filename", @@ -17399,6 +17578,16 @@ static MYSQL_SYSVAR_ULONG(ft_cache_size, fts_max_cache_size, "InnoDB Fulltext search cache size in bytes", NULL, NULL, 8000000, 1600000, 80000000, 0); +static MYSQL_SYSVAR_ULONG(ft_total_cache_size, fts_max_total_cache_size, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Total memory allocated for InnoDB Fulltext Search cache", + NULL, NULL, 640000000, 32000000, 1600000000, 0); + +static MYSQL_SYSVAR_ULONG(ft_result_cache_limit, fts_result_cache_limit, + PLUGIN_VAR_RQCMDARG, + "InnoDB Fulltext search query result cache limit in bytes", + NULL, NULL, 2000000000L, 1000000L, ~0UL, 0); + static MYSQL_SYSVAR_ULONG(ft_min_token_size, fts_min_token_size, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "InnoDB Fulltext search minimum token size in characters", @@ -17407,7 +17596,7 @@ static MYSQL_SYSVAR_ULONG(ft_min_token_size, fts_min_token_size, static MYSQL_SYSVAR_ULONG(ft_max_token_size, fts_max_token_size, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "InnoDB Fulltext search maximum token size in characters", - NULL, NULL, HA_FT_MAXCHARLEN, 10, FTS_MAX_WORD_LEN , 0); + NULL, NULL, FTS_MAX_WORD_LEN_IN_CHAR, 10, FTS_MAX_WORD_LEN_IN_CHAR, 0); static MYSQL_SYSVAR_ULONG(ft_num_word_optimize, fts_num_word_optimize, @@ -17478,10 +17667,12 @@ static MYSQL_SYSVAR_ULONG(log_files_in_group, srv_n_log_files, "Number of log files in the log group. InnoDB writes to the files in a circular fashion.", NULL, NULL, 2, 2, SRV_N_LOG_FILES_MAX, 0); +/* Note that the default and minimum values are set to 0 to +detect if the option is passed and print deprecation message */ static MYSQL_SYSVAR_LONG(mirrored_log_groups, innobase_mirrored_log_groups, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "Number of identical copies of log groups we keep for the database. Currently this should be set to 1.", - NULL, NULL, 1, 1, 10, 0); + NULL, NULL, 0, 0, 10, 0); static MYSQL_SYSVAR_UINT(old_blocks_pct, innobase_old_blocks_pct, PLUGIN_VAR_RQCMDARG, @@ -17791,6 +17982,9 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(buffer_pool_filename), MYSQL_SYSVAR(buffer_pool_dump_now), MYSQL_SYSVAR(buffer_pool_dump_at_shutdown), +#ifdef UNIV_DEBUG + MYSQL_SYSVAR(buffer_pool_evict), +#endif /* UNIV_DEBUG */ MYSQL_SYSVAR(buffer_pool_load_now), MYSQL_SYSVAR(buffer_pool_load_abort), MYSQL_SYSVAR(buffer_pool_load_at_startup), @@ -17825,6 +18019,8 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(force_recovery_crash), #endif /* !DBUG_OFF */ MYSQL_SYSVAR(ft_cache_size), + MYSQL_SYSVAR(ft_total_cache_size), + MYSQL_SYSVAR(ft_result_cache_limit), MYSQL_SYSVAR(ft_enable_stopword), MYSQL_SYSVAR(ft_max_token_size), MYSQL_SYSVAR(ft_min_token_size), @@ -17843,6 +18039,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(log_file_size), MYSQL_SYSVAR(log_files_in_group), MYSQL_SYSVAR(log_group_home_dir), + MYSQL_SYSVAR(log_compressed_pages), MYSQL_SYSVAR(max_dirty_pages_pct), MYSQL_SYSVAR(max_dirty_pages_pct_lwm), MYSQL_SYSVAR(adaptive_flushing_lwm), @@ -17910,6 +18107,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { #ifdef UNIV_DEBUG MYSQL_SYSVAR(purge_run_now), MYSQL_SYSVAR(purge_stop_now), + MYSQL_SYSVAR(log_checkpoint_now), #endif /* UNIV_DEBUG */ #if defined UNIV_DEBUG || defined UNIV_PERF_DEBUG MYSQL_SYSVAR(page_hash_locks), @@ -17962,7 +18160,6 @@ i_s_innodb_buffer_page_lru, i_s_innodb_buffer_stats, i_s_innodb_metrics, i_s_innodb_ft_default_stopword, -i_s_innodb_ft_inserted, i_s_innodb_ft_deleted, i_s_innodb_ft_being_deleted, i_s_innodb_ft_config, @@ -18246,7 +18443,6 @@ ib_senderrf( ib_uint32_t code, /*!< MySQL error code */ ...) /*!< Args */ { - char* str; va_list args; const char* format = innobase_get_err_msg(code); @@ -18260,48 +18456,24 @@ ib_senderrf( va_start(args, code); -#ifdef __WIN__ - int size = _vscprintf(format, args) + 1; - str = static_cast<char*>(malloc(size)); - str[size - 1] = 0x0; - vsnprintf(str, size, format, args); -#elif HAVE_VASPRINTF - if (vasprintf(&str, format, args) == -1) { - /* In case of failure use a fixed length string */ - str = static_cast<char*>(malloc(BUFSIZ)); - my_vsnprintf(str, BUFSIZ, format, args); - } -#else - /* Use a fixed length string. */ - str = static_cast<char*>(malloc(BUFSIZ)); - my_vsnprintf(str, BUFSIZ, format, args); -#endif /* __WIN__ */ - - Sql_condition::enum_warning_level l; - - l = Sql_condition::WARN_LEVEL_NOTE; + myf l; switch(level) { case IB_LOG_LEVEL_INFO: + l = ME_JUST_INFO; break; case IB_LOG_LEVEL_WARN: - l = Sql_condition::WARN_LEVEL_WARN; + l = ME_JUST_WARNING; break; case IB_LOG_LEVEL_ERROR: - /* We can't use push_warning_printf(), it is a hard error. */ - my_printf_error(code, "%s", MYF(0), str); - break; case IB_LOG_LEVEL_FATAL: - l = Sql_condition::WARN_LEVEL_END; + l = 0; break; } - if (level != IB_LOG_LEVEL_ERROR) { - push_warning_printf(thd, l, code, "InnoDB: %s", str); - } + my_printv_error(code, format, MYF(l), args); va_end(args); - free(str); if (level == IB_LOG_LEVEL_FATAL) { ut_error; @@ -18422,6 +18594,23 @@ ib_logf( Converts an identifier from my_charset_filename to UTF-8 charset. @return result string length, as returned by strconvert() */ uint +innobase_convert_to_filename_charset( +/*=================================*/ + char* to, /* out: converted identifier */ + const char* from, /* in: identifier to convert */ + ulint len) /* in: length of 'to', in bytes */ +{ + uint errors; + CHARSET_INFO* cs_to = &my_charset_filename; + CHARSET_INFO* cs_from = system_charset_info; + + return(strconvert(cs_from, from, strlen(from), cs_to, to, len, &errors)); +} + +/********************************************************************** +Converts an identifier from my_charset_filename to UTF-8 charset. +@return result string length, as returned by strconvert() */ +uint innobase_convert_to_system_charset( /*===============================*/ char* to, /* out: converted identifier */ diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index f4eb2bed1d4..8c7d8f64957 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -673,8 +673,8 @@ UNIV_INTERN void innobase_copy_frm_flags_from_create_info( /*=====================================*/ - dict_table_t* innodb_table, /*!< in/out: InnoDB table */ - HA_CREATE_INFO* create_info); /*!< in: create info */ + dict_table_t* innodb_table, /*!< in/out: InnoDB table */ + const HA_CREATE_INFO* create_info); /*!< in: create info */ /*********************************************************************//** Copy table flags from MySQL's TABLE_SHARE into an InnoDB table object. @@ -685,5 +685,5 @@ UNIV_INTERN void innobase_copy_frm_flags_from_table_share( /*=====================================*/ - dict_table_t* innodb_table, /*!< in/out: InnoDB table */ - TABLE_SHARE* table_share); /*!< in: table share */ + dict_table_t* innodb_table, /*!< in/out: InnoDB table */ + const TABLE_SHARE* table_share); /*!< in: table share */ diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index fe48c23e4b2..b5c421bc930 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2013, 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 @@ -53,16 +53,17 @@ Smart ALTER TABLE #endif #include "ha_innodb.h" -/** Operations for creating an index in place */ +/** Operations for creating secondary indexes (no rebuild needed) */ static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_ONLINE_CREATE = Alter_inplace_info::ADD_INDEX | Alter_inplace_info::ADD_UNIQUE_INDEX; /** Operations for rebuilding a table in place */ -static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_INPLACE_REBUILD +static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_ALTER_REBUILD = Alter_inplace_info::ADD_PK_INDEX | Alter_inplace_info::DROP_PK_INDEX | Alter_inplace_info::CHANGE_CREATE_OPTION + /* CHANGE_CREATE_OPTION needs to check innobase_need_rebuild() */ | Alter_inplace_info::ALTER_COLUMN_NULLABLE | Alter_inplace_info::ALTER_COLUMN_NOT_NULLABLE | Alter_inplace_info::ALTER_COLUMN_ORDER @@ -74,9 +75,9 @@ static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_INPLACE_REBUILD */ ; -/** Operations for creating indexes or rebuilding a table */ -static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_INPLACE_CREATE - = INNOBASE_ONLINE_CREATE | INNOBASE_INPLACE_REBUILD; +/** Operations that require changes to data */ +static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_ALTER_DATA + = INNOBASE_ONLINE_CREATE | INNOBASE_ALTER_REBUILD; /** Operations for altering a table that InnoDB does not care about */ static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_INPLACE_IGNORE @@ -85,15 +86,18 @@ static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_INPLACE_IGNORE | Alter_inplace_info::ALTER_COLUMN_STORAGE_TYPE | Alter_inplace_info::ALTER_RENAME; -/** Operations that InnoDB can perform online */ -static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_ONLINE_OPERATIONS - = INNOBASE_INPLACE_IGNORE - | INNOBASE_ONLINE_CREATE +/** Operations on foreign key definitions (changing the schema only) */ +static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_FOREIGN_OPERATIONS + = Alter_inplace_info::DROP_FOREIGN_KEY + | Alter_inplace_info::ADD_FOREIGN_KEY; + +/** Operations that InnoDB cares about and can perform without rebuild */ +static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_ALTER_NOREBUILD + = INNOBASE_ONLINE_CREATE + | INNOBASE_FOREIGN_OPERATIONS | Alter_inplace_info::DROP_INDEX | Alter_inplace_info::DROP_UNIQUE_INDEX - | Alter_inplace_info::DROP_FOREIGN_KEY - | Alter_inplace_info::ALTER_COLUMN_NAME - | Alter_inplace_info::ADD_FOREIGN_KEY; + | Alter_inplace_info::ALTER_COLUMN_NAME; /* Report an InnoDB error to the client by invoking my_error(). */ static UNIV_COLD __attribute__((nonnull)) @@ -126,6 +130,12 @@ my_error_innodb( case DB_OUT_OF_FILE_SPACE: my_error(ER_RECORD_FILE_FULL, MYF(0), table); break; + case DB_TEMP_FILE_WRITE_FAILURE: + my_error(ER_GET_ERRMSG, MYF(0), + DB_TEMP_FILE_WRITE_FAILURE, + ut_strerr(DB_TEMP_FILE_WRITE_FAILURE), + "InnoDB"); + break; case DB_TOO_BIG_INDEX_COL: my_error(ER_INDEX_COLUMN_TOO_LONG, MYF(0), DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(flags)); @@ -166,16 +176,16 @@ my_error_innodb( } /** Determine if fulltext indexes exist in a given table. -@param table_share MySQL table +@param table MySQL table @return whether fulltext indexes exist on the table */ static bool innobase_fulltext_exist( /*====================*/ - const TABLE_SHARE* table_share) + const TABLE* table) { - for (uint i = 0; i < table_share->keys; i++) { - if (table_share->key_info[i].flags & HA_FULLTEXT) { + for (uint i = 0; i < table->s->keys; i++) { + if (table->key_info[i].flags & HA_FULLTEXT) { return(true); } } @@ -203,7 +213,7 @@ innobase_need_rebuild( return(false); } - return(!!(ha_alter_info->handler_flags & INNOBASE_INPLACE_REBUILD)); + return(!!(ha_alter_info->handler_flags & INNOBASE_ALTER_REBUILD)); } /** Check if InnoDB supports a particular alter table in-place @@ -253,7 +263,10 @@ ha_innobase::check_if_supported_inplace_alter( trx_search_latch_release_if_reserved(prebuilt->trx); if (ha_alter_info->handler_flags - & ~(INNOBASE_ONLINE_OPERATIONS | INNOBASE_INPLACE_REBUILD)) { + & ~(INNOBASE_INPLACE_IGNORE + | INNOBASE_ALTER_NOREBUILD + | INNOBASE_ALTER_REBUILD)) { + if (ha_alter_info->handler_flags & (Alter_inplace_info::ALTER_COLUMN_EQUAL_PACK_LENGTH | Alter_inplace_info::ALTER_COLUMN_TYPE)) @@ -311,29 +324,6 @@ ha_innobase::check_if_supported_inplace_alter( DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); } - /* ADD FOREIGN KEY does not currently work properly in combination - with renaming columns. (Bug#14105491) */ - if ((ha_alter_info->handler_flags - & (Alter_inplace_info::ADD_FOREIGN_KEY - | Alter_inplace_info::ALTER_COLUMN_NAME)) - == (Alter_inplace_info::ADD_FOREIGN_KEY - | Alter_inplace_info::ALTER_COLUMN_NAME)) { - ha_alter_info->unsupported_reason = innobase_get_err_msg( - ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME); - DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); - } - - /* DROP FOREIGN KEY may not currently work properly in combination - with other operations. (Work-around for 5.6.10 only.) */ - if ((ha_alter_info->handler_flags - & Alter_inplace_info::DROP_FOREIGN_KEY) - && (ha_alter_info->handler_flags - & (Alter_inplace_info::DROP_FOREIGN_KEY - | INNOBASE_INPLACE_REBUILD)) - != Alter_inplace_info::DROP_FOREIGN_KEY) { - DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); - } - /* If a column change from NOT NULL to NULL, and there's a implict pk on this column. the table should be rebuild. The change should @@ -427,7 +417,7 @@ ha_innobase::check_if_supported_inplace_alter( /* We cannot replace a hidden FTS_DOC_ID with a user-visible FTS_DOC_ID. */ if (prebuilt->table->fts - && innobase_fulltext_exist(altered_table->s) + && innobase_fulltext_exist(altered_table) && !my_strcasecmp( system_charset_info, key_part->field->field_name, @@ -460,7 +450,7 @@ ha_innobase::check_if_supported_inplace_alter( < dict_table_get_n_user_cols(prebuilt->table)); if (prebuilt->table->fts - && innobase_fulltext_exist(altered_table->s)) { + && innobase_fulltext_exist(altered_table)) { /* FULLTEXT indexes are supposed to remain. */ /* Disallow DROP INDEX FTS_DOC_ID_INDEX */ @@ -504,7 +494,7 @@ ha_innobase::check_if_supported_inplace_alter( } else if (((ha_alter_info->handler_flags & Alter_inplace_info::ADD_PK_INDEX) || innobase_need_rebuild(ha_alter_info)) - && (innobase_fulltext_exist(altered_table->s) + && (innobase_fulltext_exist(altered_table) || (prebuilt->table->flags2 & DICT_TF2_FTS_HAS_DOC_ID))) { /* Refuse to rebuild the table online, if @@ -575,6 +565,8 @@ innobase_init_foreign( ulint referenced_num_field) /*!< in: number of referenced columns */ { + ut_ad(mutex_own(&dict_sys->mutex)); + if (constraint_name) { ulint db_len; @@ -591,22 +583,21 @@ innobase_init_foreign( ut_memcpy(foreign->id, table->name, db_len); foreign->id[db_len] = '/'; strcpy(foreign->id + db_len + 1, constraint_name); - } - - ut_ad(mutex_own(&dict_sys->mutex)); - /* Check if any existing foreign key has the same id */ + /* Check if any existing foreign key has the same id, + this is needed only if user supplies the constraint name */ - for (const dict_foreign_t* existing_foreign - = UT_LIST_GET_FIRST(table->foreign_list); - existing_foreign != 0; - existing_foreign = UT_LIST_GET_NEXT( - foreign_list, existing_foreign)) { + for (const dict_foreign_t* existing_foreign + = UT_LIST_GET_FIRST(table->foreign_list); + existing_foreign != 0; + existing_foreign = UT_LIST_GET_NEXT( + foreign_list, existing_foreign)) { - if (ut_strcmp(existing_foreign->id, foreign->id) == 0) { - return(false); + if (ut_strcmp(existing_foreign->id, foreign->id) == 0) { + return(false); + } } - } + } foreign->foreign_table = table; foreign->foreign_table_name = mem_heap_strdup( @@ -651,16 +642,19 @@ static __attribute__((nonnull, warn_unused_result)) bool innobase_check_fk_option( /*=====================*/ - dict_foreign_t* foreign) /*!< in:InnoDB Foreign key */ + const dict_foreign_t* foreign) /*!< in: foreign key */ { + if (!foreign->foreign_index) { + return(true); + } + if (foreign->type & (DICT_FOREIGN_ON_UPDATE_SET_NULL - | DICT_FOREIGN_ON_DELETE_SET_NULL) - && foreign->foreign_index) { + | DICT_FOREIGN_ON_DELETE_SET_NULL)) { for (ulint j = 0; j < foreign->n_fields; j++) { if ((dict_index_get_nth_col( - foreign->foreign_index, j)->prtype) - & DATA_NOT_NULL) { + foreign->foreign_index, j)->prtype) + & DATA_NOT_NULL) { /* It is not sensible to define SET NULL if the column is not @@ -774,63 +768,57 @@ no_match: } /*************************************************************//** -Found an index whose first fields are the columns in the array +Find an index whose first fields are the columns in the array in the same order and is not marked for deletion @return matching index, NULL if not found */ -static +static __attribute__((nonnull(1,2,6), warn_unused_result)) dict_index_t* innobase_find_fk_index( /*===================*/ Alter_inplace_info* ha_alter_info, /*!< in: alter table info */ dict_table_t* table, /*!< in: table */ + const char** col_names, + /*!< in: column names, or NULL + to use table->col_names */ + dict_index_t** drop_index, + /*!< in: indexes to be dropped */ + ulint n_drop_index, + /*!< in: size of drop_index[] */ const char** columns,/*!< in: array of column names */ ulint n_cols) /*!< in: number of columns */ - { - dict_index_t* index; - dict_index_t* found_index = NULL; - - index = dict_table_get_first_index(table); - - while (index != NULL) { - if (index->type & DICT_FTS) { - goto next_rec; - } else if (dict_foreign_qualify_index( - table, columns, n_cols, index, NULL, TRUE, FALSE)) { - /* Check if this index is in the drop list */ - if (index) { - KEY** drop_key; - - drop_key = ha_alter_info->index_drop_buffer; - - for (uint i = 0; - i < ha_alter_info->index_drop_count; - i++) { - if (innobase_strcasecmp( - drop_key[i]->name, - index->name) == 0) { - goto next_rec; - } + dict_index_t* index; + + index = dict_table_get_first_index(table); + + while (index != NULL) { + if (!(index->type & DICT_FTS) + && dict_foreign_qualify_index( + table, col_names, columns, n_cols, + index, NULL, true, 0)) { + for (ulint i = 0; i < n_drop_index; i++) { + if (index == drop_index[i]) { + /* Skip to-be-dropped indexes. */ + goto next_rec; } } - found_index = index; - break; + return(index); } next_rec: - index = dict_table_get_next_index(index); + index = dict_table_get_next_index(index); } - return(found_index); + return(NULL); } /*************************************************************//** Create InnoDB foreign key structure from MySQL alter_info @retval true if successful @retval false on error (will call my_error()) */ -static +static __attribute__((nonnull(1,2,3,7,8), warn_unused_result)) bool innobase_get_foreign_key_info( /*==========================*/ @@ -839,15 +827,17 @@ innobase_get_foreign_key_info( const TABLE_SHARE* table_share, /*!< in: the TABLE_SHARE */ dict_table_t* table, /*!< in: table */ + const char** col_names, /*!< in: column names, or NULL + to use table->col_names */ + dict_index_t** drop_index, /*!< in: indexes to be dropped */ + ulint n_drop_index, /*!< in: size of drop_index[] */ dict_foreign_t**add_fk, /*!< out: foreign constraint added */ ulint* n_add_fk, /*!< out: number of foreign constraints added */ - mem_heap_t* heap, /*!< in: memory heap */ const trx_t* trx) /*!< in: user transaction */ { Key* key; Foreign_key* fk_key; - ulint i = 0; dict_table_t* referenced_table = NULL; char* referenced_table_name = NULL; ulint num_fk = 0; @@ -858,203 +848,205 @@ innobase_get_foreign_key_info( List_iterator<Key> key_iterator(alter_info->key_list); while ((key=key_iterator++)) { - if (key->type == Key::FOREIGN_KEY) { - const char* column_names[MAX_NUM_FK_COLUMNS]; - dict_index_t* index = NULL; - const char* referenced_column_names[MAX_NUM_FK_COLUMNS]; - dict_index_t* referenced_index = NULL; - ulint num_col = 0; - ulint referenced_num_col = 0; - bool correct_option; - char* db_namep = NULL; - char* tbl_namep = NULL; - ulint db_name_len = 0; - ulint tbl_name_len = 0; + if (key->type != Key::FOREIGN_KEY) { + continue; + } + + const char* column_names[MAX_NUM_FK_COLUMNS]; + dict_index_t* index = NULL; + const char* referenced_column_names[MAX_NUM_FK_COLUMNS]; + dict_index_t* referenced_index = NULL; + ulint num_col = 0; + ulint referenced_num_col = 0; + bool correct_option; + char* db_namep = NULL; + char* tbl_namep = NULL; + ulint db_name_len = 0; + ulint tbl_name_len = 0; #ifdef __WIN__ - char db_name[MAX_DATABASE_NAME_LEN]; - char tbl_name[MAX_TABLE_NAME_LEN]; + char db_name[MAX_DATABASE_NAME_LEN]; + char tbl_name[MAX_TABLE_NAME_LEN]; #endif - fk_key= static_cast<Foreign_key*>(key); - - if (fk_key->columns.elements > 0) { - Key_part_spec* column; - List_iterator<Key_part_spec> key_part_iterator( - fk_key->columns); - - /* Get all the foreign key column info for the - current table */ - while ((column = key_part_iterator++)) { - column_names[i] = - column->field_name.str; - ut_ad(i < MAX_NUM_FK_COLUMNS); - i++; - } - - index = innobase_find_fk_index( - ha_alter_info, table, column_names, i); + fk_key = static_cast<Foreign_key*>(key); - /* MySQL would add a index in the creation - list if no such index for foreign table, - so we have to use DBUG_EXECUTE_IF to simulate - the scenario */ - DBUG_EXECUTE_IF("innodb_test_no_foreign_idx", - index = NULL;); + if (fk_key->columns.elements > 0) { + ulint i = 0; + Key_part_spec* column; + List_iterator<Key_part_spec> key_part_iterator( + fk_key->columns); - /* Check whether there exist such - index in the the index create clause */ - if (!index && !innobase_find_equiv_index( - column_names, i, - ha_alter_info->key_info_buffer, - ha_alter_info->index_add_buffer, - ha_alter_info->index_add_count)) { - my_error( - ER_FK_NO_INDEX_CHILD, - MYF(0), - fk_key->name.str, - table_share->table_name.str); - goto err_exit; - } + /* Get all the foreign key column info for the + current table */ + while ((column = key_part_iterator++)) { + column_names[i] = column->field_name.str; + ut_ad(i < MAX_NUM_FK_COLUMNS); + i++; + } - num_col = i; + index = innobase_find_fk_index( + ha_alter_info, + table, col_names, + drop_index, n_drop_index, + column_names, i); + + /* MySQL would add a index in the creation + list if no such index for foreign table, + so we have to use DBUG_EXECUTE_IF to simulate + the scenario */ + DBUG_EXECUTE_IF("innodb_test_no_foreign_idx", + index = NULL;); + + /* Check whether there exist such + index in the the index create clause */ + if (!index && !innobase_find_equiv_index( + column_names, i, + ha_alter_info->key_info_buffer, + ha_alter_info->index_add_buffer, + ha_alter_info->index_add_count)) { + my_error( + ER_FK_NO_INDEX_CHILD, + MYF(0), + fk_key->name.str + ? fk_key->name.str : "", + table_share->table_name.str); + goto err_exit; } - add_fk[num_fk] = dict_mem_foreign_create(); + num_col = i; + } + + add_fk[num_fk] = dict_mem_foreign_create(); #ifndef __WIN__ - tbl_namep = fk_key->ref_table.str; - tbl_name_len = fk_key->ref_table.length; - db_namep = fk_key->ref_db.str; - db_name_len = fk_key->ref_db.length; + tbl_namep = fk_key->ref_table.str; + tbl_name_len = fk_key->ref_table.length; + db_namep = fk_key->ref_db.str; + db_name_len = fk_key->ref_db.length; #else - ut_ad(fk_key->ref_table.str); - - memcpy(tbl_name, fk_key->ref_table.str, - fk_key->ref_table.length); - tbl_name[fk_key->ref_table.length] = 0; - innobase_casedn_str(tbl_name); - tbl_name_len = strlen(tbl_name); - tbl_namep = &tbl_name[0]; - - if (fk_key->ref_db.str != NULL) { - memcpy(db_name, fk_key->ref_db.str, - fk_key->ref_db.length); - db_name[fk_key->ref_db.length] = 0; - innobase_casedn_str(db_name); - db_name_len = strlen(db_name); - db_namep = &db_name[0]; - } + ut_ad(fk_key->ref_table.str); + + memcpy(tbl_name, fk_key->ref_table.str, + fk_key->ref_table.length); + tbl_name[fk_key->ref_table.length] = 0; + innobase_casedn_str(tbl_name); + tbl_name_len = strlen(tbl_name); + tbl_namep = &tbl_name[0]; + + if (fk_key->ref_db.str != NULL) { + memcpy(db_name, fk_key->ref_db.str, + fk_key->ref_db.length); + db_name[fk_key->ref_db.length] = 0; + innobase_casedn_str(db_name); + db_name_len = strlen(db_name); + db_namep = &db_name[0]; + } #endif - mutex_enter(&dict_sys->mutex); - - referenced_table_name = dict_get_referenced_table( - table->name, - db_namep, - db_name_len, - tbl_namep, - tbl_name_len, - &referenced_table, - add_fk[num_fk]->heap); - - /* Test the case when referenced_table failed to - open, if trx->check_foreigns is not set, we should - still be able to add the foreign key */ - DBUG_EXECUTE_IF("innodb_test_open_ref_fail", - referenced_table = NULL;); - - if (!referenced_table && trx->check_foreigns) { - mutex_exit(&dict_sys->mutex); - my_error(ER_FK_CANNOT_OPEN_PARENT, - MYF(0), tbl_namep); + mutex_enter(&dict_sys->mutex); + + referenced_table_name = dict_get_referenced_table( + table->name, + db_namep, + db_name_len, + tbl_namep, + tbl_name_len, + &referenced_table, + add_fk[num_fk]->heap); + + /* Test the case when referenced_table failed to + open, if trx->check_foreigns is not set, we should + still be able to add the foreign key */ + DBUG_EXECUTE_IF("innodb_test_open_ref_fail", + referenced_table = NULL;); + + if (!referenced_table && trx->check_foreigns) { + mutex_exit(&dict_sys->mutex); + my_error(ER_FK_CANNOT_OPEN_PARENT, + MYF(0), tbl_namep); - goto err_exit; - } + goto err_exit; + } - i = 0; + if (fk_key->ref_columns.elements > 0) { + ulint i = 0; + Key_part_spec* column; + List_iterator<Key_part_spec> key_part_iterator( + fk_key->ref_columns); - if (fk_key->ref_columns.elements > 0) { - Key_part_spec* column; - List_iterator<Key_part_spec> key_part_iterator( - fk_key->ref_columns); + while ((column = key_part_iterator++)) { + referenced_column_names[i] = + column->field_name.str; + ut_ad(i < MAX_NUM_FK_COLUMNS); + i++; + } - while ((column = key_part_iterator++)) { - referenced_column_names[i] = - column->field_name.str; - ut_ad(i < MAX_NUM_FK_COLUMNS); - i++; - } + if (referenced_table) { + referenced_index = + dict_foreign_find_index( + referenced_table, 0, + referenced_column_names, + i, index, + TRUE, FALSE); - if (referenced_table) { - referenced_index = - dict_foreign_find_index( - referenced_table, - referenced_column_names, - i, NULL, - TRUE, FALSE); - - DBUG_EXECUTE_IF( - "innodb_test_no_reference_idx", - referenced_index = NULL;); - - /* Check whether there exist such - index in the the index create clause */ - if (!referenced_index) { - mutex_exit(&dict_sys->mutex); - my_error( - ER_FK_NO_INDEX_PARENT, - MYF(0), - fk_key->name.str, - tbl_namep); - goto err_exit; - } - } else { - ut_a(!trx->check_foreigns); - } - - referenced_num_col = i; - } + DBUG_EXECUTE_IF( + "innodb_test_no_reference_idx", + referenced_index = NULL;); - if (!innobase_init_foreign( - add_fk[num_fk], fk_key->name.str, - table, index, column_names, - num_col, referenced_table_name, - referenced_table, referenced_index, - referenced_column_names, referenced_num_col)) { + /* Check whether there exist such + index in the the index create clause */ + if (!referenced_index) { mutex_exit(&dict_sys->mutex); - my_error( - ER_FK_DUP_NAME, - MYF(0), - add_fk[num_fk]->id); + my_error(ER_FK_NO_INDEX_PARENT, MYF(0), + fk_key->name.str + ? fk_key->name.str : "", + tbl_namep); goto err_exit; + } + } else { + ut_a(!trx->check_foreigns); } + referenced_num_col = i; + } + + if (!innobase_init_foreign( + add_fk[num_fk], fk_key->name.str, + table, index, column_names, + num_col, referenced_table_name, + referenced_table, referenced_index, + referenced_column_names, referenced_num_col)) { mutex_exit(&dict_sys->mutex); + my_error( + ER_FK_DUP_NAME, + MYF(0), + add_fk[num_fk]->id); + goto err_exit; + } - correct_option = innobase_set_foreign_key_option( - add_fk[num_fk], fk_key); + mutex_exit(&dict_sys->mutex); - DBUG_EXECUTE_IF("innodb_test_wrong_fk_option", - correct_option = false;); + correct_option = innobase_set_foreign_key_option( + add_fk[num_fk], fk_key); - if (!correct_option) { - my_error(ER_FK_INCORRECT_OPTION, - MYF(0), - table_share->table_name.str, - add_fk[num_fk]->id); - goto err_exit; - } + DBUG_EXECUTE_IF("innodb_test_wrong_fk_option", + correct_option = false;); - num_fk++; - i = 0; + if (!correct_option) { + my_error(ER_FK_INCORRECT_OPTION, + MYF(0), + table_share->table_name.str, + add_fk[num_fk]->id); + goto err_exit; } + num_fk++; } *n_add_fk = num_fk; return(true); err_exit: - for (i = 0; i <= num_fk; i++) { + for (ulint i = 0; i <= num_fk; i++) { if (add_fk[i]) { dict_foreign_free(add_fk[i]); } @@ -1655,7 +1647,7 @@ innobase_fts_check_doc_id_index( FTS_DOC_ID_INDEX_NAME is being created. */ for (uint i = 0; i < altered_table->s->keys; i++) { - const KEY& key = altered_table->s->key_info[i]; + const KEY& key = altered_table->key_info[i]; if (innobase_strcasecmp( key.name, FTS_DOC_ID_INDEX_NAME)) { @@ -2008,16 +2000,18 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx { /** Dummy query graph */ que_thr_t* thr; + /** reference to the prebuilt struct of the creating instance */ + row_prebuilt_t*&prebuilt; /** InnoDB indexes being created */ - dict_index_t** add; + dict_index_t** add_index; /** MySQL key numbers for the InnoDB indexes that are being created */ const ulint* add_key_numbers; /** number of InnoDB indexes being created */ - const ulint num_to_add; + ulint num_to_add_index; /** InnoDB indexes being dropped */ - dict_index_t** drop; + dict_index_t** drop_index; /** number of InnoDB indexes being dropped */ - const ulint num_to_drop; + const ulint num_to_drop_index; /** InnoDB foreign key constraints being dropped */ dict_foreign_t** drop_fk; /** number of InnoDB foreign key constraints being dropped */ @@ -2032,21 +2026,26 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx mem_heap_t* heap; /** dictionary transaction */ trx_t* trx; + /** original table (if rebuilt, differs from indexed_table) */ + dict_table_t* old_table; /** table where the indexes are being created or dropped */ - dict_table_t* indexed_table; + dict_table_t* new_table; /** mapping of old column numbers to new ones, or NULL */ const ulint* col_map; + /** new column names, or NULL if nothing was renamed */ + const char** col_names; /** added AUTO_INCREMENT column position, or ULINT_UNDEFINED */ const ulint add_autoinc; /** default values of ADD COLUMN, or NULL */ const dtuple_t* add_cols; /** autoinc sequence to use */ ib_sequence_t sequence; + /** maximum auto-increment value */ + ulonglong max_autoinc; + /** temporary table name to use for old table when renaming tables */ + const char* tmp_name; - ha_innobase_inplace_ctx(trx_t* user_trx, - dict_index_t** add_arg, - const ulint* add_key_numbers_arg, - ulint num_to_add_arg, + ha_innobase_inplace_ctx(row_prebuilt_t*& prebuilt_arg, dict_index_t** drop_arg, ulint num_to_drop_arg, dict_foreign_t** drop_fk_arg, @@ -2055,36 +2054,38 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx ulint num_to_add_fk_arg, bool online_arg, mem_heap_t* heap_arg, - trx_t* trx_arg, - dict_table_t* indexed_table_arg, - const ulint* col_map_arg, + dict_table_t* new_table_arg, + const char** col_names_arg, ulint add_autoinc_arg, ulonglong autoinc_col_min_value_arg, - ulonglong autoinc_col_max_value_arg, - const dtuple_t* add_cols_arg) : + ulonglong autoinc_col_max_value_arg) : inplace_alter_handler_ctx(), - add (add_arg), add_key_numbers (add_key_numbers_arg), - num_to_add (num_to_add_arg), - drop (drop_arg), num_to_drop (num_to_drop_arg), + prebuilt (prebuilt_arg), + add_index (0), add_key_numbers (0), num_to_add_index (0), + drop_index (drop_arg), num_to_drop_index (num_to_drop_arg), drop_fk (drop_fk_arg), num_to_drop_fk (num_to_drop_fk_arg), add_fk (add_fk_arg), num_to_add_fk (num_to_add_fk_arg), - online (online_arg), heap (heap_arg), trx (trx_arg), - indexed_table (indexed_table_arg), - col_map (col_map_arg), add_autoinc (add_autoinc_arg), - add_cols (add_cols_arg), - sequence(user_trx ? user_trx->mysql_thd : 0, - autoinc_col_min_value_arg, autoinc_col_max_value_arg) + online (online_arg), heap (heap_arg), trx (0), + old_table (prebuilt_arg->table), + new_table (new_table_arg), + col_map (0), col_names (col_names_arg), + add_autoinc (add_autoinc_arg), + add_cols (0), + sequence(prebuilt->trx->mysql_thd, + autoinc_col_min_value_arg, autoinc_col_max_value_arg), + max_autoinc (0), + tmp_name (0) { #ifdef UNIV_DEBUG - for (ulint i = 0; i < num_to_add; i++) { - ut_ad(!add[i]->to_be_dropped); + for (ulint i = 0; i < num_to_add_index; i++) { + ut_ad(!add_index[i]->to_be_dropped); } - for (ulint i = 0; i < num_to_drop; i++) { - ut_ad(drop[i]->to_be_dropped); + for (ulint i = 0; i < num_to_drop_index; i++) { + ut_ad(drop_index[i]->to_be_dropped); } #endif /* UNIV_DEBUG */ - thr = pars_complete_graph_for_exec(NULL, user_trx, heap); + thr = pars_complete_graph_for_exec(NULL, prebuilt->trx, heap); } ~ha_innobase_inplace_ctx() @@ -2092,6 +2093,10 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx mem_heap_free(heap); } + /** Determine if the table will be rebuilt. + @return whether the table will be rebuilt */ + bool need_rebuild () const { return(old_table != new_table); } + private: // Disable copying ha_innobase_inplace_ctx(const ha_innobase_inplace_ctx&); @@ -2527,27 +2532,59 @@ innobase_drop_fts_index_table( return(ret_err); } +/** Get the new column names if any columns were renamed +@param ha_alter_info Data used during in-place alter +@param altered_table MySQL table that is being altered +@param user_table InnoDB table as it is before the ALTER operation +@param heap Memory heap for the allocation +@return array of new column names in rebuilt_table, or NULL if not renamed */ +static __attribute__((nonnull, warn_unused_result)) +const char** +innobase_get_col_names( +/*===================*/ + Alter_inplace_info* ha_alter_info, + const TABLE* altered_table, + const dict_table_t* user_table, + mem_heap_t* heap) +{ + const char** cols; + uint i; + + DBUG_ENTER("innobase_get_col_names"); + DBUG_ASSERT(user_table->n_def > altered_table->s->fields); + DBUG_ASSERT(ha_alter_info->handler_flags + & Alter_inplace_info::ALTER_COLUMN_NAME); + + cols = static_cast<const char**>( + mem_heap_alloc(heap, user_table->n_def * sizeof *cols)); + + for (i = 0; i < altered_table->s->fields; i++) { + const Field* field = altered_table->field[i]; + cols[i] = field->field_name; + } + + /* Copy the internal column names. */ + cols[i] = dict_table_get_col_name(user_table, i); + + while (++i < user_table->n_def) { + cols[i] = cols[i - 1] + strlen(cols[i - 1]) + 1; + } + + DBUG_RETURN(cols); +} + /** Update internal structures with concurrent writes blocked, while preparing ALTER TABLE. @param ha_alter_info Data used during in-place alter @param altered_table MySQL table that is being altered @param old_table MySQL table as it is before the ALTER operation -@param user_table InnoDB table that is being altered -@param user_trx User transaction, for locking the table @param table_name Table name in MySQL @param flags Table and tablespace flags @param flags2 Additional table flags -@param heap Memory heap, or NULL -@param drop_index Indexes to be dropped, or NULL -@param n_drop_index Number of indexes to drop -@param drop_foreign Foreign key constraints to be dropped, or NULL -@param n_drop_foreign Number of foreign key constraints to drop @param fts_doc_id_col The column number of FTS_DOC_ID -@param add_autoinc_col The number of an added AUTO_INCREMENT column, - or ULINT_UNDEFINED if none was added @param add_fts_doc_id Flag: add column FTS_DOC_ID? -@param add_fts_doc_id_idx Flag: add index (FTS_DOC_ID)? +@param add_fts_doc_id_idx Flag: add index FTS_DOC_ID_INDEX (FTS_DOC_ID)? @retval true Failure @retval false Success @@ -2559,92 +2596,83 @@ prepare_inplace_alter_table_dict( Alter_inplace_info* ha_alter_info, const TABLE* altered_table, const TABLE* old_table, - dict_table_t* user_table, - trx_t* user_trx, const char* table_name, ulint flags, ulint flags2, - mem_heap_t* heap, - dict_index_t** drop_index, - ulint n_drop_index, - dict_foreign_t** drop_foreign, - ulint n_drop_foreign, - dict_foreign_t** add_foreign, - ulint n_add_foreign, ulint fts_doc_id_col, - ulint add_autoinc_col, - ulonglong autoinc_col_max_value, bool add_fts_doc_id, bool add_fts_doc_id_idx) { - trx_t* trx; bool dict_locked = false; - dict_index_t** add_index; /* indexes to be created */ ulint* add_key_nums; /* MySQL key numbers */ - ulint n_add_index; index_def_t* index_defs; /* index definitions */ + dict_table_t* user_table; dict_index_t* fts_index = NULL; - dict_table_t* indexed_table = user_table; ulint new_clustered = 0; dberr_t error; - THD* user_thd = user_trx->mysql_thd; - const ulint* col_map = NULL; - dtuple_t* add_cols = NULL; ulint num_fts_index; uint sql_idx; + ha_innobase_inplace_ctx*ctx; DBUG_ENTER("prepare_inplace_alter_table_dict"); - DBUG_ASSERT((add_autoinc_col != ULINT_UNDEFINED) - == (autoinc_col_max_value > 0)); - DBUG_ASSERT(!n_drop_index == !drop_index); - DBUG_ASSERT(!n_drop_foreign == !drop_foreign); + + ctx = static_cast<ha_innobase_inplace_ctx*> + (ha_alter_info->handler_ctx); + + DBUG_ASSERT((ctx->add_autoinc != ULINT_UNDEFINED) + == (ctx->sequence.m_max_value > 0)); + DBUG_ASSERT(!ctx->num_to_drop_index == !ctx->drop_index); + DBUG_ASSERT(!ctx->num_to_drop_fk == !ctx->drop_fk); DBUG_ASSERT(!add_fts_doc_id || add_fts_doc_id_idx); DBUG_ASSERT(!add_fts_doc_id_idx - || innobase_fulltext_exist(altered_table->s)); + || innobase_fulltext_exist(altered_table)); + DBUG_ASSERT(!ctx->add_cols); + DBUG_ASSERT(!ctx->add_index); + DBUG_ASSERT(!ctx->add_key_numbers); + DBUG_ASSERT(!ctx->num_to_add_index); + + user_table = ctx->new_table; - trx_start_if_not_started_xa(user_trx); + trx_start_if_not_started_xa(ctx->prebuilt->trx); /* Create a background transaction for the operations on the data dictionary tables. */ - trx = innobase_trx_allocate(user_thd); + ctx->trx = innobase_trx_allocate(ctx->prebuilt->trx->mysql_thd); - trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); - - if (!heap) { - heap = mem_heap_create(1024); - } + trx_start_for_ddl(ctx->trx, TRX_DICT_OP_INDEX); /* Create table containing all indexes to be built in this ALTER TABLE ADD INDEX so that they are in the correct order in the table. */ - n_add_index = ha_alter_info->index_add_count; + ctx->num_to_add_index = ha_alter_info->index_add_count; index_defs = innobase_create_key_defs( - heap, ha_alter_info, altered_table, n_add_index, - num_fts_index, row_table_got_default_clust_index(indexed_table), + ctx->heap, ha_alter_info, altered_table, ctx->num_to_add_index, + num_fts_index, + row_table_got_default_clust_index(ctx->new_table), fts_doc_id_col, add_fts_doc_id, add_fts_doc_id_idx); new_clustered = DICT_CLUSTERED & index_defs[0].ind_type; - const bool locked = - !ha_alter_info->online - || add_autoinc_col != ULINT_UNDEFINED - || num_fts_index > 0 - || (innobase_need_rebuild(ha_alter_info) - && innobase_fulltext_exist(altered_table->s)); - if (num_fts_index > 1) { my_error(ER_INNODB_FT_LIMIT, MYF(0)); goto error_handled; } - if (locked && ha_alter_info->online) { + if (!ctx->online) { + /* This is not an online operation (LOCK=NONE). */ + } else if (ctx->add_autoinc == ULINT_UNDEFINED + && num_fts_index == 0 + && (!innobase_need_rebuild(ha_alter_info) + || !innobase_fulltext_exist(altered_table))) { + /* InnoDB can perform an online operation (LOCK=NONE). */ + } else { /* This should have been blocked in check_if_supported_inplace_alter(). */ ut_ad(0); my_error(ER_NOT_SUPPORTED_YET, MYF(0), - thd_query_string(user_thd)->str); + thd_query_string(ctx->prebuilt->trx->mysql_thd)->str); goto error_handled; } @@ -2658,34 +2686,36 @@ prepare_inplace_alter_table_dict( /* Allocate memory for dictionary index definitions */ - add_index = (dict_index_t**) mem_heap_alloc( - heap, n_add_index * sizeof *add_index); - add_key_nums = (ulint*) mem_heap_alloc( - heap, n_add_index * sizeof *add_key_nums); + ctx->add_index = static_cast<dict_index_t**>( + mem_heap_alloc(ctx->heap, ctx->num_to_add_index + * sizeof *ctx->add_index)); + ctx->add_key_numbers = add_key_nums = static_cast<ulint*>( + mem_heap_alloc(ctx->heap, ctx->num_to_add_index + * sizeof *ctx->add_key_numbers)); /* This transaction should be dictionary operation, so that the data dictionary will be locked during crash recovery. */ - ut_ad(trx->dict_operation == TRX_DICT_OP_INDEX); + ut_ad(ctx->trx->dict_operation == TRX_DICT_OP_INDEX); /* Acquire a lock on the table before creating any indexes. */ - if (locked) { + if (ctx->online) { + error = DB_SUCCESS; + } else { error = row_merge_lock_table( - user_trx, indexed_table, LOCK_S); + ctx->prebuilt->trx, ctx->new_table, LOCK_S); if (error != DB_SUCCESS) { goto error_handling; } - } else { - error = DB_SUCCESS; } /* Latch the InnoDB data dictionary exclusively so that no deadlocks or lock waits can happen in it during an index create operation. */ - row_mysql_lock_data_dictionary(trx); + row_mysql_lock_data_dictionary(ctx->trx); dict_locked = true; /* Wait for background stats processing to stop using the table that @@ -2694,24 +2724,28 @@ prepare_inplace_alter_table_dict( at least until checking ut_ad(user_table->n_ref_count == 1) below. XXX what may happen if bg stats opens the table after we have unlocked data dictionary below? */ - dict_stats_wait_bg_to_stop_using_tables(user_table, NULL, trx); + dict_stats_wait_bg_to_stop_using_table(user_table, ctx->trx); - online_retry_drop_indexes_low(indexed_table, trx); + online_retry_drop_indexes_low(ctx->new_table, ctx->trx); ut_d(dict_table_check_for_dup_indexes( - indexed_table, CHECK_ABORTED_OK)); + ctx->new_table, CHECK_ABORTED_OK)); /* If a new clustered index is defined for the table we need - to drop the original table and rebuild all indexes. */ + to rebuild the table with a temporary name. */ if (new_clustered) { - char* new_table_name = dict_mem_create_temporary_tablename( - heap, indexed_table->name, indexed_table->id); - ulint n_cols; + const char* new_table_name + = dict_mem_create_temporary_tablename( + ctx->heap, + ctx->new_table->name, + ctx->new_table->id); + ulint n_cols; + dtuple_t* add_cols; if (innobase_check_foreigns( ha_alter_info, altered_table, old_table, - user_table, drop_foreign, n_drop_foreign)) { + user_table, ctx->drop_fk, ctx->num_to_drop_fk)) { goto new_clustered_failed; } @@ -2729,7 +2763,7 @@ prepare_inplace_alter_table_dict( DBUG_ASSERT(!add_fts_doc_id_idx || (flags2 & DICT_TF2_FTS)); /* Create the table. */ - trx_set_dict_operation(trx, TRX_DICT_OP_TABLE); + trx_set_dict_operation(ctx->trx, TRX_DICT_OP_TABLE); if (dict_table_get_low(new_table_name)) { my_error(ER_TABLE_EXISTS_ERROR, MYF(0), @@ -2738,12 +2772,15 @@ prepare_inplace_alter_table_dict( } /* The initial space id 0 may be overridden later. */ - indexed_table = dict_mem_table_create( + ctx->new_table = dict_mem_table_create( new_table_name, 0, n_cols, flags, flags2); + /* The rebuilt indexed_table will use the renamed + column names. */ + ctx->col_names = NULL; if (DICT_TF_HAS_DATA_DIR(flags)) { - indexed_table->data_dir_path = - mem_heap_strdup(indexed_table->heap, + ctx->new_table->data_dir_path = + mem_heap_strdup(ctx->new_table->heap, user_table->data_dir_path); } @@ -2782,7 +2819,8 @@ prepare_inplace_alter_table_dict( charset_no = (ulint) field->charset()->number; if (charset_no > MAX_CHAR_COLL_NUM) { - dict_mem_table_free(indexed_table); + dict_mem_table_free( + ctx->new_table); my_error(ER_WRONG_KEY_COLUMN, MYF(0), field->field_name); goto new_clustered_failed; @@ -2812,14 +2850,14 @@ prepare_inplace_alter_table_dict( } if (dict_col_name_is_reserved(field->field_name)) { - dict_mem_table_free(indexed_table); + dict_mem_table_free(ctx->new_table); my_error(ER_WRONG_COLUMN_NAME, MYF(0), field->field_name); goto new_clustered_failed; } dict_mem_table_add_col( - indexed_table, heap, + ctx->new_table, ctx->heap, field->field_name, col_type, dtype_form_prtype(field_type, charset_no), @@ -2827,14 +2865,15 @@ prepare_inplace_alter_table_dict( } if (add_fts_doc_id) { - fts_add_doc_id_column(indexed_table, heap); - indexed_table->fts->doc_col = fts_doc_id_col; + fts_add_doc_id_column(ctx->new_table, ctx->heap); + ctx->new_table->fts->doc_col = fts_doc_id_col; ut_ad(fts_doc_id_col == altered_table->s->stored_fields); - } else if (indexed_table->fts) { - indexed_table->fts->doc_col = fts_doc_id_col; + } else if (ctx->new_table->fts) { + ctx->new_table->fts->doc_col = fts_doc_id_col; } - error = row_create_table_for_mysql(indexed_table, trx, false); + error = row_create_table_for_mysql( + ctx->new_table, ctx->trx, false); switch (error) { dict_table_t* temp_table; @@ -2846,13 +2885,13 @@ prepare_inplace_alter_table_dict( the dict_sys->mutex. */ ut_ad(mutex_own(&dict_sys->mutex)); temp_table = dict_table_open_on_name( - indexed_table->name, TRUE, FALSE, + ctx->new_table->name, TRUE, FALSE, DICT_ERR_IGNORE_NONE); - ut_a(indexed_table == temp_table); + ut_a(ctx->new_table == temp_table); /* n_ref_count must be 1, because purge cannot be executing on this very table as we are holding dict_operation_lock X-latch. */ - DBUG_ASSERT(indexed_table->n_ref_count == 1); + DBUG_ASSERT(ctx->new_table->n_ref_count == 1); break; case DB_TABLESPACE_EXISTS: my_error(ER_TABLESPACE_EXISTS, MYF(0), @@ -2865,64 +2904,69 @@ prepare_inplace_alter_table_dict( default: my_error_innodb(error, table_name, flags); new_clustered_failed: - DBUG_ASSERT(trx != user_trx); - trx_rollback_to_savepoint(trx, NULL); + DBUG_ASSERT(ctx->trx != ctx->prebuilt->trx); + trx_rollback_to_savepoint(ctx->trx, NULL); ut_ad(user_table->n_ref_count == 1); - online_retry_drop_indexes_with_trx(user_table, trx); - + online_retry_drop_indexes_with_trx( + user_table, ctx->trx); goto err_exit; } if (ha_alter_info->handler_flags & Alter_inplace_info::ADD_COLUMN) { - add_cols = dtuple_create( - heap, dict_table_get_n_cols(indexed_table)); + ctx->heap, + dict_table_get_n_cols(ctx->new_table)); - dict_table_copy_types(add_cols, indexed_table); + dict_table_copy_types(add_cols, ctx->new_table); + } else { + add_cols = NULL; } - col_map = innobase_build_col_map( + ctx->col_map = innobase_build_col_map( ha_alter_info, altered_table, old_table, - indexed_table, user_table, - add_cols, heap); + ctx->new_table, user_table, + add_cols, ctx->heap); + ctx->add_cols = add_cols; } else { DBUG_ASSERT(!innobase_need_rebuild(ha_alter_info)); - if (!indexed_table->fts - && innobase_fulltext_exist(altered_table->s)) { - indexed_table->fts = fts_create(indexed_table); - indexed_table->fts->doc_col = fts_doc_id_col; + if (!ctx->new_table->fts + && innobase_fulltext_exist(altered_table)) { + ctx->new_table->fts = fts_create( + ctx->new_table); + ctx->new_table->fts->doc_col = fts_doc_id_col; } } /* Assign table_id, so that no table id of fts_create_index_tables() will be written to the undo logs. */ - DBUG_ASSERT(indexed_table->id != 0); - trx->table_id = indexed_table->id; + DBUG_ASSERT(ctx->new_table->id != 0); + ctx->trx->table_id = ctx->new_table->id; /* Create the indexes in SYS_INDEXES and load into dictionary. */ - for (ulint num_created = 0; num_created < n_add_index; num_created++) { + for (ulint a = 0; a < ctx->num_to_add_index; a++) { - add_index[num_created] = row_merge_create_index( - trx, indexed_table, &index_defs[num_created]); + ctx->add_index[a] = row_merge_create_index( + ctx->trx, ctx->new_table, + &index_defs[a]); - add_key_nums[num_created] = index_defs[num_created].key_number; + add_key_nums[a] = index_defs[a].key_number; - if (!add_index[num_created]) { - error = trx->error_state; + if (!ctx->add_index[a]) { + error = ctx->trx->error_state; DBUG_ASSERT(error != DB_SUCCESS); goto error_handling; } - if (add_index[num_created]->type & DICT_FTS) { + if (ctx->add_index[a]->type & DICT_FTS) { DBUG_ASSERT(num_fts_index); DBUG_ASSERT(!fts_index); - DBUG_ASSERT(add_index[num_created]->type == DICT_FTS); - fts_index = add_index[num_created]; + DBUG_ASSERT(ctx->add_index[a]->type == DICT_FTS); + fts_index = ctx->add_index[a]; } /* If only online ALTER TABLE operations have been @@ -2932,22 +2976,22 @@ prepare_inplace_alter_table_dict( (new_clustered), we will allocate the log for the clustered index of the old table, later. */ if (new_clustered - || locked + || !ctx->online || user_table->ibd_file_missing || dict_table_is_discarded(user_table)) { /* No need to allocate a modification log. */ - ut_ad(!add_index[num_created]->online_log); - } else if (add_index[num_created]->type & DICT_FTS) { + ut_ad(!ctx->add_index[a]->online_log); + } else if (ctx->add_index[a]->type & DICT_FTS) { /* Fulltext indexes are not covered by a modification log. */ } else { DBUG_EXECUTE_IF("innodb_OOM_prepare_inplace_alter", error = DB_OUT_OF_MEMORY; goto error_handling;); - rw_lock_x_lock(&add_index[num_created]->lock); - bool ok = row_log_allocate(add_index[num_created], + rw_lock_x_lock(&ctx->add_index[a]->lock); + bool ok = row_log_allocate(ctx->add_index[a], NULL, true, NULL, NULL); - rw_lock_x_unlock(&add_index[num_created]->lock); + rw_lock_x_unlock(&ctx->add_index[a]->lock); if (!ok) { error = DB_OUT_OF_MEMORY; @@ -2956,39 +3000,41 @@ prepare_inplace_alter_table_dict( } } - ut_ad(new_clustered == (indexed_table != user_table)); + ut_ad(new_clustered == ctx->need_rebuild()); DBUG_EXECUTE_IF("innodb_OOM_prepare_inplace_alter", error = DB_OUT_OF_MEMORY; goto error_handling;); - if (new_clustered && !locked) { + if (new_clustered && ctx->online) { /* Allocate a log for online table rebuild. */ dict_index_t* clust_index = dict_table_get_first_index( user_table); rw_lock_x_lock(&clust_index->lock); bool ok = row_log_allocate( - clust_index, indexed_table, + clust_index, ctx->new_table, !(ha_alter_info->handler_flags & Alter_inplace_info::ADD_PK_INDEX), - add_cols, col_map); + ctx->add_cols, ctx->col_map); rw_lock_x_unlock(&clust_index->lock); if (!ok) { error = DB_OUT_OF_MEMORY; goto error_handling; } + } + if (ctx->online) { /* Assign a consistent read view for row_merge_read_clustered_index(). */ - trx_assign_read_view(user_trx); + trx_assign_read_view(ctx->prebuilt->trx); } if (fts_index) { /* Ensure that the dictionary operation mode will not change while creating the auxiliary tables. */ - trx_dict_op_t op = trx_get_dict_operation(trx); + trx_dict_op_t op = trx_get_dict_operation(ctx->trx); #ifdef UNIV_DEBUG switch (op) { @@ -3001,18 +3047,18 @@ prepare_inplace_alter_table_dict( ut_error; op_ok: #endif /* UNIV_DEBUG */ - ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); + ut_ad(ctx->trx->dict_operation_lock_mode == RW_X_LATCH); ut_ad(mutex_own(&dict_sys->mutex)); #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ - DICT_TF2_FLAG_SET(indexed_table, DICT_TF2_FTS); + DICT_TF2_FLAG_SET(ctx->new_table, DICT_TF2_FTS); /* This function will commit the transaction and reset the trx_t::dict_operation flag on success. */ - error = fts_create_index_tables(trx, fts_index); + error = fts_create_index_tables(ctx->trx, fts_index); DBUG_EXECUTE_IF("innodb_test_fail_after_fts_index_table", error = DB_LOCK_WAIT_TIMEOUT; @@ -3022,34 +3068,38 @@ op_ok: goto error_handling; } - trx_start_for_ddl(trx, op); + trx_start_for_ddl(ctx->trx, op); - if (!indexed_table->fts - || ib_vector_size(indexed_table->fts->indexes) == 0) { + if (!ctx->new_table->fts + || ib_vector_size(ctx->new_table->fts->indexes) == 0) { error = fts_create_common_tables( - trx, indexed_table, user_table->name, TRUE); + ctx->trx, ctx->new_table, + user_table->name, TRUE); - DBUG_EXECUTE_IF("innodb_test_fail_after_fts_common_table", - error = DB_LOCK_WAIT_TIMEOUT; - goto error_handling;); + DBUG_EXECUTE_IF( + "innodb_test_fail_after_fts_common_table", + error = DB_LOCK_WAIT_TIMEOUT;); if (error != DB_SUCCESS) { goto error_handling; } - indexed_table->fts->fts_status |= TABLE_DICT_LOCKED; + ctx->new_table->fts->fts_status + |= TABLE_DICT_LOCKED; error = innobase_fts_load_stopword( - indexed_table, trx, user_thd) + ctx->new_table, ctx->trx, + ctx->prebuilt->trx->mysql_thd) ? DB_SUCCESS : DB_ERROR; - indexed_table->fts->fts_status &= ~TABLE_DICT_LOCKED; + ctx->new_table->fts->fts_status + &= ~TABLE_DICT_LOCKED; if (error != DB_SUCCESS) { goto error_handling; } } - ut_ad(trx_get_dict_operation(trx) == op); + ut_ad(trx_get_dict_operation(ctx->trx) == op); } DBUG_ASSERT(error == DB_SUCCESS); @@ -3057,15 +3107,15 @@ op_ok: /* Commit the data dictionary transaction in order to release the table locks on the system tables. This means that if MySQL crashes while creating a new primary key inside - row_merge_build_indexes(), indexed_table will not be dropped + row_merge_build_indexes(), ctx->new_table will not be dropped by trx_rollback_active(). It will have to be recovered or dropped by the database administrator. */ - trx_commit_for_mysql(trx); + trx_commit_for_mysql(ctx->trx); - row_mysql_unlock_data_dictionary(trx); + row_mysql_unlock_data_dictionary(ctx->trx); dict_locked = false; - ut_a(trx->lock.n_active_thrs == 0); + ut_a(ctx->trx->lock.n_active_thrs == 0); error_handling: /* After an error, remove all those index definitions from the @@ -3079,16 +3129,6 @@ error_handling: ut_d(dict_table_check_for_dup_indexes( user_table, CHECK_PARTIAL_OK)); ut_d(mutex_exit(&dict_sys->mutex)); - ha_alter_info->handler_ctx = new ha_innobase_inplace_ctx( - user_trx, add_index, add_key_nums, n_add_index, - drop_index, n_drop_index, - drop_foreign, n_drop_foreign, - add_foreign, n_add_foreign, - !locked, heap, trx, indexed_table, col_map, - add_autoinc_col, - ha_alter_info->create_info->auto_increment_value, - autoinc_col_max_value, - add_cols); DBUG_RETURN(false); case DB_TABLESPACE_EXISTS: my_error(ER_TABLESPACE_EXISTS, MYF(0), "(unknown)"); @@ -3102,32 +3142,33 @@ error_handling: error_handled: - user_trx->error_info = NULL; - trx->error_state = DB_SUCCESS; + ctx->prebuilt->trx->error_info = NULL; + ctx->trx->error_state = DB_SUCCESS; if (!dict_locked) { - row_mysql_lock_data_dictionary(trx); + row_mysql_lock_data_dictionary(ctx->trx); } if (new_clustered) { - if (indexed_table != user_table) { + if (ctx->need_rebuild()) { - if (DICT_TF2_FLAG_IS_SET(indexed_table, DICT_TF2_FTS)) { + if (DICT_TF2_FLAG_IS_SET( + ctx->new_table, DICT_TF2_FTS)) { innobase_drop_fts_index_table( - indexed_table, trx); + ctx->new_table, ctx->trx); } - dict_table_close(indexed_table, TRUE, FALSE); + dict_table_close(ctx->new_table, TRUE, FALSE); -#ifdef UNIV_DDL_DEBUG +#if defined UNIV_DEBUG || defined UNIV_DDL_DEBUG /* Nobody should have initialized the stats of the newly created table yet. When this is the case, we know that it has not been added for background stats gathering. */ - ut_a(!indexed_table->stat_initialized); -#endif /* UNIV_DDL_DEBUG */ + ut_a(!ctx->new_table->stat_initialized); +#endif /* UNIV_DEBUG || UNIV_DDL_DEBUG */ - row_merge_drop_table(trx, indexed_table); + row_merge_drop_table(ctx->trx, ctx->new_table); /* Free the log for online table rebuild, if one was allocated. */ @@ -3138,7 +3179,7 @@ error_handled: rw_lock_x_lock(&clust_index->lock); if (clust_index->online_log) { - ut_ad(!locked); + ut_ad(ctx->online); row_log_abort_sec(clust_index); clust_index->online_status = ONLINE_INDEX_COMPLETE; @@ -3147,17 +3188,17 @@ error_handled: rw_lock_x_unlock(&clust_index->lock); } - trx_commit_for_mysql(trx); + trx_commit_for_mysql(ctx->trx); /* n_ref_count must be 1, because purge cannot be executing on this very table as we are holding dict_operation_lock X-latch. */ - DBUG_ASSERT(user_table->n_ref_count == 1 || !locked); + DBUG_ASSERT(user_table->n_ref_count == 1 || ctx->online); - online_retry_drop_indexes_with_trx(user_table, trx); + online_retry_drop_indexes_with_trx(user_table, ctx->trx); } else { - ut_ad(indexed_table == user_table); - row_merge_drop_indexes(trx, user_table, TRUE); - trx_commit_for_mysql(trx); + ut_ad(!ctx->need_rebuild()); + row_merge_drop_indexes(ctx->trx, user_table, TRUE); + trx_commit_for_mysql(ctx->trx); } ut_d(dict_table_check_for_dup_indexes(user_table, CHECK_ALL_COMPLETE)); @@ -3165,18 +3206,19 @@ error_handled: err_exit: /* Clear the to_be_dropped flag in the data dictionary cache. */ - for (ulint i = 0; i < n_drop_index; i++) { - DBUG_ASSERT(*drop_index[i]->name != TEMP_INDEX_PREFIX); - DBUG_ASSERT(drop_index[i]->to_be_dropped); - drop_index[i]->to_be_dropped = 0; + for (ulint i = 0; i < ctx->num_to_drop_index; i++) { + DBUG_ASSERT(*ctx->drop_index[i]->name != TEMP_INDEX_PREFIX); + DBUG_ASSERT(ctx->drop_index[i]->to_be_dropped); + ctx->drop_index[i]->to_be_dropped = 0; } - row_mysql_unlock_data_dictionary(trx); + row_mysql_unlock_data_dictionary(ctx->trx); - trx_free_for_mysql(trx); - mem_heap_free(heap); + trx_free_for_mysql(ctx->trx); + trx_commit_for_mysql(ctx->prebuilt->trx); - trx_commit_for_mysql(user_trx); + delete ctx; + ha_alter_info->handler_ctx = NULL; /* There might be work for utility threads.*/ srv_active_wake_master_thread(); @@ -3187,7 +3229,7 @@ err_exit: /* Check whether an index is needed for the foreign key constraint. If so, if it is dropped, is there an equivalent index can play its role. @return true if the index is needed and can't be dropped */ -static __attribute__((warn_unused_result)) +static __attribute__((nonnull(1,2,3,5), warn_unused_result)) bool innobase_check_foreign_key_index( /*=============================*/ @@ -3197,6 +3239,8 @@ innobase_check_foreign_key_index( dict_index_t* index, /*!< in: index to check */ dict_table_t* indexed_table, /*!< in: table that owns the foreign keys */ + const char** col_names, /*!< in: column names, or NULL + for indexed_table->col_names */ trx_t* trx, /*!< in/out: transaction */ dict_foreign_t** drop_fk, /*!< in: Foreign key constraints to drop */ @@ -3205,8 +3249,6 @@ innobase_check_foreign_key_index( { dict_foreign_t* foreign; - ut_ad(!index->to_be_dropped); - /* Check if the index is referenced. */ foreign = dict_table_get_referenced_constraint(indexed_table, index); @@ -3215,7 +3257,7 @@ innobase_check_foreign_key_index( if (foreign && !dict_foreign_find_index( - indexed_table, + indexed_table, col_names, foreign->referenced_col_names, foreign->n_fields, index, /*check_charsets=*/TRUE, @@ -3243,7 +3285,7 @@ innobase_check_foreign_key_index( && !innobase_dropping_foreign( foreign, drop_fk, n_drop_fk) && !dict_foreign_find_index( - indexed_table, + indexed_table, col_names, foreign->foreign_col_names, foreign->n_fields, index, /*check_charsets=*/TRUE, @@ -3289,6 +3331,7 @@ ha_innobase::prepare_inplace_alter_table( ulint n_add_fk; /*!< Number of foreign keys to drop */ dict_table_t* indexed_table; /*!< Table where indexes are created */ mem_heap_t* heap; + const char** col_names; int error; ulint flags; ulint flags2; @@ -3302,10 +3345,7 @@ ha_innobase::prepare_inplace_alter_table( DBUG_ENTER("prepare_inplace_alter_table"); DBUG_ASSERT(!ha_alter_info->handler_ctx); DBUG_ASSERT(ha_alter_info->create_info); - - if (srv_read_only_mode) { - DBUG_RETURN(false); - } + DBUG_ASSERT(!srv_read_only_mode); MONITOR_ATOMIC_INC(MONITOR_PENDING_ALTER_TABLE); @@ -3328,12 +3368,6 @@ ha_innobase::prepare_inplace_alter_table( } if (ha_alter_info->handler_flags - == Alter_inplace_info::CHANGE_CREATE_OPTION - && !innobase_need_rebuild(ha_alter_info)) { - goto func_exit; - } - - if (ha_alter_info->handler_flags & Alter_inplace_info::CHANGE_CREATE_OPTION) { if (const char* invalid_opt = create_options_are_invalid( user_thd, altered_table, @@ -3396,7 +3430,7 @@ check_if_ok_to_rename: if (!my_strcasecmp(system_charset_info, (*fp)->field_name, FTS_DOC_ID_COL_NAME) - && innobase_fulltext_exist(altered_table->s)) { + && innobase_fulltext_exist(altered_table)) { my_error(ER_INNODB_FT_WRONG_DOCID_COLUMN, MYF(0), name); goto err_exit_no_heap; @@ -3488,11 +3522,26 @@ check_if_ok_to_rename: n_drop_fk = 0; if (ha_alter_info->handler_flags + & (INNOBASE_ALTER_NOREBUILD | INNOBASE_ALTER_REBUILD)) { + heap = mem_heap_create(1024); + + if (ha_alter_info->handler_flags + & Alter_inplace_info::ALTER_COLUMN_NAME) { + col_names = innobase_get_col_names( + ha_alter_info, altered_table, indexed_table, + heap); + } else { + col_names = NULL; + } + } else { + heap = NULL; + col_names = NULL; + } + + if (ha_alter_info->handler_flags & Alter_inplace_info::DROP_FOREIGN_KEY) { DBUG_ASSERT(ha_alter_info->alter_info->drop_list.elements > 0); - heap = mem_heap_create(1024); - drop_fk = static_cast<dict_foreign_t**>( mem_heap_alloc( heap, @@ -3539,7 +3588,6 @@ found_fk: == ha_alter_info->alter_info->drop_list.elements); } else { drop_fk = NULL; - heap = NULL; } if (ha_alter_info->index_drop_count) { @@ -3550,9 +3598,6 @@ found_fk: | Alter_inplace_info::DROP_UNIQUE_INDEX | Alter_inplace_info::DROP_PK_INDEX)); /* Check which indexes to drop. */ - if (!heap) { - heap = mem_heap_create(1024); - } drop_index = static_cast<dict_index_t**>( mem_heap_alloc( heap, (ha_alter_info->index_drop_count + 1) @@ -3586,8 +3631,8 @@ found_fk: internal FTS_DOC_ID_INDEX as well, unless it exists in the table. */ - if (innobase_fulltext_exist(table->s) - && !innobase_fulltext_exist(altered_table->s) + if (innobase_fulltext_exist(table) + && !innobase_fulltext_exist(altered_table) && !DICT_TF2_FLAG_IS_SET( indexed_table, DICT_TF2_FTS_HAS_DOC_ID)) { dict_index_t* fts_doc_index @@ -3605,7 +3650,7 @@ found_fk: if (!my_strcasecmp( system_charset_info, FTS_DOC_ID_INDEX_NAME, - table->s->key_info[i].name)) { + table->key_info[i].name)) { /* The index exists in the MySQL data dictionary. Do not drop it, even though it is no longer needed @@ -3624,12 +3669,23 @@ check_if_can_drop_indexes: CREATE TABLE adding FOREIGN KEY constraints. */ row_mysql_lock_data_dictionary(prebuilt->trx); + if (!n_drop_index) { + drop_index = NULL; + } else { + /* Flag all indexes that are to be dropped. */ + for (ulint i = 0; i < n_drop_index; i++) { + ut_ad(!drop_index[i]->to_be_dropped); + drop_index[i]->to_be_dropped = 1; + } + } + if (prebuilt->trx->check_foreigns) { for (uint i = 0; i < n_drop_index; i++) { dict_index_t* index = drop_index[i]; if (innobase_check_foreign_key_index( - ha_alter_info, index, indexed_table, + ha_alter_info, index, + indexed_table, col_names, prebuilt->trx, drop_fk, n_drop_fk)) { row_mysql_unlock_data_dictionary( prebuilt->trx); @@ -3644,7 +3700,8 @@ check_if_can_drop_indexes: any depending foreign constraints get affected */ if (drop_primary && innobase_check_foreign_key_index( - ha_alter_info, drop_primary, indexed_table, + ha_alter_info, drop_primary, + indexed_table, col_names, prebuilt->trx, drop_fk, n_drop_fk)) { row_mysql_unlock_data_dictionary(prebuilt->trx); print_error(HA_ERR_DROP_INDEX_FK, MYF(0)); @@ -3652,16 +3709,6 @@ check_if_can_drop_indexes: } } - if (!n_drop_index) { - drop_index = NULL; - } else { - /* Flag all indexes that are to be dropped. */ - for (ulint i = 0; i < n_drop_index; i++) { - ut_ad(!drop_index[i]->to_be_dropped); - drop_index[i]->to_be_dropped = 1; - } - } - row_mysql_unlock_data_dictionary(prebuilt->trx); } else { drop_index = NULL; @@ -3673,10 +3720,6 @@ check_if_can_drop_indexes: & Alter_inplace_info::ADD_FOREIGN_KEY) { ut_ad(!prebuilt->trx->check_foreigns); - if (!heap) { - heap = mem_heap_create(1024); - } - add_fk = static_cast<dict_foreign_t**>( mem_heap_zalloc( heap, @@ -3684,8 +3727,10 @@ check_if_can_drop_indexes: * sizeof(dict_foreign_t*))); if (!innobase_get_foreign_key_info( - ha_alter_info, table_share, prebuilt->table, - add_fk, &n_add_fk, heap, prebuilt->trx)) { + ha_alter_info, table_share, + prebuilt->table, col_names, + drop_index, n_drop_index, + add_fk, &n_add_fk, prebuilt->trx)) { err_exit: if (n_drop_index) { row_mysql_lock_data_dictionary(prebuilt->trx); @@ -3704,21 +3749,26 @@ err_exit: if (heap) { mem_heap_free(heap); } + goto err_exit_no_heap; } } - if (!(ha_alter_info->handler_flags & INNOBASE_INPLACE_CREATE)) { + if (!(ha_alter_info->handler_flags & INNOBASE_ALTER_DATA) + || (ha_alter_info->handler_flags + == Alter_inplace_info::CHANGE_CREATE_OPTION + && !innobase_need_rebuild(ha_alter_info))) { + if (heap) { ha_alter_info->handler_ctx = new ha_innobase_inplace_ctx( - prebuilt->trx, 0, 0, 0, + prebuilt, drop_index, n_drop_index, drop_fk, n_drop_fk, add_fk, n_add_fk, ha_alter_info->online, - heap, 0, indexed_table, 0, - ULINT_UNDEFINED, 0, 0, 0); + heap, indexed_table, + col_names, ULINT_UNDEFINED, 0, 0); } func_exit: @@ -3732,7 +3782,7 @@ func_exit: /* If we are to build a full-text search index, check whether the table already has a DOC ID column. If not, we will need to add a Doc ID hidden column and rebuild the primary index */ - if (innobase_fulltext_exist(altered_table->s)) { + if (innobase_fulltext_exist(altered_table)) { ulint doc_col_no; if (!innobase_fts_check_doc_id_col( @@ -3820,16 +3870,25 @@ found_col: innodb_idx++; } + DBUG_ASSERT(heap); DBUG_ASSERT(user_thd == prebuilt->trx->mysql_thd); + DBUG_ASSERT(!ha_alter_info->handler_ctx); + + ha_alter_info->handler_ctx = new ha_innobase_inplace_ctx( + prebuilt, + drop_index, n_drop_index, + drop_fk, n_drop_fk, add_fk, n_add_fk, + ha_alter_info->online, + heap, prebuilt->table, col_names, + add_autoinc_col_no, + ha_alter_info->create_info->auto_increment_value, + autoinc_col_max_value); + DBUG_RETURN(prepare_inplace_alter_table_dict( ha_alter_info, altered_table, table, - prebuilt->table, prebuilt->trx, table_share->table_name.str, flags, flags2, - heap, drop_index, n_drop_index, - drop_fk, n_drop_fk, add_fk, n_add_fk, - fts_doc_col_no, add_autoinc_col_no, - autoinc_col_max_value, add_fts_doc_id, + fts_doc_col_no, add_fts_doc_id, add_fts_doc_id_idx)); } @@ -3855,10 +3914,7 @@ ha_innobase::inplace_alter_table( dberr_t error; DBUG_ENTER("inplace_alter_table"); - - if (srv_read_only_mode) { - DBUG_RETURN(false); - } + DBUG_ASSERT(!srv_read_only_mode); #ifdef UNIV_SYNC_DEBUG ut_ad(!rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); @@ -3867,7 +3923,7 @@ ha_innobase::inplace_alter_table( DEBUG_SYNC(user_thd, "innodb_inplace_alter_table_enter"); - if (!(ha_alter_info->handler_flags & INNOBASE_INPLACE_CREATE)) { + if (!(ha_alter_info->handler_flags & INNOBASE_ALTER_DATA)) { ok_exit: DEBUG_SYNC(user_thd, "innodb_after_inplace_alter_table"); DBUG_RETURN(false); @@ -3885,6 +3941,7 @@ ok_exit: DBUG_ASSERT(ctx); DBUG_ASSERT(ctx->trx); + DBUG_ASSERT(ctx->prebuilt == prebuilt); if (prebuilt->table->ibd_file_missing || dict_table_is_discarded(prebuilt->table)) { @@ -3898,16 +3955,15 @@ ok_exit: error = DB_OUT_OF_MEMORY; goto oom;); error = row_merge_build_indexes( prebuilt->trx, - prebuilt->table, ctx->indexed_table, + prebuilt->table, ctx->new_table, ctx->online, - ctx->add, ctx->add_key_numbers, ctx->num_to_add, + ctx->add_index, ctx->add_key_numbers, ctx->num_to_add_index, altered_table, ctx->add_cols, ctx->col_map, ctx->add_autoinc, ctx->sequence); #ifndef DBUG_OFF oom: #endif /* !DBUG_OFF */ - if (error == DB_SUCCESS && ctx->online - && ctx->indexed_table != prebuilt->table) { + if (error == DB_SUCCESS && ctx->online && ctx->need_rebuild()) { DEBUG_SYNC_C("row_log_table_apply1_before"); error = row_log_table_apply( ctx->thr, prebuilt->table, altered_table); @@ -3916,7 +3972,8 @@ oom: DEBUG_SYNC_C("inplace_after_index_build"); DBUG_EXECUTE_IF("create_index_fail", - error = DB_DUPLICATE_KEY;); + error = DB_DUPLICATE_KEY; + prebuilt->trx->error_key_num = ULINT_UNDEFINED;); /* After an error, remove all those index definitions from the dictionary which were defined. */ @@ -4009,27 +4066,29 @@ innobase_online_rebuild_log_free( /** Rollback a secondary index creation, drop the indexes with temparary index prefix -@param prebuilt the prebuilt struct -@param table_share the TABLE_SHARE +@param user_table InnoDB table +@param table the TABLE +@param locked TRUE=table locked, FALSE=may need to do a lazy drop @param trx the transaction */ -static +static __attribute__((nonnull)) void innobase_rollback_sec_index( /*========================*/ - row_prebuilt_t* prebuilt, - const TABLE_SHARE* table_share, + dict_table_t* user_table, + const TABLE* table, + ibool locked, trx_t* trx) { - row_merge_drop_indexes(trx, prebuilt->table, FALSE); + row_merge_drop_indexes(trx, user_table, locked); /* Free the table->fts only if there is no FTS_DOC_ID in the table */ - if (prebuilt->table->fts - && !DICT_TF2_FLAG_IS_SET(prebuilt->table, + if (user_table->fts + && !DICT_TF2_FLAG_IS_SET(user_table, DICT_TF2_FTS_HAS_DOC_ID) - && !innobase_fulltext_exist(table_share)) { - fts_free(prebuilt->table); + && !innobase_fulltext_exist(table)) { + fts_free(user_table); } } @@ -4041,17 +4100,17 @@ prepare_inplace_alter_table(). (E.g concurrent writes were blocked during prepare, but might not be during commit). @param ha_alter_info Data used during in-place alter. -@param table_share the TABLE_SHARE +@param table the TABLE @param prebuilt the prebuilt struct @retval true Failure @retval false Success */ -inline +inline __attribute__((nonnull, warn_unused_result)) bool rollback_inplace_alter_table( /*=========================*/ Alter_inplace_info* ha_alter_info, - const TABLE_SHARE* table_share, + const TABLE* table, row_prebuilt_t* prebuilt) { bool fail = false; @@ -4070,65 +4129,66 @@ rollback_inplace_alter_table( row_mysql_lock_data_dictionary(ctx->trx); - if (prebuilt->table != ctx->indexed_table) { + if (ctx->need_rebuild()) { dberr_t err; - ulint flags = ctx->indexed_table->flags; + ulint flags = ctx->new_table->flags; - /* DML threads can access ctx->indexed_table via the + /* DML threads can access ctx->new_table via the online rebuild log. Free it first. */ innobase_online_rebuild_log_free(prebuilt->table); /* Since the FTS index specific auxiliary tables has not yet registered with "table->fts" by fts_add_index(), we will need explicitly delete them here */ - if (DICT_TF2_FLAG_IS_SET(ctx->indexed_table, DICT_TF2_FTS)) { + if (DICT_TF2_FLAG_IS_SET(ctx->new_table, DICT_TF2_FTS)) { err = innobase_drop_fts_index_table( - ctx->indexed_table, ctx->trx); + ctx->new_table, ctx->trx); if (err != DB_SUCCESS) { my_error_innodb( - err, table_share->table_name.str, + err, table->s->table_name.str, flags); fail = true; } } /* Drop the table. */ - dict_table_close(ctx->indexed_table, TRUE, FALSE); + dict_table_close(ctx->new_table, TRUE, FALSE); -#ifdef UNIV_DDL_DEBUG +#if defined UNIV_DEBUG || defined UNIV_DDL_DEBUG /* Nobody should have initialized the stats of the newly created table yet. When this is the case, we know that it has not been added for background stats gathering. */ - ut_a(!ctx->indexed_table->stat_initialized); -#endif /* UNIV_DDL_DEBUG */ + ut_a(!ctx->new_table->stat_initialized); +#endif /* UNIV_DEBUG || UNIV_DDL_DEBUG */ - err = row_merge_drop_table(ctx->trx, ctx->indexed_table); + err = row_merge_drop_table(ctx->trx, ctx->new_table); switch (err) { case DB_SUCCESS: break; default: - my_error_innodb(err, table_share->table_name.str, + my_error_innodb(err, table->s->table_name.str, flags); fail = true; } } else { DBUG_ASSERT(!(ha_alter_info->handler_flags & Alter_inplace_info::ADD_PK_INDEX)); + DBUG_ASSERT(ctx->new_table == prebuilt->table); trx_start_for_ddl(ctx->trx, TRX_DICT_OP_INDEX); - innobase_rollback_sec_index(prebuilt, table_share, ctx->trx); + innobase_rollback_sec_index( + prebuilt->table, table, FALSE, ctx->trx); } trx_commit_for_mysql(ctx->trx); row_mysql_unlock_data_dictionary(ctx->trx); trx_free_for_mysql(ctx->trx); - func_exit: #ifndef DBUG_OFF dict_index_t* clust_index = dict_table_get_first_index( @@ -4139,13 +4199,15 @@ func_exit: #endif /* !DBUG_OFF */ if (ctx) { + DBUG_ASSERT(ctx->prebuilt == prebuilt); + if (ctx->num_to_add_fk) { for (ulint i = 0; i < ctx->num_to_add_fk; i++) { dict_foreign_free(ctx->add_fk[i]); } } - if (ctx->num_to_drop) { + if (ctx->num_to_drop_index) { row_mysql_lock_data_dictionary(prebuilt->trx); /* Clear the to_be_dropped flags @@ -4153,8 +4215,8 @@ func_exit: The flags may already have been cleared, in case an error was detected in commit_inplace_alter_table(). */ - for (ulint i = 0; i < ctx->num_to_drop; i++) { - dict_index_t* index = ctx->drop[i]; + for (ulint i = 0; i < ctx->num_to_drop_index; i++) { + dict_index_t* index = ctx->drop_index[i]; DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); index->to_be_dropped = 0; @@ -4170,21 +4232,21 @@ func_exit: DBUG_RETURN(fail); } -/** Drop a FOREIGN KEY constraint. -@param table_share the TABLE_SHARE +/** Drop a FOREIGN KEY constraint from the data dictionary tables. @param trx data dictionary transaction -@param foreign the foreign key constraint, will be freed +@param table_name Table name in MySQL +@param foreign_id Foreign key constraint identifier @retval true Failure @retval false Success */ static __attribute__((nonnull, warn_unused_result)) bool -innobase_drop_foreign( -/*==================*/ - const TABLE_SHARE* table_share, +innobase_drop_foreign_try( +/*======================*/ trx_t* trx, - dict_foreign_t* foreign) + const char* table_name, + const char* foreign_id) { - DBUG_ENTER("innobase_drop_foreign"); + DBUG_ENTER("innobase_drop_foreign_try"); DBUG_ASSERT(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX); ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); @@ -4205,7 +4267,7 @@ innobase_drop_foreign( pars_info_t* info; info = pars_info_create(); - pars_info_add_str_literal(info, "id", foreign->id); + pars_info_add_str_literal(info, "id", foreign_id); trx->op_info = "dropping foreign key constraint from dictionary"; error = que_eval_sql(info, sql, FALSE, trx); @@ -4215,20 +4277,18 @@ innobase_drop_foreign( error = DB_OUT_OF_FILE_SPACE;); if (error != DB_SUCCESS) { - my_error_innodb(error, table_share->table_name.str, 0); + my_error_innodb(error, table_name, 0); trx->error_state = DB_SUCCESS; DBUG_RETURN(true); } - /* Drop the foreign key constraint from the data dictionary cache. */ - dict_foreign_remove_from_cache(foreign); DBUG_RETURN(false); } -/** Rename a column. -@param table_share the TABLE_SHARE -@param prebuilt the prebuilt struct +/** Rename a column in the data dictionary tables. +@param user_table InnoDB table that was being altered @param trx data dictionary transaction +@param table_name Table name in MySQL @param nth_col 0-based index of the column @param from old column name @param to new column name @@ -4237,11 +4297,11 @@ innobase_drop_foreign( @retval false Success */ static __attribute__((nonnull, warn_unused_result)) bool -innobase_rename_column( -/*===================*/ - const TABLE_SHARE* table_share, - row_prebuilt_t* prebuilt, +innobase_rename_column_try( +/*=======================*/ + const dict_table_t* user_table, trx_t* trx, + const char* table_name, ulint nth_col, const char* from, const char* to, @@ -4250,10 +4310,9 @@ innobase_rename_column( pars_info_t* info; dberr_t error; - DBUG_ENTER("innobase_rename_column"); + DBUG_ENTER("innobase_rename_column_try"); - DBUG_ASSERT(trx_get_dict_operation(trx) - == new_clustered ? TRX_DICT_OP_TABLE : TRX_DICT_OP_INDEX); + DBUG_ASSERT(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX); ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); ut_ad(mutex_own(&dict_sys->mutex)); #ifdef UNIV_SYNC_DEBUG @@ -4266,7 +4325,7 @@ innobase_rename_column( info = pars_info_create(); - pars_info_add_ull_literal(info, "tableid", prebuilt->table->id); + pars_info_add_ull_literal(info, "tableid", user_table->id); pars_info_add_int4_literal(info, "nth", nth_col); pars_info_add_str_literal(info, "old", from); pars_info_add_str_literal(info, "new", to); @@ -4288,7 +4347,7 @@ innobase_rename_column( if (error != DB_SUCCESS) { err_exit: - my_error_innodb(error, table_share->table_name.str, 0); + my_error_innodb(error, table_name, 0); trx->error_state = DB_SUCCESS; trx->op_info = ""; DBUG_RETURN(true); @@ -4296,7 +4355,8 @@ err_exit: trx->op_info = "renaming column in SYS_FIELDS"; - for (dict_index_t* index = dict_table_get_first_index(prebuilt->table); + for (const dict_index_t* index = dict_table_get_first_index( + user_table); index != NULL; index = dict_table_get_next_index(index)) { @@ -4341,8 +4401,8 @@ err_exit: rename_foreign: trx->op_info = "renaming column in SYS_FOREIGN_COLS"; - for (dict_foreign_t* foreign = UT_LIST_GET_FIRST( - prebuilt->table->foreign_list); + for (const dict_foreign_t* foreign = UT_LIST_GET_FIRST( + user_table->foreign_list); foreign != NULL; foreign = UT_LIST_GET_NEXT(foreign_list, foreign)) { for (unsigned i = 0; i < foreign->n_fields; i++) { @@ -4374,8 +4434,8 @@ rename_foreign: } } - for (dict_foreign_t* foreign = UT_LIST_GET_FIRST( - prebuilt->table->referenced_list); + for (const dict_foreign_t* foreign = UT_LIST_GET_FIRST( + user_table->referenced_list); foreign != NULL; foreign = UT_LIST_GET_NEXT(referenced_list, foreign)) { for (unsigned i = 0; i < foreign->n_fields; i++) { @@ -4408,37 +4468,35 @@ rename_foreign: } trx->op_info = ""; - if (!new_clustered) { - /* Rename the column in the data dictionary cache. */ - dict_mem_table_col_rename(prebuilt->table, nth_col, from, to); - } DBUG_RETURN(false); } -/** Rename columns. +/** Rename columns in the data dictionary tables. @param ha_alter_info Data used during in-place alter. -@param new_clustered whether the table has been rebuilt +@param ctx In-place ALTER TABLE context @param table the TABLE -@param table_share the TABLE_SHARE -@param prebuilt the prebuilt struct @param trx data dictionary transaction +@param table_name Table name in MySQL @retval true Failure @retval false Success */ static __attribute__((nonnull, warn_unused_result)) bool -innobase_rename_columns( -/*====================*/ +innobase_rename_columns_try( +/*========================*/ Alter_inplace_info* ha_alter_info, - bool new_clustered, + ha_innobase_inplace_ctx*ctx, const TABLE* table, - const TABLE_SHARE* table_share, - row_prebuilt_t* prebuilt, - trx_t* trx) + trx_t* trx, + const char* table_name) { List_iterator_fast<Create_field> cf_it( ha_alter_info->alter_info->create_list); uint i = 0; + DBUG_ASSERT(ctx); + DBUG_ASSERT(ha_alter_info->handler_flags + & Alter_inplace_info::ALTER_COLUMN_NAME); + for (Field** fp = table->field; *fp; fp++, i++) { if (!((*fp)->flags & FIELD_IS_RENAMED) || !((*fp)->stored_in_db)) { continue; @@ -4447,11 +4505,11 @@ innobase_rename_columns( cf_it.rewind(); while (Create_field* cf = cf_it++) { if (cf->field == *fp) { - if (innobase_rename_column( - table_share, - prebuilt, trx, i, + if (innobase_rename_column_try( + ctx->old_table, trx, table_name, i, cf->field->field_name, - cf->field_name, new_clustered)) { + cf->field_name, + ctx->need_rebuild())) { return(true); } goto processed_field; @@ -4466,87 +4524,73 @@ processed_field: return(false); } -/** Undo the in-memory addition of foreign key on table->foreign_list -and table->referenced_list. -@param ctx saved alter table context -@param table the foreign table */ +/** Rename columns in the data dictionary cache +as part of commit_cache_norebuild(). +@param ha_alter_info Data used during in-place alter. +@param table the TABLE +@param user_table InnoDB table that was being altered */ static __attribute__((nonnull)) void -innobase_undo_add_fk( -/*=================*/ - ha_innobase_inplace_ctx* ctx, - dict_table_t* fk_table) +innobase_rename_columns_cache( +/*==========================*/ + Alter_inplace_info* ha_alter_info, + const TABLE* table, + dict_table_t* user_table) { - for (ulint i = 0; i < ctx->num_to_add_fk; i++) { - UT_LIST_REMOVE( - foreign_list, - fk_table->foreign_list, - ctx->add_fk[i]); + if (!(ha_alter_info->handler_flags + & Alter_inplace_info::ALTER_COLUMN_NAME)) { + return; + } + + List_iterator_fast<Create_field> cf_it( + ha_alter_info->alter_info->create_list); + uint i = 0; + + for (Field** fp = table->field; *fp; fp++, i++) { + if (!((*fp)->flags & FIELD_IS_RENAMED)) { + continue; + } - if (ctx->add_fk[i]->referenced_table) { - UT_LIST_REMOVE( - referenced_list, - ctx->add_fk[i]->referenced_table - ->referenced_list, - ctx->add_fk[i]); + cf_it.rewind(); + while (Create_field* cf = cf_it++) { + if (cf->field == *fp) { + dict_mem_table_col_rename(user_table, i, + cf->field->field_name, + cf->field_name); + goto processed_field; + } } + + ut_error; +processed_field: + continue; } } -/** Commit or rollback the changes made during -prepare_inplace_alter_table() and inplace_alter_table() inside -the storage engine. Note that the allowed level of concurrency -during this operation will be the same as for -inplace_alter_table() and thus might be higher than during -prepare_inplace_alter_table(). (E.g concurrent writes were -blocked during prepare, but might not be during commit). -@param altered_table TABLE object for new version of table. -@param ha_alter_info Structure describing changes to be done -by ALTER TABLE and holding data used during in-place alter. -@param commit true => Commit, false => Rollback. -@retval true Failure -@retval false Success -*/ -UNIV_INTERN -bool -ha_innobase::commit_inplace_alter_table( -/*====================================*/ - TABLE* altered_table, +/** Get the auto-increment value of the table on commit. +@param ha_alter_info Data used during in-place alter +@param ctx In-place ALTER TABLE context +@param altered_table MySQL table that is being altered +@param old_table MySQL table as it is before the ALTER operation +@return the next auto-increment value (0 if not present) */ +static __attribute__((nonnull, warn_unused_result)) +ulonglong +commit_get_autoinc( +/*===============*/ Alter_inplace_info* ha_alter_info, - bool commit) + ha_innobase_inplace_ctx*ctx, + const TABLE* altered_table, + const TABLE* old_table) { - ha_innobase_inplace_ctx* ctx - = static_cast<ha_innobase_inplace_ctx*> - (ha_alter_info->handler_ctx); - trx_t* trx; - trx_t* fk_trx = NULL; - int err = 0; - bool new_clustered; - dict_table_t* fk_table = NULL; - ulonglong max_autoinc; - - ut_ad(!srv_read_only_mode); + ulonglong max_autoinc; - DBUG_ENTER("commit_inplace_alter_table"); - - DEBUG_SYNC_C("innodb_commit_inplace_alter_table_enter"); - - DEBUG_SYNC_C("innodb_commit_inplace_alter_table_wait"); - - if (!commit) { - /* A rollback is being requested. So far we may at - most have created some indexes. If any indexes were to - be dropped, they would actually be dropped in this - method if commit=true. */ - DBUG_RETURN(rollback_inplace_alter_table( - ha_alter_info, table_share, prebuilt)); - } + DBUG_ENTER("commit_get_autoinc"); if (!altered_table->found_next_number_field) { /* There is no AUTO_INCREMENT column in the table after the ALTER operation. */ max_autoinc = 0; - } else if (ctx && ctx->add_autoinc != ULINT_UNDEFINED) { + } else if (ctx->add_autoinc != ULINT_UNDEFINED) { /* An AUTO_INCREMENT column was added. Get the last value from the sequence, which may be based on a supplied AUTO_INCREMENT value. */ @@ -4556,546 +4600,954 @@ ha_innobase::commit_inplace_alter_table( && (ha_alter_info->create_info->used_fields & HA_CREATE_USED_AUTO)) { /* An AUTO_INCREMENT value was supplied, but the table - was not rebuilt. Get the user-supplied value. */ + was not rebuilt. Get the user-supplied value or the + last value from the sequence. */ + ut_ad(old_table->found_next_number_field); + max_autoinc = ha_alter_info->create_info->auto_increment_value; + + dict_table_autoinc_lock(ctx->old_table); + if (max_autoinc < ctx->old_table->autoinc) { + max_autoinc = ctx->old_table->autoinc; + } + dict_table_autoinc_unlock(ctx->old_table); } else { /* An AUTO_INCREMENT value was not specified. Read the old counter value from the table. */ - ut_ad(table->found_next_number_field); - dict_table_autoinc_lock(prebuilt->table); - max_autoinc = dict_table_autoinc_read(prebuilt->table); - dict_table_autoinc_unlock(prebuilt->table); + ut_ad(old_table->found_next_number_field); + dict_table_autoinc_lock(ctx->old_table); + max_autoinc = ctx->old_table->autoinc; + dict_table_autoinc_unlock(ctx->old_table); } - if (!(ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE)) { - DBUG_ASSERT(!ctx); - /* We may want to update table attributes. */ - goto func_exit; - } + DBUG_RETURN(max_autoinc); +} - trx_start_if_not_started_xa(prebuilt->trx); +/** Add or drop foreign key constraints to the data dictionary tables, +but do not touch the data dictionary cache. +@param ha_alter_info Data used during in-place alter +@param ctx In-place ALTER TABLE context +@param trx Data dictionary transaction +@param table_name Table name in MySQL +@retval true Failure +@retval false Success +*/ +static __attribute__((nonnull, warn_unused_result)) +bool +innobase_update_foreign_try( +/*========================*/ + ha_innobase_inplace_ctx*ctx, + trx_t* trx, + const char* table_name) +{ + ulint foreign_id; + ulint i; - { - /* Exclusively lock the table, to ensure that no other - transaction is holding locks on the table while we - change the table definition. The MySQL meta-data lock - should normally guarantee that no conflicting locks - exist. However, FOREIGN KEY constraints checks and any - transactions collected during crash recovery could be - holding InnoDB locks only, not MySQL locks. */ - dberr_t error = row_merge_lock_table( - prebuilt->trx, prebuilt->table, LOCK_X); + DBUG_ENTER("innobase_update_foreign_try"); + DBUG_ASSERT(ctx); + + foreign_id = dict_table_get_highest_foreign_id(ctx->new_table); + + foreign_id++; + + for (i = 0; i < ctx->num_to_add_fk; i++) { + dict_foreign_t* fk = ctx->add_fk[i]; + + ut_ad(fk->foreign_table == ctx->new_table + || fk->foreign_table == ctx->old_table); + + dberr_t error = dict_create_add_foreign_id( + &foreign_id, ctx->old_table->name, fk); if (error != DB_SUCCESS) { - my_error_innodb(error, table_share->table_name.str, 0); + my_error(ER_TOO_LONG_IDENT, MYF(0), + fk->id); DBUG_RETURN(true); } - DEBUG_SYNC(user_thd, "innodb_alter_commit_after_lock_table"); + if (!fk->foreign_index) { + fk->foreign_index = dict_foreign_find_index( + ctx->new_table, ctx->col_names, + fk->foreign_col_names, + fk->n_fields, fk->referenced_index, TRUE, + fk->type + & (DICT_FOREIGN_ON_DELETE_SET_NULL + | DICT_FOREIGN_ON_UPDATE_SET_NULL)); + if (!fk->foreign_index) { + my_error(ER_FK_INCORRECT_OPTION, + MYF(0), table_name, fk->id); + DBUG_RETURN(true); + } + } + + /* The fk->foreign_col_names[] uses renamed column + names, while the columns in ctx->old_table have not + been renamed yet. */ + error = dict_create_add_foreign_to_dictionary( + ctx->old_table->name, fk, trx); + + DBUG_EXECUTE_IF( + "innodb_test_cannot_add_fk_system", + error = DB_ERROR;); + + if (error != DB_SUCCESS) { + my_error(ER_FK_FAIL_ADD_SYSTEM, MYF(0), + fk->id); + DBUG_RETURN(true); + } } - if (ctx) { - if (ctx->indexed_table != prebuilt->table) { - for (dict_index_t* index = dict_table_get_first_index( - ctx->indexed_table); - index; - index = dict_table_get_next_index(index)) { - DBUG_ASSERT(dict_index_get_online_status(index) - == ONLINE_INDEX_COMPLETE); - DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); - if (dict_index_is_corrupted(index)) { - my_error(ER_INDEX_CORRUPT, MYF(0), - index->name); - DBUG_RETURN(true); - } - } - } else { - for (ulint i = 0; i < ctx->num_to_add; i++) { - dict_index_t* index = ctx->add[i]; - DBUG_ASSERT(dict_index_get_online_status(index) - == ONLINE_INDEX_COMPLETE); - DBUG_ASSERT(*index->name == TEMP_INDEX_PREFIX); - if (dict_index_is_corrupted(index)) { - /* Report a duplicate key - error for the index that was - flagged corrupted, most likely - because a duplicate value was - inserted (directly or by - rollback) after - ha_innobase::inplace_alter_table() - completed. */ - my_error(ER_DUP_UNKNOWN_IN_INDEX, - MYF(0), index->name + 1); - DBUG_RETURN(true); - } - } + for (i = 0; i < ctx->num_to_drop_fk; i++) { + dict_foreign_t* fk = ctx->drop_fk[i]; + + DBUG_ASSERT(fk->foreign_table == ctx->old_table); + + if (innobase_drop_foreign_try(trx, table_name, fk->id)) { + DBUG_RETURN(true); } } - if (!ctx || !ctx->trx) { - /* Create a background transaction for the operations on - the data dictionary tables. */ - trx = innobase_trx_allocate(user_thd); + DBUG_RETURN(false); +} - trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); +/** Update the foreign key constraint definitions in the data dictionary cache +after the changes to data dictionary tables were committed. +@param ctx In-place ALTER TABLE context +@return InnoDB error code (should always be DB_SUCCESS) */ +static __attribute__((nonnull, warn_unused_result)) +dberr_t +innobase_update_foreign_cache( +/*==========================*/ + ha_innobase_inplace_ctx* ctx) +{ + dict_table_t* user_table; + + DBUG_ENTER("innobase_update_foreign_cache"); + + user_table = ctx->old_table; - new_clustered = false; + /* Discard the added foreign keys, because we will + load them from the data dictionary. */ + for (ulint i = 0; i < ctx->num_to_add_fk; i++) { + dict_foreign_t* fk = ctx->add_fk[i]; + dict_foreign_free(fk); + } + + if (ctx->need_rebuild()) { + /* The rebuilt table is already using the renamed + column names. No need to pass col_names or to drop + constraints from the data dictionary cache. */ + DBUG_ASSERT(!ctx->col_names); + DBUG_ASSERT(UT_LIST_GET_LEN(user_table->foreign_list) == 0); + DBUG_ASSERT(UT_LIST_GET_LEN(user_table->referenced_list) == 0); + user_table = ctx->new_table; } else { - trx_dict_op_t op; + /* Drop the foreign key constraints if the + table was not rebuilt. If the table is rebuilt, + there would not be any foreign key contraints for + it yet in the data dictionary cache. */ + for (ulint i = 0; i < ctx->num_to_drop_fk; i++) { + dict_foreign_t* fk = ctx->drop_fk[i]; + dict_foreign_remove_from_cache(fk); + } + } + + /* Load the old or added foreign keys from the data dictionary + and prevent the table from being evicted from the data + dictionary cache (work around the lack of WL#6049). */ + DBUG_RETURN(dict_load_foreigns(user_table->name, + ctx->col_names, false, true, + DICT_ERR_IGNORE_NONE)); +} - trx = ctx->trx; +/** Commit the changes made during prepare_inplace_alter_table() +and inplace_alter_table() inside the data dictionary tables, +when rebuilding the table. +@param ha_alter_info Data used during in-place alter +@param ctx In-place ALTER TABLE context +@param altered_table MySQL table that is being altered +@param old_table MySQL table as it is before the ALTER operation +@param trx Data dictionary transaction +@param table_name Table name in MySQL +@retval true Failure +@retval false Success +*/ +inline __attribute__((nonnull, warn_unused_result)) +bool +commit_try_rebuild( +/*===============*/ + Alter_inplace_info* ha_alter_info, + ha_innobase_inplace_ctx*ctx, + TABLE* altered_table, + const TABLE* old_table, + trx_t* trx, + const char* table_name) +{ + dict_table_t* rebuilt_table = ctx->new_table; + dict_table_t* user_table = ctx->old_table; + + DBUG_ENTER("commit_try_rebuild"); + DBUG_ASSERT(ctx->need_rebuild()); + DBUG_ASSERT(trx->dict_operation_lock_mode == RW_X_LATCH); + DBUG_ASSERT(!(ha_alter_info->handler_flags + & Alter_inplace_info::DROP_FOREIGN_KEY) + || ctx->num_to_drop_fk > 0); + DBUG_ASSERT(ctx->num_to_drop_fk + == ha_alter_info->alter_info->drop_list.elements); + + for (dict_index_t* index = dict_table_get_first_index(rebuilt_table); + index; + index = dict_table_get_next_index(index)) { + DBUG_ASSERT(dict_index_get_online_status(index) + == ONLINE_INDEX_COMPLETE); + DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); + if (dict_index_is_corrupted(index)) { + my_error(ER_INDEX_CORRUPT, MYF(0), + index->name); + DBUG_RETURN(true); + } + } - new_clustered = ctx->indexed_table != prebuilt->table; + if (innobase_update_foreign_try(ctx, trx, table_name)) { + DBUG_RETURN(true); + } - op = (new_clustered) ? TRX_DICT_OP_TABLE : TRX_DICT_OP_INDEX; + dberr_t error; - trx_start_for_ddl(trx, op); + /* Clear the to_be_dropped flag in the data dictionary cache + of user_table. */ + for (ulint i = 0; i < ctx->num_to_drop_index; i++) { + dict_index_t* index = ctx->drop_index[i]; + DBUG_ASSERT(index->table == user_table); + DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); + DBUG_ASSERT(index->to_be_dropped); + index->to_be_dropped = 0; } - if (new_clustered) { - if (prebuilt->table->fts) { - ut_ad(!prebuilt->table->fts->add_wq); - fts_optimize_remove_table(prebuilt->table); - } + /* We copied the table. Any indexes that were requested to be + dropped were not created in the copy of the table. Apply any + last bit of the rebuild log and then rename the tables. */ - if (ctx->indexed_table->fts) { - ut_ad(!ctx->indexed_table->fts->add_wq); - fts_optimize_remove_table(ctx->indexed_table); + if (ctx->online) { + DEBUG_SYNC_C("row_log_table_apply2_before"); + error = row_log_table_apply( + ctx->thr, user_table, altered_table); + ulint err_key = thr_get_trx(ctx->thr)->error_key_num; + + switch (error) { + KEY* dup_key; + case DB_SUCCESS: + break; + case DB_DUPLICATE_KEY: + if (err_key == ULINT_UNDEFINED) { + /* This should be the hidden index on + FTS_DOC_ID. */ + dup_key = NULL; + } else { + DBUG_ASSERT(err_key < + ha_alter_info->key_count); + dup_key = &ha_alter_info + ->key_info_buffer[err_key]; + } + print_keydup_error(altered_table, dup_key, MYF(0)); + DBUG_RETURN(true); + case DB_ONLINE_LOG_TOO_BIG: + my_error(ER_INNODB_ONLINE_LOG_TOO_BIG, MYF(0), + ha_alter_info->key_info_buffer[0].name); + DBUG_RETURN(true); + case DB_INDEX_CORRUPT: + my_error(ER_INDEX_CORRUPT, MYF(0), + (err_key == ULINT_UNDEFINED) + ? FTS_DOC_ID_INDEX_NAME + : ha_alter_info->key_info_buffer[err_key] + .name); + DBUG_RETURN(true); + default: + my_error_innodb(error, table_name, user_table->flags); + DBUG_RETURN(true); } } - /* Latch the InnoDB data dictionary exclusively so that no deadlocks - or lock waits can happen in it during the data dictionary operation. */ - row_mysql_lock_data_dictionary(trx); + if ((ha_alter_info->handler_flags + & Alter_inplace_info::ALTER_COLUMN_NAME) + && innobase_rename_columns_try(ha_alter_info, ctx, old_table, + trx, table_name)) { + DBUG_RETURN(true); + } - /* Wait for background stats processing to stop using the - indexes that we are going to drop (if any). */ - if (ctx) { - dict_stats_wait_bg_to_stop_using_tables( - prebuilt->table, ctx->indexed_table, trx); + DBUG_EXECUTE_IF("ib_ddl_crash_before_rename", DBUG_SUICIDE();); + + /* The new table must inherit the flag from the + "parent" table. */ + if (dict_table_is_discarded(user_table)) { + rebuilt_table->ibd_file_missing = true; + rebuilt_table->flags2 |= DICT_TF2_DISCARDED; } - /* Final phase of add foreign key processing */ - if (ctx && ctx->num_to_add_fk > 0) { - ulint highest_id_so_far; - dberr_t error; + /* We can now rename the old table as a temporary table, + rename the new temporary table as the old table and drop the + old table. First, we only do this in the data dictionary + tables. The actual renaming will be performed in + commit_cache_rebuild(), once the data dictionary transaction + has been successfully committed. */ - /* If it runs concurrently with create index or table - rebuild, we will need a separate trx to do the system - table change, since in the case of failure to rebuild/create - index, it will need to commit the trx that drops the newly - created table/index, while for FK, it needs to rollback - the metadata change */ - if (new_clustered || ctx->num_to_add) { - fk_trx = innobase_trx_allocate(user_thd); + error = row_merge_rename_tables_dict( + user_table, rebuilt_table, ctx->tmp_name, trx); - trx_start_for_ddl(fk_trx, TRX_DICT_OP_INDEX); + /* We must be still holding a table handle. */ + DBUG_ASSERT(user_table->n_ref_count >= 1); - fk_trx->dict_operation_lock_mode = - trx->dict_operation_lock_mode; - } else { - fk_trx = trx; - } + DBUG_EXECUTE_IF("ib_ddl_crash_after_rename", DBUG_SUICIDE();); + DBUG_EXECUTE_IF("ib_rebuild_cannot_rename", error = DB_ERROR;); - ut_ad(ha_alter_info->handler_flags - & Alter_inplace_info::ADD_FOREIGN_KEY); + if (user_table->n_ref_count > 1) { + /* This should only occur when an innodb_memcached + connection with innodb_api_enable_mdl=off was started + before commit_inplace_alter_table() locked the data + dictionary. We must roll back the ALTER TABLE, because + we cannot drop a table while it is being used. */ - highest_id_so_far = dict_table_get_highest_foreign_id( - prebuilt->table); + /* Normally, n_ref_count must be 1, because purge + cannot be executing on this very table as we are + holding dict_operation_lock X-latch. */ - highest_id_so_far++; + error = DB_LOCK_WAIT_TIMEOUT; + } - fk_table = ctx->indexed_table; + switch (error) { + case DB_SUCCESS: + DBUG_RETURN(false); + case DB_TABLESPACE_EXISTS: + ut_a(rebuilt_table->n_ref_count == 1); + my_error(ER_TABLESPACE_EXISTS, MYF(0), ctx->tmp_name); + DBUG_RETURN(true); + case DB_DUPLICATE_KEY: + ut_a(rebuilt_table->n_ref_count == 1); + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), ctx->tmp_name); + DBUG_RETURN(true); + default: + my_error_innodb(error, table_name, user_table->flags); + DBUG_RETURN(true); + } +} - for (ulint i = 0; i < ctx->num_to_add_fk; i++) { +/** Apply the changes made during commit_try_rebuild(), +to the data dictionary cache and the file system. +@param ctx In-place ALTER TABLE context */ +inline __attribute__((nonnull)) +void +commit_cache_rebuild( +/*=================*/ + ha_innobase_inplace_ctx* ctx) +{ + dberr_t error; - /* Get the new dict_table_t */ - if (new_clustered) { - ctx->add_fk[i]->foreign_table - = fk_table; - } + DBUG_ENTER("commit_cache_rebuild"); + DBUG_ASSERT(ctx->need_rebuild()); + DBUG_ASSERT(dict_table_is_discarded(ctx->old_table) + == dict_table_is_discarded(ctx->new_table)); - /* Add Foreign Key info to in-memory metadata */ - UT_LIST_ADD_LAST(foreign_list, - fk_table->foreign_list, - ctx->add_fk[i]); + const char* old_name = mem_heap_strdup( + ctx->heap, ctx->old_table->name); - if (ctx->add_fk[i]->referenced_table) { - UT_LIST_ADD_LAST( - referenced_list, - ctx->add_fk[i]->referenced_table->referenced_list, - ctx->add_fk[i]); - } + /* We already committed and redo logged the renames, + so this must succeed. */ + error = dict_table_rename_in_cache( + ctx->old_table, ctx->tmp_name, FALSE); + ut_a(error == DB_SUCCESS); - if (!ctx->add_fk[i]->foreign_index) { - ctx->add_fk[i]->foreign_index - = dict_foreign_find_index( - fk_table, - ctx->add_fk[i]->foreign_col_names, - ctx->add_fk[i]->n_fields, NULL, - TRUE, FALSE); - - ut_ad(ctx->add_fk[i]->foreign_index); - - if (!innobase_check_fk_option( - ctx->add_fk[i])) { - my_error(ER_FK_INCORRECT_OPTION, - MYF(0), - table_share->table_name.str, - ctx->add_fk[i]->id); - goto undo_add_fk; - } - } + error = dict_table_rename_in_cache( + ctx->new_table, old_name, FALSE); + ut_a(error == DB_SUCCESS); - /* System table change */ - error = dict_create_add_foreign_to_dictionary( - &highest_id_so_far, prebuilt->table, - ctx->add_fk[i], fk_trx); + DBUG_VOID_RETURN; +} - DBUG_EXECUTE_IF( - "innodb_test_cannot_add_fk_system", - error = DB_ERROR;); +/** Commit the changes made during prepare_inplace_alter_table() +and inplace_alter_table() inside the data dictionary tables, +when not rebuilding the table. +@param ha_alter_info Data used during in-place alter +@param ctx In-place ALTER TABLE context +@param old_table MySQL table as it is before the ALTER operation +@param trx Data dictionary transaction +@param table_name Table name in MySQL +@retval true Failure +@retval false Success +*/ +inline __attribute__((nonnull, warn_unused_result)) +bool +commit_try_norebuild( +/*=================*/ + Alter_inplace_info* ha_alter_info, + ha_innobase_inplace_ctx*ctx, + const TABLE* old_table, + trx_t* trx, + const char* table_name) +{ + DBUG_ENTER("commit_try_norebuild"); + DBUG_ASSERT(!ctx->need_rebuild()); + DBUG_ASSERT(trx->dict_operation_lock_mode == RW_X_LATCH); + DBUG_ASSERT(!(ha_alter_info->handler_flags + & Alter_inplace_info::DROP_FOREIGN_KEY) + || ctx->num_to_drop_fk > 0); + DBUG_ASSERT(ctx->num_to_drop_fk + == ha_alter_info->alter_info->drop_list.elements); + + for (ulint i = 0; i < ctx->num_to_add_index; i++) { + dict_index_t* index = ctx->add_index[i]; + DBUG_ASSERT(dict_index_get_online_status(index) + == ONLINE_INDEX_COMPLETE); + DBUG_ASSERT(*index->name == TEMP_INDEX_PREFIX); + if (dict_index_is_corrupted(index)) { + /* Report a duplicate key + error for the index that was + flagged corrupted, most likely + because a duplicate value was + inserted (directly or by + rollback) after + ha_innobase::inplace_alter_table() + completed. + TODO: report this as a corruption + with a detailed reason once + WL#6379 has been implemented. */ + my_error(ER_DUP_UNKNOWN_IN_INDEX, + MYF(0), index->name + 1); + DBUG_RETURN(true); + } + } - if (error != DB_SUCCESS) { - my_error(ER_FK_FAIL_ADD_SYSTEM, MYF(0), - ctx->add_fk[i]->id); - goto undo_add_fk; - } + if (innobase_update_foreign_try(ctx, trx, table_name)) { + DBUG_RETURN(true); + } + + dberr_t error; + + /* We altered the table in place. */ + /* Lose the TEMP_INDEX_PREFIX. */ + for (ulint i = 0; i < ctx->num_to_add_index; i++) { + dict_index_t* index = ctx->add_index[i]; + DBUG_ASSERT(dict_index_get_online_status(index) + == ONLINE_INDEX_COMPLETE); + DBUG_ASSERT(*index->name + == TEMP_INDEX_PREFIX); + error = row_merge_rename_index_to_add( + trx, ctx->new_table->id, index->id); + if (error != DB_SUCCESS) { + sql_print_error( + "InnoDB: rename index to add: %lu\n", + (ulong) error); + DBUG_ASSERT(0); + my_error(ER_INTERNAL_ERROR, MYF(0), + "rename index to add"); + DBUG_RETURN(true); } + } + + /* Drop any indexes that were requested to be dropped. + Rename them to TEMP_INDEX_PREFIX in the data + dictionary first. We do not bother to rename + index->name in the dictionary cache, because the index + is about to be freed after row_merge_drop_indexes_dict(). */ - /* Make sure the tables are moved to non-lru side of - dictionary list */ - error = dict_load_foreigns(prebuilt->table->name, FALSE, TRUE); + for (ulint i = 0; i < ctx->num_to_drop_index; i++) { + dict_index_t* index = ctx->drop_index[i]; + DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); + DBUG_ASSERT(index->table == ctx->new_table); + DBUG_ASSERT(index->to_be_dropped); + error = row_merge_rename_index_to_drop( + trx, index->table->id, index->id); if (error != DB_SUCCESS) { - my_error(ER_CANNOT_ADD_FOREIGN, MYF(0)); + sql_print_error( + "InnoDB: rename index to drop: %lu\n", + (ulong) error); + DBUG_ASSERT(0); + my_error(ER_INTERNAL_ERROR, MYF(0), + "rename index to drop"); + DBUG_RETURN(true); + } + } -undo_add_fk: - err = -1; + if (!(ha_alter_info->handler_flags + & Alter_inplace_info::ALTER_COLUMN_NAME)) { + DBUG_RETURN(false); + } - if (new_clustered) { - goto drop_new_clustered; - } else if (ctx->num_to_add > 0) { - ut_ad(trx != fk_trx); + DBUG_RETURN(innobase_rename_columns_try(ha_alter_info, ctx, + old_table, trx, table_name)); +} - innobase_rollback_sec_index( - prebuilt, table_share, trx); - innobase_undo_add_fk(ctx, fk_table); - trx_rollback_for_mysql(fk_trx); +/** Commit the changes to the data dictionary cache +after a successful commit_try_norebuild() call. +@param ctx In-place ALTER TABLE context +@param table the TABLE before the ALTER +@param trx Data dictionary transaction object +(will be started and committed) +@return whether all replacements were found for dropped indexes */ +inline __attribute__((nonnull, warn_unused_result)) +bool +commit_cache_norebuild( +/*===================*/ + ha_innobase_inplace_ctx*ctx, + const TABLE* table, + trx_t* trx) +{ + DBUG_ENTER("commit_cache_norebuild"); - goto trx_commit; - } else { - goto trx_rollback; - } - } + bool found = true; + + DBUG_ASSERT(!ctx->need_rebuild()); + + for (ulint i = 0; i < ctx->num_to_add_index; i++) { + dict_index_t* index = ctx->add_index[i]; + DBUG_ASSERT(dict_index_get_online_status(index) + == ONLINE_INDEX_COMPLETE); + DBUG_ASSERT(*index->name == TEMP_INDEX_PREFIX); + index->name++; } - if (new_clustered) { - dberr_t error; - char* tmp_name; + if (ctx->num_to_drop_index) { + /* Really drop the indexes that were dropped. + The transaction had to be committed first + (after renaming the indexes), so that in the + event of a crash, crash recovery will drop the + indexes, because it drops all indexes whose + names start with TEMP_INDEX_PREFIX. Once we + have started dropping an index tree, there is + no way to roll it back. */ - /* Clear the to_be_dropped flag in the data dictionary. */ - for (ulint i = 0; i < ctx->num_to_drop; i++) { - dict_index_t* index = ctx->drop[i]; + for (ulint i = 0; i < ctx->num_to_drop_index; i++) { + dict_index_t* index = ctx->drop_index[i]; DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); + DBUG_ASSERT(index->table == ctx->new_table); DBUG_ASSERT(index->to_be_dropped); - index->to_be_dropped = 0; + + /* Replace the indexes in foreign key + constraints if needed. */ + + if (!dict_foreign_replace_index( + index->table, ctx->col_names, index)) { + found = false; + } + + /* Mark the index dropped + in the data dictionary cache. */ + rw_lock_x_lock(dict_index_get_lock(index)); + index->page = FIL_NULL; + rw_lock_x_unlock(dict_index_get_lock(index)); } - /* We copied the table. Any indexes that were - requested to be dropped were not created in the copy - of the table. Apply any last bit of the rebuild log - and then rename the tables. */ + trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); + row_merge_drop_indexes_dict(trx, ctx->new_table->id); - if (ctx->online) { - DEBUG_SYNC_C("row_log_table_apply2_before"); - error = row_log_table_apply( - ctx->thr, prebuilt->table, altered_table); + for (ulint i = 0; i < ctx->num_to_drop_index; i++) { + dict_index_t* index = ctx->drop_index[i]; + DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); + DBUG_ASSERT(index->table == ctx->new_table); - switch (error) { - KEY* dup_key; - case DB_SUCCESS: - break; - case DB_DUPLICATE_KEY: - if (prebuilt->trx->error_key_num - == ULINT_UNDEFINED) { - /* This should be the hidden index on - FTS_DOC_ID. */ - dup_key = NULL; - } else { - DBUG_ASSERT( - prebuilt->trx->error_key_num - < ha_alter_info->key_count); - dup_key = &ha_alter_info - ->key_info_buffer[ - prebuilt->trx - ->error_key_num]; - } - print_keydup_error(altered_table, dup_key, MYF(0)); - break; - case DB_ONLINE_LOG_TOO_BIG: - my_error(ER_INNODB_ONLINE_LOG_TOO_BIG, MYF(0), - ha_alter_info->key_info_buffer[0] - .name); - break; - case DB_INDEX_CORRUPT: - my_error(ER_INDEX_CORRUPT, MYF(0), - (prebuilt->trx->error_key_num - == ULINT_UNDEFINED) - ? FTS_DOC_ID_INDEX_NAME - : ha_alter_info->key_info_buffer[ - prebuilt->trx->error_key_num] - .name); - break; - default: - my_error_innodb(error, - table_share->table_name.str, - prebuilt->table->flags); + if (index->type & DICT_FTS) { + DBUG_ASSERT(index->type == DICT_FTS + || (index->type + & DICT_CORRUPT)); + DBUG_ASSERT(index->table->fts); + fts_drop_index(index->table, index, trx); } - if (error != DB_SUCCESS) { - err = -1; - goto drop_new_clustered; - } + dict_index_remove_from_cache(index->table, index); } - if ((ha_alter_info->handler_flags - & Alter_inplace_info::ALTER_COLUMN_NAME) - && innobase_rename_columns(ha_alter_info, true, table, - table_share, prebuilt, trx)) { - err = -1; - goto drop_new_clustered; - } - - /* A new clustered index was defined for the table - and there was no error at this point. We can - now rename the old table as a temporary table, - rename the new temporary table as the old - table and drop the old table. */ - tmp_name = dict_mem_create_temporary_tablename( - ctx->heap, ctx->indexed_table->name, - ctx->indexed_table->id); - - /* Rename table will reload and refresh the in-memory - foreign key constraint metadata. This is a rename operation - in preparing for dropping the old table. Set the table - to_be_dropped bit here, so to make sure DML foreign key - constraint check does not use the stale dict_foreign_t. - This is done because WL#6049 (FK MDL) has not been - implemented yet */ - prebuilt->table->to_be_dropped = true; - - DBUG_EXECUTE_IF("ib_ddl_crash_before_rename", - DBUG_SUICIDE();); + trx_commit_for_mysql(trx); + } - /* The new table must inherit the flag from the - "parent" table. */ - if (dict_table_is_discarded(prebuilt->table)) { - ctx->indexed_table->ibd_file_missing = true; - ctx->indexed_table->flags2 |= DICT_TF2_DISCARDED; + DBUG_RETURN(found); +} + +/** Adjust the persistent statistics after non-rebuilding ALTER TABLE. +Remove statistics for dropped indexes, add statistics for created indexes +and rename statistics for renamed indexes. +@param ha_alter_info Data used during in-place alter +@param ctx In-place ALTER TABLE context +@param altered_table MySQL table that is being altered +@param table_name Table name in MySQL +@param thd MySQL connection +*/ +static +void +alter_stats_norebuild( +/*==================*/ + Alter_inplace_info* ha_alter_info, + ha_innobase_inplace_ctx* ctx, + TABLE* altered_table, + const char* table_name, + THD* thd) +{ + ulint i; + + DBUG_ENTER("alter_stats_norebuild"); + DBUG_ASSERT(!ctx->need_rebuild()); + + if (!dict_stats_is_persistent_enabled(ctx->new_table)) { + DBUG_VOID_RETURN; + } + + /* TODO: This will not drop the (unused) statistics for + FTS_DOC_ID_INDEX if it was a hidden index, dropped together + with the last renamining FULLTEXT index. */ + for (i = 0; i < ha_alter_info->index_drop_count; i++) { + const KEY* key = ha_alter_info->index_drop_buffer[i]; + + if (key->flags & HA_FULLTEXT) { + /* There are no index cardinality + statistics for FULLTEXT indexes. */ + continue; } - error = row_merge_rename_tables( - prebuilt->table, ctx->indexed_table, - tmp_name, trx); + char errstr[1024]; - DBUG_EXECUTE_IF("ib_ddl_crash_after_rename", - DBUG_SUICIDE();); + if (dict_stats_drop_index( + ctx->new_table->name, key->name, + errstr, sizeof errstr) != DB_SUCCESS) { + push_warning(thd, + Sql_condition::WARN_LEVEL_WARN, + ER_LOCK_WAIT_TIMEOUT, errstr); + } + } - /* n_ref_count must be 1, because purge cannot - be executing on this very table as we are - holding dict_operation_lock X-latch. */ - ut_a(prebuilt->table->n_ref_count == 1); + for (i = 0; i < ctx->num_to_add_index; i++) { + dict_index_t* index = ctx->add_index[i]; + DBUG_ASSERT(index->table == ctx->new_table); - switch (error) { - dict_table_t* old_table; - case DB_SUCCESS: - old_table = prebuilt->table; + if (!(index->type & DICT_FTS)) { + dict_stats_init(ctx->new_table); + dict_stats_update_for_index(index); + } + } - DBUG_EXECUTE_IF("ib_ddl_crash_before_commit", - DBUG_SUICIDE();); + DBUG_VOID_RETURN; +} - trx_commit_for_mysql(prebuilt->trx); +/** Adjust the persistent statistics after rebuilding ALTER TABLE. +Remove statistics for dropped indexes, add statistics for created indexes +and rename statistics for renamed indexes. +@param table InnoDB table that was rebuilt by ALTER TABLE +@param table_name Table name in MySQL +@param thd MySQL connection +*/ +static +void +alter_stats_rebuild( +/*================*/ + dict_table_t* table, + const char* table_name, + THD* thd) +{ + DBUG_ENTER("alter_stats_rebuild"); - DBUG_EXECUTE_IF("ib_ddl_crash_after_commit", - DBUG_SUICIDE();); + if (dict_table_is_discarded(table) + || !dict_stats_is_persistent_enabled(table)) { + DBUG_VOID_RETURN; + } - if (fk_trx) { - ut_ad(fk_trx != trx); - trx_commit_for_mysql(fk_trx); - } + dberr_t ret; - row_prebuilt_free(prebuilt, TRUE); - error = row_merge_drop_table(trx, old_table); - prebuilt = row_create_prebuilt( - ctx->indexed_table, table->s->reclength); - err = 0; - break; - case DB_TABLESPACE_EXISTS: - ut_a(ctx->indexed_table->n_ref_count == 1); - my_error(ER_TABLESPACE_EXISTS, MYF(0), tmp_name); - err = HA_ERR_TABLESPACE_EXISTS; - goto drop_new_clustered; - case DB_DUPLICATE_KEY: - ut_a(ctx->indexed_table->n_ref_count == 1); - my_error(ER_TABLE_EXISTS_ERROR, MYF(0), tmp_name); - err = HA_ERR_TABLE_EXIST; - goto drop_new_clustered; - default: - my_error_innodb(error, - table_share->table_name.str, - prebuilt->table->flags); - err = -1; - -drop_new_clustered: - /* Reset the to_be_dropped bit for the old table, - since we are aborting the operation and dropping - the new table due to some error conditions */ - prebuilt->table->to_be_dropped = false; - - /* Need to drop the added foreign key first */ - if (fk_trx) { - ut_ad(fk_trx != trx); - innobase_undo_add_fk(ctx, fk_table); - trx_rollback_for_mysql(fk_trx); - } + ret = dict_stats_update(table, DICT_STATS_RECALC_PERSISTENT); - dict_table_close(ctx->indexed_table, TRUE, FALSE); + if (ret != DB_SUCCESS) { + push_warning_printf( + thd, + Sql_condition::WARN_LEVEL_WARN, + ER_ALTER_INFO, + "Error updating stats for table '%s' " + "after table rebuild: %s", + table_name, ut_strerr(ret)); + } -#ifdef UNIV_DDL_DEBUG - /* Nobody should have initialized the stats of the - newly created table yet. When this is the case, we - know that it has not been added for background stats - gathering. */ - ut_a(!ctx->indexed_table->stat_initialized); -#endif /* UNIV_DDL_DEBUG */ - - row_merge_drop_table(trx, ctx->indexed_table); - ctx->indexed_table = NULL; - goto trx_commit; - } - } else if (ctx) { - dberr_t error; - - /* We altered the table in place. */ - /* Lose the TEMP_INDEX_PREFIX. */ - for (ulint i = 0; i < ctx->num_to_add; i++) { - dict_index_t* index = ctx->add[i]; - DBUG_ASSERT(dict_index_get_online_status(index) - == ONLINE_INDEX_COMPLETE); - DBUG_ASSERT(*index->name - == TEMP_INDEX_PREFIX); - index->name++; - error = row_merge_rename_index_to_add( - trx, prebuilt->table->id, - index->id); - if (error != DB_SUCCESS) { - sql_print_error( - "InnoDB: rename index to add: %lu\n", - (ulong) error); - DBUG_ASSERT(0); - } + DBUG_VOID_RETURN; +} + +#ifndef DBUG_OFF +# define DBUG_INJECT_CRASH(prefix, count) \ +do { \ + char buf[32]; \ + ut_snprintf(buf, sizeof buf, prefix "_%u", count); \ + DBUG_EXECUTE_IF(buf, DBUG_SUICIDE();); \ +} while (0) +#else +# define DBUG_INJECT_CRASH(prefix, count) +#endif + +/** Commit or rollback the changes made during +prepare_inplace_alter_table() and inplace_alter_table() inside +the storage engine. Note that the allowed level of concurrency +during this operation will be the same as for +inplace_alter_table() and thus might be higher than during +prepare_inplace_alter_table(). (E.g concurrent writes were +blocked during prepare, but might not be during commit). +@param altered_table TABLE object for new version of table. +@param ha_alter_info Structure describing changes to be done +by ALTER TABLE and holding data used during in-place alter. +@param commit true => Commit, false => Rollback. +@retval true Failure +@retval false Success +*/ +UNIV_INTERN +bool +ha_innobase::commit_inplace_alter_table( +/*====================================*/ + TABLE* altered_table, + Alter_inplace_info* ha_alter_info, + bool commit) +{ + ha_innobase_inplace_ctx* ctx0 + = static_cast<ha_innobase_inplace_ctx*> + (ha_alter_info->handler_ctx); +#ifndef DBUG_OFF + uint crash_inject_count = 1; + uint crash_fail_inject_count = 1; + uint failure_inject_count = 1; +#endif + + DBUG_ENTER("commit_inplace_alter_table"); + DBUG_ASSERT(!srv_read_only_mode); + DBUG_ASSERT(!ctx0 || ctx0->prebuilt == prebuilt); + DBUG_ASSERT(!ctx0 || ctx0->old_table == prebuilt->table); + + DEBUG_SYNC_C("innodb_commit_inplace_alter_table_enter"); + + DEBUG_SYNC_C("innodb_commit_inplace_alter_table_wait"); + + if (!commit) { + /* A rollback is being requested. So far we may at + most have created some indexes. If any indexes were to + be dropped, they would actually be dropped in this + method if commit=true. */ + DBUG_RETURN(rollback_inplace_alter_table( + ha_alter_info, table, prebuilt)); + } + + if (!(ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE)) { + DBUG_ASSERT(!ctx0); + MONITOR_ATOMIC_DEC(MONITOR_PENDING_ALTER_TABLE); + DBUG_RETURN(false); + } + + DBUG_ASSERT(ctx0); + + inplace_alter_handler_ctx** ctx_array; + inplace_alter_handler_ctx* ctx_single[2]; + + ctx_single[0] = ctx0; + ctx_single[1] = NULL; + ctx_array = ctx_single; + + DBUG_ASSERT(ctx0 == ctx_array[0]); + ut_ad(prebuilt->table == ctx0->old_table); + + /* Free the ctx->trx of other partitions, if any. We will only + use the ctx0->trx here. Others may have been allocated in + the prepare stage. */ + + for (inplace_alter_handler_ctx** pctx = &ctx_array[1]; *pctx; + pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*>(*pctx); + + if (ctx->trx) { + trx_free_for_mysql(ctx->trx); + ctx->trx = NULL; } + } - /* Drop any indexes that were requested to be dropped. - Rename them to TEMP_INDEX_PREFIX in the data - dictionary first. We do not bother to rename - index->name in the dictionary cache, because the index - is about to be freed after row_merge_drop_indexes_dict(). */ + trx_start_if_not_started_xa(prebuilt->trx); - for (ulint i = 0; i < ctx->num_to_drop; i++) { - dict_index_t* index = ctx->drop[i]; - DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); - DBUG_ASSERT(index->table == prebuilt->table); - DBUG_ASSERT(index->to_be_dropped); + for (inplace_alter_handler_ctx** pctx = ctx_array; *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*>(*pctx); + DBUG_ASSERT(ctx->prebuilt->trx == prebuilt->trx); - error = row_merge_rename_index_to_drop( - trx, index->table->id, index->id); - if (error != DB_SUCCESS) { - sql_print_error( - "InnoDB: rename index to drop: %lu\n", - (ulong) error); - DBUG_ASSERT(0); - } + /* Exclusively lock the table, to ensure that no other + transaction is holding locks on the table while we + change the table definition. The MySQL meta-data lock + should normally guarantee that no conflicting locks + exist. However, FOREIGN KEY constraints checks and any + transactions collected during crash recovery could be + holding InnoDB locks only, not MySQL locks. */ + + dberr_t error = row_merge_lock_table( + prebuilt->trx, ctx->old_table, LOCK_X); + + if (error != DB_SUCCESS) { + my_error_innodb( + error, table_share->table_name.str, 0); + DBUG_RETURN(true); } } - if (err == 0 - && (ha_alter_info->handler_flags - & Alter_inplace_info::DROP_FOREIGN_KEY)) { - DBUG_ASSERT(ctx->num_to_drop_fk > 0); - DBUG_ASSERT(ctx->num_to_drop_fk - == ha_alter_info->alter_info->drop_list.elements); - for (ulint i = 0; i < ctx->num_to_drop_fk; i++) { - DBUG_ASSERT(prebuilt->table - == ctx->drop_fk[i]->foreign_table); + DEBUG_SYNC(user_thd, "innodb_alter_commit_after_lock_table"); + + const bool new_clustered = ctx0->need_rebuild(); + trx_t* trx = ctx0->trx; + bool fail = false; + + if (new_clustered) { + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*>(*pctx); + DBUG_ASSERT(ctx->need_rebuild()); + + if (ctx->old_table->fts) { + ut_ad(!ctx->old_table->fts->add_wq); + fts_optimize_remove_table( + ctx->old_table); + } - if (innobase_drop_foreign( - table_share, trx, ctx->drop_fk[i])) { - err = -1; + if (ctx->new_table->fts) { + ut_ad(!ctx->new_table->fts->add_wq); + fts_optimize_remove_table( + ctx->new_table); } } } - if (err == 0 && !new_clustered - && (ha_alter_info->handler_flags - & Alter_inplace_info::ALTER_COLUMN_NAME) - && innobase_rename_columns(ha_alter_info, false, table, - table_share, prebuilt, trx)) { - err = -1; + if (!trx) { + DBUG_ASSERT(!new_clustered); + trx = innobase_trx_allocate(user_thd); } - if (err == 0) { - if (fk_trx && fk_trx != trx) { - /* This needs to be placed before "trx_commit" marker, - since anyone called "goto trx_commit" has committed - or rolled back fk_trx before jumping here */ - trx_commit_for_mysql(fk_trx); - } -trx_commit: - trx_commit_for_mysql(trx); - } else { -trx_rollback: - /* undo the addition of foreign key */ - if (fk_trx) { - innobase_undo_add_fk(ctx, fk_table); + trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); + /* Latch the InnoDB data dictionary exclusively so that no deadlocks + or lock waits can happen in it during the data dictionary operation. */ + row_mysql_lock_data_dictionary(trx); - if (fk_trx != trx) { - trx_rollback_for_mysql(fk_trx); - } - } + /* Prevent the background statistics collection from accessing + the tables. */ + for (;;) { + bool retry = false; - trx_rollback_for_mysql(trx); + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*>(*pctx); - /* If there are newly added secondary indexes, above - rollback will revert the rename operation and put the - new indexes with the temp index prefix, we can drop - them here */ - if (ctx && !new_clustered) { - ulint i; - - /* Need to drop the in-memory dict_index_t first - to avoid dict_table_check_for_dup_indexes() - assertion in row_merge_drop_indexes() in the case - of add and drop the same index */ - for (i = 0; i < ctx->num_to_add; i++) { - dict_index_t* index = ctx->add[i]; - dict_index_remove_from_cache( - prebuilt->table, index); - } + DBUG_ASSERT(new_clustered == ctx->need_rebuild()); - if (ctx->num_to_add) { - trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); - row_merge_drop_indexes(trx, prebuilt->table, - FALSE); - trx_commit_for_mysql(trx); + if (new_clustered + && !dict_stats_stop_bg(ctx->old_table)) { + retry = true; } - for (i = 0; i < ctx->num_to_drop; i++) { - dict_index_t* index = ctx->drop[i]; - index->to_be_dropped = false; + if (!dict_stats_stop_bg(ctx->new_table)) { + retry = true; } } + + if (!retry) { + break; + } + + DICT_STATS_BG_YIELD(trx); + } + + /* Apply the changes to the data dictionary tables, for all + partitions. */ + + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx && !fail; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*>(*pctx); + + DBUG_ASSERT(new_clustered == ctx->need_rebuild()); + + ctx->max_autoinc = commit_get_autoinc( + ha_alter_info, ctx, altered_table, table); + + if (ctx->need_rebuild()) { + ctx->tmp_name = dict_mem_create_temporary_tablename( + ctx->heap, ctx->new_table->name, + ctx->new_table->id); + + fail = commit_try_rebuild( + ha_alter_info, ctx, altered_table, table, + trx, table_share->table_name.str); + } else { + fail = commit_try_norebuild( + ha_alter_info, ctx, table, trx, + table_share->table_name.str); + } + DBUG_INJECT_CRASH("ib_commit_inplace_crash", + crash_inject_count++); +#ifndef DBUG_OFF + { + /* Generate a dynamic dbug text. */ + char buf[32]; + ut_snprintf(buf, sizeof buf, "ib_commit_inplace_fail_%u", + failure_inject_count++); + DBUG_EXECUTE_IF(buf, + my_error(ER_INTERNAL_ERROR, MYF(0), + "Injected error!"); + fail = true; + ); + } +#endif + } + + /* Commit or roll back the changes to the data dictionary. */ + + if (fail) { + trx_rollback_for_mysql(trx); + } else if (!new_clustered) { + trx_commit_for_mysql(trx); + } else { + mtr_t mtr; + mtr_start(&mtr); + + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*>(*pctx); + + DBUG_ASSERT(ctx->need_rebuild()); + /* Generate the redo log for the file + operations that will be performed in + commit_cache_rebuild(). */ + fil_mtr_rename_log(ctx->old_table->space, + ctx->old_table->name, + ctx->new_table->space, + ctx->new_table->name, + ctx->tmp_name, &mtr); + DBUG_INJECT_CRASH("ib_commit_inplace_crash", + crash_inject_count++); + } + + /* Test what happens on crash if the redo logs + are flushed to disk here. The log records + about the rename should not be committed, and + the data dictionary transaction should be + rolled back, restoring the old table. */ + DBUG_EXECUTE_IF("innodb_alter_commit_crash_before_commit", + log_buffer_flush_to_disk(); + DBUG_SUICIDE();); + ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE)); + ut_ad(!trx->fts_trx); + ut_ad(trx->insert_undo || trx->update_undo); + + /* The following call commits the + mini-transaction, making the data dictionary + transaction committed at mtr.end_lsn. The + transaction becomes 'durable' by the time when + log_buffer_flush_to_disk() returns. In the + logical sense the commit in the file-based + data structures happens here. */ + trx_commit_low(trx, &mtr); + + /* If server crashes here, the dictionary in + InnoDB and MySQL will differ. The .ibd files + and the .frm files must be swapped manually by + the administrator. No loss of data. */ + DBUG_EXECUTE_IF("innodb_alter_commit_crash_after_commit", + log_buffer_flush_to_disk(); + DBUG_SUICIDE();); } /* Flush the log to reduce probability that the .frm files and @@ -5104,236 +5556,319 @@ trx_rollback: log_buffer_flush_to_disk(); - if (new_clustered) { - innobase_online_rebuild_log_free(prebuilt->table); - } + /* At this point, the changes to the persistent storage have + been committed or rolled back. What remains to be done is to + update the in-memory structures, close some handles, release + temporary files, and (unless we rolled back) update persistent + statistics. */ + dberr_t error = DB_SUCCESS; - if (err == 0 && ctx) { - /* The changes were successfully performed. */ - bool add_fts = false; + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*>(*pctx); - /* Rebuild the index translation table. - This should only be needed when !new_clustered. */ - share->idx_trans_tbl.index_count = 0; + DBUG_ASSERT(ctx->need_rebuild() == new_clustered); - /* Publish the created fulltext index, if any. - Note that a fulltext index can be created without - creating the clustered index, if there already exists - a suitable FTS_DOC_ID column. If not, one will be - created, implying new_clustered */ - for (ulint i = 0; i < ctx->num_to_add; i++) { - dict_index_t* index = ctx->add[i]; + if (new_clustered) { + innobase_online_rebuild_log_free(ctx->old_table); + } - if (index->type & DICT_FTS) { - DBUG_ASSERT(index->type == DICT_FTS); - fts_add_index(index, prebuilt->table); - add_fts = true; + if (fail) { + if (new_clustered) { + dict_table_close(ctx->new_table, + TRUE, FALSE); + +#if defined UNIV_DEBUG || defined UNIV_DDL_DEBUG + /* Nobody should have initialized the + stats of the newly created table + yet. When this is the case, we know + that it has not been added for + background stats gathering. */ + ut_a(!ctx->new_table->stat_initialized); +#endif /* UNIV_DEBUG || UNIV_DDL_DEBUG */ + + trx_start_for_ddl(trx, TRX_DICT_OP_TABLE); + row_merge_drop_table(trx, ctx->new_table); + trx_commit_for_mysql(trx); + ctx->new_table = NULL; + } else { + /* We failed, but did not rebuild the table. + Roll back any ADD INDEX, or get rid of garbage + ADD INDEX that was left over from a previous + ALTER TABLE statement. */ + trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); + innobase_rollback_sec_index( + ctx->new_table, table, TRUE, trx); + trx_commit_for_mysql(trx); } - } + DBUG_INJECT_CRASH("ib_commit_inplace_crash_fail", + crash_fail_inject_count++); - if (!new_clustered && ha_alter_info->index_drop_count) { + continue; + } - /* Really drop the indexes that were dropped. - The transaction had to be committed first - (after renaming the indexes), so that in the - event of a crash, crash recovery will drop the - indexes, because it drops all indexes whose - names start with TEMP_INDEX_PREFIX. Once we - have started dropping an index tree, there is - no way to roll it back. */ + innobase_copy_frm_flags_from_table_share( + ctx->new_table, altered_table->s); - trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); + if (new_clustered) { + /* We will reload and refresh the + in-memory foreign key constraint + metadata. This is a rename operation + in preparing for dropping the old + table. Set the table to_be_dropped bit + here, so to make sure DML foreign key + constraint check does not use the + stale dict_foreign_t. This is done + because WL#6049 (FK MDL) has not been + implemented yet. */ + ctx->old_table->to_be_dropped = true; - for (ulint i = 0; i < ctx->num_to_drop; i++) { - dict_index_t* index = ctx->drop[i]; - DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); - DBUG_ASSERT(index->table == prebuilt->table); - DBUG_ASSERT(index->to_be_dropped); + /* Rename the tablespace files. */ + commit_cache_rebuild(ctx); - /* Replace the indexes in foreign key - constraints if needed. */ + error = innobase_update_foreign_cache(ctx); + if (error != DB_SUCCESS) { + goto foreign_fail; + } + } else { + error = innobase_update_foreign_cache(ctx); - dict_foreign_replace_index( - prebuilt->table, index, prebuilt->trx); + if (error != DB_SUCCESS) { +foreign_fail: + /* The data dictionary cache + should be corrupted now. The + best solution should be to + kill and restart the server, + but the *.frm file has not + been replaced yet. */ + my_error(ER_CANNOT_ADD_FOREIGN, + MYF(0)); + sql_print_error( + "InnoDB: dict_load_foreigns()" + " returned %u for %s", + (unsigned) error, + thd_query_string(user_thd) + ->str); + ut_ad(0); + } else { + if (!commit_cache_norebuild( + ctx, table, trx)) { + ut_a(!prebuilt->trx->check_foreigns); + } - /* Mark the index dropped - in the data dictionary cache. */ - rw_lock_x_lock(dict_index_get_lock(index)); - index->page = FIL_NULL; - rw_lock_x_unlock(dict_index_get_lock(index)); + innobase_rename_columns_cache( + ha_alter_info, table, + ctx->new_table); } + } + DBUG_INJECT_CRASH("ib_commit_inplace_crash", + crash_inject_count++); + } - row_merge_drop_indexes_dict(trx, prebuilt->table->id); + /* Invalidate the index translation table. In partitioned + tables, there is one TABLE_SHARE (and also only one TABLE) + covering all partitions. */ + share->idx_trans_tbl.index_count = 0; - for (ulint i = 0; i < ctx->num_to_drop; i++) { - dict_index_t* index = ctx->drop[i]; - DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); - DBUG_ASSERT(index->table == prebuilt->table); - - if (index->type & DICT_FTS) { - DBUG_ASSERT(index->type == DICT_FTS - || (index->type - & DICT_CORRUPT)); - DBUG_ASSERT(prebuilt->table->fts); - fts_drop_index( - prebuilt->table, index, trx); - } + if (trx == ctx0->trx) { + ctx0->trx = NULL; + } - dict_index_remove_from_cache( - prebuilt->table, index); - } + /* Tell the InnoDB server that there might be work for + utility threads: */ - trx_commit_for_mysql(trx); - } + srv_active_wake_master_thread(); - ut_d(dict_table_check_for_dup_indexes( - prebuilt->table, CHECK_ALL_COMPLETE)); - DBUG_ASSERT(new_clustered == !prebuilt->trx); + if (fail) { + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*> + (*pctx); + DBUG_ASSERT(ctx->need_rebuild() == new_clustered); - if (add_fts) { - fts_optimize_add_table(prebuilt->table); + ut_d(dict_table_check_for_dup_indexes( + ctx->old_table, + CHECK_ABORTED_OK)); + ut_a(fts_check_cached_index(ctx->old_table)); + DBUG_INJECT_CRASH("ib_commit_inplace_crash_fail", + crash_fail_inject_count++); } + + row_mysql_unlock_data_dictionary(trx); + trx_free_for_mysql(trx); + DBUG_RETURN(true); } - if (!prebuilt->trx) { - /* We created a new clustered index and committed the - user transaction already, so that we were able to - drop the old table. */ - update_thd(); - prebuilt->trx->will_lock++; + /* Release the table locks. */ + trx_commit_for_mysql(prebuilt->trx); - DBUG_EXECUTE_IF("ib_ddl_crash_after_user_trx_commit", - DBUG_SUICIDE();); + DBUG_EXECUTE_IF("ib_ddl_crash_after_user_trx_commit", DBUG_SUICIDE();); - trx_start_if_not_started_xa(prebuilt->trx); - } + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*> + (*pctx); + DBUG_ASSERT(ctx->need_rebuild() == new_clustered); - ut_d(dict_table_check_for_dup_indexes( - prebuilt->table, CHECK_ABORTED_OK)); - ut_a(fts_check_cached_index(prebuilt->table)); - row_mysql_unlock_data_dictionary(trx); - if (fk_trx && fk_trx != trx) { - fk_trx->dict_operation_lock_mode = 0; - trx_free_for_mysql(fk_trx); - } - trx_free_for_mysql(trx); + if (altered_table->found_next_number_field) { + dict_table_t* t = ctx->new_table; - if (ctx && trx == ctx->trx) { - ctx->trx = NULL; - } + dict_table_autoinc_lock(t); + dict_table_autoinc_initialize(t, ctx->max_autoinc); + dict_table_autoinc_unlock(t); + } - if (err == 0) { - /* Delete corresponding rows from the stats table. We update - the statistics in a separate transaction from trx, because - lock waits are not allowed in a data dictionary transaction. - (Lock waits are possible on the statistics table, because it - is directly accessible by users, not covered by the - dict_operation_lock.) + bool add_fts = false; - Because the data dictionary changes were already committed, - orphaned rows may be left in the statistics table if the - system crashes. */ + /* Publish the created fulltext index, if any. + Note that a fulltext index can be created without + creating the clustered index, if there already exists + a suitable FTS_DOC_ID column. If not, one will be + created, implying new_clustered */ + for (ulint i = 0; i < ctx->num_to_add_index; i++) { + dict_index_t* index = ctx->add_index[i]; - for (uint i = 0; i < ha_alter_info->index_drop_count; i++) { - const KEY* key - = ha_alter_info->index_drop_buffer[i]; - dberr_t ret; - char errstr[1024]; - - ret = dict_stats_drop_index( - prebuilt->table->name, key->name, - errstr, sizeof(errstr)); - - if (ret != DB_SUCCESS) { - push_warning(user_thd, - Sql_condition::WARN_LEVEL_WARN, - ER_LOCK_WAIT_TIMEOUT, - errstr); + if (index->type & DICT_FTS) { + DBUG_ASSERT(index->type == DICT_FTS); + /* We reset DICT_TF2_FTS here because the bit + is left unset when a drop proceeds the add. */ + DICT_TF2_FLAG_SET(ctx->new_table, DICT_TF2_FTS); + fts_add_index(index, ctx->new_table); + add_fts = true; } } - if (ctx && !dict_table_is_discarded(prebuilt->table)) { - bool stats_init_called = false; + ut_d(dict_table_check_for_dup_indexes( + ctx->new_table, CHECK_ALL_COMPLETE)); - for (uint i = 0; i < ctx->num_to_add; i++) { - dict_index_t* index = ctx->add[i]; + if (add_fts) { + fts_optimize_add_table(ctx->new_table); + } - if (!(index->type & DICT_FTS)) { + ut_d(dict_table_check_for_dup_indexes( + ctx->new_table, CHECK_ABORTED_OK)); + ut_a(fts_check_cached_index(ctx->new_table)); - if (!stats_init_called) { - innobase_copy_frm_flags_from_table_share( - index->table, - altered_table->s); + if (new_clustered) { + /* Since the table has been rebuilt, we remove + all persistent statistics corresponding to the + old copy of the table (which was renamed to + ctx->tmp_name). */ - dict_stats_init(index->table); + char errstr[1024]; - stats_init_called = true; - } + DBUG_ASSERT(0 == strcmp(ctx->old_table->name, + ctx->tmp_name)); - dict_stats_update_for_index(index); - } + if (dict_stats_drop_table( + ctx->new_table->name, + errstr, sizeof(errstr)) + != DB_SUCCESS) { + push_warning_printf( + user_thd, + Sql_condition::WARN_LEVEL_WARN, + ER_ALTER_INFO, + "Deleting persistent statistics" + " for rebuilt table '%s' in" + " InnoDB failed: %s", + table->s->table_name.str, + errstr); } - } - } - trx_commit_for_mysql(prebuilt->trx); + DBUG_EXECUTE_IF("ib_ddl_crash_before_commit", + DBUG_SUICIDE();); - /* Flush the log to reduce probability that the .frm files and - the InnoDB data dictionary get out-of-sync if the user runs - with innodb_flush_log_at_trx_commit = 0 */ + trx_t* const user_trx = prebuilt->trx; - log_buffer_flush_to_disk(); + row_prebuilt_free(ctx->prebuilt, TRUE); - /* Tell the InnoDB server that there might be work for - utility threads: */ + /* Drop the copy of the old table, which was + renamed to ctx->tmp_name at the atomic DDL + transaction commit. If the system crashes + before this is completed, some orphan tables + with ctx->tmp_name may be recovered. */ + trx_start_for_ddl(trx, TRX_DICT_OP_TABLE); + row_merge_drop_table(trx, ctx->old_table); + trx_commit_for_mysql(trx); - srv_active_wake_master_thread(); + /* Rebuild the prebuilt object. */ + ctx->prebuilt = row_create_prebuilt( + ctx->new_table, altered_table->s->reclength); + trx_start_if_not_started(user_trx); + user_trx->will_lock++; + prebuilt->trx = user_trx; + } + DBUG_INJECT_CRASH("ib_commit_inplace_crash", + crash_inject_count++); + } -func_exit: + row_mysql_unlock_data_dictionary(trx); + trx_free_for_mysql(trx); + + /* TODO: The following code could be executed + while allowing concurrent access to the table + (MDL downgrade). */ - if (err == 0 && altered_table->found_next_number_field != 0) { - dict_table_autoinc_lock(prebuilt->table); - dict_table_autoinc_initialize(prebuilt->table, max_autoinc); - dict_table_autoinc_unlock(prebuilt->table); + if (new_clustered) { + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*> + (*pctx); + DBUG_ASSERT(ctx->need_rebuild()); + + alter_stats_rebuild( + ctx->new_table, table->s->table_name.str, + user_thd); + DBUG_INJECT_CRASH("ib_commit_inplace_crash", + crash_inject_count++); + } + } else { + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast<ha_innobase_inplace_ctx*> + (*pctx); + DBUG_ASSERT(!ctx->need_rebuild()); + + alter_stats_norebuild( + ha_alter_info, ctx, altered_table, + table->s->table_name.str, user_thd); + DBUG_INJECT_CRASH("ib_commit_inplace_crash", + crash_inject_count++); + } } + /* TODO: Also perform DROP TABLE and DROP INDEX after + the MDL downgrade. */ + #ifndef DBUG_OFF dict_index_t* clust_index = dict_table_get_first_index( prebuilt->table); DBUG_ASSERT(!clust_index->online_log); DBUG_ASSERT(dict_index_get_online_status(clust_index) == ONLINE_INDEX_COMPLETE); -#endif /* !DBUG_OFF */ -#ifdef UNIV_DEBUG for (dict_index_t* index = dict_table_get_first_index( prebuilt->table); index; index = dict_table_get_next_index(index)) { - ut_ad(!index->to_be_dropped); - } -#endif /* UNIV_DEBUG */ - - if (err == 0) { - MONITOR_ATOMIC_DEC(MONITOR_PENDING_ALTER_TABLE); - -#ifdef UNIV_DDL_DEBUG - /* Invoke CHECK TABLE atomically after a successful - ALTER TABLE. */ - TABLE* old_table = table; - table = altered_table; - ut_a(check(user_thd, 0) == HA_ADMIN_OK); - table = old_table; -#endif /* UNIV_DDL_DEBUG */ + DBUG_ASSERT(!index->to_be_dropped); } +#endif /* DBUG_OFF */ - DBUG_RETURN(err != 0); + MONITOR_ATOMIC_DEC(MONITOR_PENDING_ALTER_TABLE); + DBUG_RETURN(false); } /** @param thd - the session @param start_value - the lower bound @param max_value - the upper bound (inclusive) */ +UNIV_INTERN ib_sequence_t::ib_sequence_t( THD* thd, ulonglong start_value, @@ -5370,6 +5905,7 @@ ib_sequence_t::ib_sequence_t( /** Postfix increment @return the next value to insert */ +UNIV_INTERN ulonglong ib_sequence_t::operator++(int) UNIV_NOTHROW { diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index 9a95e620af7..bd999177806 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2013, 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 @@ -24,7 +24,7 @@ Created July 18, 2007 Vasil Dimov *******************************************************/ #include <mysqld_error.h> -#include <sql_acl.h> // PROCESS_ACL +#include <sql_acl.h> #include <m_ctype.h> #include <hash.h> @@ -35,18 +35,19 @@ Created July 18, 2007 Vasil Dimov #include <sql_plugin.h> #include <innodb_priv.h> -#include "btr0pcur.h" /* for file sys_tables related info. */ +#include "btr0pcur.h" #include "btr0types.h" -#include "buf0buddy.h" /* for i_s_cmpmem */ -#include "buf0buf.h" /* for buf_pool */ -#include "dict0dict.h" /* for dict_table_stats_lock() */ -#include "dict0load.h" /* for file sys_tables related info. */ +#include "dict0dict.h" +#include "dict0load.h" +#include "buf0buddy.h" +#include "buf0buf.h" +#include "ibuf0ibuf.h" #include "dict0mem.h" #include "dict0types.h" -#include "ha_prototypes.h" /* for innobase_convert_name() */ -#include "srv0start.h" /* for srv_was_started */ +#include "ha_prototypes.h" +#include "srv0start.h" #include "trx0i_s.h" -#include "trx0trx.h" /* for TRX_QUE_STATE_STR_MAX_LEN */ +#include "trx0trx.h" #include "srv0mon.h" #include "fut0fut.h" #include "pars0pars.h" @@ -64,8 +65,12 @@ struct buf_page_desc_t{ ulint type_value; /*!< Page type or page state */ }; -/** Any states greater than FIL_PAGE_TYPE_LAST would be treated as unknown. */ -#define I_S_PAGE_TYPE_UNKNOWN (FIL_PAGE_TYPE_LAST + 1) +/** Change buffer B-tree page */ +#define I_S_PAGE_TYPE_IBUF (FIL_PAGE_TYPE_LAST + 1) + +/** Any states greater than I_S_PAGE_TYPE_IBUF would be treated as +unknown. */ +#define I_S_PAGE_TYPE_UNKNOWN (I_S_PAGE_TYPE_IBUF + 1) /** We also define I_S_PAGE_TYPE_INDEX as the Index Page's position in i_s_page_type[] array */ @@ -86,6 +91,7 @@ static buf_page_desc_t i_s_page_type[] = { {"BLOB", FIL_PAGE_TYPE_BLOB}, {"COMPRESSED_BLOB", FIL_PAGE_TYPE_ZBLOB}, {"COMPRESSED_BLOB2", FIL_PAGE_TYPE_ZBLOB2}, + {"IBUF_INDEX", I_S_PAGE_TYPE_IBUF}, {"UNKNOWN", I_S_PAGE_TYPE_UNKNOWN} }; @@ -2900,8 +2906,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_default_stopword = }; /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_DELETED -INFORMATION_SCHEMA.INNODB_FT_BEING_DELETED and -INFORMATION_SCHEMA.INNODB_FT_INSERTED */ +INFORMATION_SCHEMA.INNODB_FT_BEING_DELETED */ static ST_FIELD_INFO i_s_fts_doc_fields_info[] = { #define I_S_FTS_DOC_ID 0 @@ -3151,139 +3156,6 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_being_deleted = STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE), }; -/*******************************************************************//** -Fill the dynamic table INFORMATION_SCHEMA.INNODB_FT_INSERTED. -@return 0 on success, 1 on failure */ -static -int -i_s_fts_inserted_fill( -/*==================*/ - THD* thd, /*!< in: thread */ - TABLE_LIST* tables, /*!< in/out: tables to fill */ - Item* ) /*!< in: condition (ignored) */ -{ - Field** fields; - TABLE* table = (TABLE*) tables->table; - trx_t* trx; - fts_table_t fts_table; - fts_doc_ids_t* inserted; - dict_table_t* user_table; - - DBUG_ENTER("i_s_fts_inserted_fill"); - - /* deny access to non-superusers */ - if (check_global_access(thd, PROCESS_ACL)) { - DBUG_RETURN(0); - } - - if (!fts_internal_tbl_name) { - DBUG_RETURN(0); - } - - user_table = dict_table_open_on_name( - fts_internal_tbl_name, FALSE, FALSE, DICT_ERR_IGNORE_NONE); - - if (!user_table) { - DBUG_RETURN(0); - } - - inserted = fts_doc_ids_create(); - - trx = trx_allocate_for_background(); - trx->op_info = "Select for FTS ADDED Table"; - - FTS_INIT_FTS_TABLE(&fts_table, "ADDED", FTS_COMMON_TABLE, user_table); - - fts_table_fetch_doc_ids(trx, &fts_table, inserted); - - fields = table->field; - - for (ulint j = 0; j < ib_vector_size(inserted->doc_ids); ++j) { - doc_id_t doc_id; - - doc_id = *(doc_id_t*) ib_vector_get_const(inserted->doc_ids, j); - - OK(fields[I_S_FTS_DOC_ID]->store((longlong) doc_id, true)); - - OK(schema_table_store_record(thd, table)); - } - - trx_free_for_background(trx); - - fts_doc_ids_free(inserted); - - dict_table_close(user_table, FALSE, FALSE); - - DBUG_RETURN(0); -} - -/*******************************************************************//** -Bind the dynamic table INFORMATION_SCHEMA.INNODB_FT_INSERTED -@return 0 on success */ -static -int -i_s_fts_inserted_init( -/*==================*/ - void* p) /*!< in/out: table schema object */ -{ - DBUG_ENTER("i_s_fts_inserted_init"); - ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p; - - schema->fields_info = i_s_fts_doc_fields_info; - schema->fill_table = i_s_fts_inserted_fill; - - DBUG_RETURN(0); -} - -UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_inserted = -{ - /* the plugin type (a MYSQL_XXX_PLUGIN value) */ - /* int */ - STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN), - - /* pointer to type-specific plugin descriptor */ - /* void* */ - STRUCT_FLD(info, &i_s_info), - - /* plugin name */ - /* const char* */ - STRUCT_FLD(name, "INNODB_FT_INSERTED"), - - /* plugin author (for SHOW PLUGINS) */ - /* const char* */ - STRUCT_FLD(author, plugin_author), - - /* general descriptive text (for SHOW PLUGINS) */ - /* const char* */ - STRUCT_FLD(descr, "INNODB AUXILIARY FTS INSERTED TABLE"), - - /* the plugin license (PLUGIN_LICENSE_XXX) */ - /* int */ - STRUCT_FLD(license, PLUGIN_LICENSE_GPL), - - /* the function to invoke when plugin is loaded */ - /* int (*)(void*); */ - STRUCT_FLD(init, i_s_fts_inserted_init), - - /* the function to invoke when plugin is unloaded */ - /* int (*)(void*); */ - STRUCT_FLD(deinit, i_s_common_deinit), - - /* plugin version (for SHOW PLUGINS) */ - /* unsigned int */ - STRUCT_FLD(version, INNODB_VERSION_SHORT), - - /* struct st_mysql_show_var* */ - STRUCT_FLD(status_vars, NULL), - - /* struct st_mysql_sys_var** */ - STRUCT_FLD(system_vars, NULL), - - /* Maria extension */ - STRUCT_FLD(version_info, INNODB_VERSION_STR), - STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE), -}; - /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHED and INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE */ static ST_FIELD_INFO i_s_fts_index_fields_info[] = @@ -3359,12 +3231,22 @@ i_s_fts_index_cache_fill_one_index( { TABLE* table = (TABLE*) tables->table; Field** fields; + CHARSET_INFO* index_charset; const ib_rbt_node_t* rbt_node; + fts_string_t conv_str; + uint dummy_errors; + char* word_str; DBUG_ENTER("i_s_fts_index_cache_fill_one_index"); fields = table->field; + index_charset = index_cache->charset; + conv_str.f_len = system_charset_info->mbmaxlen + * FTS_MAX_WORD_LEN_IN_CHAR; + conv_str.f_str = static_cast<byte*>(ut_malloc(conv_str.f_len)); + conv_str.f_n_char = 0; + /* Go through each word in the index cache */ for (rbt_node = rbt_first(index_cache->words); rbt_node; @@ -3375,6 +3257,20 @@ i_s_fts_index_cache_fill_one_index( word = rbt_value(fts_tokenizer_word_t, rbt_node); + /* Convert word from index charset to system_charset_info */ + if (index_charset->cset != system_charset_info->cset) { + conv_str.f_n_char = my_convert( + reinterpret_cast<char*>(conv_str.f_str), + conv_str.f_len, system_charset_info, + reinterpret_cast<char*>(word->text.f_str), + word->text.f_len, index_charset, &dummy_errors); + ut_ad(conv_str.f_n_char <= conv_str.f_len); + conv_str.f_str[conv_str.f_n_char] = 0; + word_str = reinterpret_cast<char*>(conv_str.f_str); + } else { + word_str = reinterpret_cast<char*>(word->text.f_str); + } + /* Decrypt the ilist, and display Dod ID and word position */ for (ulint i = 0; i < ib_vector_size(word->nodes); i++) { fts_node_t* node; @@ -3397,8 +3293,7 @@ i_s_fts_index_cache_fill_one_index( OK(field_store_string( fields[I_S_FTS_WORD], - reinterpret_cast<const char*> - (word->text.f_str))); + word_str)); OK(fields[I_S_FTS_FIRST_DOC_ID]->store( (longlong) node->first_doc_id, @@ -3428,6 +3323,8 @@ i_s_fts_index_cache_fill_one_index( } } + ut_free(conv_str.f_str); + DBUG_RETURN(0); } /*******************************************************************//** @@ -3552,31 +3449,38 @@ Go through a FTS index auxiliary table, fetch its rows and fill FTS word cache structure. @return DB_SUCCESS on success, otherwise error code */ static -ulint +dberr_t i_s_fts_index_table_fill_selected( /*==============================*/ dict_index_t* index, /*!< in: FTS index */ ib_vector_t* words, /*!< in/out: vector to hold fetched words */ - ulint selected) /*!< in: selected FTS index */ + ulint selected, /*!< in: selected FTS index */ + fts_string_t* word) /*!< in: word to select */ { pars_info_t* info; fts_table_t fts_table; trx_t* trx; que_t* graph; - ulint error; + dberr_t error; fts_fetch_t fetch; info = pars_info_create(); fetch.read_arg = words; fetch.read_record = fts_optimize_index_fetch_node; + fetch.total_memory = 0; + + DBUG_EXECUTE_IF("fts_instrument_result_cache_limit", + fts_result_cache_limit = 8192; + ); trx = trx_allocate_for_background(); trx->op_info = "fetching FTS index nodes"; pars_info_bind_function(info, "my_func", fetch.read_record, &fetch); + pars_info_bind_varchar_literal(info, "word", word->f_str, word->f_len); FTS_INIT_INDEX_TABLE(&fts_table, fts_get_suffix(selected), FTS_INDEX_TABLE, index); @@ -3587,7 +3491,7 @@ i_s_fts_index_table_fill_selected( "DECLARE CURSOR c IS" " SELECT word, doc_count, first_doc_id, last_doc_id, " "ilist\n" - " FROM %s;\n" + " FROM %s WHERE word >= :word;\n" "BEGIN\n" "\n" "OPEN c;\n" @@ -3618,7 +3522,7 @@ i_s_fts_index_table_fill_selected( trx->error_state = DB_SUCCESS; } else { - fprintf(stderr, " InnoDB: Error: %lu " + fprintf(stderr, " InnoDB: Error: %d " "while reading FTS index.\n", error); break; } @@ -3631,54 +3535,94 @@ i_s_fts_index_table_fill_selected( trx_free_for_background(trx); + if (fetch.total_memory >= fts_result_cache_limit) { + error = DB_FTS_EXCEED_RESULT_CACHE_LIMIT; + } + return(error); } /*******************************************************************//** -Go through a FTS index and its auxiliary tables, fetch rows in each table -and fill INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE. +Free words. */ +static +void +i_s_fts_index_table_free_one_fetch( +/*===============================*/ + ib_vector_t* words) /*!< in: words fetched */ +{ + for (ulint i = 0; i < ib_vector_size(words); i++) { + fts_word_t* word; + + word = static_cast<fts_word_t*>(ib_vector_get(words, i)); + + for (ulint j = 0; j < ib_vector_size(word->nodes); j++) { + fts_node_t* node; + + node = static_cast<fts_node_t*> (ib_vector_get( + word->nodes, j)); + ut_free(node->ilist); + } + + fts_word_free(word); + } + + ib_vector_reset(words); +} + +/*******************************************************************//** +Go through words, fill INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE. @return 0 on success, 1 on failure */ static int -i_s_fts_index_table_fill_one_index( +i_s_fts_index_table_fill_one_fetch( /*===============================*/ - dict_index_t* index, /*!< in: FTS index */ + CHARSET_INFO* index_charset, /*!< in: FTS index charset */ THD* thd, /*!< in: thread */ - TABLE_LIST* tables) /*!< in/out: tables to fill */ + TABLE_LIST* tables, /*!< in/out: tables to fill */ + ib_vector_t* words, /*!< in: words fetched */ + fts_string_t* conv_str, /*!< in: string for conversion*/ + bool has_more) /*!< in: has more to fetch */ { TABLE* table = (TABLE*) tables->table; Field** fields; - ib_vector_t* words; - mem_heap_t* heap; - ulint num_row_fill; - - DBUG_ENTER("i_s_fts_index_cache_fill_one_index"); - DBUG_ASSERT(!dict_index_is_online_ddl(index)); + uint dummy_errors; + char* word_str; + ulint words_size; + int ret = 0; - heap = mem_heap_create(1024); - - words = ib_vector_create(ib_heap_allocator_create(heap), - sizeof(fts_word_t), 256); + DBUG_ENTER("i_s_fts_index_table_fill_one_fetch"); fields = table->field; - /* Iterate through each auxiliary table as described in - fts_index_selector */ - for (ulint selected = 0; fts_index_selector[selected].value; - selected++) { - i_s_fts_index_table_fill_selected(index, words, selected); + words_size = ib_vector_size(words); + if (has_more) { + /* the last word is not fetched completely. */ + ut_ad(words_size > 1); + words_size -= 1; } - num_row_fill = ut_min(ib_vector_size(words), 500000); - /* Go through each word in the index cache */ - for (ulint i = 0; i < num_row_fill; i++) { + for (ulint i = 0; i < words_size; i++) { fts_word_t* word; - word = (fts_word_t*) ib_vector_get(words, i); + word = static_cast<fts_word_t*>(ib_vector_get(words, i)); word->text.f_str[word->text.f_len] = 0; + /* Convert word from index charset to system_charset_info */ + if (index_charset->cset != system_charset_info->cset) { + conv_str->f_n_char = my_convert( + reinterpret_cast<char*>(conv_str->f_str), + conv_str->f_len, system_charset_info, + reinterpret_cast<char*>(word->text.f_str), + word->text.f_len, index_charset, &dummy_errors); + ut_ad(conv_str->f_n_char <= conv_str->f_len); + conv_str->f_str[conv_str->f_n_char] = 0; + word_str = reinterpret_cast<char*>(conv_str->f_str); + } else { + word_str = reinterpret_cast<char*>(word->text.f_str); + } + /* Decrypt the ilist, and display Dod ID and word position */ for (ulint i = 0; i < ib_vector_size(word->nodes); i++) { fts_node_t* node; @@ -3702,8 +3646,7 @@ i_s_fts_index_table_fill_one_index( OK(field_store_string( fields[I_S_FTS_WORD], - reinterpret_cast<const char*> - (word->text.f_str))); + word_str)); OK(fields[I_S_FTS_FIRST_DOC_ID]->store( (longlong) node->first_doc_id, @@ -3733,9 +3676,95 @@ i_s_fts_index_table_fill_one_index( } } + i_s_fts_index_table_free_one_fetch(words); + + DBUG_RETURN(ret); +} + +/*******************************************************************//** +Go through a FTS index and its auxiliary tables, fetch rows in each table +and fill INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE. +@return 0 on success, 1 on failure */ +static +int +i_s_fts_index_table_fill_one_index( +/*===============================*/ + dict_index_t* index, /*!< in: FTS index */ + THD* thd, /*!< in: thread */ + TABLE_LIST* tables) /*!< in/out: tables to fill */ +{ + ib_vector_t* words; + mem_heap_t* heap; + fts_string_t word; + CHARSET_INFO* index_charset; + fts_string_t conv_str; + dberr_t error; + int ret = 0; + + DBUG_ENTER("i_s_fts_index_table_fill_one_index"); + DBUG_ASSERT(!dict_index_is_online_ddl(index)); + + heap = mem_heap_create(1024); + + words = ib_vector_create(ib_heap_allocator_create(heap), + sizeof(fts_word_t), 256); + + word.f_str = NULL; + word.f_len = 0; + word.f_n_char = 0; + + index_charset = fts_index_get_charset(index); + conv_str.f_len = system_charset_info->mbmaxlen + * FTS_MAX_WORD_LEN_IN_CHAR; + conv_str.f_str = static_cast<byte*>(ut_malloc(conv_str.f_len)); + conv_str.f_n_char = 0; + + /* Iterate through each auxiliary table as described in + fts_index_selector */ + for (ulint selected = 0; fts_index_selector[selected].value; + selected++) { + bool has_more = false; + + do { + /* Fetch from index */ + error = i_s_fts_index_table_fill_selected( + index, words, selected, &word); + + if (error == DB_SUCCESS) { + has_more = false; + } else if (error == DB_FTS_EXCEED_RESULT_CACHE_LIMIT) { + has_more = true; + } else { + i_s_fts_index_table_free_one_fetch(words); + ret = 1; + goto func_exit; + } + + if (has_more) { + fts_word_t* last_word; + + /* Prepare start point for next fetch */ + last_word = static_cast<fts_word_t*>(ib_vector_last(words)); + ut_ad(last_word != NULL); + fts_utf8_string_dup(&word, &last_word->text, heap); + } + + /* Fill into tables */ + ret = i_s_fts_index_table_fill_one_fetch( + index_charset, thd, tables, words, &conv_str, has_more); + + if (ret != 0) { + i_s_fts_index_table_free_one_fetch(words); + goto func_exit; + } + } while (has_more); + } + +func_exit: + ut_free(conv_str.f_str); mem_heap_free(heap); - DBUG_RETURN(0); + DBUG_RETURN(ret); } /*******************************************************************//** Fill the dynamic table INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE @@ -3875,14 +3904,8 @@ static ST_FIELD_INFO i_s_fts_config_fields_info[] = static const char* fts_config_key[] = { FTS_OPTIMIZE_LIMIT_IN_SECS, FTS_SYNCED_DOC_ID, - FTS_LAST_OPTIMIZED_WORD, - FTS_TOTAL_DELETED_COUNT, - FTS_TOTAL_WORD_COUNT, - FTS_OPTIMIZE_START_TIME, - FTS_OPTIMIZE_END_TIME, FTS_STOPWORD_TABLE_NAME, FTS_USE_STOPWORD, - FTS_TABLE_STATE, NULL }; @@ -4466,6 +4489,7 @@ i_s_innodb_buffer_stats_fill_table( buf_pool_info_t* pool_info; DBUG_ENTER("i_s_innodb_buffer_fill_general"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* Only allow the PROCESS privilege holder to access the stats */ if (check_global_access(thd, PROCESS_ACL)) { @@ -4879,7 +4903,7 @@ i_s_innodb_buffer_page_fill( /* First three states are for compression pages and are not states we would get as we scan pages through buffer blocks */ - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: state_str = NULL; @@ -4951,14 +4975,21 @@ i_s_innodb_set_page_type( if (page_type == FIL_PAGE_INDEX) { const page_t* page = (const page_t*) frame; + page_info->index_id = btr_page_get_index_id(page); + /* FIL_PAGE_INDEX is a bit special, its value is defined as 17855, so we cannot use FIL_PAGE_INDEX to index into i_s_page_type[] array, its array index in the i_s_page_type[] array is I_S_PAGE_TYPE_INDEX - (1) */ - page_info->page_type = I_S_PAGE_TYPE_INDEX; - - page_info->index_id = btr_page_get_index_id(page); + (1) for index pages or I_S_PAGE_TYPE_IBUF for + change buffer index pages */ + if (page_info->index_id + == static_cast<index_id_t>(DICT_IBUF_ID_MIN + + IBUF_SPACE_ID)) { + page_info->page_type = I_S_PAGE_TYPE_IBUF; + } else { + page_info->page_type = I_S_PAGE_TYPE_INDEX; + } page_info->data_size = (ulint)(page_header_get_field( page, PAGE_HEAP_TOP) - (page_is_comp(page) @@ -4967,7 +4998,7 @@ i_s_innodb_set_page_type( - page_header_get_field(page, PAGE_GARBAGE)); page_info->num_recs = page_get_n_recs(page); - } else if (page_type >= I_S_PAGE_TYPE_UNKNOWN) { + } else if (page_type > FIL_PAGE_TYPE_LAST) { /* Encountered an unknown page type */ page_info->page_type = I_S_PAGE_TYPE_UNKNOWN; } else { @@ -5039,6 +5070,16 @@ i_s_innodb_buffer_page_get_info( page_info->freed_page_clock = bpage->freed_page_clock; + switch (buf_page_get_io_fix(bpage)) { + case BUF_IO_NONE: + case BUF_IO_WRITE: + case BUF_IO_PIN: + break; + case BUF_IO_READ: + page_info->page_type = I_S_PAGE_TYPE_UNKNOWN; + return; + } + if (page_info->page_state == BUF_BLOCK_FILE_PAGE) { const buf_block_t*block; @@ -5075,6 +5116,7 @@ i_s_innodb_fill_buffer_pool( mem_heap_t* heap; DBUG_ENTER("i_s_innodb_fill_buffer_pool"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); heap = mem_heap_create(10000); @@ -5574,7 +5616,7 @@ i_s_innodb_buf_page_lru_fill( state_str = "NO"; break; /* We should not see following states */ - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_MEMORY: @@ -5640,6 +5682,7 @@ i_s_innodb_fill_buffer_lru( ulint lru_len; DBUG_ENTER("i_s_innodb_fill_buffer_lru"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* Obtain buf_pool mutex before allocate info_buffer, since UT_LIST_GET_LEN(buf_pool->LRU) could change */ @@ -5966,6 +6009,7 @@ i_s_sys_tables_fill_table( mtr_t mtr; DBUG_ENTER("i_s_sys_tables_fill_table"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* deny access to user without PROCESS_ACL privilege */ if (check_global_access(thd, PROCESS_ACL)) { @@ -6262,6 +6306,7 @@ i_s_sys_tables_fill_table_stats( mtr_t mtr; DBUG_ENTER("i_s_sys_tables_fill_table_stats"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* deny access to user without PROCESS_ACL privilege */ if (check_global_access(thd, PROCESS_ACL)) { @@ -6511,6 +6556,7 @@ i_s_sys_indexes_fill_table( mtr_t mtr; DBUG_ENTER("i_s_sys_indexes_fill_table"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* deny access to user without PROCESS_ACL privilege */ if (check_global_access(thd, PROCESS_ACL)) { @@ -6748,6 +6794,7 @@ i_s_sys_columns_fill_table( mtr_t mtr; DBUG_ENTER("i_s_sys_columns_fill_table"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* deny access to user without PROCESS_ACL privilege */ if (check_global_access(thd, PROCESS_ACL)) { @@ -6951,6 +6998,7 @@ i_s_sys_fields_fill_table( mtr_t mtr; DBUG_ENTER("i_s_sys_fields_fill_table"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* deny access to user without PROCESS_ACL privilege */ if (check_global_access(thd, PROCESS_ACL)) { @@ -7182,6 +7230,7 @@ i_s_sys_foreign_fill_table( mtr_t mtr; DBUG_ENTER("i_s_sys_foreign_fill_table"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* deny access to user without PROCESS_ACL privilege */ if (check_global_access(thd, PROCESS_ACL)) { @@ -7396,6 +7445,7 @@ i_s_sys_foreign_cols_fill_table( mtr_t mtr; DBUG_ENTER("i_s_sys_foreign_cols_fill_table"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* deny access to user without PROCESS_ACL privilege */ if (check_global_access(thd, PROCESS_ACL)) { @@ -7660,6 +7710,7 @@ i_s_sys_tablespaces_fill_table( mtr_t mtr; DBUG_ENTER("i_s_sys_tablespaces_fill_table"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* deny access to user without PROCESS_ACL privilege */ if (check_global_access(thd, PROCESS_ACL)) { @@ -7850,6 +7901,7 @@ i_s_sys_datafiles_fill_table( mtr_t mtr; DBUG_ENTER("i_s_sys_datafiles_fill_table"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* deny access to user without PROCESS_ACL privilege */ if (check_global_access(thd, PROCESS_ACL)) { diff --git a/storage/innobase/handler/i_s.h b/storage/innobase/handler/i_s.h index 05f6fd8ecd2..a2b324cb314 100644 --- a/storage/innobase/handler/i_s.h +++ b/storage/innobase/handler/i_s.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2013, 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 @@ -39,7 +39,6 @@ extern struct st_maria_plugin i_s_innodb_cmpmem; extern struct st_maria_plugin i_s_innodb_cmpmem_reset; extern struct st_maria_plugin i_s_innodb_metrics; extern struct st_maria_plugin i_s_innodb_ft_default_stopword; -extern struct st_maria_plugin i_s_innodb_ft_inserted; extern struct st_maria_plugin i_s_innodb_ft_deleted; extern struct st_maria_plugin i_s_innodb_ft_being_deleted; extern struct st_maria_plugin i_s_innodb_ft_index_cache; diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc index af0699f8c67..1ce5332885a 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, 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 @@ -61,6 +61,7 @@ UNIV_INTERN my_bool srv_ibuf_disable_background_merge; #include "que0que.h" #include "srv0start.h" /* srv_shutdown_state */ #include "ha_prototypes.h" +#include "rem0cmp.h" /* STRUCTURE OF AN INSERT BUFFER RECORD @@ -416,7 +417,7 @@ ibuf_tree_root_get( ut_ad(page_get_space_id(root) == IBUF_SPACE_ID); ut_ad(page_get_page_no(root) == FSP_IBUF_TREE_ROOT_PAGE_NO); - ut_ad(ibuf->empty == (page_get_n_recs(root) == 0)); + ut_ad(ibuf->empty == page_is_empty(root)); return(root); } @@ -564,7 +565,7 @@ ibuf_init_at_db_start(void) ibuf_size_update(root, &mtr); mutex_exit(&ibuf_mutex); - ibuf->empty = (page_get_n_recs(root) == 0); + ibuf->empty = page_is_empty(root); ibuf_mtr_commit(&mtr); heap = mem_heap_create(450); @@ -2567,7 +2568,7 @@ ulint ibuf_merge_pages( /*=============*/ ulint* n_pages, /*!< out: number of pages to which merged */ - bool sync) /*!< in: TRUE if the caller wants to wait for + bool sync) /*!< in: true if the caller wants to wait for the issued read with the highest tablespace address to complete */ { @@ -2589,7 +2590,7 @@ ibuf_merge_pages( ut_ad(page_validate(btr_pcur_get_page(&pcur), ibuf->index)); - if (page_get_n_recs(btr_pcur_get_page(&pcur)) == 0) { + if (page_is_empty(btr_pcur_get_page(&pcur))) { /* If a B-tree page is empty, it must be the root page and the whole B-tree must be empty. InnoDB does not allow empty B-tree pages other than the root. */ @@ -2633,7 +2634,8 @@ ibuf_get_table( { rw_lock_s_lock_func(&dict_operation_lock, 0, __FILE__, __LINE__); - dict_table_t* table = dict_table_open_on_id(table_id, FALSE, FALSE); + dict_table_t* table = dict_table_open_on_id( + table_id, FALSE, DICT_TABLE_OP_NORMAL); rw_lock_s_unlock_gen(&dict_operation_lock, 0); @@ -2674,7 +2676,7 @@ ibuf_merge_space( ulint spaces[IBUF_MAX_N_PAGES_MERGED]; ib_int64_t versions[IBUF_MAX_N_PAGES_MERGED]; - if (page_get_n_recs(btr_pcur_get_page(&pcur)) == 0) { + if (page_is_empty(btr_pcur_get_page(&pcur))) { /* If a B-tree page is empty, it must be the root page and the whole B-tree must be empty. InnoDB does not allow empty B-tree pages other than the root. */ @@ -2712,7 +2714,7 @@ ibuf_merge_space( #endif /* UNIV_DEBUG */ buf_read_ibuf_merge_pages( - TRUE, spaces, versions, pages, *n_pages); + true, spaces, versions, pages, *n_pages); } return(sum_sizes); @@ -2749,6 +2751,10 @@ ibuf_merge( if (ibuf->empty && !srv_shutdown_state) { return(0); +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + } else if (ibuf_debug) { + return(0); +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ } else if (table_id == 0) { return(ibuf_merge_pages(n_pages, sync)); } else if ((table = ibuf_get_table(table_id)) == 0) { @@ -3697,7 +3703,7 @@ fail_exit: ut_ad(page_get_page_no(root) == FSP_IBUF_TREE_ROOT_PAGE_NO); - ibuf->empty = (page_get_n_recs(root) == 0); + ibuf->empty = page_is_empty(root); } } else { ut_ad(mode == BTR_MODIFY_TREE); @@ -3726,7 +3732,7 @@ fail_exit: mutex_exit(&ibuf_pessimistic_insert_mutex); ibuf_size_update(root, &mtr); mutex_exit(&ibuf_mutex); - ibuf->empty = (page_get_n_recs(root) == 0); + ibuf->empty = page_is_empty(root); block = btr_cur_get_block(cursor); ut_ad(buf_block_get_space(block) == IBUF_SPACE_ID); @@ -3768,7 +3774,7 @@ func_exit: #ifdef UNIV_IBUF_DEBUG ut_a(n_stored <= IBUF_MAX_N_PAGES_MERGED); #endif - buf_read_ibuf_merge_pages(FALSE, space_ids, space_versions, + buf_read_ibuf_merge_pages(false, space_ids, space_versions, page_nos, n_stored); } @@ -3798,6 +3804,10 @@ ibuf_insert( /* Read the settable global variable ibuf_use only once in this function, so that we will have a consistent view of it. */ ibuf_use_t use = ibuf_use; + DBUG_ENTER("ibuf_insert"); + + DBUG_PRINT("ibuf", ("op: %d, space: %ld, page_no: %ld", + op, space, page_no)); ut_ad(dtuple_check_typed(entry)); ut_ad(ut_is_2pow(zip_size)); @@ -3812,7 +3822,7 @@ ibuf_insert( case IBUF_USE_NONE: case IBUF_USE_DELETE: case IBUF_USE_DELETE_MARK: - return(FALSE); + DBUG_RETURN(FALSE); case IBUF_USE_INSERT: case IBUF_USE_INSERT_DELETE_MARK: case IBUF_USE_ALL: @@ -3825,7 +3835,7 @@ ibuf_insert( switch (use) { case IBUF_USE_NONE: case IBUF_USE_INSERT: - return(FALSE); + DBUG_RETURN(FALSE); case IBUF_USE_DELETE_MARK: case IBUF_USE_DELETE: case IBUF_USE_INSERT_DELETE_MARK: @@ -3841,7 +3851,7 @@ ibuf_insert( case IBUF_USE_NONE: case IBUF_USE_INSERT: case IBUF_USE_INSERT_DELETE_MARK: - return(FALSE); + DBUG_RETURN(FALSE); case IBUF_USE_DELETE_MARK: case IBUF_USE_DELETE: case IBUF_USE_ALL: @@ -3883,7 +3893,7 @@ check_watch: is being buffered, have this request executed directly on the page in the buffer pool after the buffered entries for this page have been merged. */ - return(FALSE); + DBUG_RETURN(FALSE); } } @@ -3894,7 +3904,7 @@ skip_watch: >= page_get_free_space_of_empty(dict_table_is_comp(index->table)) / 2) { - return(FALSE); + DBUG_RETURN(FALSE); } err = ibuf_insert_low(BTR_MODIFY_PREV, op, no_counter, @@ -3911,20 +3921,21 @@ skip_watch: /* fprintf(stderr, "Ibuf insert for page no %lu of index %s\n", page_no, index->name); */ #endif - return(TRUE); + DBUG_RETURN(TRUE); } else { ut_a(err == DB_STRONG_FAIL || err == DB_TOO_BIG_RECORD); - return(FALSE); + DBUG_RETURN(FALSE); } } /********************************************************************//** During merge, inserts to an index page a secondary index entry extracted -from the insert buffer. */ +from the insert buffer. +@return newly inserted record */ static __attribute__((nonnull)) -void +rec_t* ibuf_insert_to_index_page_low( /*==========================*/ const dtuple_t* entry, /*!< in: buffered entry to insert */ @@ -3943,22 +3954,31 @@ ibuf_insert_to_index_page_low( ulint zip_size; const page_t* bitmap_page; ulint old_bits; + rec_t* rec; + DBUG_ENTER("ibuf_insert_to_index_page_low"); - if (page_cur_tuple_insert( - page_cur, entry, index, offsets, &heap, 0, mtr) != NULL) { - return; + rec = page_cur_tuple_insert(page_cur, entry, index, + offsets, &heap, 0, mtr); + if (rec != NULL) { + DBUG_RETURN(rec); } + /* Page reorganization or recompression should already have + been attempted by page_cur_tuple_insert(). Besides, per + ibuf_index_page_calc_free_zip() the page should not have been + recompressed or reorganized. */ + ut_ad(!buf_block_get_page_zip(block)); + /* If the record did not fit, reorganize */ - btr_page_reorganize(block, index, mtr); - page_cur_search(block, index, entry, PAGE_CUR_LE, page_cur); + btr_page_reorganize(page_cur, index, mtr); /* This time the record must fit */ - if (page_cur_tuple_insert(page_cur, entry, index, - offsets, &heap, 0, mtr) != NULL) { - return; + rec = page_cur_tuple_insert(page_cur, entry, index, + offsets, &heap, 0, mtr); + if (rec != NULL) { + DBUG_RETURN(rec); } page = buf_block_get_frame(block); @@ -3992,6 +4012,7 @@ ibuf_insert_to_index_page_low( fputs("InnoDB: Submit a detailed bug report" " to http://bugs.mysql.com\n", stderr); ut_ad(0); + DBUG_RETURN(NULL); } /************************************************************************ @@ -4014,6 +4035,13 @@ ibuf_insert_to_index_page( ulint* offsets; mem_heap_t* heap; + DBUG_ENTER("ibuf_insert_to_index_page"); + + DBUG_PRINT("ibuf", ("page_no: %ld", buf_block_get_page_no(block))); + DBUG_PRINT("ibuf", ("index name: %s", index->name)); + DBUG_PRINT("ibuf", ("online status: %d", + dict_index_get_online_status(index))); + ut_ad(ibuf_inside(mtr)); ut_ad(dtuple_check_typed(entry)); ut_ad(!buf_block_align(page)->index); @@ -4057,7 +4085,7 @@ dump: "InnoDB: Submit a detailed bug report to" " http://bugs.mysql.com!\n", stderr); - return; + DBUG_VOID_RETURN; } low_match = page_cur_search(block, index, entry, @@ -4105,15 +4133,35 @@ dump: if (!row_upd_changes_field_size_or_external(index, offsets, update) && (!page_zip || btr_cur_update_alloc_zip( - page_zip, block, index, - rec_offs_size(offsets), FALSE, mtr))) { + page_zip, &page_cur, index, offsets, + rec_offs_size(offsets), false, mtr))) { /* This is the easy case. Do something similar to btr_cur_update_in_place(). */ + rec = page_cur_get_rec(&page_cur); row_upd_rec_in_place(rec, index, offsets, update, page_zip); + + /* Log the update in place operation. During recovery + MLOG_COMP_REC_UPDATE_IN_PLACE/MLOG_REC_UPDATE_IN_PLACE + expects trx_id, roll_ptr for secondary indexes. So we + just write dummy trx_id(0), roll_ptr(0) */ + btr_cur_update_in_place_log(BTR_KEEP_SYS_FLAG, rec, + index, update, 0, 0, mtr); + DBUG_EXECUTE_IF( + "crash_after_log_ibuf_upd_inplace", + log_buffer_flush_to_disk(); + ib_logf(IB_LOG_LEVEL_INFO, + "Wrote log record for ibuf update in " + "place operation"); + DBUG_SUICIDE(); + ); + goto updated_in_place; } + /* btr_cur_update_alloc_zip() may have changed this */ + rec = page_cur_get_rec(&page_cur); + /* A collation may identify values that differ in storage length. Some examples (1 or 2 bytes): @@ -4136,10 +4184,11 @@ dump: lock_rec_store_on_page_infimum(block, rec); page_cur_delete_rec(&page_cur, index, offsets, mtr); page_cur_move_to_prev(&page_cur); + rec = ibuf_insert_to_index_page_low(entry, block, index, + &offsets, heap, mtr, + &page_cur); - ibuf_insert_to_index_page_low(entry, block, index, - &offsets, heap, mtr, - &page_cur); + ut_ad(!cmp_dtuple_rec(entry, rec, offsets)); lock_rec_restore_from_page_infimum(block, rec, block); } else { offsets = NULL; @@ -4147,9 +4196,10 @@ dump: &offsets, heap, mtr, &page_cur); } - updated_in_place: mem_heap_free(heap); + + DBUG_VOID_RETURN; } /****************************************************************//** @@ -4359,14 +4409,6 @@ ibuf_restore_pos( fflush(stderr); ibuf_btr_pcur_commit_specify_mtr(pcur, mtr); - - fputs("InnoDB: Validating insert buffer tree:\n", stderr); - if (!btr_validate_index(ibuf->index, 0)) { - ut_error; - } - - fprintf(stderr, "InnoDB: ibuf tree ok\n"); - fflush(stderr); ut_ad(0); } @@ -4378,7 +4420,7 @@ Deletes from ibuf the record on which pcur is positioned. If we have to resort to a pessimistic delete, this function commits mtr and closes the cursor. @return TRUE if mtr was committed and pcur closed in this operation */ -static +static __attribute__((warn_unused_result)) ibool ibuf_delete_rec( /*============*/ @@ -4411,7 +4453,7 @@ ibuf_delete_rec( btr_cur_set_deleted_flag_for_ibuf( btr_pcur_get_rec(pcur), NULL, TRUE, mtr); ibuf_mtr_commit(mtr); - log_write_up_to(IB_ULONGLONG_MAX, LOG_WAIT_ALL_GROUPS, TRUE); + log_write_up_to(LSN_MAX, LOG_WAIT_ALL_GROUPS, TRUE); DBUG_SUICIDE(); } #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ @@ -4420,7 +4462,7 @@ ibuf_delete_rec( 0, mtr); if (success) { - if (UNIV_UNLIKELY(!page_get_n_recs(btr_pcur_get_page(pcur)))) { + if (page_is_empty(btr_pcur_get_page(pcur))) { /* If a B-tree page is empty, it must be the root page and the whole B-tree must be empty. InnoDB does not allow empty B-tree pages other than the root. */ @@ -4433,7 +4475,7 @@ ibuf_delete_rec( /* ibuf->empty is protected by the root page latch. Before the deletion, it had to be FALSE. */ ut_ad(!ibuf->empty); - ibuf->empty = TRUE; + ibuf->empty = true; } #ifdef UNIV_IBUF_COUNT_DEBUG @@ -4484,7 +4526,7 @@ ibuf_delete_rec( ibuf_size_update(root, mtr); mutex_exit(&ibuf_mutex); - ibuf->empty = (page_get_n_recs(root) == 0); + ibuf->empty = page_is_empty(root); ibuf_btr_pcur_commit_specify_mtr(pcur, mtr); func_exit: @@ -4677,6 +4719,12 @@ ibuf_merge_or_delete_for_page( loop: ibuf_mtr_start(&mtr); + /* Position pcur in the insert buffer at the first entry for this + index page */ + btr_pcur_open_on_user_rec( + ibuf->index, search_tuple, PAGE_CUR_GE, BTR_MODIFY_LEAF, + &pcur, &mtr); + if (block) { ibool success; @@ -4695,12 +4743,6 @@ loop: buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE); } - /* Position pcur in the insert buffer at the first entry for this - index page */ - btr_pcur_open_on_user_rec( - ibuf->index, search_tuple, PAGE_CUR_GE, BTR_MODIFY_LEAF, - &pcur, &mtr); - if (!btr_pcur_is_on_user_rec(&pcur)) { ut_ad(btr_pcur_is_after_last_in_tree(&pcur, &mtr)); @@ -4785,6 +4827,16 @@ loop: == page_no); ut_ad(ibuf_rec_get_space(&mtr, rec) == space); + /* Mark the change buffer record processed, + so that it will not be merged again in case + the server crashes between the following + mtr_commit() and the subsequent mtr_commit() + of deleting the change buffer record. */ + + btr_cur_set_deleted_flag_for_ibuf( + btr_pcur_get_rec(&pcur), NULL, + TRUE, &mtr); + btr_pcur_store_position(&pcur, &mtr); ibuf_btr_pcur_commit_specify_mtr(&pcur, &mtr); @@ -4832,6 +4884,7 @@ loop: /* Deletion was pessimistic and mtr was committed: we start from the beginning again */ + ut_ad(mtr.state == MTR_COMMITTED); goto loop; } else if (btr_pcur_is_after_last_on_page(&pcur)) { ibuf_mtr_commit(&mtr); @@ -4962,6 +5015,7 @@ loop: /* Deletion was pessimistic and mtr was committed: we start from the beginning again */ + ut_ad(mtr.state == MTR_COMMITTED); goto loop; } @@ -4991,13 +5045,13 @@ leave_loop: /******************************************************************//** Looks if the insert buffer is empty. -@return TRUE if empty */ +@return true if empty */ UNIV_INTERN -ibool +bool ibuf_is_empty(void) /*===============*/ { - ibool is_empty; + bool is_empty; const page_t* root; mtr_t mtr; @@ -5007,7 +5061,7 @@ ibuf_is_empty(void) root = ibuf_tree_root_get(&mtr); mutex_exit(&ibuf_mutex); - is_empty = (page_get_n_recs(root) == 0); + is_empty = page_is_empty(root); ut_a(is_empty == ibuf->empty); ibuf_mtr_commit(&mtr); diff --git a/storage/innobase/include/api0api.h b/storage/innobase/include/api0api.h index 5b7bfdbdde5..c294e3f34d5 100644 --- a/storage/innobase/include/api0api.h +++ b/storage/innobase/include/api0api.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2013, 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 @@ -460,6 +460,10 @@ ib_trx_start( /*=========*/ ib_trx_t ib_trx, /*!< in: transaction to restart */ ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ + ib_bool_t read_write, /*!< in: true if read write + transaction */ + ib_bool_t auto_commit, /*!< in: auto commit after each + single DML */ void* thd); /*!< in: THD */ /*****************************************************************//** @@ -470,7 +474,11 @@ put the transaction in the active state. ib_trx_t ib_trx_begin( /*=========*/ - ib_trx_level_t ib_trx_level); /*!< in: trx isolation level */ + ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ + ib_bool_t read_write, /*!< in: true if read write + transaction */ + ib_bool_t auto_commit); /*!< in: auto commit after each + single DML */ /*****************************************************************//** Query the transaction's state. This function can be used to check for @@ -669,7 +677,9 @@ ib_err_t ib_cursor_read_row( /*===============*/ ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_tpl_t ib_tpl); /*!< out: read cols into this tuple */ + ib_tpl_t ib_tpl, /*!< out: read cols into this tuple */ + void** row_buf, /*!< in/out: row buffer */ + ib_ulint_t* row_len); /*!< in/out: row buffer len */ /*****************************************************************//** Move cursor to the first record in the table. @@ -728,7 +738,9 @@ ib_col_set_value( ib_tpl_t ib_tpl, /*!< in: tuple instance */ ib_ulint_t col_no, /*!< in: column index in tuple */ const void* src, /*!< in: data value */ - ib_ulint_t len); /*!< in: data value len */ + ib_ulint_t len, /*!< in: data value len */ + ib_bool_t need_cpy); /*!< in: if need memcpy */ + /*****************************************************************//** Get the size of the data available in the column the tuple. diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h index b99b0c0cd7b..305acf7e322 100644 --- a/storage/innobase/include/btr0btr.h +++ b/storage/innobase/include/btr0btr.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -450,18 +450,48 @@ btr_root_raise_and_insert( __attribute__((nonnull, warn_unused_result)); /*************************************************************//** Reorganizes an index page. -IMPORTANT: if btr_page_reorganize() is invoked on a compressed leaf -page of a non-clustered index, the caller must update the insert -buffer free bits in the same mini-transaction in such a way that the -modification will be redo-logged. -@return TRUE on success, FALSE on failure */ + +IMPORTANT: On success, the caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. This has to +be done either within the same mini-transaction, or by invoking +ibuf_reset_free_bits() before mtr_commit(). On uncompressed pages, +IBUF_BITMAP_FREE is unaffected by reorganization. + +@retval true if the operation was successful +@retval false if it is a compressed page, and recompression failed */ UNIV_INTERN -ibool +bool +btr_page_reorganize_low( +/*====================*/ + bool recovery,/*!< in: true if called in recovery: + locks should not be updated, i.e., + there cannot exist locks on the + page, and a hash index should not be + dropped: it cannot exist */ + ulint z_level,/*!< in: compression level to be used + if dealing with compressed page */ + page_cur_t* cursor, /*!< in/out: page cursor */ + dict_index_t* index, /*!< in: the index tree of the page */ + mtr_t* mtr) /*!< in/out: mini-transaction */ + __attribute__((nonnull, warn_unused_result)); +/*************************************************************//** +Reorganizes an index page. + +IMPORTANT: On success, the caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. This has to +be done either within the same mini-transaction, or by invoking +ibuf_reset_free_bits() before mtr_commit(). On uncompressed pages, +IBUF_BITMAP_FREE is unaffected by reorganization. + +@retval true if the operation was successful +@retval false if it is a compressed page, and recompression failed */ +UNIV_INTERN +bool btr_page_reorganize( /*================*/ - buf_block_t* block, /*!< in: page to be reorganized */ - dict_index_t* index, /*!< in: record descriptor */ - mtr_t* mtr) /*!< in: mtr */ + page_cur_t* cursor, /*!< in/out: page cursor */ + dict_index_t* index, /*!< in: the index tree of the page */ + mtr_t* mtr) /*!< in/out: mini-transaction */ __attribute__((nonnull)); /*************************************************************//** Decides if the page should be split at the convergence point of diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index edba1d1d77f..833166e783c 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, 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 @@ -45,7 +45,11 @@ enum { BTR_KEEP_POS_FLAG = 8, /** the caller is creating the index or wants to bypass the index->info.online creation log */ - BTR_CREATE_FLAG = 16 + BTR_CREATE_FLAG = 16, + /** the caller of btr_cur_optimistic_update() or + btr_cur_update_in_place() will take care of + updating IBUF_BITMAP_FREE */ + BTR_KEEP_IBUF_BITMAP = 32 }; #ifndef UNIV_HOTBACKUP @@ -225,10 +229,11 @@ btr_cur_optimistic_insert( NULL */ ulint n_ext, /*!< in: number of externally stored columns */ que_thr_t* thr, /*!< in: query thread or NULL */ - mtr_t* mtr) /*!< in: mtr; if this function returns - DB_SUCCESS on a leaf page of a secondary - index in a compressed tablespace, the - mtr must be committed before latching + mtr_t* mtr) /*!< in/out: mini-transaction; + if this function returns DB_SUCCESS on + a leaf page of a secondary index in a + compressed tablespace, the caller must + mtr_commit(mtr) before latching any further pages */ __attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result)); /*************************************************************//** @@ -260,27 +265,48 @@ btr_cur_pessimistic_insert( NULL */ ulint n_ext, /*!< in: number of externally stored columns */ que_thr_t* thr, /*!< in: query thread or NULL */ - mtr_t* mtr) /*!< in: mtr */ + mtr_t* mtr) /*!< in/out: mini-transaction */ __attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result)); /*************************************************************//** See if there is enough place in the page modification log to log an update-in-place. -@return TRUE if enough place */ + +@retval false if out of space; IBUF_BITMAP_FREE will be reset +outside mtr if the page was recompressed +@retval true if enough place; + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE if this is +a secondary index leaf page. This has to be done either within the +same mini-transaction, or by invoking ibuf_reset_free_bits() before +mtr_commit(mtr). */ UNIV_INTERN -ibool -btr_cur_update_alloc_zip( -/*=====================*/ +bool +btr_cur_update_alloc_zip_func( +/*==========================*/ page_zip_des_t* page_zip,/*!< in/out: compressed page */ - buf_block_t* block, /*!< in/out: buffer page */ - dict_index_t* index, /*!< in: the index corresponding to the block */ + page_cur_t* cursor, /*!< in/out: B-tree page cursor */ + dict_index_t* index, /*!< in: the index corresponding to cursor */ +#ifdef UNIV_DEBUG + ulint* offsets,/*!< in/out: offsets of the cursor record */ +#endif /* UNIV_DEBUG */ ulint length, /*!< in: size needed */ - ibool create, /*!< in: TRUE=delete-and-insert, - FALSE=update-in-place */ - mtr_t* mtr) /*!< in: mini-transaction */ + bool create, /*!< in: true=delete-and-insert, + false=update-in-place */ + mtr_t* mtr) /*!< in/out: mini-transaction */ __attribute__((nonnull, warn_unused_result)); +#ifdef UNIV_DEBUG +# define btr_cur_update_alloc_zip(page_zip,cursor,index,offsets,len,cr,mtr) \ + btr_cur_update_alloc_zip_func(page_zip,cursor,index,offsets,len,cr,mtr) +#else /* UNIV_DEBUG */ +# define btr_cur_update_alloc_zip(page_zip,cursor,index,offsets,len,cr,mtr) \ + btr_cur_update_alloc_zip_func(page_zip,cursor,index,len,cr,mtr) +#endif /* UNIV_DEBUG */ /*************************************************************//** Updates a record when the update causes no size changes in its fields. -@return DB_SUCCESS or error number */ +@return locking or undo log related error code, or +@retval DB_SUCCESS on success +@retval DB_ZIP_OVERFLOW if there is not enough space left +on the compressed page (IBUF_BITMAP_FREE was reset outside mtr) */ UNIV_INTERN dberr_t btr_cur_update_in_place( @@ -289,24 +315,42 @@ btr_cur_update_in_place( btr_cur_t* cursor, /*!< in: cursor on the record to update; cursor stays valid and positioned on the same record */ - const ulint* offsets,/*!< in: offsets on cursor->page_cur.rec */ + ulint* offsets,/*!< in/out: offsets on cursor->page_cur.rec */ const upd_t* update, /*!< in: update vector */ ulint cmpl_info,/*!< in: compiler info on secondary index updates */ - que_thr_t* thr, /*!< in: query thread, or NULL if - appropriate flags are set */ + que_thr_t* thr, /*!< in: query thread */ trx_id_t trx_id, /*!< in: transaction id */ - mtr_t* mtr) /*!< in: mtr; must be committed before - latching any further pages */ - __attribute__((warn_unused_result, nonnull(2,3,4,8))); + mtr_t* mtr) /*!< in/out: mini-transaction; if this + is a secondary index, the caller must + mtr_commit(mtr) before latching any + further pages */ + __attribute__((warn_unused_result, nonnull)); +/***********************************************************//** +Writes a redo log record of updating a record in-place. */ +UNIV_INTERN +void +btr_cur_update_in_place_log( +/*========================*/ + ulint flags, /*!< in: flags */ + const rec_t* rec, /*!< in: record */ + dict_index_t* index, /*!< in: index of the record */ + const upd_t* update, /*!< in: update vector */ + trx_id_t trx_id, /*!< in: transaction id */ + roll_ptr_t roll_ptr, /*!< in: roll ptr */ + mtr_t* mtr) /*!< in: mtr */ + __attribute__((nonnull)); /*************************************************************//** Tries to update a record on a page in an index tree. It is assumed that mtr holds an x-latch on the page. The operation does not succeed if there is too little space on the page or if the update would result in too empty a page, so that tree compression is recommended. -@return DB_SUCCESS, or DB_OVERFLOW if the updated record does not fit, -DB_UNDERFLOW if the page would become too empty, or DB_ZIP_OVERFLOW if -there is not enough space left on the compressed page */ +@return error code, including +@retval DB_SUCCESS on success +@retval DB_OVERFLOW if the updated record does not fit +@retval DB_UNDERFLOW if the page would become too empty +@retval DB_ZIP_OVERFLOW if there is not enough space left +on the compressed page */ UNIV_INTERN dberr_t btr_cur_optimistic_update( @@ -316,17 +360,18 @@ btr_cur_optimistic_update( cursor stays valid and positioned on the same record */ ulint** offsets,/*!< out: offsets on cursor->page_cur.rec */ - mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ + mem_heap_t** heap, /*!< in/out: pointer to NULL or memory heap */ const upd_t* update, /*!< in: update vector; this must also contain trx id and roll ptr fields */ ulint cmpl_info,/*!< in: compiler info on secondary index updates */ - que_thr_t* thr, /*!< in: query thread, or NULL if - appropriate flags are set */ + que_thr_t* thr, /*!< in: query thread */ trx_id_t trx_id, /*!< in: transaction id */ - mtr_t* mtr) /*!< in: mtr; must be committed before - latching any further pages */ - __attribute__((warn_unused_result, nonnull(2,3,4,5,9))); + mtr_t* mtr) /*!< in/out: mini-transaction; if this + is a secondary index, the caller must + mtr_commit(mtr) before latching any + further pages */ + __attribute__((warn_unused_result, nonnull)); /*************************************************************//** Performs an update of a record on a page of a tree. It is assumed that mtr holds an x-latch on the tree and on the cursor page. If the @@ -356,12 +401,11 @@ btr_cur_pessimistic_update( the values in update vector have no effect */ ulint cmpl_info,/*!< in: compiler info on secondary index updates */ - que_thr_t* thr, /*!< in: query thread, or NULL if - appropriate flags are set */ + que_thr_t* thr, /*!< in: query thread */ trx_id_t trx_id, /*!< in: transaction id */ - mtr_t* mtr) /*!< in: mtr; must be committed before - latching any further pages */ - __attribute__((warn_unused_result, nonnull(2,3,4,5,6,7,11))); + mtr_t* mtr) /*!< in/out: mini-transaction; must be committed + before latching any further pages */ + __attribute__((warn_unused_result, nonnull)); /***********************************************************//** Marks a clustered index record deleted. Writes an undo log record to undo log on this delete marking. Writes in the trx id field the id @@ -377,8 +421,8 @@ btr_cur_del_mark_set_clust_rec( dict_index_t* index, /*!< in: clustered index of the record */ const ulint* offsets,/*!< in: rec_get_offsets(rec) */ que_thr_t* thr, /*!< in: query thread */ - mtr_t* mtr) /*!< in: mtr */ - __attribute__((nonnull)); + mtr_t* mtr) /*!< in/out: mini-transaction */ + __attribute__((nonnull, warn_unused_result)); /***********************************************************//** Sets a secondary index record delete mark to TRUE or FALSE. @return DB_SUCCESS, DB_LOCK_WAIT, or error number */ @@ -390,7 +434,8 @@ btr_cur_del_mark_set_sec_rec( btr_cur_t* cursor, /*!< in: cursor */ ibool val, /*!< in: value to set */ que_thr_t* thr, /*!< in: query thread */ - mtr_t* mtr); /*!< in: mtr */ + mtr_t* mtr) /*!< in/out: mini-transaction */ + __attribute__((nonnull, warn_unused_result)); /*************************************************************//** Tries to compress a page of the tree if it seems useful. It is assumed that mtr holds an x-latch on the tree and on the cursor page. To avoid diff --git a/storage/innobase/include/btr0pcur.h b/storage/innobase/include/btr0pcur.h index 973fae382ab..fc008cdd185 100644 --- a/storage/innobase/include/btr0pcur.h +++ b/storage/innobase/include/btr0pcur.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -460,6 +460,27 @@ btr_pcur_move_to_prev_on_page( /*==========================*/ btr_pcur_t* cursor);/*!< in/out: persistent cursor */ +/** Position state of persistent B-tree cursor. */ +enum pcur_pos_t { + /** The persistent cursor is not positioned. */ + BTR_PCUR_NOT_POSITIONED = 0, + /** The persistent cursor was previously positioned. + TODO: currently, the state can be BTR_PCUR_IS_POSITIONED, + though it really should be BTR_PCUR_WAS_POSITIONED, + because we have no obligation to commit the cursor with + mtr; similarly latch_mode may be out of date. This can + lead to problems if btr_pcur is not used the right way; + all current code should be ok. */ + BTR_PCUR_WAS_POSITIONED, + /** The persistent cursor is positioned by optimistic get to the same + record as it was positioned at. Not used for rel_pos == BTR_PCUR_ON. + It may need adjustment depending on previous/current search direction + and rel_pos. */ + BTR_PCUR_IS_POSITIONED_OPTIMISTIC, + /** The persistent cursor is positioned by index search. + Or optimistic get for rel_pos == BTR_PCUR_ON. */ + BTR_PCUR_IS_POSITIONED +}; /* The persistent B-tree cursor structure. This is used mainly for SQL selects, updates, and deletes. */ @@ -493,10 +514,8 @@ struct btr_pcur_t{ ib_uint64_t modify_clock; /*!< the modify clock value of the buffer block when the cursor position was stored */ - ulint pos_state; /*!< see TODO note below! - BTR_PCUR_IS_POSITIONED, - BTR_PCUR_WAS_POSITIONED, - BTR_PCUR_NOT_POSITIONED */ + enum pcur_pos_t pos_state; /*!< btr_pcur_store_position() and + btr_pcur_restore_position() state. */ ulint search_mode; /*!< PAGE_CUR_G, ... */ trx_t* trx_if_known; /*!< the transaction, if we know it; otherwise this field is not defined; @@ -512,21 +531,6 @@ struct btr_pcur_t{ is not NULL */ }; -#define BTR_PCUR_IS_POSITIONED 1997660512 /* TODO: currently, the state - can be BTR_PCUR_IS_POSITIONED, - though it really should be - BTR_PCUR_WAS_POSITIONED, - because we have no obligation - to commit the cursor with - mtr; similarly latch_mode may - be out of date. This can - lead to problems if btr_pcur - is not used the right way; - all current code should be - ok. */ -#define BTR_PCUR_WAS_POSITIONED 1187549791 -#define BTR_PCUR_NOT_POSITIONED 1328997689 - #define BTR_PCUR_OLD_STORED 908467085 #define BTR_PCUR_OLD_NOT_STORED 122766467 diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.ic index 79afd7c322e..29f2fc722a2 100644 --- a/storage/innobase/include/btr0pcur.ic +++ b/storage/innobase/include/btr0pcur.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -379,7 +379,7 @@ btr_pcur_commit_specify_mtr( btr_pcur_t* pcur, /*!< in: persistent cursor */ mtr_t* mtr) /*!< in: mtr to commit */ { - ut_a(pcur->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(pcur->pos_state == BTR_PCUR_IS_POSITIONED); pcur->latch_mode = BTR_NO_LATCHES; diff --git a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h index fea117d0aaf..848bde451a0 100644 --- a/storage/innobase/include/btr0sea.h +++ b/storage/innobase/include/btr0sea.h @@ -189,8 +189,6 @@ UNIV_INTERN ibool btr_search_validate(void); /*======================*/ -#else -# define btr_search_validate() TRUE #endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */ /** The search info struct in an index */ diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 74a6e203808..7ad6339e63b 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -104,9 +104,7 @@ extern buf_block_t* back_block2; /*!< second block, for page reorganize */ The enumeration values must be 0..7. */ enum buf_page_state { - BUF_BLOCK_ZIP_FREE = 0, /*!< contains a free - compressed page */ - BUF_BLOCK_POOL_WATCH = 0, /*!< a sentinel for the buffer pool + BUF_BLOCK_POOL_WATCH, /*!< a sentinel for the buffer pool watch, element of buf_pool->watch[] */ BUF_BLOCK_ZIP_PAGE, /*!< contains a clean compressed page */ @@ -897,7 +895,7 @@ buf_page_get_mutex( Get the flush type of a page. @return flush type */ UNIV_INLINE -enum buf_flush +buf_flush_t buf_page_get_flush_type( /*====================*/ const buf_page_t* bpage) /*!< in: buffer page */ @@ -909,7 +907,7 @@ void buf_page_set_flush_type( /*====================*/ buf_page_t* bpage, /*!< in: buffer page */ - enum buf_flush flush_type); /*!< in: flush type */ + buf_flush_t flush_type); /*!< in: flush type */ /*********************************************************************//** Map a block to a file page. */ UNIV_INLINE @@ -1451,7 +1449,7 @@ struct buf_page_t{ unsigned flush_type:2; /*!< if this block is currently being flushed to disk, this tells the flush_type. - @see enum buf_flush */ + @see buf_flush_t */ unsigned io_fix:2; /*!< type of pending I/O operation; also protected by buf_pool->mutex @see enum buf_io_fix */ @@ -1495,7 +1493,6 @@ struct buf_page_t{ - BUF_BLOCK_FILE_PAGE: flush_list - BUF_BLOCK_ZIP_DIRTY: flush_list - BUF_BLOCK_ZIP_PAGE: zip_clean - - BUF_BLOCK_ZIP_FREE: zip_free[] If bpage is part of flush_list then the node pointers are @@ -1729,6 +1726,26 @@ Compute the hash fold value for blocks in buf_pool->zip_hash. */ #define BUF_POOL_ZIP_FOLD_BPAGE(b) BUF_POOL_ZIP_FOLD((buf_block_t*) (b)) /* @} */ +/** Struct that is embedded in the free zip blocks */ +struct buf_buddy_free_t { + union { + ulint size; /*!< size of the block */ + byte bytes[FIL_PAGE_DATA]; + /*!< stamp[FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID] + == BUF_BUDDY_FREE_STAMP denotes a free + block. If the space_id field of buddy + block != BUF_BUDDY_FREE_STAMP, the block + is not in any zip_free list. If the + space_id is BUF_BUDDY_FREE_STAMP then + stamp[0] will contain the + buddy block size. */ + } stamp; + + buf_page_t bpage; /*!< Embedded bpage descriptor */ + UT_LIST_NODE_T(buf_buddy_free_t) list; + /*!< Node of zip_free list */ +}; + /** @brief The buffer pool statistics structure. */ struct buf_pool_stat_t{ ulint n_page_gets; /*!< number of page gets performed; @@ -1839,7 +1856,12 @@ struct buf_pool_t{ and bpage::list pointers when the bpage is on flush_list. It also protects writes to - bpage::oldest_modification */ + bpage::oldest_modification and + flush_list_hp */ + const buf_page_t* flush_list_hp;/*!< "hazard pointer" + used during scan of flush_list + while doing flush list batch. + Protected by flush_list_mutex */ UT_LIST_BASE_NODE_T(buf_page_t) flush_list; /*!< base node of the modified block list */ @@ -1925,7 +1947,7 @@ struct buf_pool_t{ UT_LIST_BASE_NODE_T(buf_page_t) zip_clean; /*!< unmodified compressed pages */ #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ - UT_LIST_BASE_NODE_T(buf_page_t) zip_free[BUF_BUDDY_SIZES_MAX]; + UT_LIST_BASE_NODE_T(buf_buddy_free_t) zip_free[BUF_BUDDY_SIZES_MAX]; /*!< buddy free lists */ buf_page_t* watch; diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic index b310efdf451..08b31a59da3 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/storage/innobase/include/buf0buf.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -205,7 +205,7 @@ buf_page_get_state( #ifdef UNIV_DEBUG switch (state) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: case BUF_BLOCK_NOT_USED: @@ -245,7 +245,7 @@ buf_page_set_state( enum buf_page_state old_state = buf_page_get_state(bpage); switch (old_state) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: ut_error; break; case BUF_BLOCK_ZIP_PAGE: @@ -300,9 +300,7 @@ buf_page_in_file( const buf_page_t* bpage) /*!< in: pointer to control block */ { switch (buf_page_get_state(bpage)) { - case BUF_BLOCK_ZIP_FREE: - /* This is a free page in buf_pool->zip_free[]. - Such pages should only be accessed by the buddy allocator. */ + case BUF_BLOCK_POOL_WATCH: ut_error; break; case BUF_BLOCK_ZIP_PAGE: @@ -347,7 +345,7 @@ buf_page_get_mutex( buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); switch (buf_page_get_state(bpage)) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: ut_error; return(NULL); case BUF_BLOCK_ZIP_PAGE: @@ -362,12 +360,12 @@ buf_page_get_mutex( Get the flush type of a page. @return flush type */ UNIV_INLINE -enum buf_flush +buf_flush_t buf_page_get_flush_type( /*====================*/ const buf_page_t* bpage) /*!< in: buffer page */ { - enum buf_flush flush_type = (enum buf_flush) bpage->flush_type; + buf_flush_t flush_type = (buf_flush_t) bpage->flush_type; #ifdef UNIV_DEBUG switch (flush_type) { @@ -389,7 +387,7 @@ void buf_page_set_flush_type( /*====================*/ buf_page_t* bpage, /*!< in: buffer page */ - enum buf_flush flush_type) /*!< in: flush type */ + buf_flush_t flush_type) /*!< in: flush type */ { bpage->flush_type = flush_type; ut_ad(buf_page_get_flush_type(bpage) == flush_type); @@ -666,7 +664,7 @@ buf_block_get_frame( ut_ad(block); switch (buf_block_get_state(block)) { - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: case BUF_BLOCK_NOT_USED: @@ -1311,7 +1309,7 @@ buf_page_release_zip( bpage->buf_fix_count--; mutex_exit(&block->mutex); return; - case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_POOL_WATCH: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_MEMORY: diff --git a/storage/innobase/include/buf0dblwr.h b/storage/innobase/include/buf0dblwr.h index 357ba697f6a..1b9336f4002 100644 --- a/storage/innobase/include/buf0dblwr.h +++ b/storage/innobase/include/buf0dblwr.h @@ -63,12 +63,13 @@ void buf_dblwr_free(void); /*================*/ /********************************************************************//** -Updates the doublewrite buffer when an IO request that is part of an -LRU or flush batch is completed. */ +Updates the doublewrite buffer when an IO request is completed. */ UNIV_INTERN void -buf_dblwr_update(void); -/*==================*/ +buf_dblwr_update( +/*=============*/ + const buf_page_t* bpage, /*!< in: buffer block descriptor */ + buf_flush_t flush_type);/*!< in: flush type */ /****************************************************************//** Determines if a page number is located inside the doublewrite buffer. @return TRUE if the location is inside the two blocks of the @@ -109,36 +110,41 @@ UNIV_INTERN void buf_dblwr_write_single_page( /*========================*/ - buf_page_t* bpage); /*!< in: buffer block to write */ + buf_page_t* bpage, /*!< in: buffer block to write */ + bool sync); /*!< in: true if sync IO requested */ /** Doublewrite control struct */ struct buf_dblwr_t{ - ib_mutex_t mutex; /*!< mutex protecting the first_free field and - write_buf */ - ulint block1; /*!< the page number of the first + ib_mutex_t mutex; /*!< mutex protecting the first_free + field and write_buf */ + ulint block1; /*!< the page number of the first doublewrite block (64 pages) */ - ulint block2; /*!< page number of the second block */ - ulint first_free; /*!< first free position in write_buf measured - in units of UNIV_PAGE_SIZE */ - ulint s_reserved; /*!< number of slots currently reserved - for single page flushes. */ - ulint b_reserved; /*!< number of slots currently reserved + ulint block2; /*!< page number of the second block */ + ulint first_free;/*!< first free position in write_buf + measured in units of UNIV_PAGE_SIZE */ + ulint b_reserved;/*!< number of slots currently reserved for batch flush. */ - ibool* in_use; /*!< flag used to indicate if a slot is + os_event_t b_event;/*!< event where threads wait for a + batch flush to end. */ + ulint s_reserved;/*!< number of slots currently + reserved for single page flushes. */ + os_event_t s_event;/*!< event where threads wait for a + single page flush slot. */ + bool* in_use; /*!< flag used to indicate if a slot is in use. Only used for single page flushes. */ - ibool batch_running; /*!< set to TRUE if currently a batch + bool batch_running;/*!< set to TRUE if currently a batch is being written from the doublewrite buffer. */ - byte* write_buf; /*!< write buffer used in writing to the + byte* write_buf;/*!< write buffer used in writing to the doublewrite buffer, aligned to an address divisible by UNIV_PAGE_SIZE (which is required by Windows aio) */ - byte* write_buf_unaligned; - /*!< pointer to write_buf, but unaligned */ - buf_page_t** - buf_block_arr; /*!< array to store pointers to the buffer - blocks which have been cached to write_buf */ + byte* write_buf_unaligned;/*!< pointer to write_buf, + but unaligned */ + buf_page_t** buf_block_arr;/*!< array to store pointers to + the buffer blocks which have been + cached to write_buf */ }; diff --git a/storage/innobase/include/buf0flu.h b/storage/innobase/include/buf0flu.h index 94f4e6dedd1..6fee9afcc91 100644 --- a/storage/innobase/include/buf0flu.h +++ b/storage/innobase/include/buf0flu.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -87,13 +87,6 @@ buf_flush_page_try( buf_block_t* block) /*!< in/out: buffer control block */ __attribute__((nonnull, warn_unused_result)); # endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ -/********************************************************************//** -Flush a batch of writes to the datafiles that have already been -written by the OS. */ -UNIV_INTERN -void -buf_flush_sync_datafiles(void); -/*==========================*/ /*******************************************************************//** This utility flushes dirty blocks from the end of the flush list of all buffer pool instances. @@ -136,7 +129,7 @@ void buf_flush_wait_batch_end( /*=====================*/ buf_pool_t* buf_pool, /*!< in: buffer pool instance */ - enum buf_flush type); /*!< in: BUF_FLUSH_LRU + buf_flush_t type); /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ /******************************************************************//** Waits until a flush batch of the given type ends. This is called by @@ -147,7 +140,7 @@ void buf_flush_wait_batch_end_wait_only( /*===============================*/ buf_pool_t* buf_pool, /*!< in: buffer pool instance */ - enum buf_flush type); /*!< in: BUF_FLUSH_LRU + buf_flush_t type); /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ /********************************************************************//** This function should be called at a mini-transaction commit, if a page was @@ -248,8 +241,20 @@ buf_flush_page( /*===========*/ buf_pool_t* buf_pool, /*!< in: buffer pool instance */ buf_page_t* bpage, /*!< in: buffer control block */ - buf_flush flush_type) /*!< in: type of flush */ + buf_flush_t flush_type, /*!< in: type of flush */ + bool sync) /*!< in: true if sync IO request */ __attribute__((nonnull)); +/********************************************************************//** +Returns true if the block is modified and ready for flushing. +@return true if can flush immediately */ +UNIV_INTERN +bool +buf_flush_ready_for_flush( +/*======================*/ + buf_page_t* bpage, /*!< in: buffer control block, must be + buf_page_in_file(bpage) */ + buf_flush_t flush_type)/*!< in: type of flush */ + __attribute__((warn_unused_result)); #ifdef UNIV_DEBUG /******************************************************************//** diff --git a/storage/innobase/include/buf0lru.h b/storage/innobase/include/buf0lru.h index f7a69e1c9e4..ecdaef685a1 100644 --- a/storage/innobase/include/buf0lru.h +++ b/storage/innobase/include/buf0lru.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -79,19 +79,19 @@ buf_LRU_insert_zip_clean( Try to free a block. If bpage is a descriptor of a compressed-only page, the descriptor object will be freed as well. -NOTE: If this function returns TRUE, it will temporarily +NOTE: If this function returns true, it will temporarily release buf_pool->mutex. Furthermore, the page frame will no longer be accessible via bpage. The caller must hold buf_pool->mutex and must not hold any buf_page_get_mutex() when calling this function. -@return TRUE if freed, FALSE otherwise. */ +@return true if freed, false otherwise. */ UNIV_INTERN -ibool -buf_LRU_free_block( -/*===============*/ +bool +buf_LRU_free_page( +/*==============*/ buf_page_t* bpage, /*!< in: block to be freed */ - ibool zip) /*!< in: TRUE if should remove also the + bool zip) /*!< in: true if should remove also the compressed page of an uncompressed page */ __attribute__((nonnull)); /******************************************************************//** diff --git a/storage/innobase/include/buf0rea.h b/storage/innobase/include/buf0rea.h index b98ff121209..d2a1f264ff5 100644 --- a/storage/innobase/include/buf0rea.h +++ b/storage/innobase/include/buf0rea.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -119,7 +119,7 @@ UNIV_INTERN void buf_read_ibuf_merge_pages( /*======================*/ - ibool sync, /*!< in: TRUE if the caller + bool sync, /*!< in: true if the caller wants this function to wait for the highest address page to get read in, before this diff --git a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h index 5ed210d3b90..307ef18f0c2 100644 --- a/storage/innobase/include/buf0types.h +++ b/storage/innobase/include/buf0types.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved +Copyright (c) 1995, 2013, 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 @@ -45,7 +45,7 @@ struct buf_dblwr_t; typedef byte buf_frame_t; /** Flags for flush types */ -enum buf_flush { +enum buf_flush_t { BUF_FLUSH_LRU = 0, /*!< flush via the LRU list */ BUF_FLUSH_LIST, /*!< flush via the flush list of dirty blocks */ diff --git a/storage/innobase/include/db0err.h b/storage/innobase/include/db0err.h index 12e9f543e94..982bf1943cf 100644 --- a/storage/innobase/include/db0err.h +++ b/storage/innobase/include/db0err.h @@ -124,6 +124,10 @@ enum dberr_t { during online index creation */ DB_IO_ERROR, /*!< Generic IO error */ + DB_IDENTIFIER_TOO_LONG, /*!< Identifier name too long */ + DB_FTS_EXCEED_RESULT_CACHE_LIMIT, /*!< FTS query memory + exceeds result cache limit */ + DB_TEMP_FILE_WRITE_FAILURE, /*!< Temp file write failure */ /* The following are partial failure codes */ DB_FAIL = 1000, diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h index 217da0142ee..6ec1079957b 100644 --- a/storage/innobase/include/dict0crea.h +++ b/storage/innobase/include/dict0crea.h @@ -111,6 +111,20 @@ dberr_t dict_create_or_check_foreign_constraint_tables(void); /*================================================*/ /********************************************************************//** +Generate a foreign key constraint name when it was not named by the user. +A generated constraint has a name of the format dbname/tablename_ibfk_NUMBER, +where the numbers start from 1, and are given locally for this table, that is, +the number is not global, as it used to be before MySQL 4.0.18. */ +UNIV_INLINE +dberr_t +dict_create_add_foreign_id( +/*=======================*/ + ulint* id_nr, /*!< in/out: number to use in id generation; + incremented if used */ + const char* name, /*!< in: table name */ + dict_foreign_t* foreign)/*!< in/out: foreign key */ + __attribute__((nonnull)); +/********************************************************************//** Adds foreign key definitions to data dictionary tables in the database. We look at table->foreign_list, and also generate names to constraints that were not named by the user. A generated constraint has a name of the format @@ -158,25 +172,15 @@ dict_create_add_tablespace_to_dictionary( bool commit); /*!< in: if true then commit the transaction */ /********************************************************************//** -Table create node structure */ - -/********************************************************************//** -Add a single foreign key definition to the data dictionary tables in the -database. We also generate names to constraints that were not named by the -user. A generated constraint has a name of the format -databasename/tablename_ibfk_NUMBER, where the numbers start from 1, and -are given locally for this table, that is, the number is not global, as in -the old format constraints < 4.0.18 it used to be. -@return error code or DB_SUCCESS */ +Add a foreign key definition to the data dictionary tables. +@return error code or DB_SUCCESS */ UNIV_INTERN dberr_t dict_create_add_foreign_to_dictionary( /*==================================*/ - ulint* id_nr, /*!< in/out: number to use in id generation; - incremented if used */ - dict_table_t* table, /*!< in: table */ - dict_foreign_t* foreign,/*!< in: foreign */ - trx_t* trx) /*!< in/out: dictionary transaction */ + const char* name, /*!< in: table name */ + const dict_foreign_t* foreign,/*!< in: foreign key */ + trx_t* trx) /*!< in/out: dictionary transaction */ __attribute__((nonnull, warn_unused_result)); /* Table create node structure */ diff --git a/storage/innobase/include/dict0crea.ic b/storage/innobase/include/dict0crea.ic index 98cbbf28208..2d0d9dcb858 100644 --- a/storage/innobase/include/dict0crea.ic +++ b/storage/innobase/include/dict0crea.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2012, 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 @@ -23,3 +23,76 @@ Database object creation Created 1/8/1996 Heikki Tuuri *******************************************************/ +#include "mem0mem.h" + +/*********************************************************************//** +Checks if a table name contains the string "/#sql" which denotes temporary +tables in MySQL. +@return true if temporary table */ +UNIV_INTERN +bool +row_is_mysql_tmp_table_name( +/*========================*/ + const char* name) __attribute__((warn_unused_result)); + /*!< in: table name in the form + 'database/tablename' */ + + +/********************************************************************//** +Generate a foreign key constraint name when it was not named by the user. +A generated constraint has a name of the format dbname/tablename_ibfk_NUMBER, +where the numbers start from 1, and are given locally for this table, that is, +the number is not global, as it used to be before MySQL 4.0.18. */ +UNIV_INLINE +dberr_t +dict_create_add_foreign_id( +/*=======================*/ + ulint* id_nr, /*!< in/out: number to use in id generation; + incremented if used */ + const char* name, /*!< in: table name */ + dict_foreign_t* foreign)/*!< in/out: foreign key */ +{ + if (foreign->id == NULL) { + /* Generate a new constraint id */ + ulint namelen = strlen(name); + char* id = static_cast<char*>( + mem_heap_alloc(foreign->heap, + namelen + 20)); + + if (row_is_mysql_tmp_table_name(name)) { + + /* no overflow if number < 1e13 */ + sprintf(id, "%s_ibfk_%lu", name, + (ulong) (*id_nr)++); + } else { + char table_name[MAX_TABLE_NAME_LEN + 20] = ""; + uint errors = 0; + + strncpy(table_name, name, + MAX_TABLE_NAME_LEN + 20); + + innobase_convert_to_system_charset( + strchr(table_name, '/') + 1, + strchr(name, '/') + 1, + MAX_TABLE_NAME_LEN, &errors); + + if (errors) { + strncpy(table_name, name, + MAX_TABLE_NAME_LEN + 20); + } + + /* no overflow if number < 1e13 */ + sprintf(id, "%s_ibfk_%lu", table_name, + (ulong) (*id_nr)++); + + if (innobase_check_identifier_length( + strchr(id,'/') + 1)) { + return(DB_IDENTIFIER_TOO_LONG); + } + } + foreign->id = id; + } + + return(DB_SUCCESS); +} + diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index af0a5b31cc4..f740c427006 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -108,6 +108,18 @@ dict_remove_db_name( const char* name) /*!< in: table name in the form dbname '/' tablename */ __attribute__((nonnull, warn_unused_result)); + +/** Operation to perform when opening a table */ +enum dict_table_op_t { + /** Expect the tablespace to exist. */ + DICT_TABLE_OP_NORMAL = 0, + /** Drop any orphan indexes after an aborted online index creation */ + DICT_TABLE_OP_DROP_ORPHAN, + /** Silently load the tablespace if it does not exist, + and do not load the definitions of incomplete indexes. */ + DICT_TABLE_OP_LOAD_TABLESPACE +}; + /**********************************************************************//** Returns a table object based on table id. @return table, NULL if does not exist */ @@ -117,9 +129,7 @@ dict_table_open_on_id( /*==================*/ table_id_t table_id, /*!< in: table id */ ibool dict_locked, /*!< in: TRUE=data dictionary locked */ - ibool try_drop) /*!< in: TRUE=try to drop any orphan - indexes after an aborted online - index creation */ + dict_table_op_t table_op) /*!< in: operation to perform */ __attribute__((warn_unused_result)); /********************************************************************//** Decrements the count of open handles to a table. */ @@ -408,10 +418,17 @@ UNIV_INTERN dberr_t dict_foreign_add_to_cache( /*======================*/ - dict_foreign_t* foreign, /*!< in, own: foreign key constraint */ - ibool check_charsets) /*!< in: TRUE=check charset - compatibility */ - __attribute__((nonnull, warn_unused_result)); + dict_foreign_t* foreign, + /*!< in, own: foreign key constraint */ + const char** col_names, + /*!< in: column names, or NULL to use + foreign->foreign_table->col_names */ + bool check_charsets, + /*!< in: whether to check charset + compatibility */ + dict_err_ignore_t ignore_err) + /*!< in: error to be ignored */ + __attribute__((nonnull(1), warn_unused_result)); /*********************************************************************//** Check if the index is referenced by a foreign key, if TRUE return the matching instance NULL otherwise. @@ -435,15 +452,18 @@ dict_table_is_referenced_by_foreign_key( __attribute__((nonnull, warn_unused_result)); /**********************************************************************//** Replace the index passed in with another equivalent index in the -foreign key lists of the table. */ +foreign key lists of the table. +@return whether all replacements were found */ UNIV_INTERN -void +bool dict_foreign_replace_index( /*=======================*/ dict_table_t* table, /*!< in/out: table */ - const dict_index_t* index, /*!< in: index to be replaced */ - const trx_t* trx) /*!< in: transaction handle */ - __attribute__((nonnull)); + const char** col_names, + /*!< in: column names, or NULL + to use table->col_names */ + const dict_index_t* index) /*!< in: index to be replaced */ + __attribute__((nonnull(1,3), warn_unused_result)); /**********************************************************************//** Determines whether a string starts with the specified keyword. @return TRUE if str starts with keyword */ @@ -544,13 +564,16 @@ dict_index_t* dict_foreign_find_index( /*====================*/ const dict_table_t* table, /*!< in: table */ + const char** col_names, + /*!< in: column names, or NULL + to use table->col_names */ const char** columns,/*!< in: array of column names */ ulint n_cols, /*!< in: number of columns */ const dict_index_t* types_idx, /*!< in: NULL or an index whose types the column types must match */ - ibool check_charsets, + bool check_charsets, /*!< in: whether to check charsets. only has an effect if types_idx != NULL */ @@ -558,7 +581,7 @@ dict_foreign_find_index( /*!< in: nonzero if none of the columns must be declared NOT NULL */ - __attribute__((nonnull(1,2), warn_unused_result)); + __attribute__((nonnull(1,3), warn_unused_result)); /**********************************************************************//** Returns a column's name. @return column name. NOTE: not guaranteed to stay valid if table is @@ -624,6 +647,9 @@ bool dict_foreign_qualify_index( /*====================*/ const dict_table_t* table, /*!< in: table */ + const char** col_names, + /*!< in: column names, or NULL + to use table->col_names */ const char** columns,/*!< in: array of column names */ ulint n_cols, /*!< in: number of columns */ const dict_index_t* index, /*!< in: index to check */ @@ -631,7 +657,7 @@ dict_foreign_qualify_index( /*!< in: NULL or an index whose types the column types must match */ - ibool check_charsets, + bool check_charsets, /*!< in: whether to check charsets. only has an effect if types_idx != NULL */ @@ -639,7 +665,7 @@ dict_foreign_qualify_index( /*!< in: nonzero if none of the columns must be declared NOT NULL */ - __attribute__((nonnull(1,2), warn_unused_result)); + __attribute__((nonnull(1,3), warn_unused_result)); #ifdef UNIV_DEBUG /********************************************************************//** Gets the first index on the table (the clustered index). diff --git a/storage/innobase/include/dict0load.h b/storage/innobase/include/dict0load.h index 5991d58a686..030190b1a8e 100644 --- a/storage/innobase/include/dict0load.h +++ b/storage/innobase/include/dict0load.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -58,6 +58,18 @@ enum dict_table_info_t { is in the cache, if so, return it */ }; +/** Check type for dict_check_tablespaces_and_store_max_id() */ +enum dict_check_t { + /** No user tablespaces have been opened + (no crash recovery, no transactions recovered). */ + DICT_CHECK_NONE_LOADED = 0, + /** Some user tablespaces may have been opened + (no crash recovery; recovered table locks for transactions). */ + DICT_CHECK_SOME_LOADED, + /** All user tablespaces have been opened (crash recovery). */ + DICT_CHECK_ALL_LOADED +}; + /********************************************************************//** In a crash recovery we already have all the tablespace objects created. This function compares the space id information in the InnoDB data dictionary @@ -70,7 +82,7 @@ UNIV_INTERN void dict_check_tablespaces_and_store_max_id( /*====================================*/ - ibool in_crash_recovery); /*!< in: are we doing a crash recovery */ + dict_check_t dict_check); /*!< in: how to check */ /********************************************************************//** Finds the first table name in the given database. @return own: table name, NULL if does not exist; the caller must free @@ -199,7 +211,9 @@ UNIV_INTERN dict_table_t* dict_load_table_on_id( /*==================*/ - table_id_t table_id); /*!< in: table id */ + table_id_t table_id, /*!< in: table id */ + dict_err_ignore_t ignore_err); /*!< in: errors to ignore + when loading the table */ /********************************************************************//** This function is called when the database is booted. Loads system table index definitions except for the clustered index which @@ -220,12 +234,16 @@ UNIV_INTERN dberr_t dict_load_foreigns( /*===============*/ - const char* table_name, /*!< in: table name */ - ibool check_recursive,/*!< in: Whether to check recursive - load of tables chained by FK */ - ibool check_charsets) /*!< in: TRUE=check charsets - compatibility */ - __attribute__((nonnull, warn_unused_result)); + const char* table_name, /*!< in: table name */ + const char** col_names, /*!< in: column names, or NULL + to use table->col_names */ + bool check_recursive,/*!< in: Whether to check + recursive load of tables + chained by FK */ + bool check_charsets, /*!< in: whether to check + charset compatibility */ + dict_err_ignore_t ignore_err) /*!< in: error to be ignored */ + __attribute__((nonnull(1), warn_unused_result)); /********************************************************************//** Prints to the standard output information on all tables found in the data dictionary system table. */ diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index 3077162111a..21c1ab71445 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -226,7 +226,7 @@ This could result in rescursive calls and out of stack error eventually. DICT_FK_MAX_RECURSIVE_LOAD defines the maximum number of recursive loads, when exceeded, the child table will not be loaded. It will be loaded when the foreign constraint check needs to be run. */ -#define DICT_FK_MAX_RECURSIVE_LOAD 255 +#define DICT_FK_MAX_RECURSIVE_LOAD 20 /** Similarly, when tables are chained together with foreign key constraints with on cascading delete/update clause, delete from parent table could @@ -919,7 +919,9 @@ struct dict_table_t{ the background stats thread will detect this and will eventually quit sooner */ byte stats_bg_flag; - /*!< see BG_STAT_* above */ + /*!< see BG_STAT_* above. + Writes are covered by dict_sys->mutex. + Dirty reads are possible. */ /* @} */ /*----------------------*/ /**!< The following fields are used by the diff --git a/storage/innobase/include/dict0priv.h b/storage/innobase/include/dict0priv.h index 69eeb835885..9a3c8e22992 100644 --- a/storage/innobase/include/dict0priv.h +++ b/storage/innobase/include/dict0priv.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2010, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2013, 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 @@ -52,7 +52,9 @@ UNIV_INLINE dict_table_t* dict_table_open_on_id_low( /*=====================*/ - table_id_t table_id); /*!< in: table id */ + table_id_t table_id, /*!< in: table id */ + dict_err_ignore_t ignore_err); /*!< in: errors to ignore + when loading the table */ #ifndef UNIV_NONINL #include "dict0priv.ic" diff --git a/storage/innobase/include/dict0priv.ic b/storage/innobase/include/dict0priv.ic index e15fbc65a63..30ba8fb60aa 100644 --- a/storage/innobase/include/dict0priv.ic +++ b/storage/innobase/include/dict0priv.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2010, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2013, 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 @@ -73,7 +73,9 @@ UNIV_INLINE dict_table_t* dict_table_open_on_id_low( /*======================*/ - table_id_t table_id) /*!< in: table id */ + table_id_t table_id, /*!< in: table id */ + dict_err_ignore_t ignore_err) /*!< in: errors to ignore + when loading the table */ { dict_table_t* table; ulint fold; @@ -87,7 +89,7 @@ dict_table_open_on_id_low( dict_table_t*, table, ut_ad(table->cached), table->id == table_id); if (table == NULL) { - table = dict_load_table_on_id(table_id); + table = dict_load_table_on_id(table_id, ignore_err); } ut_ad(!table || table->cached); diff --git a/storage/innobase/include/dict0stats.ic b/storage/innobase/include/dict0stats.ic index 04763f174d0..ec9a9065470 100644 --- a/storage/innobase/include/dict0stats.ic +++ b/storage/innobase/include/dict0stats.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2013, 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 @@ -31,8 +31,7 @@ Created Jan 23, 2012 Vasil Dimov /*********************************************************************//** Set the persistent statistics flag for a given table. This is set only in the in-memory table object and is not saved on disk. It will be read -from the .frm file upon first open from MySQL after a server restart. -dict_stats_set_persistent() @{ */ +from the .frm file upon first open from MySQL after a server restart. */ UNIV_INLINE void dict_stats_set_persistent( @@ -61,11 +60,9 @@ dict_stats_set_persistent( /* we rely on this assignment to be atomic */ table->stat_persistent = stat_persistent; } -/* @} */ /*********************************************************************//** Check whether persistent statistics is enabled for a given table. -dict_stats_is_persistent_enabled() @{ @return TRUE if enabled, FALSE otherwise */ UNIV_INLINE ibool @@ -100,14 +97,12 @@ dict_stats_is_persistent_enabled( return(srv_stats_persistent); } } -/* @} */ /*********************************************************************//** Set the auto recalc flag for a given table (only honored for a persistent stats enabled table). The flag is set only in the in-memory table object and is not saved in InnoDB files. It will be read from the .frm file upon -first open from MySQL after a server restart. -dict_stats_auto_recalc_set() @{ */ +first open from MySQL after a server restart. */ UNIV_INLINE void dict_stats_auto_recalc_set( @@ -131,11 +126,9 @@ dict_stats_auto_recalc_set( /* we rely on this assignment to be atomic */ table->stats_auto_recalc = stats_auto_recalc; } -/* @} */ /*********************************************************************//** Check whether auto recalc is enabled for a given table. -dict_stats_auto_recalc_is_enabled() @{ @return TRUE if enabled, FALSE otherwise */ UNIV_INLINE ibool @@ -155,11 +148,9 @@ dict_stats_auto_recalc_is_enabled( return(srv_stats_auto_recalc); } } -/* @} */ /*********************************************************************//** -Initialize table's stats for the first time when opening a table. -dict_stats_init() @{ */ +Initialize table's stats for the first time when opening a table. */ UNIV_INLINE void dict_stats_init( @@ -182,12 +173,10 @@ dict_stats_init( dict_stats_update(table, opt); } -/* @} */ /*********************************************************************//** Deinitialize table's stats after the last close of the table. This is -used to detect "FLUSH TABLE" and refresh the stats upon next open. -dict_stats_deinit() @{ */ +used to detect "FLUSH TABLE" and refresh the stats upon next open. */ UNIV_INLINE void dict_stats_deinit( @@ -245,6 +234,3 @@ dict_stats_deinit( dict_table_stats_unlock(table, RW_X_LATCH); } -/* @} */ - -/* vim: set foldmethod=marker foldmarker=@{,@}: */ diff --git a/storage/innobase/include/dict0stats_bg.h b/storage/innobase/include/dict0stats_bg.h index dd85088c7ba..e866ab419fe 100644 --- a/storage/innobase/include/dict0stats_bg.h +++ b/storage/innobase/include/dict0stats_bg.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2013, 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 @@ -40,14 +40,12 @@ Add a table to the recalc pool, which is processed by the background stats gathering thread. Only the table id is added to the list, so the table can be closed after being enqueued and it will be opened when needed. If the table does not exist later (has been DROPped), -then it will be removed from the pool and skipped. -dict_stats_recalc_pool_add() @{ */ +then it will be removed from the pool and skipped. */ UNIV_INTERN void dict_stats_recalc_pool_add( /*=======================*/ const dict_table_t* table); /*!< in: table to add */ -/* @} */ /*****************************************************************//** Delete a given table from the auto recalc pool. @@ -57,53 +55,63 @@ void dict_stats_recalc_pool_del( /*=======================*/ const dict_table_t* table); /*!< in: table to remove */ -/* @} */ + +/** Yield the data dictionary latch when waiting +for the background thread to stop accessing a table. +@param trx transaction holding the data dictionary locks */ +#define DICT_STATS_BG_YIELD(trx) do { \ + row_mysql_unlock_data_dictionary(trx); \ + os_thread_sleep(250000); \ + row_mysql_lock_data_dictionary(trx); \ +} while (0) + +/*****************************************************************//** +Request the background collection of statistics to stop for a table. +@retval true when no background process is active +@retval false when it is not safe to modify the table definition */ +UNIV_INLINE +bool +dict_stats_stop_bg( +/*===============*/ + dict_table_t* table) /*!< in/out: table */ + __attribute__((warn_unused_result)); /*****************************************************************//** -Wait until background stats thread has stopped using the specified table(s). +Wait until background stats thread has stopped using the specified table. The caller must have locked the data dictionary using row_mysql_lock_data_dictionary() and this function may unlock it temporarily and restore the lock before it exits. -The background stats thead is guaranteed not to start using the specified -tables after this function returns and before the caller unlocks the data +The background stats thread is guaranteed not to start using the specified +table after this function returns and before the caller unlocks the data dictionary because it sets the BG_STAT_IN_PROGRESS bit in table->stats_bg_flag -under dict_sys->mutex. -dict_stats_wait_bg_to_stop_using_table() @{ */ +under dict_sys->mutex. */ UNIV_INTERN void -dict_stats_wait_bg_to_stop_using_tables( -/*====================================*/ - dict_table_t* table1, /*!< in/out: table1 */ - dict_table_t* table2, /*!< in/out: table2, could be NULL */ +dict_stats_wait_bg_to_stop_using_table( +/*===================================*/ + dict_table_t* table, /*!< in/out: table */ trx_t* trx); /*!< in/out: transaction to use for unlocking/locking the data dict */ -/* @} */ - /*****************************************************************//** Initialize global variables needed for the operation of dict_stats_thread(). -Must be called before dict_stats_thread() is started. -dict_stats_thread_init() @{ */ +Must be called before dict_stats_thread() is started. */ UNIV_INTERN void dict_stats_thread_init(); /*====================*/ -/* @} */ /*****************************************************************//** Free resources allocated by dict_stats_thread_init(), must be called -after dict_stats_thread() has exited. -dict_stats_thread_deinit() @{ */ +after dict_stats_thread() has exited. */ UNIV_INTERN void dict_stats_thread_deinit(); /*======================*/ -/* @} */ /*****************************************************************//** This is the thread for background stats gathering. It pops tables, from the auto recalc list and proceeds them, eventually recalculating their statistics. -dict_stats_thread() @{ @return this function does not return, it calls os_thread_exit() */ extern "C" UNIV_INTERN os_thread_ret_t @@ -111,6 +119,9 @@ DECLARE_THREAD(dict_stats_thread)( /*==============================*/ void* arg); /*!< in: a dummy parameter required by os_thread_create */ -/* @} */ + +# ifndef UNIV_NONINL +# include "dict0stats_bg.ic" +# endif #endif /* dict0stats_bg_h */ diff --git a/storage/innobase/include/dict0stats_bg.ic b/storage/innobase/include/dict0stats_bg.ic new file mode 100644 index 00000000000..87e3225de58 --- /dev/null +++ b/storage/innobase/include/dict0stats_bg.ic @@ -0,0 +1,45 @@ +/***************************************************************************** + +Copyright (c) 2012, 2013, 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 Street, Suite 500, Boston, MA 02110-1335 USA + +*****************************************************************************/ + +/**************************************************//** +@file include/dict0stats_bg.ic +Code used for background table and index stats gathering. + +Created Feb 8, 2013 Marko Makela +*******************************************************/ + +/*****************************************************************//** +Request the background collection of statistics to stop for a table. +@retval true when no background process is active +@retval false when it is not safe to modify the table definition */ +UNIV_INLINE +bool +dict_stats_stop_bg( +/*===============*/ + dict_table_t* table) /*!< in/out: table */ +{ + ut_ad(!srv_read_only_mode); + ut_ad(mutex_own(&dict_sys->mutex)); + + if (!(table->stats_bg_flag & BG_STAT_IN_PROGRESS)) { + return(true); + } + + table->stats_bg_flag |= BG_STAT_SHOULD_QUIT; + return(false); +} diff --git a/storage/innobase/include/dict0types.h b/storage/innobase/include/dict0types.h index b7f7c2d9df9..1299445a8ee 100644 --- a/storage/innobase/include/dict0types.h +++ b/storage/innobase/include/dict0types.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -57,6 +57,14 @@ enum dict_err_ignore_t { DICT_ERR_IGNORE_INDEX_ROOT = 1, /*!< ignore error if index root page is FIL_NULL or incorrect value */ DICT_ERR_IGNORE_CORRUPT = 2, /*!< skip corrupted indexes */ + DICT_ERR_IGNORE_FK_NOKEY = 4, /*!< ignore error if any foreign + key is missing */ + DICT_ERR_IGNORE_RECOVER_LOCK = 8, + /*!< Used when recovering table locks + for resurrected transactions. + Silently load a missing + tablespace, and do not load + incomplete index definitions. */ DICT_ERR_IGNORE_ALL = 0xFFFF /*!< ignore all errors */ }; @@ -67,4 +75,16 @@ enum ib_quiesce_t { QUIESCE_COMPLETE /*!< All done */ }; +/** Prefix for tmp tables, adopted from sql/table.h */ +#define tmp_file_prefix "#sql" +#define tmp_file_prefix_length 4 + +#define TEMP_TABLE_PREFIX "#sql" +#define TEMP_TABLE_PATH_PREFIX "/" TEMP_TABLE_PREFIX + +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG +/** Flag to control insert buffer debugging. */ +extern uint ibuf_debug; +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + #endif diff --git a/storage/innobase/include/dyn0dyn.h b/storage/innobase/include/dyn0dyn.h index ffb4f270d0e..7f23302d1ff 100644 --- a/storage/innobase/include/dyn0dyn.h +++ b/storage/innobase/include/dyn0dyn.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -46,15 +46,17 @@ UNIV_INLINE dyn_array_t* dyn_array_create( /*=============*/ - dyn_array_t* arr); /*!< in: pointer to a memory buffer of + dyn_array_t* arr) /*!< in/out memory buffer of size sizeof(dyn_array_t) */ + __attribute__((nonnull)); /************************************************************//** Frees a dynamic array. */ UNIV_INLINE void dyn_array_free( /*===========*/ - dyn_array_t* arr); /*!< in: dyn array */ + dyn_array_t* arr) /*!< in,own: dyn array */ + __attribute__((nonnull)); /*********************************************************************//** Makes room on top of a dyn array and returns a pointer to a buffer in it. After copying the elements, the caller must close the buffer using @@ -65,8 +67,9 @@ byte* dyn_array_open( /*===========*/ dyn_array_t* arr, /*!< in: dynamic array */ - ulint size); /*!< in: size in bytes of the buffer; MUST be + ulint size) /*!< in: size in bytes of the buffer; MUST be smaller than DYN_ARRAY_DATA_SIZE! */ + __attribute__((nonnull, warn_unused_result)); /*********************************************************************//** Closes the buffer returned by dyn_array_open. */ UNIV_INLINE @@ -74,7 +77,8 @@ void dyn_array_close( /*============*/ dyn_array_t* arr, /*!< in: dynamic array */ - byte* ptr); /*!< in: buffer space from ptr up was not used */ + const byte* ptr) /*!< in: end of used space */ + __attribute__((nonnull)); /*********************************************************************//** Makes room on top of a dyn array and returns a pointer to the added element. The caller must copy the element to @@ -84,8 +88,9 @@ UNIV_INLINE void* dyn_array_push( /*===========*/ - dyn_array_t* arr, /*!< in: dynamic array */ - ulint size); /*!< in: size in bytes of the element */ + dyn_array_t* arr, /*!< in/out: dynamic array */ + ulint size) /*!< in: size in bytes of the element */ + __attribute__((nonnull, warn_unused_result)); /************************************************************//** Returns pointer to an element in dyn array. @return pointer to element */ @@ -93,9 +98,10 @@ UNIV_INLINE void* dyn_array_get_element( /*==================*/ - dyn_array_t* arr, /*!< in: dyn array */ - ulint pos); /*!< in: position of element as bytes - from array start */ + const dyn_array_t* arr, /*!< in: dyn array */ + ulint pos) /*!< in: position of element + in bytes from array start */ + __attribute__((nonnull, warn_unused_result)); /************************************************************//** Returns the size of stored data in a dyn array. @return data size in bytes */ @@ -103,30 +109,33 @@ UNIV_INLINE ulint dyn_array_get_data_size( /*====================*/ - dyn_array_t* arr); /*!< in: dyn array */ + const dyn_array_t* arr) /*!< in: dyn array */ + __attribute__((nonnull, warn_unused_result, pure)); /************************************************************//** -Gets the first block in a dyn array. */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_first_block( -/*======================*/ - dyn_array_t* arr); /*!< in: dyn array */ +Gets the first block in a dyn array. +@param arr dyn array +@return first block */ +#define dyn_array_get_first_block(arr) (arr) /************************************************************//** -Gets the last block in a dyn array. */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_last_block( -/*=====================*/ - dyn_array_t* arr); /*!< in: dyn array */ +Gets the last block in a dyn array. +@param arr dyn array +@return last block */ +#define dyn_array_get_last_block(arr) \ + ((arr)->heap ? UT_LIST_GET_LAST((arr)->base) : (arr)) /********************************************************************//** Gets the next block in a dyn array. -@return pointer to next, NULL if end of list */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_next_block( -/*=====================*/ - dyn_array_t* arr, /*!< in: dyn array */ - dyn_block_t* block); /*!< in: dyn array block */ +@param arr dyn array +@param block dyn array block +@return pointer to next, NULL if end of list */ +#define dyn_array_get_next_block(arr, block) \ + ((arr)->heap ? UT_LIST_GET_NEXT(list, block) : NULL) +/********************************************************************//** +Gets the previous block in a dyn array. +@param arr dyn array +@param block dyn array block +@return pointer to previous, NULL if end of list */ +#define dyn_array_get_prev_block(arr, block) \ + ((arr)->heap ? UT_LIST_GET_PREV(list, block) : NULL) /********************************************************************//** Gets the number of used bytes in a dyn array block. @return number of bytes used */ @@ -134,7 +143,8 @@ UNIV_INLINE ulint dyn_block_get_used( /*===============*/ - dyn_block_t* block); /*!< in: dyn array block */ + const dyn_block_t* block) /*!< in: dyn array block */ + __attribute__((nonnull, warn_unused_result, pure)); /********************************************************************//** Gets pointer to the start of data in a dyn array block. @return pointer to data */ @@ -142,16 +152,18 @@ UNIV_INLINE byte* dyn_block_get_data( /*===============*/ - dyn_block_t* block); /*!< in: dyn array block */ + const dyn_block_t* block) /*!< in: dyn array block */ + __attribute__((nonnull, warn_unused_result, pure)); /********************************************************//** Pushes n bytes to a dyn array. */ UNIV_INLINE void dyn_push_string( /*============*/ - dyn_array_t* arr, /*!< in: dyn array */ + dyn_array_t* arr, /*!< in/out: dyn array */ const byte* str, /*!< in: string to write */ - ulint len); /*!< in: string length */ + ulint len) /*!< in: string length */ + __attribute__((nonnull)); /*#################################################################*/ diff --git a/storage/innobase/include/dyn0dyn.ic b/storage/innobase/include/dyn0dyn.ic index 39254e632a8..0296554e2ee 100644 --- a/storage/innobase/include/dyn0dyn.ic +++ b/storage/innobase/include/dyn0dyn.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -35,56 +35,8 @@ UNIV_INTERN dyn_block_t* dyn_array_add_block( /*================*/ - dyn_array_t* arr); /*!< in: dyn array */ - - -/************************************************************//** -Gets the first block in a dyn array. */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_first_block( -/*======================*/ - dyn_array_t* arr) /*!< in: dyn array */ -{ - return(arr); -} - -/************************************************************//** -Gets the last block in a dyn array. */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_last_block( -/*=====================*/ - dyn_array_t* arr) /*!< in: dyn array */ -{ - if (arr->heap == NULL) { - - return(arr); - } - - return(UT_LIST_GET_LAST(arr->base)); -} - -/********************************************************************//** -Gets the next block in a dyn array. -@return pointer to next, NULL if end of list */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_next_block( -/*=====================*/ - dyn_array_t* arr, /*!< in: dyn array */ - dyn_block_t* block) /*!< in: dyn array block */ -{ - ut_ad(arr && block); - - if (arr->heap == NULL) { - ut_ad(arr == block); - - return(NULL); - } - - return(UT_LIST_GET_NEXT(list, block)); -} + dyn_array_t* arr) /*!< in/out: dyn array */ + __attribute__((nonnull, warn_unused_result)); /********************************************************************//** Gets the number of used bytes in a dyn array block. @@ -93,7 +45,7 @@ UNIV_INLINE ulint dyn_block_get_used( /*===============*/ - dyn_block_t* block) /*!< in: dyn array block */ + const dyn_block_t* block) /*!< in: dyn array block */ { ut_ad(block); @@ -107,11 +59,11 @@ UNIV_INLINE byte* dyn_block_get_data( /*===============*/ - dyn_block_t* block) /*!< in: dyn array block */ + const dyn_block_t* block) /*!< in: dyn array block */ { ut_ad(block); - return(block->data); + return(const_cast<byte*>(block->data)); } /*********************************************************************//** @@ -121,7 +73,7 @@ UNIV_INLINE dyn_array_t* dyn_array_create( /*=============*/ - dyn_array_t* arr) /*!< in: pointer to a memory buffer of + dyn_array_t* arr) /*!< in/out: memory buffer of size sizeof(dyn_array_t) */ { ut_ad(arr); @@ -132,10 +84,9 @@ dyn_array_create( arr->heap = NULL; arr->used = 0; -#ifdef UNIV_DEBUG - arr->buf_end = 0; - arr->magic_n = DYN_BLOCK_MAGIC_N; -#endif + ut_d(arr->buf_end = 0); + ut_d(arr->magic_n = DYN_BLOCK_MAGIC_N); + return(arr); } @@ -151,9 +102,7 @@ dyn_array_free( mem_heap_free(arr->heap); } -#ifdef UNIV_DEBUG - arr->magic_n = 0; -#endif + ut_d(arr->magic_n = 0); } /*********************************************************************//** @@ -164,7 +113,7 @@ UNIV_INLINE void* dyn_array_push( /*===========*/ - dyn_array_t* arr, /*!< in: dynamic array */ + dyn_array_t* arr, /*!< in/out: dynamic array */ ulint size) /*!< in: size in bytes of the element */ { dyn_block_t* block; @@ -176,24 +125,23 @@ dyn_array_push( ut_ad(size); block = arr; - used = block->used; - if (used + size > DYN_ARRAY_DATA_SIZE) { + if (block->used + size > DYN_ARRAY_DATA_SIZE) { /* Get the last array block */ block = dyn_array_get_last_block(arr); - used = block->used; - if (used + size > DYN_ARRAY_DATA_SIZE) { + if (block->used + size > DYN_ARRAY_DATA_SIZE) { block = dyn_array_add_block(arr); - used = block->used; } } + used = block->used; + block->used = used + size; ut_ad(block->used <= DYN_ARRAY_DATA_SIZE); - return((block->data) + used); + return(block->data + used); } /*********************************************************************//** @@ -210,7 +158,6 @@ dyn_array_open( smaller than DYN_ARRAY_DATA_SIZE! */ { dyn_block_t* block; - ulint used; ut_ad(arr); ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N); @@ -218,28 +165,23 @@ dyn_array_open( ut_ad(size); block = arr; - used = block->used; - if (used + size > DYN_ARRAY_DATA_SIZE) { + if (block->used + size > DYN_ARRAY_DATA_SIZE) { /* Get the last array block */ block = dyn_array_get_last_block(arr); - used = block->used; - if (used + size > DYN_ARRAY_DATA_SIZE) { + if (block->used + size > DYN_ARRAY_DATA_SIZE) { block = dyn_array_add_block(arr); - used = block->used; ut_a(size <= DYN_ARRAY_DATA_SIZE); } } ut_ad(block->used <= DYN_ARRAY_DATA_SIZE); -#ifdef UNIV_DEBUG ut_ad(arr->buf_end == 0); + ut_d(arr->buf_end = block->used + size); - arr->buf_end = used + size; -#endif - return((block->data) + used); + return(block->data + block->used); } /*********************************************************************//** @@ -248,8 +190,8 @@ UNIV_INLINE void dyn_array_close( /*============*/ - dyn_array_t* arr, /*!< in: dynamic array */ - byte* ptr) /*!< in: buffer space from ptr up was not used */ + dyn_array_t* arr, /*!< in/out: dynamic array */ + const byte* ptr) /*!< in: end of used space */ { dyn_block_t* block; @@ -264,9 +206,7 @@ dyn_array_close( ut_ad(block->used <= DYN_ARRAY_DATA_SIZE); -#ifdef UNIV_DEBUG - arr->buf_end = 0; -#endif + ut_d(arr->buf_end = 0); } /************************************************************//** @@ -276,12 +216,11 @@ UNIV_INLINE void* dyn_array_get_element( /*==================*/ - dyn_array_t* arr, /*!< in: dyn array */ - ulint pos) /*!< in: position of element as bytes - from array start */ + const dyn_array_t* arr, /*!< in: dyn array */ + ulint pos) /*!< in: position of element + in bytes from array start */ { - dyn_block_t* block; - ulint used; + const dyn_block_t* block; ut_ad(arr); ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N); @@ -290,21 +229,23 @@ dyn_array_get_element( block = dyn_array_get_first_block(arr); if (arr->heap != NULL) { - used = dyn_block_get_used(block); + for (;;) { + ulint used = dyn_block_get_used(block); + + if (pos < used) { + break; + } - while (pos >= used) { pos -= used; block = UT_LIST_GET_NEXT(list, block); ut_ad(block); - - used = dyn_block_get_used(block); } } ut_ad(block); ut_ad(dyn_block_get_used(block) >= pos); - return(block->data + pos); + return(const_cast<byte*>(block->data) + pos); } /************************************************************//** @@ -314,10 +255,10 @@ UNIV_INLINE ulint dyn_array_get_data_size( /*====================*/ - dyn_array_t* arr) /*!< in: dyn array */ + const dyn_array_t* arr) /*!< in: dyn array */ { - dyn_block_t* block; - ulint sum = 0; + const dyn_block_t* block; + ulint sum = 0; ut_ad(arr); ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N); @@ -344,7 +285,7 @@ UNIV_INLINE void dyn_push_string( /*============*/ - dyn_array_t* arr, /*!< in: dyn array */ + dyn_array_t* arr, /*!< in/out: dyn array */ const byte* str, /*!< in: string to write */ ulint len) /*!< in: string length */ { diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index 56fda8b39b1..daeca1d8e44 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -360,9 +360,11 @@ fil_write_flushed_lsn_to_data_files( ulint arch_log_no); /*!< in: latest archived log file number */ /*******************************************************************//** Reads the flushed lsn, arch no, and tablespace flag fields from a data -file at database startup. */ +file at database startup. +@retval NULL on success, or if innodb_force_recovery is set +@return pointer to an error message string */ UNIV_INTERN -void +const char* fil_read_first_page( /*================*/ os_file_t data_file, /*!< in: open data file */ @@ -379,8 +381,9 @@ fil_read_first_page( #endif /* UNIV_LOG_ARCHIVE */ lsn_t* min_flushed_lsn, /*!< out: min of flushed lsn values in data files */ - lsn_t* max_flushed_lsn); /*!< out: max of flushed + lsn_t* max_flushed_lsn) /*!< out: max of flushed lsn values in data files */ + __attribute__((warn_unused_result)); /*******************************************************************//** Increments the count of pending operation, if space is not being deleted. @return TRUE if being deleted, and operation should be skipped */ @@ -728,7 +731,7 @@ fil_io( because i/os are not actually handled until all have been posted: use with great caution! */ - ibool sync, /*!< in: TRUE if synchronous aio is desired */ + bool sync, /*!< in: true if synchronous aio is desired */ ulint space_id, /*!< in: space id */ ulint zip_size, /*!< in: compressed page size in bytes; 0 for uncompressed pages */ @@ -977,8 +980,10 @@ fil_mtr_rename_log( ulint new_space_id, /*!< in: tablespace id of the new table */ const char* new_name, /*!< in: new table name */ - const char* tmp_name); /*!< in: temp table name used while + const char* tmp_name, /*!< in: temp table name used while swapping */ + mtr_t* mtr) /*!< in/out: mini-transaction */ + __attribute__((nonnull)); #endif /* !UNIV_INNOCHECKSUM */ #endif /* fil0fil_h */ diff --git a/storage/innobase/include/fts0ast.h b/storage/innobase/include/fts0ast.h index 7f2525dc450..c0aac6d8e4c 100644 --- a/storage/innobase/include/fts0ast.h +++ b/storage/innobase/include/fts0ast.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2013, 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 @@ -27,6 +27,7 @@ Created 2007/03/16/03 Sunny Bains #define INNOBASE_FST0AST_H #include "mem0mem.h" +#include "ha_prototypes.h" /* The type of AST Node */ enum fts_ast_type_t { @@ -59,11 +60,16 @@ enum fts_ast_oper_t { word*/ FTS_DISTANCE, /*!< Proximity distance */ - FTS_IGNORE_SKIP /*!< Transient node operator + FTS_IGNORE_SKIP, /*!< Transient node operator signifies that this is a FTS_IGNORE node, and ignored in the first pass of fts_ast_visit() */ + FTS_EXIST_SKIP /*!< Transient node operator + signifies that this ia a + FTS_EXIST node, and ignored in + the first pass of + fts_ast_visit() */ }; /* Data types used by the FTS parser */ @@ -71,7 +77,7 @@ struct fts_lexer_t; struct fts_ast_node_t; struct fts_ast_state_t; -typedef ulint (*fts_ast_callback)(fts_ast_oper_t, fts_ast_node_t*, void*); +typedef dberr_t (*fts_ast_callback)(fts_ast_oper_t, fts_ast_node_t*, void*); /******************************************************************** Parse the string using the lexer setup within state.*/ @@ -268,6 +274,8 @@ struct fts_ast_state_t { fts_ast_list_t list; /*!< List of nodes allocated */ fts_lexer_t* lexer; /*!< Lexer callback + arg */ + CHARSET_INFO* charset; /*!< charset used for + tokenization */ }; #endif /* INNOBASE_FSTS0AST_H */ diff --git a/storage/innobase/include/fts0blex.h b/storage/innobase/include/fts0blex.h index 6f8d6eaeb29..d0e4cae0678 100644 --- a/storage/innobase/include/fts0blex.h +++ b/storage/innobase/include/fts0blex.h @@ -38,7 +38,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -55,7 +55,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -193,7 +193,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ diff --git a/storage/innobase/include/fts0fts.h b/storage/innobase/include/fts0fts.h index f2f8617012a..5bea5bc0e97 100644 --- a/storage/innobase/include/fts0fts.h +++ b/storage/innobase/include/fts0fts.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2013, 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 @@ -87,6 +87,7 @@ those defined in mysql file ft_global.h */ #define FTS_EXPAND 4 #define FTS_PROXIMITY 8 #define FTS_PHRASE 16 +#define FTS_OPT_RANKING 32 #define FTS_INDEX_TABLE_IND_NAME "FTS_INDEX_TABLE_IND" @@ -240,9 +241,10 @@ struct fts_ranking_t { fts_rank_t rank; /*!< Rank is between 0 .. 1 */ - ib_rbt_t* words; /*!< RB Tree of type byte*, this - contains the words that were queried + byte* words; /*!< this contains the words + that were queried and found in this document */ + ulint words_len; /*!< words len */ }; /** Query result. */ @@ -345,14 +347,27 @@ extern const char* fts_default_stopword[]; /** Variable specifying the maximum FTS cache size for each table */ extern ulong fts_max_cache_size; +/** Variable specifying the total memory allocated for FTS cache */ +extern ulong fts_max_total_cache_size; + +/** Variable specifying the FTS result cache limit for each query */ +extern ulong fts_result_cache_limit; + /** Variable specifying the maximum FTS max token size */ extern ulong fts_max_token_size; /** Variable specifying the minimum FTS max token size */ extern ulong fts_min_token_size; +/** Whether the total memory used for FTS cache is exhausted, and we will +need a sync to free some memory */ +extern bool fts_need_sync; + /** Maximum possible Fulltext word length */ -#define FTS_MAX_WORD_LEN 3 * HA_FT_MAXCHARLEN +#define FTS_MAX_WORD_LEN HA_FT_MAXBYTELEN + +/** Maximum possible Fulltext word length (in characters) */ +#define FTS_MAX_WORD_LEN_IN_CHAR HA_FT_MAXCHARLEN /** Variable specifying the table that has Fulltext index to display its content through information schema table */ @@ -758,16 +773,12 @@ fts_cache_destroy( fts_cache_t* cache); /*!< in: cache*/ /*********************************************************************//** -Clear cache. If the shutdown flag is TRUE then the cache can contain -data that needs to be freed. For regular clear as part of normal -working we assume the caller has freed all resources. */ +Clear cache. */ UNIV_INTERN void fts_cache_clear( /*============*/ - fts_cache_t* cache, /*!< in: cache */ - ibool free_words); /*!< in: TRUE if free - in memory word cache. */ + fts_cache_t* cache); /*!< in: cache */ /*********************************************************************//** Initialize things in cache. */ @@ -818,7 +829,7 @@ fts_drop_index_split_tables( Run SYNC on the table, i.e., write out data from the cache to the FTS auxiliary INDEX table and clear the cache at the end. */ UNIV_INTERN -void +dberr_t fts_sync_table( /*===========*/ dict_table_t* table) /*!< in: table */ @@ -844,7 +855,7 @@ fts_index_get_charset( dict_index_t* index); /*!< in: FTS index */ /*********************************************************************//** -Get the initial Doc ID by consulting the ADDED and the CONFIG table +Get the initial Doc ID by consulting the CONFIG table @return initial Doc ID */ UNIV_INTERN doc_id_t @@ -894,8 +905,8 @@ ulint innobase_mysql_fts_get_token( /*=========================*/ CHARSET_INFO* charset, /*!< in: Character set */ - byte* start, /*!< in: start of text */ - byte* end, /*!< in: one character past + const byte* start, /*!< in: start of text */ + const byte* end, /*!< in: one character past end of text */ fts_string_t* token, /*!< out: token's text */ ulint* offset); /*!< out: offset to token, @@ -923,9 +934,9 @@ fts_get_max_doc_id( /******************************************************************//** Check whether user supplied stopword table exists and is of the right format. -@return TRUE if the table qualifies */ +@return the stopword column charset if qualifies */ UNIV_INTERN -ibool +CHARSET_INFO* fts_valid_stopword_table( /*=====================*/ const char* stopword_table_name); /*!< in: Stopword table @@ -970,9 +981,11 @@ fts_table_fetch_doc_ids( fts_doc_ids_t* doc_ids); /*!< in: For collecting doc ids */ /****************************************************************//** -This function loads the documents in "ADDED" table into FTS cache, -it also loads the stopword info into the FTS cache. -@return DB_SUCCESS if all OK */ +This function brings FTS index in sync when FTS index is first +used. There are documents that have not yet sync-ed to auxiliary +tables from last server abnormally shutdown, we will need to bring +such document into FTS cache before any further operations +@return TRUE if all OK */ UNIV_INTERN ibool fts_init_index( @@ -1001,6 +1014,17 @@ fts_drop_index( trx_t* trx) /*!< in: Transaction for the drop */ __attribute__((nonnull)); +/****************************************************************//** +Rename auxiliary tables for all fts index for a table +@return DB_SUCCESS or error code */ + +dberr_t +fts_rename_aux_tables( +/*==================*/ + dict_table_t* table, /*!< in: user Table */ + const char* new_name, /*!< in: new table name */ + trx_t* trx); /*!< in: transaction */ + /*******************************************************************//** Check indexes in the fts->indexes is also present in index cache and table->indexes list diff --git a/storage/innobase/include/fts0pars.h b/storage/innobase/include/fts0pars.h index ae5a55b2455..50f636944e5 100644 --- a/storage/innobase/include/fts0pars.h +++ b/storage/innobase/include/fts0pars.h @@ -1,21 +1,19 @@ +/* A Bison parser, made by GNU Bison 2.5. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + 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, see <http://www.gnu.org/licenses/>. */ @@ -28,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -52,8 +50,8 @@ typedef union YYSTYPE { -/* Line 1676 of yacc.c */ -#line 36 "fts0pars.y" +/* Line 2068 of yacc.c */ +#line 61 "fts0pars.y" int oper; char* token; @@ -61,8 +59,8 @@ typedef union YYSTYPE -/* Line 1676 of yacc.c */ -#line 66 "fts0pars.h" +/* Line 2068 of yacc.c */ +#line 64 "fts0pars.hh" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/storage/innobase/include/fts0tlex.h b/storage/innobase/include/fts0tlex.h index c0fed0efa71..f91533803e8 100644 --- a/storage/innobase/include/fts0tlex.h +++ b/storage/innobase/include/fts0tlex.h @@ -38,7 +38,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -55,7 +55,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -193,7 +193,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ diff --git a/storage/innobase/include/fts0types.h b/storage/innobase/include/fts0types.h index 8fc52c9fc5e..64677428331 100644 --- a/storage/innobase/include/fts0types.h +++ b/storage/innobase/include/fts0types.h @@ -137,11 +137,11 @@ struct fts_cache_t { intialization, it has different SYNC level as above cache lock */ - ib_mutex_t optimize_lock; /*!< Lock for OPTIMIZE */ + ib_mutex_t optimize_lock; /*!< Lock for OPTIMIZE */ - ib_mutex_t deleted_lock; /*!< Lock covering deleted_doc_ids */ + ib_mutex_t deleted_lock; /*!< Lock covering deleted_doc_ids */ - ib_mutex_t doc_id_lock; /*!< Lock covering Doc ID */ + ib_mutex_t doc_id_lock; /*!< Lock covering Doc ID */ ib_vector_t* deleted_doc_ids;/*!< Array of deleted doc ids, each element is of type fts_update_t */ @@ -237,6 +237,7 @@ struct fts_fetch_t { fts_sql_callback read_record; /*!< Callback for reading index record */ + ulint total_memory; /*!< Total memory used */ }; /** For horizontally splitting an FTS auxiliary index */ diff --git a/storage/innobase/include/fts0types.ic b/storage/innobase/include/fts0types.ic index b96c3f9dac8..f0dfd023a70 100644 --- a/storage/innobase/include/fts0types.ic +++ b/storage/innobase/include/fts0types.ic @@ -47,7 +47,8 @@ fts_utf8_string_dup( const fts_string_t* src, /*!< in: src string */ mem_heap_t* heap) /*!< in: heap to use */ { - dst->f_str = (byte*) mem_heap_dup(heap, src->f_str, src->f_len + 1); + dst->f_str = (byte*)mem_heap_alloc(heap, src->f_len + 1); + memcpy(dst->f_str, src->f_str, src->f_len); dst->f_len = src->f_len; dst->f_str[src->f_len] = 0; diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h index 08ac2a74405..53c196b6f9e 100644 --- a/storage/innobase/include/ha_prototypes.h +++ b/storage/innobase/include/ha_prototypes.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2006, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2006, 2013, 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 @@ -409,8 +409,8 @@ ulint innobase_mysql_fts_get_token( /*=========================*/ CHARSET_INFO* charset, /*!< in: Character set */ - byte* start, /*!< in: start of text */ - byte* end, /*!< in: one character past end of + const byte* start, /*!< in: start of text */ + const byte* end, /*!< in: one character past end of text */ fts_string_t* token, /*!< out: token's text */ ulint* offset); /*!< out: offset to token, @@ -608,4 +608,35 @@ innobase_convert_to_system_charset( ulint len, /* in: length of 'to', in bytes */ uint* errors); /* out: error return */ +/********************************************************************** +Check if the length of the identifier exceeds the maximum allowed. +The input to this function is an identifier in charset my_charset_filename. +return true when length of identifier is too long. */ +UNIV_INTERN +my_bool +innobase_check_identifier_length( +/*=============================*/ + const char* id); /* in: identifier to check. it must belong + to charset my_charset_filename */ + +/********************************************************************** +Converts an identifier from my_charset_filename to UTF-8 charset. */ +uint +innobase_convert_to_system_charset( +/*===============================*/ + char* to, /* out: converted identifier */ + const char* from, /* in: identifier to convert */ + ulint len, /* in: length of 'to', in bytes */ + uint* errors); /* out: error return */ + +/********************************************************************** +Converts an identifier from my_charset_filename to UTF-8 charset. */ +uint +innobase_convert_to_filename_charset( +/*=================================*/ + char* to, /* out: converted identifier */ + const char* from, /* in: identifier to convert */ + ulint len); /* in: length of 'to', in bytes */ + + #endif /* HA_INNODB_PROTOTYPES_H */ diff --git a/storage/innobase/include/handler0alter.h b/storage/innobase/include/handler0alter.h index 52aaf2d25ef..66b963ae39a 100644 --- a/storage/innobase/include/handler0alter.h +++ b/storage/innobase/include/handler0alter.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2013, 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 diff --git a/storage/innobase/include/ibuf0ibuf.h b/storage/innobase/include/ibuf0ibuf.h index e64f067d364..9c3b686c998 100644 --- a/storage/innobase/include/ibuf0ibuf.h +++ b/storage/innobase/include/ibuf0ibuf.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, 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 @@ -67,11 +67,6 @@ typedef enum { /** Operations that can currently be buffered. */ extern ibuf_use_t ibuf_use; -#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG -/** Flag to control insert buffer debugging. */ -extern uint ibuf_debug; -#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ - /** The insert buffer control structure */ extern ibuf_t* ibuf; @@ -413,9 +408,9 @@ ibuf_count_get( #endif /******************************************************************//** Looks if the insert buffer is empty. -@return TRUE if empty */ +@return true if empty */ UNIV_INTERN -ibool +bool ibuf_is_empty(void); /*===============*/ /******************************************************************//** diff --git a/storage/innobase/include/ibuf0ibuf.ic b/storage/innobase/include/ibuf0ibuf.ic index 92ca2cbb9a2..21747fdceac 100644 --- a/storage/innobase/include/ibuf0ibuf.ic +++ b/storage/innobase/include/ibuf0ibuf.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, 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 @@ -67,10 +67,10 @@ struct ibuf_t{ ulint seg_size; /*!< allocated pages of the file segment containing ibuf header and tree */ - ibool empty; /*!< Protected by the page + bool empty; /*!< Protected by the page latch of the root page of the insert buffer tree - (FSP_IBUF_TREE_ROOT_PAGE_NO). TRUE + (FSP_IBUF_TREE_ROOT_PAGE_NO). true if and only if the insert buffer tree is empty. */ ulint free_list_len; /*!< length of the free list */ @@ -253,7 +253,15 @@ ibuf_index_page_calc_free_zip( ut_ad(zip_size == buf_block_get_zip_size(block)); ut_ad(zip_size); - max_ins_size = page_get_max_insert_size_after_reorganize( + /* Consider the maximum insert size on the uncompressed page + without reorganizing the page. We must not assume anything + about the compression ratio. If zip_max_ins > max_ins_size and + there is 1/4 garbage on the page, recompression after the + reorganize could fail, in theory. So, let us guarantee that + merging a buffered insert to a compressed page will always + succeed without reorganizing or recompressing the page, just + by using the page modification log. */ + max_ins_size = page_get_max_insert_size( buf_block_get_frame(block), 1); page_zip = buf_block_get_page_zip(block); @@ -331,8 +339,8 @@ ibuf_update_free_bits_if_full( before = ibuf_index_page_calc_free_bits(0, max_ins_size); if (max_ins_size >= increase) { -#if ULINT32_UNDEFINED <= UNIV_PAGE_SIZE -# error "ULINT32_UNDEFINED <= UNIV_PAGE_SIZE" +#if ULINT32_UNDEFINED <= UNIV_PAGE_SIZE_MAX +# error "ULINT32_UNDEFINED <= UNIV_PAGE_SIZE_MAX" #endif after = ibuf_index_page_calc_free_bits(0, max_ins_size - increase); diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h index 24e612e63f5..f34bfc3656a 100644 --- a/storage/innobase/include/lock0lock.h +++ b/storage/innobase/include/lock0lock.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -466,6 +466,14 @@ lock_table( enum lock_mode mode, /*!< in: lock mode */ que_thr_t* thr) /*!< in: query thread */ __attribute__((nonnull, warn_unused_result)); +/*********************************************************************//** +Creates a table IX lock object for a resurrected transaction. */ +UNIV_INTERN +void +lock_table_ix_resurrect( +/*====================*/ + dict_table_t* table, /*!< in/out: table */ + trx_t* trx); /*!< in/out: transaction */ /*************************************************************//** Removes a granted record lock of a transaction from the queue and grants locks to other transactions waiting in the queue if they now are entitled @@ -824,6 +832,19 @@ lock_trx_has_sys_table_locks( /*=========================*/ const trx_t* trx) /*!< in: transaction to check */ __attribute__((warn_unused_result)); + +/*******************************************************************//** +Check if the transaction holds an exclusive lock on a record. +@return whether the locks are held */ +UNIV_INTERN +bool +lock_trx_has_rec_x_lock( +/*====================*/ + const trx_t* trx, /*!< in: transaction to check */ + const dict_table_t* table, /*!< in: table to check */ + const buf_block_t* block, /*!< in: buffer block of the record */ + ulint heap_no)/*!< in: record heap number */ + __attribute__((nonnull, warn_unused_result)); #endif /* UNIV_DEBUG */ /** Lock modes and types */ diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h index dd5e37012b7..61318e34561 100644 --- a/storage/innobase/include/log0log.h +++ b/storage/innobase/include/log0log.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2009, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -794,12 +794,14 @@ struct log_t{ ulint max_buf_free; /*!< recommended maximum value of buf_free, after which the buffer is flushed */ + #ifdef UNIV_LOG_DEBUG ulint old_buf_free; /*!< value of buf free when log was last time opened; only in the debug version */ ib_uint64_t old_lsn; /*!< value of lsn when log was last time opened; only in the debug version */ +#endif /* UNIV_LOG_DEBUG */ ibool check_flush_or_checkpoint; /*!< this is set to TRUE when there may be need to flush the log buffer, or @@ -822,6 +824,8 @@ struct log_t{ later; this is advanced when a flush operation is completed to all the log groups */ + volatile bool is_extending; /*!< this is set to true during extend + the log buffer size */ lsn_t written_to_some_lsn; /*!< first log sequence number not yet written to any log group; for this to diff --git a/storage/innobase/include/mach0data.ic b/storage/innobase/include/mach0data.ic index fffef87f09d..7449d2da2b8 100644 --- a/storage/innobase/include/mach0data.ic +++ b/storage/innobase/include/mach0data.ic @@ -873,6 +873,8 @@ mach_read_ulint( default: ut_error; } + + return(0); } #endif /* !UNIV_HOTBACKUP */ diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index f8c1874412c..ed7fd76d425 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -299,26 +299,29 @@ mtr_x_lock_func( #endif /* !UNIV_HOTBACKUP */ /***************************************************//** -Releases an object in the memo stack. */ +Releases an object in the memo stack. +@return true if released */ UNIV_INTERN -void +bool mtr_memo_release( /*=============*/ - mtr_t* mtr, /*!< in: mtr */ + mtr_t* mtr, /*!< in/out: mini-transaction */ void* object, /*!< in: object */ - ulint type); /*!< in: object type: MTR_MEMO_S_LOCK, ... */ + ulint type) /*!< in: object type: MTR_MEMO_S_LOCK, ... */ + __attribute__((nonnull)); #ifdef UNIV_DEBUG # ifndef UNIV_HOTBACKUP /**********************************************************//** Checks if memo contains the given item. @return TRUE if contains */ UNIV_INLINE -ibool +bool mtr_memo_contains( /*==============*/ mtr_t* mtr, /*!< in: mtr */ const void* object, /*!< in: object to search */ - ulint type); /*!< in: type of object */ + ulint type) /*!< in: type of object */ + __attribute__((warn_unused_result, nonnull)); /**********************************************************//** Checks if memo contains the given page. diff --git a/storage/innobase/include/mtr0mtr.ic b/storage/innobase/include/mtr0mtr.ic index bb24734c9bb..a9f02430220 100644 --- a/storage/innobase/include/mtr0mtr.ic +++ b/storage/innobase/include/mtr0mtr.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -158,37 +158,38 @@ mtr_release_s_latch_at_savepoint( Checks if memo contains the given item. @return TRUE if contains */ UNIV_INLINE -ibool +bool mtr_memo_contains( /*==============*/ mtr_t* mtr, /*!< in: mtr */ const void* object, /*!< in: object to search */ ulint type) /*!< in: type of object */ { - mtr_memo_slot_t* slot; - dyn_array_t* memo; - ulint offset; - ut_ad(mtr); ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->state == MTR_ACTIVE || mtr->state == MTR_COMMITTING); - memo = &(mtr->memo); - - offset = dyn_array_get_data_size(memo); - - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); - - slot = (mtr_memo_slot_t*) dyn_array_get_element(memo, offset); - - if ((object == slot->object) && (type == slot->type)) { - - return(TRUE); + for (const dyn_block_t* block = dyn_array_get_last_block(&mtr->memo); + block; + block = dyn_array_get_prev_block(&mtr->memo, block)) { + const mtr_memo_slot_t* start + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block)); + mtr_memo_slot_t* slot + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block) + + dyn_block_get_used(block)); + + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); + + while (slot-- != start) { + if (object == slot->object && type == slot->type) { + return(true); + } } } - return(FALSE); + return(false); } # endif /* UNIV_DEBUG */ #endif /* !UNIV_HOTBACKUP */ diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h index 4a744c1b268..ef7503ad45f 100644 --- a/storage/innobase/include/os0file.h +++ b/storage/innobase/include/os0file.h @@ -213,7 +213,9 @@ various file I/O operations with performance schema. 1) register_pfs_file_open_begin() and register_pfs_file_open_end() are used to register file creation, opening, closing and renaming. 2) register_pfs_file_io_begin() and register_pfs_file_io_end() are -used to register actual file read, write and flush */ +used to register actual file read, write and flush +3) register_pfs_file_close_begin() and register_pfs_file_close_end() +are used to register file deletion operations*/ # define register_pfs_file_open_begin(state, locker, key, op, name, \ src_file, src_line) \ do { \ @@ -233,6 +235,25 @@ do { \ } \ } while (0) +# define register_pfs_file_close_begin(state, locker, key, op, name, \ + src_file, src_line) \ +do { \ + locker = PSI_FILE_CALL(get_thread_file_name_locker)( \ + state, key, op, name, &locker); \ + if (UNIV_LIKELY(locker != NULL)) { \ + PSI_FILE_CALL(start_file_close_wait)( \ + locker, src_file, src_line); \ + } \ +} while (0) + +# define register_pfs_file_close_end(locker, result) \ +do { \ + if (UNIV_LIKELY(locker != NULL)) { \ + PSI_FILE_CALL(end_file_close_wait)( \ + locker, result); \ + } \ +} while (0) + # define register_pfs_file_io_begin(state, locker, file, count, op, \ src_file, src_line) \ do { \ @@ -306,6 +327,12 @@ The wrapper functions have the prefix of "innodb_". */ # define os_file_rename(key, oldpath, newpath) \ pfs_os_file_rename_func(key, oldpath, newpath, __FILE__, __LINE__) + +# define os_file_delete(key, name) \ + pfs_os_file_delete_func(key, name, __FILE__, __LINE__) + +# define os_file_delete_if_exists(key, name) \ + pfs_os_file_delete_if_exists_func(key, name, __FILE__, __LINE__) #else /* UNIV_PFS_IO */ /* If UNIV_PFS_IO is not defined, these I/O APIs point @@ -341,6 +368,11 @@ to original un-instrumented file I/O APIs */ # define os_file_rename(key, oldpath, newpath) \ os_file_rename_func(oldpath, newpath) +# define os_file_delete(key, name) os_file_delete_func(name) + +# define os_file_delete_if_exists(key, name) \ + os_file_delete_if_exists_func(name) + #endif /* UNIV_PFS_IO */ /* File types for directory entry data type */ @@ -527,8 +559,8 @@ Deletes a file. The file has to be closed before calling this. @return TRUE if success */ UNIV_INTERN bool -os_file_delete( -/*===========*/ +os_file_delete_func( +/*================*/ const char* name); /*!< in: file path as a null-terminated string */ @@ -537,8 +569,8 @@ Deletes a file if it exists. The file has to be closed before calling this. @return TRUE if success */ UNIV_INTERN bool -os_file_delete_if_exists( -/*=====================*/ +os_file_delete_if_exists_func( +/*==========================*/ const char* name); /*!< in: file path as a null-terminated string */ /***********************************************************************//** @@ -767,6 +799,38 @@ pfs_os_file_rename_func( const char* newpath,/*!< in: new file path */ const char* src_file,/*!< in: file name where func invoked */ ulint src_line);/*!< in: line where the func invoked */ + +/***********************************************************************//** +NOTE! Please use the corresponding macro os_file_delete(), not directly +this function! +This is the performance schema instrumented wrapper function for +os_file_delete() +@return TRUE if success */ +UNIV_INLINE +bool +pfs_os_file_delete_func( +/*====================*/ + mysql_pfs_key_t key, /*!< in: Performance Schema Key */ + const char* name, /*!< in: old file path as a null-terminated + string */ + const char* src_file,/*!< in: file name where func invoked */ + ulint src_line);/*!< in: line where the func invoked */ + +/***********************************************************************//** +NOTE! Please use the corresponding macro os_file_delete_if_exists(), not +directly this function! +This is the performance schema instrumented wrapper function for +os_file_delete_if_exists() +@return TRUE if success */ +UNIV_INLINE +bool +pfs_os_file_delete_if_exists_func( +/*==============================*/ + mysql_pfs_key_t key, /*!< in: Performance Schema Key */ + const char* name, /*!< in: old file path as a null-terminated + string */ + const char* src_file,/*!< in: file name where func invoked */ + ulint src_line);/*!< in: line where the func invoked */ #endif /* UNIV_PFS_IO */ #ifdef UNIV_HOTBACKUP @@ -896,8 +960,8 @@ os_file_status( The function os_file_dirname returns a directory component of a null-terminated pathname string. In the usual case, dirname returns the string up to, but not including, the final '/', and basename -is the component following the final '/'. Trailing '/' charac -ters are not counted as part of the pathname. +is the component following the final '/'. Trailing '/' characters +are not counted as part of the pathname. If path does not contain a slash, dirname returns the string ".". diff --git a/storage/innobase/include/os0file.ic b/storage/innobase/include/os0file.ic index bdd7eb5f8f4..defd8204ba3 100644 --- a/storage/innobase/include/os0file.ic +++ b/storage/innobase/include/os0file.ic @@ -386,4 +386,64 @@ pfs_os_file_rename_func( return(result); } + +/***********************************************************************//** +NOTE! Please use the corresponding macro os_file_delete(), not directly +this function! +This is the performance schema instrumented wrapper function for +os_file_delete() +@return TRUE if success */ +UNIV_INLINE +bool +pfs_os_file_delete_func( +/*====================*/ + mysql_pfs_key_t key, /*!< in: Performance Schema Key */ + const char* name, /*!< in: file path as a null-terminated + string */ + const char* src_file, /*!< in: file name where func invoked */ + ulint src_line) /*!< in: line where the func invoked */ +{ + bool result; + struct PSI_file_locker* locker = NULL; + PSI_file_locker_state state; + + register_pfs_file_close_begin(&state, locker, key, PSI_FILE_DELETE, + name, src_file, src_line); + + result = os_file_delete_func(name); + + register_pfs_file_close_end(locker, 0); + + return(result); +} + +/***********************************************************************//** +NOTE! Please use the corresponding macro os_file_delete_if_exists(), not +directly this function! +This is the performance schema instrumented wrapper function for +os_file_delete_if_exists() +@return TRUE if success */ +UNIV_INLINE +bool +pfs_os_file_delete_if_exists_func( +/*==============================*/ + mysql_pfs_key_t key, /*!< in: Performance Schema Key */ + const char* name, /*!< in: file path as a null-terminated + string */ + const char* src_file, /*!< in: file name where func invoked */ + ulint src_line) /*!< in: line where the func invoked */ +{ + bool result; + struct PSI_file_locker* locker = NULL; + PSI_file_locker_state state; + + register_pfs_file_close_begin(&state, locker, key, PSI_FILE_DELETE, + name, src_file, src_line); + + result = os_file_delete_if_exists_func(name); + + register_pfs_file_close_end(locker, 0); + + return(result); +} #endif /* UNIV_PFS_IO */ diff --git a/storage/innobase/include/page0cur.h b/storage/innobase/include/page0cur.h index 038a05edbd0..b1ad49b4915 100644 --- a/storage/innobase/include/page0cur.h +++ b/storage/innobase/include/page0cur.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, 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 @@ -162,6 +162,12 @@ Inserts a record next to page cursor. Returns pointer to inserted record if succeed, i.e., enough space available, NULL otherwise. The cursor stays at the same logical position, but the physical position may change if it is pointing to a compressed page that was reorganized. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to record if succeed, NULL otherwise */ UNIV_INLINE rec_t* @@ -181,6 +187,12 @@ Inserts a record next to page cursor. Returns pointer to inserted record if succeed, i.e., enough space available, NULL otherwise. The cursor stays at the same logical position, but the physical position may change if it is pointing to a compressed page that was reorganized. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to record if succeed, NULL otherwise */ UNIV_INLINE rec_t* @@ -205,27 +217,38 @@ page_cur_insert_rec_low( dict_index_t* index, /*!< in: record descriptor */ const rec_t* rec, /*!< in: pointer to a physical record */ ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */ - mtr_t* mtr); /*!< in: mini-transaction handle, or NULL */ + mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */ + __attribute__((nonnull(1,2,3,4), warn_unused_result)); /***********************************************************//** Inserts a record next to page cursor on a compressed and uncompressed page. Returns pointer to inserted record if succeed, i.e., enough space available, NULL otherwise. The cursor stays at the same position. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to record if succeed, NULL otherwise */ UNIV_INTERN rec_t* page_cur_insert_rec_zip( /*====================*/ - rec_t** current_rec,/*!< in/out: pointer to current record after - which the new record is inserted */ - buf_block_t* block, /*!< in: buffer block of *current_rec */ + page_cur_t* cursor, /*!< in/out: page cursor */ dict_index_t* index, /*!< in: record descriptor */ const rec_t* rec, /*!< in: pointer to a physical record */ ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */ - mtr_t* mtr); /*!< in: mini-transaction handle, or NULL */ + mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */ + __attribute__((nonnull(1,2,3,4), warn_unused_result)); /*************************************************************//** Copies records from page to a newly created page, from a given record onward, -including that record. Infimum and supremum records are not copied. */ +including that record. Infimum and supremum records are not copied. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). */ UNIV_INTERN void page_copy_rec_list_end_to_created_page( diff --git a/storage/innobase/include/page0cur.ic b/storage/innobase/include/page0cur.ic index 90a5a690487..028d33b17aa 100644 --- a/storage/innobase/include/page0cur.ic +++ b/storage/innobase/include/page0cur.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, 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 @@ -237,6 +237,12 @@ Inserts a record next to page cursor. Returns pointer to inserted record if succeed, i.e., enough space available, NULL otherwise. The cursor stays at the same logical position, but the physical position may change if it is pointing to a compressed page that was reorganized. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to record if succeed, NULL otherwise */ UNIV_INLINE rec_t* @@ -267,8 +273,8 @@ page_cur_tuple_insert( rec, index, *offsets, ULINT_UNDEFINED, heap); if (buf_block_get_page_zip(cursor->block)) { - rec = page_cur_insert_rec_zip(&cursor->rec, cursor->block, - index, rec, *offsets, mtr); + rec = page_cur_insert_rec_zip( + cursor, index, rec, *offsets, mtr); } else { rec = page_cur_insert_rec_low(cursor->rec, index, rec, *offsets, mtr); @@ -284,6 +290,12 @@ Inserts a record next to page cursor. Returns pointer to inserted record if succeed, i.e., enough space available, NULL otherwise. The cursor stays at the same logical position, but the physical position may change if it is pointing to a compressed page that was reorganized. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to record if succeed, NULL otherwise */ UNIV_INLINE rec_t* @@ -296,8 +308,8 @@ page_cur_rec_insert( mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */ { if (buf_block_get_page_zip(cursor->block)) { - return(page_cur_insert_rec_zip(&cursor->rec, cursor->block, - index, rec, offsets, mtr)); + return(page_cur_insert_rec_zip( + cursor, index, rec, offsets, mtr)); } else { return(page_cur_insert_rec_low(cursor->rec, index, rec, offsets, mtr)); diff --git a/storage/innobase/include/page0page.h b/storage/innobase/include/page0page.h index 773ec4c2177..fb21aaec778 100644 --- a/storage/innobase/include/page0page.h +++ b/storage/innobase/include/page0page.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, 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 @@ -518,14 +518,32 @@ page_rec_get_heap_no( const rec_t* rec); /*!< in: the physical record */ /************************************************************//** Determine whether the page is a B-tree leaf. -@return TRUE if the page is a B-tree leaf */ +@return true if the page is a B-tree leaf (PAGE_LEVEL = 0) */ UNIV_INLINE -ibool +bool page_is_leaf( /*=========*/ const page_t* page) /*!< in: page */ __attribute__((nonnull, pure)); /************************************************************//** +Determine whether the page is empty. +@return true if the page is empty (PAGE_N_RECS = 0) */ +UNIV_INLINE +bool +page_is_empty( +/*==========*/ + const page_t* page) /*!< in: page */ + __attribute__((nonnull, pure)); +/************************************************************//** +Determine whether the page contains garbage. +@return true if the page contains garbage (PAGE_GARBAGE is not 0) */ +UNIV_INLINE +bool +page_has_garbage( +/*=============*/ + const page_t* page) /*!< in: page */ + __attribute__((nonnull, pure)); +/************************************************************//** Gets the pointer to the next record on the page. @return pointer to next record */ UNIV_INLINE @@ -566,10 +584,10 @@ UNIV_INLINE void page_rec_set_next( /*==============*/ - rec_t* rec, /*!< in: pointer to record, - must not be page supremum */ - rec_t* next); /*!< in: pointer to next record, - must not be page infimum */ + rec_t* rec, /*!< in: pointer to record, + must not be page supremum */ + const rec_t* next); /*!< in: pointer to next record, + must not be page infimum */ /************************************************************//** Gets the pointer to the previous record. @return pointer to previous record */ @@ -777,11 +795,27 @@ page_create_zip( page is created */ dict_index_t* index, /*!< in: the index of the page */ ulint level, /*!< in: the B-tree level of the page */ - mtr_t* mtr); /*!< in: mini-transaction handle */ - + trx_id_t max_trx_id, /*!< in: PAGE_MAX_TRX_ID */ + mtr_t* mtr) /*!< in/out: mini-transaction */ + __attribute__((nonnull)); +/**********************************************************//** +Empty a previously created B-tree index page. */ +UNIV_INTERN +void +page_create_empty( +/*==============*/ + buf_block_t* block, /*!< in/out: B-tree block */ + dict_index_t* index, /*!< in: the index of the page */ + mtr_t* mtr) /*!< in/out: mini-transaction */ + __attribute__((nonnull(1,2))); /*************************************************************//** Differs from page_copy_rec_list_end, because this function does not -touch the lock table and max trx id on page or compress the page. */ +touch the lock table and max trx id on page or compress the page. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). */ UNIV_INTERN void page_copy_rec_list_end_no_locks( @@ -795,6 +829,12 @@ page_copy_rec_list_end_no_locks( Copies records from page to new_page, from the given record onward, including that record. Infimum and supremum records are not copied. The records are copied to the start of the record list on new_page. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to the original successor of the infimum record on new_page, or NULL on zip overflow (new_block will be decompressed) */ UNIV_INTERN @@ -811,6 +851,12 @@ page_copy_rec_list_end( Copies records from page to new_page, up to the given record, NOT including that record. Infimum and supremum records are not copied. The records are copied to the end of the record list on new_page. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to the original predecessor of the supremum record on new_page, or NULL on zip overflow (new_block will be decompressed) */ UNIV_INTERN @@ -855,6 +901,12 @@ page_delete_rec_list_start( /*************************************************************//** Moves record list end to another page. Moved records include split_rec. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return TRUE on success; FALSE on compression failure (new_block will be decompressed) */ UNIV_INTERN @@ -870,6 +922,12 @@ page_move_rec_list_end( /*************************************************************//** Moves record list start to another page. Moved records do not include split_rec. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return TRUE on success; FALSE on compression failure */ UNIV_INTERN ibool diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic index c2e20d81a29..1410f21b670 100644 --- a/storage/innobase/include/page0page.ic +++ b/storage/innobase/include/page0page.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, 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 @@ -266,9 +266,9 @@ page_rec_get_heap_no( /************************************************************//** Determine whether the page is a B-tree leaf. -@return TRUE if the page is a B-tree leaf */ +@return true if the page is a B-tree leaf (PAGE_LEVEL = 0) */ UNIV_INLINE -ibool +bool page_is_leaf( /*=========*/ const page_t* page) /*!< in: page */ @@ -277,6 +277,30 @@ page_is_leaf( } /************************************************************//** +Determine whether the page is empty. +@return true if the page is empty (PAGE_N_RECS = 0) */ +UNIV_INLINE +bool +page_is_empty( +/*==========*/ + const page_t* page) /*!< in: page */ +{ + return(!*(const uint16*) (page + (PAGE_HEADER + PAGE_N_RECS))); +} + +/************************************************************//** +Determine whether the page contains garbage. +@return true if the page contains garbage (PAGE_GARBAGE is not 0) */ +UNIV_INLINE +bool +page_has_garbage( +/*=============*/ + const page_t* page) /*!< in: page */ +{ + return(!!*(const uint16*) (page + (PAGE_HEADER + PAGE_GARBAGE))); +} + +/************************************************************//** Gets the offset of the first record on the page. @return offset of the first record in record list, relative from page */ UNIV_INLINE @@ -805,9 +829,9 @@ UNIV_INLINE void page_rec_set_next( /*==============*/ - rec_t* rec, /*!< in: pointer to record, + rec_t* rec, /*!< in: pointer to record, must not be page supremum */ - rec_t* next) /*!< in: pointer to next record, + const rec_t* next) /*!< in: pointer to next record, must not be page infimum */ { ulint offs; diff --git a/storage/innobase/include/page0types.h b/storage/innobase/include/page0types.h index 533b0d3cf98..95143a4bb44 100644 --- a/storage/innobase/include/page0types.h +++ b/storage/innobase/include/page0types.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, 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 @@ -42,9 +42,7 @@ typedef byte page_t; struct page_cur_t; /** Compressed index page */ -typedef byte page_zip_t; -/** Compressed page descriptor */ -struct page_zip_des_t; +typedef byte page_zip_t; /* The following definitions would better belong to page0zip.h, but we cannot include page0zip.h from rem0rec.ic, because diff --git a/storage/innobase/include/page0zip.h b/storage/innobase/include/page0zip.h index 12781bd61b8..9d3b78ed2fc 100644 --- a/storage/innobase/include/page0zip.h +++ b/storage/innobase/include/page0zip.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -41,14 +41,14 @@ Created June 2005 by Marko Makela #include "mem0mem.h" /* Compression level to be used by zlib. Settable by user. */ -extern ulint page_compression_level; +extern uint page_zip_level; /* Default compression level. */ #define DEFAULT_COMPRESSION_LEVEL 6 /* Whether or not to log compressed page images to avoid possible compression algorithm changes in zlib. */ -extern bool page_log_compressed_pages; +extern my_bool page_zip_log_pages; /**********************************************************************//** Determine the size of a compressed page in bytes. @@ -125,7 +125,7 @@ page_zip_compress( m_start, m_end, m_nonempty */ const page_t* page, /*!< in: uncompressed page */ dict_index_t* index, /*!< in: index of the B-tree node */ - ulint level, /*!< in: commpression level */ + ulint level, /*!< in: compression level */ mtr_t* mtr) /*!< in: mini-transaction, or NULL */ __attribute__((nonnull(1,2,3))); @@ -495,7 +495,7 @@ page_zip_parse_compress_no_data( byte* end_ptr, /*!< in: buffer end */ page_t* page, /*!< in: uncompressed page */ page_zip_des_t* page_zip, /*!< out: compressed page */ - dict_index_t* index) /*!< in: index */ + dict_index_t* index) /*!< in: index */ __attribute__((nonnull(1,2))); /**********************************************************************//** diff --git a/storage/innobase/include/page0zip.ic b/storage/innobase/include/page0zip.ic index 0062e1cb39f..6c7d8cd32c7 100644 --- a/storage/innobase/include/page0zip.ic +++ b/storage/innobase/include/page0zip.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -176,7 +176,7 @@ page_zip_rec_needs_ext( ut_ad(ut_is_2pow(zip_size)); ut_ad(comp || !zip_size); -#if UNIV_PAGE_SIZE > REC_MAX_DATA_SIZE +#if UNIV_PAGE_SIZE_MAX > REC_MAX_DATA_SIZE if (rec_size >= REC_MAX_DATA_SIZE) { return(TRUE); } @@ -190,8 +190,8 @@ page_zip_rec_needs_ext( one record on an empty leaf page. Subtract 1 byte for the encoded heap number. Check also the available space on the uncompressed page. */ - return(rec_size - (REC_N_NEW_EXTRA_BYTES - 2) - >= (page_zip_empty_size(n_fields, zip_size) - 1) + return(rec_size - (REC_N_NEW_EXTRA_BYTES - 2 - 1) + >= page_zip_empty_size(n_fields, zip_size) || rec_size >= page_get_free_space_of_empty(TRUE) / 2); } @@ -231,9 +231,7 @@ ibool page_zip_get_trailer_len( /*=====================*/ const page_zip_des_t* page_zip,/*!< in: compressed page */ - ibool is_clust,/*!< in: TRUE if clustered index */ - ulint* entry_size)/*!< out: size of the uncompressed - portion of a user record */ + ibool is_clust)/*!< in: TRUE if clustered index */ { ulint uncompressed_size; @@ -252,10 +250,6 @@ page_zip_get_trailer_len( ut_ad(!page_zip->n_blobs); } - if (entry_size) { - *entry_size = uncompressed_size; - } - return((page_dir_get_n_heap(page_zip->data) - 2) * uncompressed_size + page_zip->n_blobs * BTR_EXTERN_FIELD_REF_SIZE); @@ -272,11 +266,9 @@ page_zip_max_ins_size( const page_zip_des_t* page_zip,/*!< in: compressed page */ ibool is_clust)/*!< in: TRUE if clustered index */ { - ulint uncompressed_size; ulint trailer_len; - trailer_len = page_zip_get_trailer_len(page_zip, is_clust, - &uncompressed_size); + trailer_len = page_zip_get_trailer_len(page_zip, is_clust); /* When a record is created, a pointer may be added to the dense directory. @@ -285,7 +277,7 @@ page_zip_max_ins_size( Also the BLOB pointers will be allocated from there, but we may as well count them in the length of the record. */ - trailer_len += uncompressed_size; + trailer_len += PAGE_ZIP_DIR_SLOT_SIZE; return((lint) page_zip_get_size(page_zip) - trailer_len - page_zip->m_end @@ -305,13 +297,11 @@ page_zip_available( ulint create) /*!< in: nonzero=add the record to the heap */ { - ulint uncompressed_size; ulint trailer_len; ut_ad(length > REC_N_NEW_EXTRA_BYTES); - trailer_len = page_zip_get_trailer_len(page_zip, is_clust, - &uncompressed_size); + trailer_len = page_zip_get_trailer_len(page_zip, is_clust); /* Subtract the fixed extra bytes and add the maximum space needed for identifying the record (encoded heap_no). */ @@ -325,7 +315,7 @@ page_zip_available( Also the BLOB pointers will be allocated from there, but we may as well count them in the length of the record. */ - trailer_len += uncompressed_size; + trailer_len += PAGE_ZIP_DIR_SLOT_SIZE; } return(length + trailer_len + page_zip->m_end @@ -422,7 +412,7 @@ page_zip_parse_compress_no_data( byte* end_ptr, /*!< in: buffer end */ page_t* page, /*!< in: uncompressed page */ page_zip_des_t* page_zip, /*!< out: compressed page */ - dict_index_t* index) /*!< in: index */ + dict_index_t* index) /*!< in: index */ { ulint level; if (end_ptr == ptr) { diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.ic index 18a7deb9d26..a539320dd2a 100644 --- a/storage/innobase/include/rem0rec.ic +++ b/storage/innobase/include/rem0rec.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, 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 @@ -259,7 +259,7 @@ rec_get_next_ptr_const( } if (comp) { -#if UNIV_PAGE_SIZE <= 32768 +#if UNIV_PAGE_SIZE_MAX <= 32768 /* Note that for 64 KiB pages, field_value can 'wrap around' and the debug assertion is not valid */ @@ -302,7 +302,7 @@ rec_get_next_ptr( rec_t* rec, /*!< in: physical record */ ulint comp) /*!< in: nonzero=compact page format */ { - return((rec_t*) rec_get_next_ptr_const(rec, comp)); + return(const_cast<rec_t*>(rec_get_next_ptr_const(rec, comp))); } /******************************************************//** @@ -327,7 +327,7 @@ rec_get_next_offs( field_value = mach_read_from_2(rec - REC_NEXT); if (comp) { -#if UNIV_PAGE_SIZE <= 32768 +#if UNIV_PAGE_SIZE_MAX <= 32768 /* Note that for 64 KiB pages, field_value can 'wrap around' and the debug assertion is not valid */ @@ -1508,7 +1508,7 @@ rec_get_end( const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ { ut_ad(rec_offs_validate(rec, NULL, offsets)); - return((rec_t*) rec + rec_offs_data_size(offsets)); + return(const_cast<rec_t*>(rec + rec_offs_data_size(offsets))); } /**********************************************************//** @@ -1522,7 +1522,7 @@ rec_get_start( const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ { ut_ad(rec_offs_validate(rec, NULL, offsets)); - return((rec_t*) rec - rec_offs_extra_size(offsets)); + return(const_cast<rec_t*>(rec - rec_offs_extra_size(offsets))); } #endif /* UNIV_DEBUG */ @@ -1541,7 +1541,7 @@ rec_copy( ulint data_len; ut_ad(rec && buf); - ut_ad(rec_offs_validate((rec_t*) rec, NULL, offsets)); + ut_ad(rec_offs_validate(rec, NULL, offsets)); ut_ad(rec_validate(rec, offsets)); extra_len = rec_offs_extra_size(offsets); diff --git a/storage/innobase/include/row0ftsort.h b/storage/innobase/include/row0ftsort.h index 4a486450efc..4e04a099140 100644 --- a/storage/innobase/include/row0ftsort.h +++ b/storage/innobase/include/row0ftsort.h @@ -84,10 +84,13 @@ struct fts_psort_t { row_merge_block_t* block_alloc[FTS_NUM_AUX_INDEX]; /*!< buffer to allocated */ ulint child_status; /*!< child thread status */ - ulint state; /*!< child thread state */ + ulint state; /*!< parent thread state */ fts_doc_list_t fts_doc_list; /*!< doc list to process */ fts_psort_common_t* psort_common; /*!< ptr to all psort info */ os_thread_t thread_hdl; /*!< thread handler */ + dberr_t error; /*!< db error during psort */ + ulint memory_used; /*!< memory used by fts_doc_list */ + ib_mutex_t mutex; /*!< mutex for fts_doc_list */ }; /** Structure stores information from string tokenization operation */ @@ -124,6 +127,7 @@ typedef struct fts_psort_insert fts_psort_insert_t; /** status bit used for communication between parent and child thread */ #define FTS_PARENT_COMPLETE 1 +#define FTS_PARENT_EXITING 2 #define FTS_CHILD_COMPLETE 1 #define FTS_CHILD_EXITING 2 diff --git a/storage/innobase/include/row0log.h b/storage/innobase/include/row0log.h index 984d907d390..41dac63963d 100644 --- a/storage/innobase/include/row0log.h +++ b/storage/innobase/include/row0log.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2013, 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 @@ -122,6 +122,7 @@ row_log_table_delete( dict_index_t* index, /*!< in/out: clustered index, S-latched or X-latched */ const ulint* offsets,/*!< in: rec_get_offsets(rec,index) */ + bool purge, /*!< in: true=purging BLOBs */ trx_id_t trx_id) /*!< in: DB_TRX_ID of the record before it was deleted */ UNIV_COLD __attribute__((nonnull)); @@ -173,28 +174,24 @@ row_log_table_insert( or X-latched */ const ulint* offsets)/*!< in: rec_get_offsets(rec,index) */ UNIV_COLD __attribute__((nonnull)); - /******************************************************//** -Notes that a transaction is being rolled back. */ +Notes that a BLOB is being freed during online ALTER TABLE. */ UNIV_INTERN void -row_log_table_rollback( -/*===================*/ - dict_index_t* index, /*!< in/out: clustered index */ - trx_id_t trx_id) /*!< in: transaction being rolled back */ +row_log_table_blob_free( +/*====================*/ + dict_index_t* index, /*!< in/out: clustered index, X-latched */ + ulint page_no)/*!< in: starting page number of the BLOB */ UNIV_COLD __attribute__((nonnull)); - /******************************************************//** -Check if a transaction rollback has been initiated. -@return true if inserts of this transaction were rolled back */ +Notes that a BLOB is being allocated during online ALTER TABLE. */ UNIV_INTERN -bool -row_log_table_is_rollback( -/*======================*/ - const dict_index_t* index, /*!< in: clustered index */ - trx_id_t trx_id) /*!< in: transaction id */ - __attribute__((nonnull)); - +void +row_log_table_blob_alloc( +/*=====================*/ + dict_index_t* index, /*!< in/out: clustered index, X-latched */ + ulint page_no)/*!< in: starting page number of the BLOB */ + UNIV_COLD __attribute__((nonnull)); /******************************************************//** Apply the row_log_table log to a table upon completing rebuild. @return DB_SUCCESS, or error code on failure */ diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h index f464e46ae5b..390c0ce038b 100644 --- a/storage/innobase/include/row0merge.h +++ b/storage/innobase/include/row0merge.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2013, 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 @@ -206,14 +206,14 @@ will not be committed. @return error code or DB_SUCCESS */ UNIV_INTERN dberr_t -row_merge_rename_tables( -/*====================*/ +row_merge_rename_tables_dict( +/*=========================*/ dict_table_t* old_table, /*!< in/out: old table, renamed to tmp_name */ dict_table_t* new_table, /*!< in/out: new table, renamed to old_table->name */ const char* tmp_name, /*!< in: new name for old_table */ - trx_t* trx) /*!< in: transaction handle */ + trx_t* trx) /*!< in/out: dictionary transaction */ __attribute__((nonnull, warn_unused_result)); /*********************************************************************//** @@ -265,7 +265,7 @@ row_merge_is_index_usable( /*********************************************************************//** Drop a table. The caller must have ensured that the background stats thread is not processing the table. This can be done by calling -dict_stats_wait_bg_to_stop_using_tables() after locking the dictionary and +dict_stats_wait_bg_to_stop_using_table() after locking the dictionary and before calling this function. @return DB_SUCCESS or error code */ UNIV_INTERN diff --git a/storage/innobase/include/srv0conc.h b/storage/innobase/include/srv0conc.h index 9aee1b17bf0..cf61ef5528d 100644 --- a/storage/innobase/include/srv0conc.h +++ b/storage/innobase/include/srv0conc.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2012, Oracle and/or its affiliates. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h index 48d4b94dcae..e2ab81bf53a 100644 --- a/storage/innobase/include/srv0mon.h +++ b/storage/innobase/include/srv0mon.h @@ -1,6 +1,6 @@ /*********************************************************************** -Copyright (c) 2010, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it @@ -98,7 +98,7 @@ enum monitor_type_t { /** Counter minimum value is initialized to be max value of mon_type_t (ib_int64_t) */ -#define MIN_RESERVED ((mon_type_t) (IB_ULONGLONG_MAX >> 1)) +#define MIN_RESERVED ((mon_type_t) (IB_UINT64_MAX >> 1)) #define MAX_RESERVED (~MIN_RESERVED) /** This enumeration defines internal monitor identifier used internally @@ -169,6 +169,7 @@ enum monitor_id_t { MONITOR_FLUSH_BATCH_SCANNED, MONITOR_FLUSH_BATCH_SCANNED_NUM_CALL, MONITOR_FLUSH_BATCH_SCANNED_PER_CALL, + MONITOR_FLUSH_HP_RESCAN, MONITOR_FLUSH_BATCH_TOTAL_PAGE, MONITOR_FLUSH_BATCH_COUNT, MONITOR_FLUSH_BATCH_PAGES, @@ -307,7 +308,11 @@ enum monitor_id_t { /* Index related counters */ MONITOR_MODULE_INDEX, MONITOR_INDEX_SPLIT, - MONITOR_INDEX_MERGE, + MONITOR_INDEX_MERGE_ATTEMPTS, + MONITOR_INDEX_MERGE_SUCCESSFUL, + MONITOR_INDEX_REORG_ATTEMPTS, + MONITOR_INDEX_REORG_SUCCESSFUL, + MONITOR_INDEX_DISCARD, /* Adaptive Hash Index related counters */ MONITOR_MODULE_ADAPTIVE_HASH, diff --git a/storage/innobase/include/srv0mon.ic b/storage/innobase/include/srv0mon.ic index 17411d77a8b..225390c6b6f 100644 --- a/storage/innobase/include/srv0mon.ic +++ b/storage/innobase/include/srv0mon.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2010, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2012, 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 diff --git a/storage/innobase/include/srv0start.h b/storage/innobase/include/srv0start.h index e136f30f96a..40d502f4459 100644 --- a/storage/innobase/include/srv0start.h +++ b/storage/innobase/include/srv0start.h @@ -53,15 +53,6 @@ srv_parse_data_file_paths_and_sizes( /*================================*/ char* str); /*!< in/out: the data file path string */ /*********************************************************************//** -Reads log group home directories from a character string given in -the .cnf file. -@return TRUE if ok, FALSE on parse error */ -UNIV_INTERN -ibool -srv_parse_log_group_home_dirs( -/*==========================*/ - char* str); /*!< in/out: character string */ -/*********************************************************************//** Frees the memory allocated by srv_parse_data_file_paths_and_sizes() and srv_parse_log_group_home_dirs(). */ UNIV_INTERN diff --git a/storage/innobase/include/sync0arr.h b/storage/innobase/include/sync0arr.h index bb4d1037a62..15dbdcb540d 100644 --- a/storage/innobase/include/sync0arr.h +++ b/storage/innobase/include/sync0arr.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -37,10 +37,27 @@ struct sync_cell_t; struct sync_array_t; /******************************************************************//** +Get an instance of the sync wait array and reserve a wait array cell +in the instance for waiting for an object. The event of the cell is +reset to nonsignalled state. +If reserving cell of the instance fails, try to get another new +instance until we can reserve an empty cell of it. +@return the instance found, never NULL. */ +UNIV_INLINE +sync_array_t* +sync_array_get_and_reserve_cell( +/*============================*/ + void* object, /*!< in: pointer to the object to wait for */ + ulint type, /*!< in: lock request type */ + const char* file, /*!< in: file where requested */ + ulint line, /*!< in: line where requested */ + ulint* index); /*!< out: index of the reserved cell */ +/******************************************************************//** Reserves a wait array cell for waiting for an object. -The event of the cell is reset to nonsignalled state. */ +The event of the cell is reset to nonsignalled state. +@return true if free cell is found, otherwise false */ UNIV_INTERN -void +bool sync_array_reserve_cell( /*====================*/ sync_array_t* arr, /*!< in: wait array */ diff --git a/storage/innobase/include/sync0arr.ic b/storage/innobase/include/sync0arr.ic index 0114a1ff5a2..18a46dd0a41 100644 --- a/storage/innobase/include/sync0arr.ic +++ b/storage/innobase/include/sync0arr.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -24,3 +24,41 @@ Inline code Created 9/5/1995 Heikki Tuuri *******************************************************/ + +/** User configured sync array size */ +extern ulong srv_sync_array_size; + +/******************************************************************//** +Get an instance of the sync wait array and reserve a wait array cell +in the instance for waiting for an object. The event of the cell is +reset to nonsignalled state. +If reserving cell of the instance fails, try to get another new +instance until we can reserve an empty cell of it. +@return the instance found, never NULL. */ +UNIV_INLINE +sync_array_t* +sync_array_get_and_reserve_cell( +/*============================*/ + void* object, /*!< in: pointer to the object to wait for */ + ulint type, /*!< in: lock request type */ + const char* file, /*!< in: file where requested */ + ulint line, /*!< in: line where requested */ + ulint* index) /*!< out: index of the reserved cell */ +{ + sync_array_t* sync_arr; + bool reserved = false; + + for (ulint i = 0; i < srv_sync_array_size && !reserved; ++i) { + sync_arr = sync_array_get(); + reserved = sync_array_reserve_cell(sync_arr, object, type, + file, line, index); + } + + /* This won't be true every time, for the loop above may execute + more than srv_sync_array_size times to reserve a cell. + But an assertion here makes the code more solid. */ + ut_a(reserved); + + return sync_arr; +} + diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index 9950a6fbf6b..7b00e16476b 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -80,6 +80,7 @@ extern mysql_pfs_key_t fts_bg_threads_mutex_key; extern mysql_pfs_key_t fts_delete_mutex_key; extern mysql_pfs_key_t fts_optimize_mutex_key; extern mysql_pfs_key_t fts_doc_id_mutex_key; +extern mysql_pfs_key_t fts_pll_tokenize_mutex_key; extern mysql_pfs_key_t hash_table_mutex_key; extern mysql_pfs_key_t ibuf_bitmap_mutex_key; extern mysql_pfs_key_t ibuf_mutex_key; @@ -710,6 +711,7 @@ or row lock! */ #define SYNC_LOG 170 #define SYNC_LOG_FLUSH_ORDER 147 #define SYNC_RECV 168 +#define SYNC_FTS_TOKENIZE 167 #define SYNC_FTS_CACHE_INIT 166 /* Used for FTS cache initialization */ #define SYNC_FTS_BG_THREADS 165 #define SYNC_FTS_OPTIMIZE 164 // FIXME: is this correct number, test diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h index cd1ecc096fd..50da55d2ea3 100644 --- a/storage/innobase/include/trx0rec.h +++ b/storage/innobase/include/trx0rec.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -109,7 +109,7 @@ trx_undo_rec_get_pars( externally stored fild */ undo_no_t* undo_no, /*!< out: undo log record number */ table_id_t* table_id) /*!< out: table id */ - __attribute__((nonnull, warn_unused_result)); + __attribute__((nonnull)); /*******************************************************************//** Builds a row reference from an undo log record. @return pointer to remaining part of undo record */ diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 5c807c03535..0d3711f567d 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -190,7 +190,18 @@ UNIV_INTERN void trx_commit( /*=======*/ - trx_t* trx); /*!< in: transaction */ + trx_t* trx) /*!< in/out: transaction */ + __attribute__((nonnull)); +/****************************************************************//** +Commits a transaction and a mini-transaction. */ +UNIV_INTERN +void +trx_commit_low( +/*===========*/ + trx_t* trx, /*!< in/out: transaction */ + mtr_t* mtr) /*!< in/out: mini-transaction (will be committed), + or NULL if trx made no modifications */ + __attribute__((nonnull(1))); /****************************************************************//** Cleans up a transaction at database startup. The cleanup is needed if the transaction already got to the middle of a commit when the database @@ -665,7 +676,7 @@ lock_sys->mutex and sometimes by trx->mutex. */ struct trx_t{ ulint magic_n; - ib_mutex_t mutex; /*!< Mutex protecting the fields + ib_mutex_t mutex; /*!< Mutex protecting the fields state and lock (except some fields of lock, which are protected by lock_sys->mutex) */ @@ -823,7 +834,7 @@ struct trx_t{ COMMITTED_IN_MEMORY state. Protected by trx_sys_t::mutex when trx->in_rw_trx_list. Initially - set to IB_ULONGLONG_MAX. */ + set to TRX_ID_MAX. */ time_t start_time; /*!< time the trx object was created or the state last time became @@ -914,7 +925,7 @@ struct trx_t{ trx_savepoints; /*!< savepoints set with SAVEPOINT ..., oldest first */ /*------------------------------*/ - ib_mutex_t undo_mutex; /*!< mutex protecting the fields in this + ib_mutex_t undo_mutex; /*!< mutex protecting the fields in this section (down to undo_no_arr), EXCEPT last_sql_stat_start, which can be accessed only when we know that there @@ -986,6 +997,10 @@ struct trx_t{ ulint start_line; /*!< Track where it was started from */ const char* start_file; /*!< Filename where it was started */ #endif /* UNIV_DEBUG */ + /*------------------------------*/ + bool api_trx; /*!< trx started by InnoDB API */ + bool api_auto_commit;/*!< automatic commit */ + bool read_write; /*!< if read and write operation */ /*------------------------------*/ char detailed_error[256]; /*!< detailed error message for last diff --git a/storage/innobase/include/trx0types.h b/storage/innobase/include/trx0types.h index 4f515cb5248..7ca95131328 100644 --- a/storage/innobase/include/trx0types.h +++ b/storage/innobase/include/trx0types.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -119,6 +119,9 @@ typedef ib_id_t roll_ptr_t; /** Undo number */ typedef ib_id_t undo_no_t; +/** Maximum transaction identifier */ +#define TRX_ID_MAX IB_ID_MAX + /** Transaction savepoint */ struct trx_savept_t{ undo_no_t least_undo_no; /*!< least undo number to undo */ diff --git a/storage/innobase/include/trx0undo.h b/storage/innobase/include/trx0undo.h index 4021d71c68a..61b0dabb1e6 100644 --- a/storage/innobase/include/trx0undo.h +++ b/storage/innobase/include/trx0undo.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -175,6 +175,7 @@ trx_undo_get_prev_rec( trx_undo_rec_t* rec, /*!< in: undo record */ ulint page_no,/*!< in: undo log header page number */ ulint offset, /*!< in: undo log header offset on page */ + bool shared, /*!< in: true=S-latch, false=X-latch */ mtr_t* mtr); /*!< in: mtr */ /***********************************************************************//** Gets the next record in an undo log. diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 65f289eda35..9b5fffe81e8 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -44,7 +44,7 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 5 #define INNODB_VERSION_MINOR 6 -#define INNODB_VERSION_BUGFIX 10 +#define INNODB_VERSION_BUGFIX 15 /* The following is the InnoDB version as shown in SELECT plugin_version FROM information_schema.plugins; @@ -171,6 +171,7 @@ command. Not tested on Windows. */ #define UNIV_COMPILE_TEST_FUNCS */ +#undef UNIV_SYNC_DEBUG #if defined(HAVE_valgrind)&& defined(HAVE_VALGRIND_MEMCHECK_H) # define UNIV_DEBUG_VALGRIND #endif /* HAVE_VALGRIND */ @@ -332,7 +333,7 @@ typedef enum innodb_file_formats_enum innodb_file_formats_t; #define UNIV_PAGE_SIZE_SHIFT srv_page_size_shift /** The universal page size of the database */ -#define UNIV_PAGE_SIZE srv_page_size +#define UNIV_PAGE_SIZE ((ulint) srv_page_size) /** log2 of smallest compressed page size (1<<10 == 1024 bytes) Note: This must never change! */ @@ -433,6 +434,7 @@ macro ULINTPF. */ # define INT64PF "%I64d" # define UINT64PF "%I64u" # define UINT64PFx "%016I64u" +# define DBUG_LSN_PF "%llu" typedef __int64 ib_int64_t; typedef unsigned __int64 ib_uint64_t; typedef unsigned __int32 ib_uint32_t; @@ -442,6 +444,7 @@ typedef unsigned __int32 ib_uint32_t; # define INT64PF "%"PRId64 # define UINT64PF "%"PRIu64 # define UINT64PFx "%016"PRIx64 +# define DBUG_LSN_PF UINT64PF typedef int64_t ib_int64_t; typedef uint64_t ib_uint64_t; typedef uint32_t ib_uint32_t; @@ -486,11 +489,11 @@ typedef unsigned long long int ullint; #define ULINT_MAX ((ulint)(-2)) /** Maximum value for ib_uint64_t */ -#define IB_ULONGLONG_MAX ((ib_uint64_t) (~0ULL)) -#define IB_UINT64_MAX IB_ULONGLONG_MAX +#define IB_UINT64_MAX ((ib_uint64_t) (~0ULL)) /** The generic InnoDB system object identifier data type */ -typedef ib_uint64_t ib_id_t; +typedef ib_uint64_t ib_id_t; +#define IB_ID_MAX IB_UINT64_MAX /** The 'undefined' value for a ullint */ #define ULLINT_UNDEFINED ((ullint)(-1)) @@ -633,6 +636,10 @@ typedef void* os_thread_ret_t; (const void*) (addr), (unsigned) (size), (long) \ (((const char*) _p) - ((const char*) (addr)))); \ } while (0) +# define UNIV_MEM_TRASH(addr, c, size) do { \ + ut_d(memset(addr, c, size)); \ + UNIV_MEM_INVALID(addr, size); \ + } while (0) #else # define UNIV_MEM_VALID(addr, size) do {} while(0) # define UNIV_MEM_INVALID(addr, size) do {} while(0) @@ -644,6 +651,7 @@ typedef void* os_thread_ret_t; # define UNIV_MEM_ASSERT_RW(addr, size) do {} while(0) # define UNIV_MEM_ASSERT_RW_ABORT(addr, size) do {} while(0) # define UNIV_MEM_ASSERT_W(addr, size) do {} while(0) +# define UNIV_MEM_TRASH(addr, c, size) do {} while(0) #endif #define UNIV_MEM_ASSERT_AND_FREE(addr, size) do { \ UNIV_MEM_ASSERT_W(addr, size); \ diff --git a/storage/innobase/include/ut0bh.h b/storage/innobase/include/ut0bh.h index 84ea6dd915a..1085736c7ab 100644 --- a/storage/innobase/include/ut0bh.h +++ b/storage/innobase/include/ut0bh.h @@ -1,6 +1,6 @@ /***************************************************************************//** -Copyright (c) 2011, Oracle Corpn. All Rights Reserved. +Copyright (c) 2011, 2013, Oracle Corpn. 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 diff --git a/storage/innobase/include/ut0bh.ic b/storage/innobase/include/ut0bh.ic index a604237665d..b11de5b8b3e 100644 --- a/storage/innobase/include/ut0bh.ic +++ b/storage/innobase/include/ut0bh.ic @@ -1,6 +1,6 @@ /***************************************************************************//** -Copyright (c) 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2013, 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 diff --git a/storage/innobase/include/ut0dbg.h b/storage/innobase/include/ut0dbg.h index 0f2da165da7..6a4afe99597 100644 --- a/storage/innobase/include/ut0dbg.h +++ b/storage/innobase/include/ut0dbg.h @@ -61,49 +61,8 @@ ut_dbg_assertion_failed( ulint line) /*!< in: line number of the assertion */ UNIV_COLD __attribute__((nonnull(2))); - -#define UT_DBG_USE_ABORT - - -#ifndef UT_DBG_USE_ABORT -/** A null pointer that will be dereferenced to trigger a memory trap */ -extern ulint* ut_dbg_null_ptr; -#endif - -#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) -/** If this is set to TRUE by ut_dbg_assertion_failed(), all threads -will stop at the next ut_a() or ut_ad(). */ -extern ibool ut_dbg_stop_threads; - -/*************************************************************//** -Stop a thread after assertion failure. */ -UNIV_INTERN -void -ut_dbg_stop_thread( -/*===============*/ - const char* file, - ulint line); -#endif - -#ifdef UT_DBG_USE_ABORT /** Abort the execution. */ -#ifdef _WIN32 -# define UT_DBG_PANIC __debugbreak() -#else # define UT_DBG_PANIC abort() -#endif -/** Stop threads (null operation) */ -# define UT_DBG_STOP do {} while (0) -#else /* UT_DBG_USE_ABORT */ -/** Abort the execution. */ -# define UT_DBG_PANIC \ - if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL -/** Stop threads in ut_a(). */ -# define UT_DBG_STOP do \ - if (UNIV_UNLIKELY(ut_dbg_stop_threads)) { \ - ut_dbg_stop_thread(__FILE__, (ulint) __LINE__); \ - } while (0) -#endif /* UT_DBG_USE_ABORT */ /** Abort execution if EXPR does not evaluate to nonzero. @param EXPR assertion expression that should hold */ @@ -113,7 +72,6 @@ ut_dbg_stop_thread( __FILE__, (ulint) __LINE__); \ UT_DBG_PANIC; \ } \ - UT_DBG_STOP; \ } while (0) /** Abort execution. */ diff --git a/storage/innobase/include/ut0rbt.h b/storage/innobase/include/ut0rbt.h index e0593e99bde..59e3fc94598 100644 --- a/storage/innobase/include/ut0rbt.h +++ b/storage/innobase/include/ut0rbt.h @@ -136,7 +136,7 @@ rbt_create_arg_cmp( size_t sizeof_value, /*!< in: size in bytes */ ib_rbt_arg_compare compare, /*!< in: comparator */ - void* cmp_arg); /*!< in: compare fn arg */ + void* cmp_arg); /*!< in: compare fn arg */ /**********************************************************************//** Delete a node from the red black tree, identified by key */ UNIV_INTERN diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 51b00bbd580..92cc5ee89a8 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -48,6 +48,7 @@ Created 5/7/1996 Heikki Tuuri #include "ut0vec.h" #include "btr0btr.h" #include "dict0boot.h" +#include <set> #ifdef WITH_WSREP extern my_bool wsrep_debug; @@ -374,7 +375,7 @@ struct lock_deadlock_ctx_t { struct lock_stack_t { const lock_t* lock; /*!< Current lock */ const lock_t* wait_lock; /*!< Waiting for lock */ - unsigned heap_no:16; /*!< heap number if rec lock */ + ulint heap_no; /*!< heap number if rec lock */ }; /** Stack to use during DFS search. Currently only a single stack is required @@ -1551,6 +1552,7 @@ lock_rec_has_expl( lock = lock_rec_get_next(heap_no, lock)) { if (lock->trx == trx + && !lock_rec_get_insert_intention(lock) && !lock_is_wait_not_by_other(lock->type_mode) && lock_mode_stronger_or_eq( lock_get_mode(lock), @@ -1561,8 +1563,7 @@ lock_rec_has_expl( || heap_no == PAGE_HEAP_NO_SUPREMUM) && (!lock_rec_get_gap(lock) || (precise_mode & LOCK_GAP) - || heap_no == PAGE_HEAP_NO_SUPREMUM) - && (!lock_rec_get_insert_intention(lock))) { + || heap_no == PAGE_HEAP_NO_SUPREMUM)) { return(lock); } @@ -2082,6 +2083,7 @@ lock_rec_enqueue_waiting( trx_id_t victim_trx_id; ut_ad(lock_mutex_own()); + ut_ad(!srv_read_only_mode); ut_ad(dict_index_is_clust(index) || !dict_index_is_online_ddl(index)); trx = thr_get_trx(thr); @@ -2369,6 +2371,8 @@ lock_rec_lock_fast( || mode - (LOCK_MODE_MASK & mode) == LOCK_REC_NOT_GAP); ut_ad(dict_index_is_clust(index) || !dict_index_is_online_ddl(index)); + DBUG_EXECUTE_IF("innodb_report_deadlock", return(LOCK_REC_FAIL);); + lock = lock_rec_get_first_on_page(block); trx = thr_get_trx(thr); @@ -2459,8 +2463,9 @@ lock_rec_lock_slow( || mode - (LOCK_MODE_MASK & mode) == LOCK_REC_NOT_GAP); ut_ad(dict_index_is_clust(index) || !dict_index_is_online_ddl(index)); - trx = thr_get_trx(thr); + DBUG_EXECUTE_IF("innodb_report_deadlock", return(DB_DEADLOCK);); + trx = thr_get_trx(thr); trx_mutex_enter(trx); lock = lock_rec_has_expl(mode, block, heap_no, trx); @@ -3894,16 +3899,14 @@ lock_get_next_lock( } else { ut_ad(heap_no == ULINT_UNDEFINED); ut_ad(lock_get_type_low(lock) == LOCK_TABLE); - lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock); - } - if (lock == NULL) { - return(NULL); + lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock); } + } while (lock != NULL + && lock->trx->lock.deadlock_mark > ctx->mark_start); - } while (lock->trx->lock.deadlock_mark > ctx->mark_start); - - ut_ad(lock_get_type_low(lock) == lock_get_type_low(ctx->wait_lock)); + ut_ad(lock == NULL + || lock_get_type_low(lock) == lock_get_type_low(ctx->wait_lock)); return(lock); } @@ -3938,20 +3941,20 @@ lock_get_first_lock( lock = lock_rec_get_first_on_page_addr( lock->un_member.rec_lock.space, lock->un_member.rec_lock.page_no); + + /* Position on the first lock on the physical record. */ + if (!lock_rec_get_nth_bit(lock, *heap_no)) { + lock = lock_rec_get_next_const(*heap_no, lock); + } + } else { *heap_no = ULINT_UNDEFINED; ut_ad(lock_get_type_low(lock) == LOCK_TABLE); lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock); } - ut_ad(lock != NULL); - - /* Skip sub-trees that have already been searched. */ - - if (lock->trx->lock.deadlock_mark > ctx->mark_start) { - return(lock_get_next_lock(ctx, lock, *heap_no)); - } - + ut_a(lock != NULL); + ut_a(lock != ctx->wait_lock); ut_ad(lock_get_type_low(lock) == lock_get_type_low(ctx->wait_lock)); return(lock); @@ -4038,44 +4041,6 @@ lock_deadlock_select_victim( } /********************************************************************//** -Check whether the current waiting lock in the context has to wait for -the given lock that is ahead in the queue. -@return lock instance that could cause potential deadlock. */ -static -const lock_t* -lock_deadlock_check( -/*================*/ - const lock_deadlock_ctx_t* ctx, /*!< in: deadlock context */ - const lock_t* lock) /*!< in: lock to check */ -{ - ut_ad(lock_mutex_own()); - - /* If it is the joining transaction wait lock or the joining - transaction was granted its lock due to deadlock detection. */ - if (lock == ctx->start->lock.wait_lock - || ctx->start->lock.wait_lock == NULL) { - ; /* Skip */ - } else if (lock == ctx->wait_lock) { - - /* We can mark this subtree as searched */ - ut_ad(lock->trx->lock.deadlock_mark <= ctx->mark_start); - lock->trx->lock.deadlock_mark = ++lock_mark_counter; - - /* We are not prepared for an overflow. This 64-bit - counter should never wrap around. At 10^9 increments - per second, it would take 10^3 years of uptime. */ - - ut_ad(lock_mark_counter > 0); - - } else if (lock_has_to_wait(ctx->wait_lock, lock)) { - - return(lock); - } - - return(NULL); -} - -/********************************************************************//** Pop the deadlock search state from the stack. @return stack slot instance that was on top of the stack. */ static @@ -4084,23 +4049,11 @@ lock_deadlock_pop( /*==============*/ lock_deadlock_ctx_t* ctx) /*!< in/out: context */ { - const lock_stack_t* stack; - const trx_lock_t* trx_lock; - ut_ad(lock_mutex_own()); ut_ad(ctx->depth > 0); - do { - /* Restore search state. */ - - stack = &lock_stack[--ctx->depth]; - trx_lock = &stack->lock->trx->lock; - - /* Skip sub-trees that have already been searched. */ - } while (ctx->depth > 0 && trx_lock->deadlock_mark > ctx->mark_start); - - return(ctx->depth == 0) ? NULL : stack; + return(&lock_stack[--ctx->depth]); } /********************************************************************//** @@ -4156,23 +4109,54 @@ lock_deadlock_search( /* Look at the locks ahead of wait_lock in the lock queue. */ lock = lock_get_first_lock(ctx, &heap_no); - do { + + for (;;) { + /* We should never visit the same sub-tree more than once. */ - ut_ad(lock->trx->lock.deadlock_mark <= ctx->mark_start); + ut_ad(lock == NULL + || lock->trx->lock.deadlock_mark <= ctx->mark_start); + + while (ctx->depth > 0 && lock == NULL) { + const lock_stack_t* stack; - ++ctx->cost; + /* Restore previous search state. */ - if (lock_deadlock_check(ctx, lock) == NULL) { + stack = lock_deadlock_pop(ctx); - /* No conflict found, skip this lock. */ + lock = stack->lock; + heap_no = stack->heap_no; + ctx->wait_lock = stack->wait_lock; + + lock = lock_get_next_lock(ctx, lock, heap_no); + } + + if (lock == NULL) { + break; + } else if (lock == ctx->wait_lock) { + + /* We can mark this subtree as searched */ + ut_ad(lock->trx->lock.deadlock_mark <= ctx->mark_start); + + lock->trx->lock.deadlock_mark = ++lock_mark_counter; + + /* We are not prepared for an overflow. This 64-bit + counter should never wrap around. At 10^9 increments + per second, it would take 10^3 years of uptime. */ + + ut_ad(lock_mark_counter > 0); + + lock = NULL; + + } else if (!lock_has_to_wait(ctx->wait_lock, lock)) { + + /* No conflict, next lock */ + lock = lock_get_next_lock(ctx, lock, heap_no); } else if (lock->trx == ctx->start) { /* Found a cycle. */ - if (!srv_read_only_mode) { - lock_deadlock_notify(ctx, lock); - } + lock_deadlock_notify(ctx, lock); return(lock_deadlock_select_victim(ctx)->id); @@ -4195,6 +4179,8 @@ lock_deadlock_search( /* Another trx ahead has requested a lock in an incompatible mode, and is itself waiting for a lock. */ + ++ctx->cost; + /* Save current search state. */ if (!lock_deadlock_push(ctx, lock, heap_no)) { @@ -4214,31 +4200,17 @@ lock_deadlock_search( ctx->wait_lock = lock->trx->lock.wait_lock; lock = lock_get_first_lock(ctx, &heap_no); - if (lock != NULL) { - continue; + if (lock->trx->lock.deadlock_mark > ctx->mark_start) { + lock = lock_get_next_lock(ctx, lock, heap_no); } - } - if (lock != NULL) { + } else { lock = lock_get_next_lock(ctx, lock, heap_no); } + } - if (lock == NULL && ctx->depth > 0) { - const lock_stack_t* stack; - - /* Restore previous search state. */ - - stack = lock_deadlock_pop(ctx); - - if (stack != NULL) { - lock = stack->lock; - heap_no = stack->heap_no; - ctx->wait_lock = stack->wait_lock; - } - } - - } while (lock != NULL || ctx->depth > 0); - + ut_a(lock == NULL && ctx->depth == 0); + /* No deadlock found. */ return(0); } @@ -4645,6 +4617,7 @@ lock_table_enqueue_waiting( trx_id_t victim_trx_id; ut_ad(lock_mutex_own()); + ut_ad(!srv_read_only_mode); trx = thr_get_trx(thr); ut_ad(trx_mutex_own(trx)); @@ -4859,6 +4832,39 @@ lock_table( } /*********************************************************************//** +Creates a table IX lock object for a resurrected transaction. */ +UNIV_INTERN +void +lock_table_ix_resurrect( +/*====================*/ + dict_table_t* table, /*!< in/out: table */ + trx_t* trx) /*!< in/out: transaction */ +{ + ut_ad(trx->is_recovered); + + if (lock_table_has(trx, table, LOCK_IX)) { + return; + } + + lock_mutex_enter(); + + /* We have to check if the new lock is compatible with any locks + other transactions have in the table lock queue. */ + + ut_ad(!lock_table_other_has_incompatible( + trx, LOCK_WAIT, table, LOCK_IX)); + + trx_mutex_enter(trx); +#ifdef WITH_WSREP + lock_table_create(NULL, table, LOCK_IX, trx); +#else + lock_table_create(table, LOCK_IX, trx); +#endif + lock_mutex_exit(); + trx_mutex_exit(trx); +} + +/*********************************************************************//** Checks if a waiting table lock request still has to wait in a queue. @return TRUE if still has to wait */ static @@ -5251,15 +5257,21 @@ lock_remove_recovered_trx_record_locks( ut_a(!lock_get_wait(lock)); - /* Recovered transactions don't have any - table level locks. */ - - ut_a(lock_get_type_low(lock) == LOCK_REC); - next_lock = UT_LIST_GET_NEXT(trx_locks, lock); - if (lock->index->table == table) { - lock_rec_discard(lock); + switch (lock_get_type_low(lock)) { + default: + ut_error; + case LOCK_TABLE: + if (lock->un_member.tab_lock.table == table) { + lock_trx_table_locks_remove(lock); + lock_table_remove_low(lock); + } + break; + case LOCK_REC: + if (lock->index->table == table) { + lock_rec_discard(lock); + } } } @@ -6220,8 +6232,11 @@ bool lock_validate() /*===========*/ { - lock_mutex_enter(); + typedef std::pair<ulint, ulint> page_addr_t; + typedef std::set<page_addr_t> page_addr_set; + page_addr_set pages; + lock_mutex_enter(); mutex_enter(&trx_sys->mutex); ut_a(lock_validate_table_locks(&trx_sys->rw_trx_list)); @@ -6240,20 +6255,19 @@ lock_validate() ulint space = lock->un_member.rec_lock.space; ulint page_no = lock->un_member.rec_lock.page_no; - lock_mutex_exit(); - mutex_exit(&trx_sys->mutex); - - lock_rec_block_validate(space, page_no); - - lock_mutex_enter(); - mutex_enter(&trx_sys->mutex); + pages.insert(std::make_pair(space, page_no)); } } mutex_exit(&trx_sys->mutex); - lock_mutex_exit(); + for (page_addr_set::const_iterator it = pages.begin(); + it != pages.end(); + ++it) { + lock_rec_block_validate((*it).first, (*it).second); + } + return(true); } #endif /* UNIV_DEBUG */ @@ -7474,4 +7488,26 @@ lock_trx_has_sys_table_locks( return(strongest_lock); } + +/*******************************************************************//** +Check if the transaction holds an exclusive lock on a record. +@return whether the locks are held */ +UNIV_INTERN +bool +lock_trx_has_rec_x_lock( +/*====================*/ + const trx_t* trx, /*!< in: transaction to check */ + const dict_table_t* table, /*!< in: table to check */ + const buf_block_t* block, /*!< in: buffer block of the record */ + ulint heap_no)/*!< in: record heap number */ +{ + ut_ad(heap_no > PAGE_HEAP_NO_SUPREMUM); + + lock_mutex_enter(); + ut_a(lock_table_has(trx, table, LOCK_IX)); + ut_a(lock_rec_has_expl(LOCK_X | LOCK_REC_NOT_GAP, + block, heap_no, trx)); + lock_mutex_exit(); + return(true); +} #endif /* UNIV_DEBUG */ diff --git a/storage/innobase/lock/lock0wait.cc b/storage/innobase/lock/lock0wait.cc index fc355d8bb6d..a1c35e20ead 100644 --- a/storage/innobase/lock/lock0wait.cc +++ b/storage/innobase/lock/lock0wait.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -266,6 +266,16 @@ lock_wait_suspend_thread( lock_wait_mutex_exit(); trx_mutex_exit(trx); + ulint lock_type = ULINT_UNDEFINED; + + lock_mutex_enter(); + + if (const lock_t* wait_lock = trx->lock.wait_lock) { + lock_type = lock_get_type_low(wait_lock); + } + + lock_mutex_exit(); + had_dict_lock = trx->dict_operation_lock_mode; switch (had_dict_lock) { @@ -301,8 +311,18 @@ lock_wait_suspend_thread( srv_conc_force_exit_innodb(trx); } + /* Unknown is also treated like a record lock */ + if (lock_type == ULINT_UNDEFINED || lock_type == LOCK_REC) { + thd_wait_begin(trx->mysql_thd, THD_WAIT_ROW_LOCK); + } else { + ut_ad(lock_type == LOCK_TABLE); + thd_wait_begin(trx->mysql_thd, THD_WAIT_TABLE_LOCK); + } + os_event_wait(slot->event); + thd_wait_end(trx->mysql_thd); + /* After resuming, reacquire the data dictionary latch if necessary. */ @@ -333,7 +353,8 @@ lock_wait_suspend_thread( finish_time = (ib_int64_t) sec * 1000000 + ms; } - diff_time = (ulint) (finish_time - start_time); + diff_time = (finish_time > start_time) ? + (ulint) (finish_time - start_time) : 0; srv_stats.n_lock_wait_current_count.dec(); srv_stats.n_lock_wait_time.add(diff_time); @@ -346,6 +367,10 @@ lock_wait_suspend_thread( lock_sys->n_lock_max_wait_time = diff_time; } + + /* Record the lock wait time for this thread */ + thd_set_lock_wait_time(trx->mysql_thd, diff_time); + } if (lock_wait_timeout < 100000000 diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index b6909f4771a..5282e45dddb 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -184,6 +184,86 @@ log_buf_pool_get_oldest_modification(void) return(lsn); } +/** Extends the log buffer. +@param[in] len requested minimum size in bytes */ +static +void +log_buffer_extend( + ulint len) +{ + ulint move_start; + ulint move_end; + byte tmp_buf[OS_FILE_LOG_BLOCK_SIZE]; + + mutex_enter(&(log_sys->mutex)); + + while (log_sys->is_extending) { + /* Another thread is trying to extend already. + Needs to wait for. */ + mutex_exit(&(log_sys->mutex)); + + log_buffer_flush_to_disk(); + + mutex_enter(&(log_sys->mutex)); + + if (srv_log_buffer_size > len / UNIV_PAGE_SIZE) { + /* Already extended enough by the others */ + mutex_exit(&(log_sys->mutex)); + return; + } + } + + log_sys->is_extending = true; + + while (log_sys->n_pending_writes != 0 + || ut_calc_align_down(log_sys->buf_free, + OS_FILE_LOG_BLOCK_SIZE) + != ut_calc_align_down(log_sys->buf_next_to_write, + OS_FILE_LOG_BLOCK_SIZE)) { + /* Buffer might have >1 blocks to write still. */ + mutex_exit(&(log_sys->mutex)); + + log_buffer_flush_to_disk(); + + mutex_enter(&(log_sys->mutex)); + } + + move_start = ut_calc_align_down( + log_sys->buf_free, + OS_FILE_LOG_BLOCK_SIZE); + move_end = log_sys->buf_free; + + /* store the last log block in buffer */ + ut_memcpy(tmp_buf, log_sys->buf + move_start, + move_end - move_start); + + log_sys->buf_free -= move_start; + log_sys->buf_next_to_write -= move_start; + + /* reallocate log buffer */ + srv_log_buffer_size = len / UNIV_PAGE_SIZE + 1; + mem_free(log_sys->buf_ptr); + log_sys->buf_ptr = static_cast<byte*>( + mem_zalloc(LOG_BUFFER_SIZE + OS_FILE_LOG_BLOCK_SIZE)); + log_sys->buf = static_cast<byte*>( + ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE)); + log_sys->buf_size = LOG_BUFFER_SIZE; + log_sys->max_buf_free = log_sys->buf_size / LOG_BUF_FLUSH_RATIO + - LOG_BUF_FLUSH_MARGIN; + + /* restore the last log block */ + ut_memcpy(log_sys->buf, tmp_buf, move_end - move_start); + + ut_ad(log_sys->is_extending); + log_sys->is_extending = false; + + mutex_exit(&(log_sys->mutex)); + + ib_logf(IB_LOG_LEVEL_INFO, + "innodb_log_buffer_size was extended to %lu.", + LOG_BUFFER_SIZE); +} + /************************************************************//** Opens the log for log_write_low. The log must be closed with log_close and released with log_release. @@ -204,11 +284,37 @@ log_reserve_and_open( ulint count = 0; #endif /* UNIV_DEBUG */ - ut_a(len < log->buf_size / 2); + if (len >= log->buf_size / 2) { + DBUG_EXECUTE_IF("ib_log_buffer_is_short_crash", + DBUG_SUICIDE();); + + /* log_buffer is too small. try to extend instead of crash. */ + ib_logf(IB_LOG_LEVEL_WARN, + "The transaction log size is too large" + " for innodb_log_buffer_size (%lu >= %lu / 2). " + "Trying to extend it.", + len, LOG_BUFFER_SIZE); + + log_buffer_extend((len + 1) * 2); + } loop: mutex_enter(&(log->mutex)); ut_ad(!recv_no_log_write); + if (log->is_extending) { + + mutex_exit(&(log->mutex)); + + /* Log buffer size is extending. Writing up to the next block + should wait for the extending finished. */ + + os_thread_sleep(100000); + + ut_ad(++count < 50); + + goto loop; + } + /* Calculate an upper limit for the space the string may take in the log buffer */ @@ -758,6 +864,7 @@ log_init(void) ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE)); log_sys->buf_size = LOG_BUFFER_SIZE; + log_sys->is_extending = false; log_sys->max_buf_free = log_sys->buf_size / LOG_BUF_FLUSH_RATIO - LOG_BUF_FLUSH_MARGIN; @@ -852,7 +959,7 @@ log_init(void) recv_sys->scanned_lsn = log_sys->lsn; recv_sys->scanned_checkpoint_no = 0; recv_sys->recovered_lsn = log_sys->lsn; - recv_sys->limit_lsn = IB_ULONGLONG_MAX; + recv_sys->limit_lsn = LSN_MAX; #endif } @@ -1161,7 +1268,7 @@ log_group_file_header_flush( srv_stats.os_log_pending_writes.inc(); - fil_io(OS_FILE_WRITE | OS_FILE_LOG, TRUE, group->space_id, 0, + fil_io(OS_FILE_WRITE | OS_FILE_LOG, true, group->space_id, 0, (ulint) (dest_offset / UNIV_PAGE_SIZE), (ulint) (dest_offset % UNIV_PAGE_SIZE), OS_FILE_LOG_BLOCK_SIZE, @@ -1290,7 +1397,7 @@ loop: ut_a(next_offset / UNIV_PAGE_SIZE <= ULINT_MAX); - fil_io(OS_FILE_WRITE | OS_FILE_LOG, TRUE, group->space_id, 0, + fil_io(OS_FILE_WRITE | OS_FILE_LOG, true, group->space_id, 0, (ulint) (next_offset / UNIV_PAGE_SIZE), (ulint) (next_offset % UNIV_PAGE_SIZE), write_len, buf, group); @@ -1323,7 +1430,7 @@ log_write_up_to( /*============*/ lsn_t lsn, /*!< in: log sequence number up to which the log should be written, - IB_ULONGLONG_MAX if not specified */ + LSN_MAX if not specified */ ulint wait, /*!< in: LOG_NO_WAIT, LOG_WAIT_ONE_GROUP, or LOG_WAIT_ALL_GROUPS */ ibool flush_to_disk) @@ -1787,7 +1894,7 @@ log_group_checkpoint( #ifdef UNIV_LOG_ARCHIVE if (log_sys->archiving_state == LOG_ARCH_OFF) { - archived_lsn = IB_ULONGLONG_MAX; + archived_lsn = LSN_MAX; } else { archived_lsn = log_sys->archived_lsn; @@ -1799,7 +1906,7 @@ log_group_checkpoint( mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN, archived_lsn); #else /* UNIV_LOG_ARCHIVE */ - mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN, IB_ULONGLONG_MAX); + mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN, LSN_MAX); #endif /* UNIV_LOG_ARCHIVE */ for (i = 0; i < LOG_MAX_N_GROUPS; i++) { @@ -1855,7 +1962,7 @@ log_group_checkpoint( added with 1, as we want to distinguish between a normal log file write and a checkpoint field write */ - fil_io(OS_FILE_WRITE | OS_FILE_LOG, FALSE, group->space_id, 0, + fil_io(OS_FILE_WRITE | OS_FILE_LOG, false, group->space_id, 0, write_offset / UNIV_PAGE_SIZE, write_offset % UNIV_PAGE_SIZE, OS_FILE_LOG_BLOCK_SIZE, @@ -1906,7 +2013,7 @@ log_reset_first_header_and_checkpoint( mach_write_to_4(buf + LOG_CHECKPOINT_LOG_BUF_SIZE, 2 * 1024 * 1024); - mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN, IB_ULONGLONG_MAX); + mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN, LSN_MAX); fold = ut_fold_binary(buf, LOG_CHECKPOINT_CHECKSUM_1); mach_write_to_4(buf + LOG_CHECKPOINT_CHECKSUM_1, fold); @@ -1937,7 +2044,7 @@ log_group_read_checkpoint_info( MONITOR_INC(MONITOR_LOG_IO); - fil_io(OS_FILE_READ | OS_FILE_LOG, TRUE, group->space_id, 0, + fil_io(OS_FILE_READ | OS_FILE_LOG, true, group->space_id, 0, field / UNIV_PAGE_SIZE, field % UNIV_PAGE_SIZE, OS_FILE_LOG_BLOCK_SIZE, log_sys->checkpoint_buf, NULL); } @@ -2070,7 +2177,7 @@ void log_make_checkpoint_at( /*===================*/ lsn_t lsn, /*!< in: make a checkpoint at this or a - later lsn, if IB_ULONGLONG_MAX, makes + later lsn, if LSN_MAX, makes a checkpoint at the latest lsn */ ibool write_always) /*!< in: the function normally checks if the new checkpoint would have a @@ -2196,7 +2303,7 @@ log_group_read_log_seg( { ulint len; lsn_t source_offset; - ibool sync; + bool sync; ut_ad(mutex_own(&(log_sys->mutex))); @@ -2294,7 +2401,7 @@ log_group_archive_file_header_write( MONITOR_INC(MONITOR_LOG_IO); - fil_io(OS_FILE_WRITE | OS_FILE_LOG, TRUE, group->archive_space_id, + fil_io(OS_FILE_WRITE | OS_FILE_LOG, true, group->archive_space_id, dest_offset / UNIV_PAGE_SIZE, dest_offset % UNIV_PAGE_SIZE, 2 * OS_FILE_LOG_BLOCK_SIZE, @@ -2329,7 +2436,7 @@ log_group_archive_completed_header_write( MONITOR_INC(MONITOR_LOG_IO); - fil_io(OS_FILE_WRITE | OS_FILE_LOG, TRUE, group->archive_space_id, + fil_io(OS_FILE_WRITE | OS_FILE_LOG, true, group->archive_space_id, dest_offset / UNIV_PAGE_SIZE, dest_offset % UNIV_PAGE_SIZE, OS_FILE_LOG_BLOCK_SIZE, @@ -2458,7 +2565,7 @@ loop: MONITOR_INC(MONITOR_LOG_IO); - fil_io(OS_FILE_WRITE | OS_FILE_LOG, FALSE, group->archive_space_id, + fil_io(OS_FILE_WRITE | OS_FILE_LOG, false, group->archive_space_id, (ulint) (next_offset / UNIV_PAGE_SIZE), (ulint) (next_offset % UNIV_PAGE_SIZE), ut_calc_align(len, OS_FILE_LOG_BLOCK_SIZE), buf, diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index 8cefa9e4b70..e7a643b516a 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -1689,17 +1689,13 @@ recv_recover_page_func( start_lsn = recv->start_lsn; } -#ifdef UNIV_DEBUG - if (log_debug_writes) { - fprintf(stderr, - "InnoDB: Applying log rec" - " type %lu len %lu" - " to space %lu page no %lu\n", - (ulong) recv->type, (ulong) recv->len, - (ulong) recv_addr->space, - (ulong) recv_addr->page_no); - } -#endif /* UNIV_DEBUG */ + DBUG_PRINT("ib_log", + ("apply " DBUG_LSN_PF ": %u len %u " + "page %u:%u", recv->start_lsn, + (unsigned) recv->type, + (unsigned) recv->len, + (unsigned) recv_addr->space, + (unsigned) recv_addr->page_no)); recv_parse_or_apply_log_rec_body(recv->type, buf, buf + recv->len, @@ -1734,19 +1730,6 @@ recv_recover_page_func( } #endif /* UNIV_ZIP_DEBUG */ - mutex_enter(&(recv_sys->mutex)); - - if (recv_max_page_lsn < page_lsn) { - recv_max_page_lsn = page_lsn; - } - - recv_addr->state = RECV_PROCESSED; - - ut_a(recv_sys->n_addrs); - recv_sys->n_addrs--; - - mutex_exit(&(recv_sys->mutex)); - #ifndef UNIV_HOTBACKUP if (modification_to_page) { ut_a(block); @@ -1763,6 +1746,20 @@ recv_recover_page_func( mtr.modifications = FALSE; mtr_commit(&mtr); + + mutex_enter(&(recv_sys->mutex)); + + if (recv_max_page_lsn < page_lsn) { + recv_max_page_lsn = page_lsn; + } + + recv_addr->state = RECV_PROCESSED; + + ut_a(recv_sys->n_addrs); + recv_sys->n_addrs--; + + mutex_exit(&(recv_sys->mutex)); + } #ifndef UNIV_HOTBACKUP @@ -2060,7 +2057,7 @@ recv_apply_log_recs_for_backup(void) fil0fil.cc routines */ if (zip_size) { - error = fil_io(OS_FILE_READ, TRUE, + error = fil_io(OS_FILE_READ, true, recv_addr->space, zip_size, recv_addr->page_no, 0, zip_size, block->page.zip.data, NULL); @@ -2069,7 +2066,7 @@ recv_apply_log_recs_for_backup(void) exit(1); } } else { - error = fil_io(OS_FILE_READ, TRUE, + error = fil_io(OS_FILE_READ, true, recv_addr->space, 0, recv_addr->page_no, 0, UNIV_PAGE_SIZE, @@ -2098,13 +2095,13 @@ recv_apply_log_recs_for_backup(void) mach_read_from_8(block->frame + FIL_PAGE_LSN)); if (zip_size) { - error = fil_io(OS_FILE_WRITE, TRUE, + error = fil_io(OS_FILE_WRITE, true, recv_addr->space, zip_size, recv_addr->page_no, 0, zip_size, block->page.zip.data, NULL); } else { - error = fil_io(OS_FILE_WRITE, TRUE, + error = fil_io(OS_FILE_WRITE, true, recv_addr->space, 0, recv_addr->page_no, 0, UNIV_PAGE_SIZE, @@ -2387,15 +2384,11 @@ loop: recv_sys->recovered_offset += len; recv_sys->recovered_lsn = new_recovered_lsn; -#ifdef UNIV_DEBUG - if (log_debug_writes) { - fprintf(stderr, - "InnoDB: Parsed a single log rec" - " type %lu len %lu space %lu page no %lu\n", - (ulong) type, (ulong) len, (ulong) space, - (ulong) page_no); - } -#endif /* UNIV_DEBUG */ + DBUG_PRINT("ib_log", + ("scan " DBUG_LSN_PF ": log rec %u len %u " + "page %u:%u", old_lsn, + (unsigned) type, (unsigned) len, + (unsigned) space, (unsigned) page_no)); if (type == MLOG_DUMMY_RECORD) { /* Do nothing */ @@ -2482,16 +2475,12 @@ loop: } #endif /* UNIV_LOG_DEBUG */ -#ifdef UNIV_DEBUG - if (log_debug_writes) { - fprintf(stderr, - "InnoDB: Parsed a multi log rec" - " type %lu len %lu" - " space %lu page no %lu\n", - (ulong) type, (ulong) len, - (ulong) space, (ulong) page_no); - } -#endif /* UNIV_DEBUG */ + DBUG_PRINT("ib_log", + ("scan " DBUG_LSN_PF ": multi-log rec %u " + "len %u page %u:%u", + recv_sys->recovered_lsn, + (unsigned) type, (unsigned) len, + (unsigned) space, (unsigned) page_no)); total_len += len; n_recs++; @@ -2980,6 +2969,11 @@ recv_init_crash_recovery(void) "from the doublewrite buffer..."); buf_dblwr_init_or_restore_pages(TRUE); + + /* Spawn the background thread to flush dirty pages + from the buffer pools. */ + recv_writer_thread_handle = os_thread_create( + recv_writer_thread, 0, 0); } } @@ -3072,7 +3066,7 @@ recv_recovery_from_checkpoint_start_func( /* Read the first log file header to print a note if this is a recovery from a restored InnoDB Hot Backup */ - fil_io(OS_FILE_READ | OS_FILE_LOG, TRUE, max_cp_group->space_id, 0, + fil_io(OS_FILE_READ | OS_FILE_LOG, true, max_cp_group->space_id, 0, 0, 0, LOG_FILE_HDR_SIZE, log_hdr_buf, max_cp_group); @@ -3102,7 +3096,7 @@ recv_recovery_from_checkpoint_start_func( memset(log_hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, ' ', 4); /* Write to the log file to wipe over the label */ - fil_io(OS_FILE_WRITE | OS_FILE_LOG, TRUE, + fil_io(OS_FILE_WRITE | OS_FILE_LOG, true, max_cp_group->space_id, 0, 0, 0, OS_FILE_LOG_BLOCK_SIZE, log_hdr_buf, max_cp_group); @@ -3266,19 +3260,9 @@ recv_recovery_from_checkpoint_start_func( } } - if (!srv_read_only_mode) { - if (recv_needed_recovery) { - /* Spawn the background thread to - flush dirty pages from the buffer - pools. */ - recv_writer_thread_handle = - os_thread_create( - recv_writer_thread, 0, 0); - } else { - /* Init the doublewrite buffer memory - structure */ - buf_dblwr_init_or_restore_pages(FALSE); - } + if (!recv_needed_recovery && !srv_read_only_mode) { + /* Init the doublewrite buffer memory structure */ + buf_dblwr_init_or_restore_pages(FALSE); } } @@ -3347,7 +3331,7 @@ recv_recovery_from_checkpoint_start_func( log_sys->next_checkpoint_no = checkpoint_no + 1; #ifdef UNIV_LOG_ARCHIVE - if (archived_lsn == IB_ULONGLONG_MAX) { + if (archived_lsn == LSN_MAX) { log_sys->archiving_state = LOG_ARCH_OFF; } @@ -3387,12 +3371,7 @@ recv_recovery_from_checkpoint_finish(void) recv_apply_hashed_log_recs(TRUE); } -#ifdef UNIV_DEBUG - if (log_debug_writes) { - fprintf(stderr, - "InnoDB: Log records applied to the database\n"); - } -#endif /* UNIV_DEBUG */ + DBUG_PRINT("ib_log", ("apply completed")); if (recv_needed_recovery) { trx_sys_print_mysql_master_log_pos(); @@ -3753,7 +3732,7 @@ ask_again: #endif /* Read the archive file header */ - fil_io(OS_FILE_READ | OS_FILE_LOG, TRUE, group->archive_space_id, 0, 0, + fil_io(OS_FILE_READ | OS_FILE_LOG, true, group->archive_space_id, 0, 0, LOG_FILE_HDR_SIZE, buf, NULL); /* Check if the archive file header is consistent */ @@ -3825,7 +3804,7 @@ ask_again: } #endif /* UNIV_DEBUG */ - fil_io(OS_FILE_READ | OS_FILE_LOG, TRUE, + fil_io(OS_FILE_READ | OS_FILE_LOG, true, group->archive_space_id, read_offset / UNIV_PAGE_SIZE, read_offset % UNIV_PAGE_SIZE, len, buf, NULL); @@ -3951,8 +3930,8 @@ recv_recovery_from_archive_start( err = recv_recovery_from_checkpoint_start(LOG_ARCHIVE, limit_lsn, - IB_ULONGLONG_MAX, - IB_ULONGLONG_MAX); + LSN_MAX, + LSN_MAX); if (err != DB_SUCCESS) { return(err); @@ -3961,7 +3940,7 @@ recv_recovery_from_archive_start( mutex_enter(&(log_sys->mutex)); } - if (limit_lsn != IB_ULONGLONG_MAX) { + if (limit_lsn != LSN_MAX) { recv_apply_hashed_log_recs(FALSE); diff --git a/storage/innobase/mem/mem0mem.cc b/storage/innobase/mem/mem0mem.cc index 33060f22c6a..e0e6220f4d8 100644 --- a/storage/innobase/mem/mem0mem.cc +++ b/storage/innobase/mem/mem0mem.cc @@ -354,7 +354,11 @@ mem_heap_create_block( block = (mem_block_t*) buf_block->frame; } - ut_ad(block); + if(!block) { + ib_logf(IB_LOG_LEVEL_FATAL, + " InnoDB: Unable to allocate memory of size %lu.\n", + len); + } block->buf_block = buf_block; block->free_block = NULL; #else /* !UNIV_HOTBACKUP */ diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index 10b4686b720..869586bcd90 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -58,78 +58,81 @@ mtr_block_dirtied( /*****************************************************************//** Releases the item in the slot given. */ -static +static __attribute__((nonnull)) void -mtr_memo_slot_release( -/*==================*/ - mtr_t* mtr, /*!< in: mtr */ +mtr_memo_slot_release_func( +/*=======================*/ +#ifdef UNIV_DEBUG + mtr_t* mtr, /*!< in/out: mini-transaction */ +#endif /* UNIV_DEBUG */ mtr_memo_slot_t* slot) /*!< in: memo slot */ { - void* object; - ulint type; - - ut_ad(mtr); - ut_ad(slot); + void* object = slot->object; + slot->object = NULL; /* slot release is a local operation for the current mtr. We must not be holding the flush_order mutex while doing this. */ ut_ad(!log_flush_order_mutex_own()); -#ifndef UNIV_DEBUG - UT_NOT_USED(mtr); -#endif /* UNIV_DEBUG */ - - object = slot->object; - type = slot->type; - if (UNIV_LIKELY(object != NULL)) { - if (type <= MTR_MEMO_BUF_FIX) { - buf_page_release((buf_block_t*) object, type); - } else if (type == MTR_MEMO_S_LOCK) { - rw_lock_s_unlock((rw_lock_t*) object); + switch (slot->type) { + case MTR_MEMO_PAGE_S_FIX: + case MTR_MEMO_PAGE_X_FIX: + case MTR_MEMO_BUF_FIX: + buf_page_release((buf_block_t*) object, slot->type); + break; + case MTR_MEMO_S_LOCK: + rw_lock_s_unlock((rw_lock_t*) object); + break; + case MTR_MEMO_X_LOCK: + rw_lock_x_unlock((rw_lock_t*) object); + break; #ifdef UNIV_DEBUG - } else if (type != MTR_MEMO_X_LOCK) { - ut_ad(type == MTR_MEMO_MODIFY); - ut_ad(mtr_memo_contains(mtr, object, - MTR_MEMO_PAGE_X_FIX)); + default: + ut_ad(slot->type == MTR_MEMO_MODIFY); + ut_ad(mtr_memo_contains(mtr, object, MTR_MEMO_PAGE_X_FIX)); #endif /* UNIV_DEBUG */ - } else { - rw_lock_x_unlock((rw_lock_t*) object); - } } - - slot->object = NULL; } +#ifdef UNIV_DEBUG +# define mtr_memo_slot_release(mtr, slot) mtr_memo_slot_release_func(mtr, slot) +#else /* UNIV_DEBUG */ +# define mtr_memo_slot_release(mtr, slot) mtr_memo_slot_release_func(slot) +#endif /* UNIV_DEBUG */ + /**********************************************************//** Releases the mlocks and other objects stored in an mtr memo. They are released in the order opposite to which they were pushed to the memo. */ -static +static __attribute__((nonnull)) void mtr_memo_pop_all( /*=============*/ - mtr_t* mtr) /*!< in: mtr */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { - mtr_memo_slot_t* slot; - dyn_array_t* memo; - ulint offset; - - ut_ad(mtr); ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->state == MTR_COMMITTING); /* Currently only used in commit */ - memo = &(mtr->memo); - - offset = dyn_array_get_data_size(memo); - - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); - slot = static_cast<mtr_memo_slot_t*>( - dyn_array_get_element(memo, offset)); - - mtr_memo_slot_release(mtr, slot); + for (const dyn_block_t* block = dyn_array_get_last_block(&mtr->memo); + block; + block = dyn_array_get_prev_block(&mtr->memo, block)) { + const mtr_memo_slot_t* start + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block)); + mtr_memo_slot_t* slot + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block) + + dyn_block_get_used(block)); + + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); + + while (slot-- != start) { + if (slot->object != NULL) { + mtr_memo_slot_release(mtr, slot); + } + } } } @@ -167,26 +170,29 @@ mtr_memo_note_modifications( /*========================*/ mtr_t* mtr) /*!< in: mtr */ { - dyn_array_t* memo; - ulint offset; - ut_ad(!srv_read_only_mode); ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->state == MTR_COMMITTING); /* Currently only used in commit */ - memo = &mtr->memo; - - offset = dyn_array_get_data_size(memo); - - while (offset > 0) { - mtr_memo_slot_t* slot; - - offset -= sizeof(mtr_memo_slot_t); - slot = static_cast<mtr_memo_slot_t*>( - dyn_array_get_element(memo, offset)); - - mtr_memo_slot_note_modification(mtr, slot); + for (const dyn_block_t* block = dyn_array_get_last_block(&mtr->memo); + block; + block = dyn_array_get_prev_block(&mtr->memo, block)) { + const mtr_memo_slot_t* start + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block)); + mtr_memo_slot_t* slot + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block) + + dyn_block_get_used(block)); + + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); + + while (slot-- != start) { + if (slot->object != NULL) { + mtr_memo_slot_note_modification(mtr, slot); + } + } } } @@ -339,46 +345,44 @@ mtr_commit( #ifndef UNIV_HOTBACKUP /***************************************************//** -Releases an object in the memo stack. */ +Releases an object in the memo stack. +@return true if released */ UNIV_INTERN -void +bool mtr_memo_release( /*=============*/ - mtr_t* mtr, /*!< in: mtr */ + mtr_t* mtr, /*!< in/out: mini-transaction */ void* object, /*!< in: object */ ulint type) /*!< in: object type: MTR_MEMO_S_LOCK, ... */ { - mtr_memo_slot_t* slot; - dyn_array_t* memo; - ulint offset; - - ut_ad(mtr); ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->state == MTR_ACTIVE); - - memo = &(mtr->memo); - - offset = dyn_array_get_data_size(memo); - - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); - - slot = static_cast<mtr_memo_slot_t*>( - dyn_array_get_element(memo, offset)); - - if (object == slot->object && type == slot->type) { - - /* We cannot release a page that has been written - to in the middle of a mini-transaction. */ - - ut_ad(!(mtr->modifications - && slot->type == MTR_MEMO_PAGE_X_FIX)); - - mtr_memo_slot_release(mtr, slot); - - break; + /* We cannot release a page that has been written to in the + middle of a mini-transaction. */ + ut_ad(!mtr->modifications || type != MTR_MEMO_PAGE_X_FIX); + + for (const dyn_block_t* block = dyn_array_get_last_block(&mtr->memo); + block; + block = dyn_array_get_prev_block(&mtr->memo, block)) { + const mtr_memo_slot_t* start + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block)); + mtr_memo_slot_t* slot + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block) + + dyn_block_get_used(block)); + + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); + + while (slot-- != start) { + if (object == slot->object && type == slot->type) { + mtr_memo_slot_release(mtr, slot); + return(true); + } } } + + return(false); } #endif /* !UNIV_HOTBACKUP */ diff --git a/storage/innobase/mysql-test/storage_engine/fulltext_search.rdiff b/storage/innobase/mysql-test/storage_engine/fulltext_search.rdiff index 1bfb2fb96e1..a68fe83070e 100644 --- a/storage/innobase/mysql-test/storage_engine/fulltext_search.rdiff +++ b/storage/innobase/mysql-test/storage_engine/fulltext_search.rdiff @@ -1,5 +1,5 @@ ---- suite/storage_engine/fulltext_search.result 2013-10-03 20:35:06.000000000 +0400 -+++ suite/storage_engine/fulltext_search.reject 2013-11-08 17:46:03.000000000 +0400 +--- suite/storage_engine/fulltext_search.result 2013-11-27 18:50:16.000000000 +0400 ++++ suite/storage_engine/fulltext_search.reject 2014-02-05 15:33:26.000000000 +0400 @@ -52,15 +52,14 @@ INSERT INTO t1 (v0,v1,v2) VALUES ('text4','Contributing more...','...is a good idea'),('text5','test','test'); SELECT v0, MATCH(v1) AGAINST('contributing') AS rating FROM t1 WHERE MATCH(v1) AGAINST ('contributing'); @@ -7,10 +7,12 @@ -text4 1.3705332279205322 +text4 0.4885590672492981 SELECT v0 FROM t1 WHERE MATCH(v1,v2) AGAINST ('-test1 +critical +Cook*' IN BOOLEAN MODE); - v0 +-v0 -text1 ++ERROR HY000: Can't find FULLTEXT index matching the column list SELECT v0 FROM t1 WHERE MATCH(v1,v2) AGAINST ('-patch +critical +Cook*' IN BOOLEAN MODE); - v0 +-v0 ++ERROR HY000: Can't find FULLTEXT index matching the column list SELECT v0, MATCH(v1) AGAINST('database' WITH QUERY EXPANSION) AS rating FROM t1 WHERE MATCH(v1) AGAINST ('database' WITH QUERY EXPANSION); v0 rating -text1 178.11756896972656 @@ -42,6 +44,6 @@ v0 rating -text1 190.56150817871094 -text4 1.1758291721343994 -+text1 229.6087646484375 ++text1 229.60874938964844 +text4 0.31671249866485596 DROP TABLE t1; diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index c9c7ec4cc31..f473b168e8e 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -1,6 +1,6 @@ /*********************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. Portions of this file contain modifications contributed and copyrighted @@ -640,26 +640,13 @@ os_file_handle_error_cond_exit( to the log. */ if (should_exit || !on_error_silent) { - if (name) { - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: File name %s\n", name); - } - - ut_print_timestamp(stderr); - fprintf(stderr, " InnoDB: File operation call: " - "'%s' returned OS error " ULINTPF ".\n", - operation, err); + ib_logf(IB_LOG_LEVEL_ERROR, "File %s: '%s' returned OS " + "error " ULINTPF ".%s", name ? name : "(unknown)", + operation, err, should_exit + ? " Cannot continue operation" : ""); } if (should_exit) { - ut_print_timestamp(stderr); - fprintf(stderr, " InnoDB: Cannot continue " - "operation.\n"); - - fflush(stderr); - - ut_ad(0); /* Report call stack, etc only in debug code. */ exit(1); } } @@ -1131,6 +1118,7 @@ os_file_create_simple_func( os_file_t file; ibool retry; + *success = FALSE; #ifdef __WIN__ DWORD access; DWORD create_flag; @@ -1325,6 +1313,7 @@ os_file_create_simple_no_error_handling_func( { os_file_t file; + *success = FALSE; #ifdef __WIN__ DWORD access; DWORD create_flag; @@ -1475,18 +1464,32 @@ os_file_set_nocache( } #elif defined(O_DIRECT) if (fcntl(fd, F_SETFL, O_DIRECT) == -1) { - int errno_save = errno; - - ib_logf(IB_LOG_LEVEL_ERROR, - "Failed to set O_DIRECT on file %s: %s: %s, " - "continuing anyway", - file_name, operation_name, strerror(errno_save)); - + int errno_save = errno; + static bool warning_message_printed = false; if (errno_save == EINVAL) { - ib_logf(IB_LOG_LEVEL_ERROR, - "O_DIRECT is known to result in 'Invalid " - "argument' on Linux on tmpfs, see MySQL " - "Bug#26662"); + if (!warning_message_printed) { + warning_message_printed = true; +# ifdef UNIV_LINUX + ib_logf(IB_LOG_LEVEL_WARN, + "Failed to set O_DIRECT on file " + "%s: %s: %s, continuing anyway. " + "O_DIRECT is known to result " + "in 'Invalid argument' on Linux on " + "tmpfs, see MySQL Bug#26662.", + file_name, operation_name, + strerror(errno_save)); +# else /* UNIV_LINUX */ + goto short_warning; +# endif /* UNIV_LINUX */ + } + } else { +# ifndef UNIV_LINUX +short_warning: +# endif + ib_logf(IB_LOG_LEVEL_WARN, + "Failed to set O_DIRECT on file %s: %s: %s, " + "continuing anyway.", + file_name, operation_name, strerror(errno_save)); } } #endif /* defined(UNIV_SOLARIS) && defined(DIRECTIO_ON) */ @@ -1800,8 +1803,8 @@ Deletes a file if it exists. The file has to be closed before calling this. @return TRUE if success */ UNIV_INTERN bool -os_file_delete_if_exists( -/*=====================*/ +os_file_delete_if_exists_func( +/*==========================*/ const char* name) /*!< in: file path as a null-terminated string */ { @@ -1862,8 +1865,8 @@ Deletes a file. The file has to be closed before calling this. @return TRUE if success */ UNIV_INTERN bool -os_file_delete( -/*===========*/ +os_file_delete_func( +/*================*/ const char* name) /*!< in: file path as a null-terminated string */ { @@ -2106,8 +2109,8 @@ os_file_set_size( fprintf(stderr, "InnoDB: Error: preallocating file " "space for file \'%s\' failed. Current size " - "%llu, desired size %llu\n", - name, current_size, size); + "%lu, desired size %lu\n", + name, (long unsigned) current_size, (long unsigned) size); os_file_handle_error_no_exit(name, "posix_fallocate", FALSE); return(FALSE); } @@ -3358,8 +3361,8 @@ os_file_make_data_dir_path( The function os_file_dirname returns a directory component of a null-terminated pathname string. In the usual case, dirname returns the string up to, but not including, the final '/', and basename -is the component following the final '/'. Trailing '/' charac -ters are not counted as part of the pathname. +is the component following the final '/'. Trailing '/' characters +are not counted as part of the pathname. If path does not contain a slash, dirname returns the string ".". @@ -4085,7 +4088,7 @@ os_aio_get_segment_no_from_slot( seg_len = os_aio_read_array->n_slots / os_aio_read_array->n_segments; - segment = 2 + slot->pos / seg_len; + segment = (srv_read_only_mode ? 0 : 2) + slot->pos / seg_len; } else { ut_ad(!srv_read_only_mode); ut_a(array == os_aio_write_array); @@ -5323,7 +5326,7 @@ consecutive_loop: if (slot->reserved && slot != aio_slot - && slot->offset == slot->offset + aio_slot->len + && slot->offset == aio_slot->offset + aio_slot->len && slot->type == aio_slot->type && slot->file == aio_slot->file) { diff --git a/storage/innobase/os/os0thread.cc b/storage/innobase/os/os0thread.cc index 9cc09a847b1..6736df46a87 100644 --- a/storage/innobase/os/os0thread.cc +++ b/storage/innobase/os/os0thread.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -179,6 +179,9 @@ os_thread_create_func( #ifndef UNIV_HPUX10 pthread_attr_destroy(&attr); #endif + + ut_a(os_thread_count <= OS_THREAD_MAX_N); + if (thread_id) { *thread_id = pthread; } diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc index f416d38cc35..efce1f10cae 100644 --- a/storage/innobase/page/page0cur.cc +++ b/storage/innobase/page/page0cur.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -30,6 +30,7 @@ Created 10/4/1994 Heikki Tuuri #endif #include "page0zip.h" +#include "btr0btr.h" #include "mtr0log.h" #include "log0recv.h" #include "ut0ut.h" @@ -773,7 +774,7 @@ page_cur_parse_insert_rec( byte* buf; byte* ptr2 = ptr; ulint info_and_status_bits = 0; /* remove warning */ - page_cur_t cursor; + page_cur_t cursor; mem_heap_t* heap = NULL; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; @@ -1160,84 +1161,22 @@ use_heap: } /***********************************************************//** -Compresses or reorganizes a page after an optimistic insert. -@return rec if succeed, NULL otherwise */ -static -rec_t* -page_cur_insert_rec_zip_reorg( -/*==========================*/ - rec_t** current_rec,/*!< in/out: pointer to current record after - which the new record is inserted */ - buf_block_t* block, /*!< in: buffer block */ - dict_index_t* index, /*!< in: record descriptor */ - rec_t* rec, /*!< in: inserted record */ - ulint rec_size,/*!< in: size of the inserted record */ - page_t* page, /*!< in: uncompressed page */ - page_zip_des_t* page_zip,/*!< in: compressed page */ - mtr_t* mtr) /*!< in: mini-transaction, or NULL */ -{ - ulint pos; - - /* Make a local copy as the values can change dynamically. */ - bool log_compressed = page_log_compressed_pages; - ulint level = page_compression_level; - - /* Recompress or reorganize and recompress the page. */ - if (page_zip_compress(page_zip, page, index, level, - log_compressed ? mtr : NULL)) { - if (!log_compressed) { - page_cur_insert_rec_write_log( - rec, rec_size, *current_rec, index, mtr); - page_zip_compress_write_log_no_data( - level, page, index, mtr); - } - - return(rec); - } - - /* Before trying to reorganize the page, - store the number of preceding records on the page. */ - pos = page_rec_get_n_recs_before(rec); - ut_ad(pos > 0); - - if (page_zip_reorganize(block, index, mtr)) { - /* The page was reorganized: Find rec by seeking to pos, - and update *current_rec. */ - if (pos > 1) { - rec = page_rec_get_nth(page, pos - 1); - } else { - rec = page + PAGE_NEW_INFIMUM; - } - - *current_rec = rec; - rec = page + rec_get_next_offs(rec, TRUE); - - return(rec); - } - - /* Out of space: restore the page */ - btr_blob_dbg_remove(page, index, "insert_zip_fail"); - if (!page_zip_decompress(page_zip, page, FALSE)) { - ut_error; /* Memory corrupted? */ - } - ut_ad(page_validate(page, index)); - btr_blob_dbg_add(page, index, "insert_zip_fail"); - return(NULL); -} - -/***********************************************************//** Inserts a record next to page cursor on a compressed and uncompressed page. Returns pointer to inserted record if succeed, i.e., enough space available, NULL otherwise. The cursor stays at the same position. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to record if succeed, NULL otherwise */ UNIV_INTERN rec_t* page_cur_insert_rec_zip( /*====================*/ - rec_t** current_rec,/*!< in/out: pointer to current record after - which the new record is inserted */ - buf_block_t* block, /*!< in: buffer block of *current_rec */ + page_cur_t* cursor, /*!< in/out: page cursor */ dict_index_t* index, /*!< in: record descriptor */ const rec_t* rec, /*!< in: pointer to a physical record */ ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */ @@ -1255,19 +1194,19 @@ page_cur_insert_rec_zip( record */ page_zip_des_t* page_zip; - page_zip = buf_block_get_page_zip(block); + page_zip = page_cur_get_page_zip(cursor); ut_ad(page_zip); ut_ad(rec_offs_validate(rec, index, offsets)); - page = page_align(*current_rec); + page = page_cur_get_page(cursor); ut_ad(dict_table_is_comp(index->table)); ut_ad(page_is_comp(page)); ut_ad(fil_page_get_type(page) == FIL_PAGE_INDEX); ut_ad(mach_read_from_8(page + PAGE_HEADER + PAGE_INDEX_ID) == index->id || mtr->inside_ibuf || recv_recovery_is_on()); - ut_ad(!page_rec_is_supremum(*current_rec)); + ut_ad(!page_cur_is_after_last(cursor)); #ifdef UNIV_ZIP_DEBUG ut_a(page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ @@ -1292,14 +1231,74 @@ page_cur_insert_rec_zip( } #endif /* UNIV_DEBUG_VALGRIND */ + const bool reorg_before_insert = page_has_garbage(page) + && rec_size > page_get_max_insert_size(page, 1) + && rec_size <= page_get_max_insert_size_after_reorganize( + page, 1); + /* 2. Try to find suitable space from page memory management */ if (!page_zip_available(page_zip, dict_index_is_clust(index), - rec_size, 1)) { + rec_size, 1) + || reorg_before_insert) { + /* The values can change dynamically. */ + bool log_compressed = page_zip_log_pages; + ulint level = page_zip_level; +#ifdef UNIV_DEBUG + rec_t* cursor_rec = page_cur_get_rec(cursor); +#endif /* UNIV_DEBUG */ + + /* If we are not writing compressed page images, we + must reorganize the page before attempting the + insert. */ + if (recv_recovery_is_on()) { + /* Insert into the uncompressed page only. + The page reorganization or creation that we + would attempt outside crash recovery would + have been covered by a previous redo log record. */ + } else if (page_is_empty(page)) { + ut_ad(page_cur_is_before_first(cursor)); + + /* This is an empty page. Recreate it to + get rid of the modification log. */ + page_create_zip(page_cur_get_block(cursor), index, + page_header_get_field(page, PAGE_LEVEL), + 0, mtr); + ut_ad(!page_header_get_ptr(page, PAGE_FREE)); + + if (page_zip_available( + page_zip, dict_index_is_clust(index), + rec_size, 1)) { + goto use_heap; + } + + /* The cursor should remain on the page infimum. */ + return(NULL); + } else if (!page_zip->m_nonempty && !page_has_garbage(page)) { + /* The page has been freshly compressed, so + reorganizing it will not help. */ + } else if (log_compressed && !reorg_before_insert) { + /* Insert into uncompressed page only, and + try page_zip_reorganize() afterwards. */ + } else if (btr_page_reorganize_low( + recv_recovery_is_on(), level, + cursor, index, mtr)) { + ut_ad(!page_header_get_ptr(page, PAGE_FREE)); + + if (page_zip_available( + page_zip, dict_index_is_clust(index), + rec_size, 1)) { + /* After reorganizing, there is space + available. */ + goto use_heap; + } + } else { + ut_ad(cursor->rec == cursor_rec); + return(NULL); + } /* Try compressing the whole page afterwards. */ - insert_rec = page_cur_insert_rec_low(*current_rec, - index, rec, offsets, - NULL); + insert_rec = page_cur_insert_rec_low( + cursor->rec, index, rec, offsets, NULL); /* If recovery is on, this implies that the compression of the page was successful during runtime. Had that not @@ -1318,16 +1317,82 @@ page_cur_insert_rec_zip( we call page_zip_validate only after processing all changes to a page under a single mtr during recovery. */ - if (insert_rec != NULL && !recv_recovery_is_on()) { - insert_rec = page_cur_insert_rec_zip_reorg( - current_rec, block, index, insert_rec, - rec_size, page, page_zip, mtr); -#ifdef UNIV_DEBUG - if (insert_rec) { - rec_offs_make_valid( - insert_rec, index, offsets); + if (insert_rec == NULL) { + /* Out of space. + This should never occur during crash recovery, + because the MLOG_COMP_REC_INSERT should only + be logged after a successful operation. */ + ut_ad(!recv_recovery_is_on()); + } else if (recv_recovery_is_on()) { + /* This should be followed by + MLOG_ZIP_PAGE_COMPRESS_NO_DATA, + which should succeed. */ + rec_offs_make_valid(insert_rec, index, offsets); + } else { + ulint pos = page_rec_get_n_recs_before(insert_rec); + ut_ad(pos > 0); + + if (!log_compressed) { + if (page_zip_compress( + page_zip, page, index, + level, NULL)) { + page_cur_insert_rec_write_log( + insert_rec, rec_size, + cursor->rec, index, mtr); + page_zip_compress_write_log_no_data( + level, page, index, mtr); + + rec_offs_make_valid( + insert_rec, index, offsets); + return(insert_rec); + } + + ut_ad(cursor->rec + == (pos > 1 + ? page_rec_get_nth( + page, pos - 1) + : page + PAGE_NEW_INFIMUM)); + } else { + /* We are writing entire page images + to the log. Reduce the redo log volume + by reorganizing the page at the same time. */ + if (page_zip_reorganize( + cursor->block, index, mtr)) { + /* The page was reorganized: + Seek to pos. */ + if (pos > 1) { + cursor->rec = page_rec_get_nth( + page, pos - 1); + } else { + cursor->rec = page + + PAGE_NEW_INFIMUM; + } + + insert_rec = page + rec_get_next_offs( + cursor->rec, TRUE); + rec_offs_make_valid( + insert_rec, index, offsets); + return(insert_rec); + } + + /* Theoretically, we could try one + last resort of btr_page_reorganize_low() + followed by page_zip_available(), but + that would be very unlikely to + succeed. (If the full reorganized page + failed to compress, why would it + succeed to compress the page, plus log + the insert of this record? */ } -#endif /* UNIV_DEBUG */ + + /* Out of space: restore the page */ + btr_blob_dbg_remove(page, index, "insert_zip_fail"); + if (!page_zip_decompress(page_zip, page, FALSE)) { + ut_error; /* Memory corrupted? */ + } + ut_ad(page_validate(page, index)); + btr_blob_dbg_add(page, index, "insert_zip_fail"); + insert_rec = NULL; } return(insert_rec); @@ -1344,7 +1409,7 @@ page_cur_insert_rec_zip( rec_offs_init(foffsets_); foffsets = rec_get_offsets(free_rec, index, foffsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); if (rec_offs_size(foffsets) < rec_size) { too_small: if (UNIV_LIKELY_NULL(heap)) { @@ -1452,18 +1517,19 @@ use_heap: rec_offs_make_valid(insert_rec, index, offsets); /* 4. Insert the record in the linked list of records */ - ut_ad(*current_rec != insert_rec); + ut_ad(cursor->rec != insert_rec); { /* next record after current before the insertion */ - rec_t* next_rec = page_rec_get_next(*current_rec); - ut_ad(rec_get_status(*current_rec) + const rec_t* next_rec = page_rec_get_next_low( + cursor->rec, TRUE); + ut_ad(rec_get_status(cursor->rec) <= REC_STATUS_INFIMUM); ut_ad(rec_get_status(insert_rec) < REC_STATUS_INFIMUM); ut_ad(rec_get_status(next_rec) != REC_STATUS_INFIMUM); page_rec_set_next(insert_rec, next_rec); - page_rec_set_next(*current_rec, insert_rec); + page_rec_set_next(cursor->rec, insert_rec); } page_header_set_field(page, page_zip, PAGE_N_RECS, @@ -1477,7 +1543,7 @@ use_heap: UNIV_MEM_ASSERT_RW(rec_get_start(insert_rec, offsets), rec_offs_size(offsets)); - page_zip_dir_insert(page_zip, *current_rec, free_rec, insert_rec); + page_zip_dir_insert(page_zip, cursor->rec, free_rec, insert_rec); /* 6. Update the last insertion info in page header */ @@ -1491,7 +1557,7 @@ use_heap: PAGE_NO_DIRECTION); page_header_set_field(page, page_zip, PAGE_N_DIRECTION, 0); - } else if ((last_insert == *current_rec) + } else if ((last_insert == cursor->rec) && (page_header_get_field(page, PAGE_DIRECTION) != PAGE_LEFT)) { @@ -1544,7 +1610,7 @@ use_heap: /* 9. Write log record of the insert */ if (UNIV_LIKELY(mtr != NULL)) { page_cur_insert_rec_write_log(insert_rec, rec_size, - *current_rec, index, mtr); + cursor->rec, index, mtr); } return(insert_rec); @@ -1638,7 +1704,12 @@ page_parse_copy_rec_list_to_created_page( #ifndef UNIV_HOTBACKUP /*************************************************************//** Copies records from page to a newly created page, from a given record onward, -including that record. Infimum and supremum records are not copied. */ +including that record. Infimum and supremum records are not copied. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if this is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). */ UNIV_INTERN void page_copy_rec_list_end_to_created_page( @@ -1940,6 +2011,24 @@ page_cur_delete_rec( /* The record must not be the supremum or infimum record. */ ut_ad(page_rec_is_user_rec(current_rec)); + if (page_get_n_recs(page) == 1 && !recv_recovery_is_on()) { + /* Empty the page, unless we are applying the redo log + during crash recovery. During normal operation, the + page_create_empty() gets logged as one of MLOG_PAGE_CREATE, + MLOG_COMP_PAGE_CREATE, MLOG_ZIP_PAGE_COMPRESS. */ + ut_ad(page_is_leaf(page)); + /* Usually, this should be the root page, + and the whole index tree should become empty. + However, this could also be a call in + btr_cur_pessimistic_update() to delete the only + record in the page and to insert another one. */ + page_cur_move_to_next(cursor); + ut_ad(page_cur_is_after_last(cursor)); + page_create_empty(page_cur_get_block(cursor), + const_cast<dict_index_t*>(index), mtr); + return; + } + /* Save to local variables some data associated with current_rec */ cur_slot_no = page_dir_find_owner_slot(current_rec); ut_ad(cur_slot_no > 0); diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc index 6b7b8424856..2faf804279c 100644 --- a/storage/innobase/page/page0page.cc +++ b/storage/innobase/page/page0page.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -500,7 +500,8 @@ page_create_zip( page is created */ dict_index_t* index, /*!< in: the index of the page */ ulint level, /*!< in: the B-tree level of the page */ - mtr_t* mtr) /*!< in: mini-transaction handle */ + trx_id_t max_trx_id, /*!< in: PAGE_MAX_TRX_ID */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { page_t* page; page_zip_des_t* page_zip = buf_block_get_page_zip(block); @@ -511,10 +512,11 @@ page_create_zip( ut_ad(dict_table_is_comp(index->table)); page = page_create_low(block, TRUE); - mach_write_to_2(page + PAGE_HEADER + PAGE_LEVEL, level); + mach_write_to_2(PAGE_HEADER + PAGE_LEVEL + page, level); + mach_write_to_8(PAGE_HEADER + PAGE_MAX_TRX_ID + page, max_trx_id); if (!page_zip_compress(page_zip, page, index, - page_compression_level, mtr)) { + page_zip_level, mtr)) { /* The compression of a newly created page should always succeed. */ ut_error; @@ -523,9 +525,49 @@ page_create_zip( return(page); } +/**********************************************************//** +Empty a previously created B-tree index page. */ +UNIV_INTERN +void +page_create_empty( +/*==============*/ + buf_block_t* block, /*!< in/out: B-tree block */ + dict_index_t* index, /*!< in: the index of the page */ + mtr_t* mtr) /*!< in/out: mini-transaction */ +{ + trx_id_t max_trx_id = 0; + const page_t* page = buf_block_get_frame(block); + page_zip_des_t* page_zip= buf_block_get_page_zip(block); + + ut_ad(fil_page_get_type(page) == FIL_PAGE_INDEX); + + if (dict_index_is_sec_or_ibuf(index) && page_is_leaf(page)) { + max_trx_id = page_get_max_trx_id(page); + ut_ad(max_trx_id); + } + + if (page_zip) { + page_create_zip(block, index, + page_header_get_field(page, PAGE_LEVEL), + max_trx_id, mtr); + } else { + page_create(block, mtr, page_is_comp(page)); + + if (max_trx_id) { + page_update_max_trx_id( + block, page_zip, max_trx_id, mtr); + } + } +} + /*************************************************************//** Differs from page_copy_rec_list_end, because this function does not -touch the lock table and max trx id on page or compress the page. */ +touch the lock table and max trx id on page or compress the page. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). */ UNIV_INTERN void page_copy_rec_list_end_no_locks( @@ -600,6 +642,12 @@ page_copy_rec_list_end_no_locks( Copies records from page to new_page, from a given record onward, including that record. Infimum and supremum records are not copied. The records are copied to the start of the record list on new_page. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to the original successor of the infimum record on new_page, or NULL on zip overflow (new_block will be decompressed) */ UNIV_INTERN @@ -660,11 +708,8 @@ page_copy_rec_list_end( if (new_page_zip) { mtr_set_log_mode(mtr, log_mode); - if (!page_zip_compress(new_page_zip, - new_page, - index, - page_compression_level, - mtr)) { + if (!page_zip_compress(new_page_zip, new_page, + index, page_zip_level, mtr)) { /* Before trying to reorganize the page, store the number of preceding records on the page. */ ulint ret_pos @@ -713,6 +758,12 @@ page_copy_rec_list_end( Copies records from page to new_page, up to the given record, NOT including that record. Infimum and supremum records are not copied. The records are copied to the end of the record list on new_page. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return pointer to the original predecessor of the supremum record on new_page, or NULL on zip overflow (new_block will be decompressed) */ UNIV_INTERN @@ -788,7 +839,7 @@ page_copy_rec_list_start( goto zip_reorganize;); if (!page_zip_compress(new_page_zip, new_page, index, - page_compression_level, mtr)) { + page_zip_level, mtr)) { ulint ret_pos; #ifndef DBUG_OFF @@ -953,13 +1004,38 @@ page_delete_rec_list_end( ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ - if (page_rec_is_infimum(rec)) { - rec = page_rec_get_next(rec); - } - if (page_rec_is_supremum(rec)) { + ut_ad(n_recs == 0 || n_recs == ULINT_UNDEFINED); + /* Nothing to do, there are no records bigger than the + page supremum. */ + return; + } + if (recv_recovery_is_on()) { + /* If we are replaying a redo log record, we must + replay it exactly. Since MySQL 5.6.11, we should be + generating a redo log record for page creation if + the page would become empty. Thus, this branch should + only be executed when applying redo log that was + generated by an older version of MySQL. */ + } else if (page_rec_is_infimum(rec) + || n_recs == page_get_n_recs(page)) { +delete_all: + /* We are deleting all records. */ + page_create_empty(block, index, mtr); return; + } else if (page_is_comp(page)) { + if (page_rec_get_next_low(page + PAGE_NEW_INFIMUM, 1) == rec) { + /* We are deleting everything from the first + user record onwards. */ + goto delete_all; + } + } else { + if (page_rec_get_next_low(page + PAGE_OLD_INFIMUM, 0) == rec) { + /* We are deleting everything from the first + user record onwards. */ + goto delete_all; + } } /* Reset the last insert info in the page header and increment @@ -1138,7 +1214,12 @@ page_delete_rec_list_start( #endif /* UNIV_ZIP_DEBUG */ if (page_rec_is_infimum(rec)) { + return; + } + if (page_rec_is_supremum(rec)) { + /* We are deleting all records. */ + page_create_empty(block, index, mtr); return; } @@ -1176,6 +1257,12 @@ page_delete_rec_list_start( /*************************************************************//** Moves record list end to another page. Moved records include split_rec. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return TRUE on success; FALSE on compression failure (new_block will be decompressed) */ UNIV_INTERN @@ -1231,6 +1318,12 @@ page_move_rec_list_end( /*************************************************************//** Moves record list start to another page. Moved records do not include split_rec. + +IMPORTANT: The caller will have to update IBUF_BITMAP_FREE +if new_block is a compressed leaf page in a secondary index. +This has to be done either within the same mini-transaction, +or by invoking ibuf_reset_free_bits() before mtr_commit(). + @return TRUE on success; FALSE on compression failure */ UNIV_INTERN ibool @@ -2327,7 +2420,7 @@ page_validate( } if (dict_index_is_sec_or_ibuf(index) && page_is_leaf(page) - && page_get_n_recs(page) > 0) { + && !page_is_empty(page)) { trx_id_t max_trx_id = page_get_max_trx_id(page); trx_id_t sys_max_trx_id = trx_sys_get_max_trx_id(); diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc index dee37580002..52dcbf64183 100644 --- a/storage/innobase/page/page0zip.cc +++ b/storage/innobase/page/page0zip.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -69,11 +69,11 @@ UNIV_INTERN mysql_pfs_key_t page_zip_stat_per_index_mutex_key; #endif /* !UNIV_HOTBACKUP */ /* Compression level to be used by zlib. Settable by user. */ -UNIV_INTERN ulint page_compression_level = 6; +UNIV_INTERN uint page_zip_level = DEFAULT_COMPRESSION_LEVEL; /* Whether or not to log compressed page images to avoid possible compression algorithm changes in zlib. */ -UNIV_INTERN bool page_log_compressed_pages = true; +UNIV_INTERN my_bool page_zip_log_pages = true; /* Please refer to ../include/page0zip.ic for a description of the compressed page format. */ @@ -655,8 +655,8 @@ page_zip_dir_encode( #if PAGE_ZIP_DIR_SLOT_MASK & (PAGE_ZIP_DIR_SLOT_MASK + 1) # error "PAGE_ZIP_DIR_SLOT_MASK is not 1 less than a power of 2" #endif -#if PAGE_ZIP_DIR_SLOT_MASK < UNIV_PAGE_SIZE - 1 -# error "PAGE_ZIP_DIR_SLOT_MASK < UNIV_PAGE_SIZE - 1" +#if PAGE_ZIP_DIR_SLOT_MASK < UNIV_PAGE_SIZE_MAX - 1 +# error "PAGE_ZIP_DIR_SLOT_MASK < UNIV_PAGE_SIZE_MAX - 1" #endif if (UNIV_UNLIKELY(rec_get_n_owned_new(rec))) { offs |= PAGE_ZIP_DIR_SLOT_OWNED; @@ -864,11 +864,12 @@ page_zip_compress_node_ptrs( c_stream->next_in = (byte*) rec; c_stream->avail_in = rec_offs_data_size(offsets) - REC_NODE_PTR_SIZE; - ut_ad(c_stream->avail_in); - err = deflate(c_stream, Z_NO_FLUSH); - if (UNIV_UNLIKELY(err != Z_OK)) { - break; + if (c_stream->avail_in) { + err = deflate(c_stream, Z_NO_FLUSH); + if (UNIV_UNLIKELY(err != Z_OK)) { + break; + } } ut_ad(!c_stream->avail_in); @@ -1199,7 +1200,7 @@ page_zip_compress( m_start, m_end, m_nonempty */ const page_t* page, /*!< in: uncompressed page */ dict_index_t* index, /*!< in: index of the B-tree node */ - ulint level, /*!< in: commpression level */ + ulint level, /*!< in: compression level */ mtr_t* mtr) /*!< in: mini-transaction, or NULL */ { z_stream c_stream; @@ -1246,7 +1247,7 @@ page_zip_compress( ut_a(!memcmp(page + (PAGE_NEW_SUPREMUM - REC_N_NEW_EXTRA_BYTES + 1), supremum_extra_data, sizeof supremum_extra_data)); - if (UNIV_UNLIKELY(!page_get_n_recs(page))) { + if (page_is_empty(page)) { ut_a(rec_get_next_offs(page + PAGE_NEW_INFIMUM, TRUE) == PAGE_NEW_SUPREMUM); } @@ -1263,7 +1264,7 @@ page_zip_compress( if (UNIV_UNLIKELY(page_zip_compress_dbg)) { fprintf(stderr, "compress %p %p %lu %lu %lu\n", (void*) page_zip, (void*) page, - page_is_leaf(page), + (ibool) page_is_leaf(page), n_fields, n_dense); } if (UNIV_UNLIKELY(page_zip_compress_log)) { @@ -2173,6 +2174,32 @@ page_zip_apply_log( } /**********************************************************************//** +Set the heap_no in a record, and skip the fixed-size record header +that is not included in the d_stream. +@return TRUE on success, FALSE if d_stream does not end at rec */ +static +ibool +page_zip_decompress_heap_no( +/*========================*/ + z_stream* d_stream, /*!< in/out: compressed page stream */ + rec_t* rec, /*!< in/out: record */ + ulint& heap_status) /*!< in/out: heap_no and status bits */ +{ + if (d_stream->next_out != rec - REC_N_NEW_EXTRA_BYTES) { + /* n_dense has grown since the page was last compressed. */ + return(FALSE); + } + + /* Skip the REC_N_NEW_EXTRA_BYTES. */ + d_stream->next_out = rec; + + /* Set heap_no and the status bits. */ + mach_write_to_2(rec - REC_NEW_HEAP_NO, heap_status); + heap_status += 1 << REC_HEAP_NO_SHIFT; + return(TRUE); +} + +/**********************************************************************//** Decompress the records of a node pointer page. @return TRUE on success, FALSE on failure */ static @@ -2208,8 +2235,8 @@ page_zip_decompress_node_ptrs( - PAGE_ZIP_START - PAGE_DIR); switch (inflate(d_stream, Z_SYNC_FLUSH)) { case Z_STREAM_END: - /* Apparently, n_dense has grown - since the time the page was last compressed. */ + page_zip_decompress_heap_no( + d_stream, rec, heap_status); goto zlib_done; case Z_OK: case Z_BUF_ERROR: @@ -2224,12 +2251,10 @@ page_zip_decompress_node_ptrs( goto zlib_error; } - ut_ad(d_stream->next_out == rec - REC_N_NEW_EXTRA_BYTES); - /* Prepare to decompress the data bytes. */ - d_stream->next_out = rec; - /* Set heap_no and the status bits. */ - mach_write_to_2(rec - REC_NEW_HEAP_NO, heap_status); - heap_status += 1 << REC_HEAP_NO_SHIFT; + if (!page_zip_decompress_heap_no( + d_stream, rec, heap_status)) { + ut_ad(0); + } /* Read the offsets. The status bits are needed here. */ offsets = rec_get_offsets(rec, index, offsets, @@ -2331,13 +2356,12 @@ zlib_done: if (UNIV_UNLIKELY (page_zip_get_trailer_len(page_zip, - dict_index_is_clust(index), NULL) + dict_index_is_clust(index)) + page_zip->m_end >= page_zip_get_size(page_zip))) { page_zip_fail(("page_zip_decompress_node_ptrs:" " %lu + %lu >= %lu, %lu\n", (ulong) page_zip_get_trailer_len( - page_zip, dict_index_is_clust(index), - NULL), + page_zip, dict_index_is_clust(index)), (ulong) page_zip->m_end, (ulong) page_zip_get_size(page_zip), (ulong) dict_index_is_clust(index))); @@ -2398,8 +2422,8 @@ page_zip_decompress_sec( if (UNIV_LIKELY(d_stream->avail_out)) { switch (inflate(d_stream, Z_SYNC_FLUSH)) { case Z_STREAM_END: - /* Apparently, n_dense has grown - since the time the page was last compressed. */ + page_zip_decompress_heap_no( + d_stream, rec, heap_status); goto zlib_done; case Z_OK: case Z_BUF_ERROR: @@ -2415,15 +2439,10 @@ page_zip_decompress_sec( } } - ut_ad(d_stream->next_out == rec - REC_N_NEW_EXTRA_BYTES); - - /* Skip the REC_N_NEW_EXTRA_BYTES. */ - - d_stream->next_out = rec; - - /* Set heap_no and the status bits. */ - mach_write_to_2(rec - REC_NEW_HEAP_NO, heap_status); - heap_status += 1 << REC_HEAP_NO_SHIFT; + if (!page_zip_decompress_heap_no( + d_stream, rec, heap_status)) { + ut_ad(0); + } } /* Decompress the data of the last record and any trailing garbage, @@ -2488,12 +2507,12 @@ zlib_done: page_zip->m_nonempty = mod_log_ptr != d_stream->next_in; } - if (UNIV_UNLIKELY(page_zip_get_trailer_len(page_zip, FALSE, NULL) + if (UNIV_UNLIKELY(page_zip_get_trailer_len(page_zip, FALSE) + page_zip->m_end >= page_zip_get_size(page_zip))) { page_zip_fail(("page_zip_decompress_sec: %lu + %lu >= %lu\n", (ulong) page_zip_get_trailer_len( - page_zip, FALSE, NULL), + page_zip, FALSE), (ulong) page_zip->m_end, (ulong) page_zip_get_size(page_zip))); return(FALSE); @@ -2657,8 +2676,8 @@ page_zip_decompress_clust( err = inflate(d_stream, Z_SYNC_FLUSH); switch (err) { case Z_STREAM_END: - /* Apparently, n_dense has grown - since the time the page was last compressed. */ + page_zip_decompress_heap_no( + d_stream, rec, heap_status); goto zlib_done; case Z_OK: case Z_BUF_ERROR: @@ -2673,12 +2692,10 @@ page_zip_decompress_clust( goto zlib_error; } - ut_ad(d_stream->next_out == rec - REC_N_NEW_EXTRA_BYTES); - /* Prepare to decompress the data bytes. */ - d_stream->next_out = rec; - /* Set heap_no and the status bits. */ - mach_write_to_2(rec - REC_NEW_HEAP_NO, heap_status); - heap_status += 1 << REC_HEAP_NO_SHIFT; + if (!page_zip_decompress_heap_no( + d_stream, rec, heap_status)) { + ut_ad(0); + } /* Read the offsets. The status bits are needed here. */ offsets = rec_get_offsets(rec, index, offsets, @@ -2819,12 +2836,12 @@ zlib_done: page_zip->m_nonempty = mod_log_ptr != d_stream->next_in; } - if (UNIV_UNLIKELY(page_zip_get_trailer_len(page_zip, TRUE, NULL) + if (UNIV_UNLIKELY(page_zip_get_trailer_len(page_zip, TRUE) + page_zip->m_end >= page_zip_get_size(page_zip))) { page_zip_fail(("page_zip_decompress_clust: %lu + %lu >= %lu\n", (ulong) page_zip_get_trailer_len( - page_zip, TRUE, NULL), + page_zip, TRUE), (ulong) page_zip->m_end, (ulong) page_zip_get_size(page_zip))); return(FALSE); @@ -3001,7 +3018,7 @@ zlib_error: /* Copy the infimum and supremum records. */ memcpy(page + (PAGE_NEW_INFIMUM - REC_N_NEW_EXTRA_BYTES), infimum_extra, sizeof infimum_extra); - if (UNIV_UNLIKELY(!page_get_n_recs(page))) { + if (page_is_empty(page)) { rec_set_next_offs_new(page + PAGE_NEW_INFIMUM, PAGE_NEW_SUPREMUM); } else { @@ -4630,8 +4647,7 @@ page_zip_reorganize( /* Restore logging. */ mtr_set_log_mode(mtr, log_mode); - if (!page_zip_compress(page_zip, page, index, - page_compression_level, mtr)) { + if (!page_zip_compress(page_zip, page, index, page_zip_level, mtr)) { #ifndef UNIV_HOTBACKUP buf_block_free(temp_block); @@ -4715,8 +4731,7 @@ page_zip_copy_recs( memcpy(page_zip, src_zip, sizeof *page_zip); page_zip->data = data; } - ut_ad(page_zip_get_trailer_len(page_zip, - dict_index_is_clust(index), NULL) + ut_ad(page_zip_get_trailer_len(page_zip, dict_index_is_clust(index)) + page_zip->m_end < page_zip_get_size(page_zip)); if (!page_is_leaf(src) diff --git a/storage/innobase/pars/make_bison.sh b/storage/innobase/pars/make_bison.sh index 2618be102bc..2618be102bc 100644..100755 --- a/storage/innobase/pars/make_bison.sh +++ b/storage/innobase/pars/make_bison.sh diff --git a/storage/innobase/pars/make_flex.sh b/storage/innobase/pars/make_flex.sh index 581fc2342aa..581fc2342aa 100644..100755 --- a/storage/innobase/pars/make_flex.sh +++ b/storage/innobase/pars/make_flex.sh diff --git a/storage/innobase/pars/pars0pars.cc b/storage/innobase/pars/pars0pars.cc index f82610e62d0..e0bc00fad0d 100644 --- a/storage/innobase/pars/pars0pars.cc +++ b/storage/innobase/pars/pars0pars.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -11,8 +11,8 @@ 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 +this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, +Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ diff --git a/storage/innobase/read/read0read.cc b/storage/innobase/read/read0read.cc index 14dc9ee5e7f..faf4102437b 100644 --- a/storage/innobase/read/read0read.cc +++ b/storage/innobase/read/read0read.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -303,7 +303,7 @@ struct CreateView { trx_sys->max_trx_id can still be active, if it is in the middle of its commit! Note that when a transaction starts, we initialize trx->no to - IB_ULONGLONG_MAX. */ + TRX_ID_MAX. */ /* trx->no is protected by trx_sys->mutex, which we are holding. It is assigned by trx_commit() diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc index 1d65016d455..3be66f68aad 100644 --- a/storage/innobase/rem/rem0rec.cc +++ b/storage/innobase/rem/rem0rec.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, 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 @@ -1842,6 +1842,13 @@ rec_print_comp( if (len <= 30) { ut_print_buf(file, data, len); + } else if (rec_offs_nth_extern(offsets, i)) { + ut_print_buf(file, data, 30); + fprintf(file, " (total %lu bytes, external)", + (ulong) len); + ut_print_buf(file, data + len + - BTR_EXTERN_FIELD_REF_SIZE, + BTR_EXTERN_FIELD_REF_SIZE); } else { ut_print_buf(file, data, 30); diff --git a/storage/innobase/row/row0ext.cc b/storage/innobase/row/row0ext.cc index f084fa09c5a..32b78391d6a 100644 --- a/storage/innobase/row/row0ext.cc +++ b/storage/innobase/row/row0ext.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2006, 2013, 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 @@ -58,14 +58,28 @@ row_ext_cache_fill( /* The BLOB pointer is not set: we cannot fetch it */ ext->len[i] = 0; } else { - /* Fetch at most ext->max_len of the column. - The column should be non-empty. However, - trx_rollback_or_clean_all_recovered() may try to - access a half-deleted BLOB if the server previously - crashed during the execution of - btr_free_externally_stored_field(). */ - ext->len[i] = btr_copy_externally_stored_field_prefix( - buf, ext->max_len, zip_size, field, f_len); + if (ext->max_len == REC_VERSION_56_MAX_INDEX_COL_LEN + && f_len > BTR_EXTERN_FIELD_REF_SIZE) { + /* In this case, the field is in B format or beyond, + (refer to the definition of row_ext_t.max_len) + and the field is already fill with prefix, otherwise + f_len would be BTR_EXTERN_FIELD_REF_SIZE. + So there is no need to re-read the prefix externally, + but just copy the local prefix to buf. Please note + if the ext->len[i] is zero, it means an error + as above. */ + memcpy(buf, field, f_len - BTR_EXTERN_FIELD_REF_SIZE); + ext->len[i] = f_len - BTR_EXTERN_FIELD_REF_SIZE; + } else { + /* Fetch at most ext->max_len of the column. + The column should be non-empty. However, + trx_rollback_or_clean_all_recovered() may try to + access a half-deleted BLOB if the server previously + crashed during the execution of + btr_free_externally_stored_field(). */ + ext->len[i] = btr_copy_externally_stored_field_prefix( + buf, ext->max_len, zip_size, field, f_len); + } } } diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc index 9a6af50e09d..087d2152826 100644 --- a/storage/innobase/row/row0ftsort.cc +++ b/storage/innobase/row/row0ftsort.cc @@ -96,7 +96,7 @@ row_merge_create_fts_sort_index( field->prefix_len = 0; field->col = static_cast<dict_col_t*>( mem_heap_alloc(new_index->heap, sizeof(dict_col_t))); - field->col->len = fts_max_token_size; + field->col->len = FTS_MAX_WORD_LEN; if (strcmp(charset->name, "latin1_swedish_ci") == 0) { field->col->mtype = DATA_VARCHAR; @@ -265,6 +265,9 @@ row_fts_psort_info_init( psort_info[j].child_status = 0; psort_info[j].state = 0; psort_info[j].psort_common = common_info; + psort_info[j].error = DB_SUCCESS; + psort_info[j].memory_used = 0; + mutex_create(fts_pll_tokenize_mutex_key, &psort_info[j].mutex, SYNC_FTS_TOKENIZE); } /* Initialize merge_info structures parallel merge and insert @@ -312,6 +315,8 @@ row_fts_psort_info_destroy( } mem_free(psort_info[j].merge_file[i]); } + + mutex_free(&psort_info[j].mutex); } os_event_free(merge_info[0].psort_common->sort_event); @@ -450,7 +455,7 @@ row_merge_fts_doc_tokenize( field->type.prtype = word_dtype->prtype | DATA_NOT_NULL; /* Variable length field, set to max size. */ - field->type.len = fts_max_token_size; + field->type.len = FTS_MAX_WORD_LEN; field->type.mbminmaxlen = word_dtype->mbminmaxlen; cur_len += len; @@ -545,6 +550,35 @@ row_merge_fts_doc_tokenize( } /*********************************************************************//** +Get next doc item from fts_doc_list */ +UNIV_INLINE +void +row_merge_fts_get_next_doc_item( +/*============================*/ + fts_psort_t* psort_info, /*!< in: psort_info */ + fts_doc_item_t** doc_item) /*!< in/out: doc item */ +{ + if (*doc_item != NULL) { + ut_free(*doc_item); + } + + mutex_enter(&psort_info->mutex); + + *doc_item = UT_LIST_GET_FIRST(psort_info->fts_doc_list); + if (*doc_item != NULL) { + UT_LIST_REMOVE(doc_list, psort_info->fts_doc_list, + *doc_item); + + ut_ad(psort_info->memory_used >= sizeof(fts_doc_item_t) + + (*doc_item)->field->len); + psort_info->memory_used -= sizeof(fts_doc_item_t) + + (*doc_item)->field->len; + } + + mutex_exit(&psort_info->mutex); +} + +/*********************************************************************//** Function performs parallel tokenization of the incoming doc strings. It also performs the initial in memory sort of the parsed records. @return OS_THREAD_DUMMY_RETURN */ @@ -557,7 +591,6 @@ fts_parallel_tokenization( fts_psort_t* psort_info = (fts_psort_t*) arg; ulint i; fts_doc_item_t* doc_item = NULL; - fts_doc_item_t* prev_doc_item = NULL; row_merge_buf_t** buf; ibool processed = FALSE; merge_file_t** merge_file; @@ -575,7 +608,7 @@ fts_parallel_tokenization( dict_field_t* idx_field; fts_tokenize_ctx_t t_ctx; ulint retried = 0; - ut_ad(psort_info); + dberr_t error = DB_SUCCESS; ut_ad(psort_info); @@ -599,11 +632,7 @@ fts_parallel_tokenization( block = psort_info->merge_block; zip_size = dict_table_zip_size(table); - doc_item = UT_LIST_GET_FIRST(psort_info->fts_doc_list); - - if (doc_item) { - prev_doc_item = doc_item; - } + row_merge_fts_get_next_doc_item(psort_info, &doc_item); t_ctx.cached_stopword = table->fts->cache->stopword_info.cached_stopword; processed = TRUE; @@ -613,17 +642,8 @@ loop: last_doc_id = doc_item->doc_id; - if (!(dfield->data) - || dfield_get_len(dfield) == UNIV_SQL_NULL) { - num_doc_processed++; - doc_item = UT_LIST_GET_NEXT(doc_list, doc_item); - - /* Always remember the last doc_item we processed */ - if (doc_item) { - prev_doc_item = doc_item; - } - continue; - } + ut_ad (dfield->data != NULL + && dfield_get_len(dfield) != UNIV_SQL_NULL); /* If finish processing the last item, update "doc" with strings in the doc_item, otherwise continue processing last @@ -671,11 +691,13 @@ loop: num_doc_processed++; if (fts_enable_diag_print && num_doc_processed % 10000 == 1) { - fprintf(stderr, "number of doc processed %d\n", + ib_logf(IB_LOG_LEVEL_INFO, + "number of doc processed %d\n", (int) num_doc_processed); #ifdef FTS_INTERNAL_DIAG_PRINT for (i = 0; i < FTS_NUM_AUX_INDEX; i++) { - fprintf(stderr, "ID %d, partition %d, word " + ib_logf(IB_LOG_LEVEL_INFO, + "ID %d, partition %d, word " "%d\n",(int) psort_info->psort_id, (int) i, (int) mycount[i]); } @@ -684,19 +706,10 @@ loop: mem_heap_empty(blob_heap); - if (doc_item->field->data) { - ut_free(doc_item->field->data); - doc_item->field->data = NULL; - } - - doc_item = UT_LIST_GET_NEXT(doc_list, doc_item); + row_merge_fts_get_next_doc_item(psort_info, &doc_item); - /* Always remember the last doc_item we processed */ - if (doc_item) { - prev_doc_item = doc_item; - if (last_doc_id != doc_item->doc_id) { - t_ctx.init_pos = 0; - } + if (doc_item && last_doc_id != doc_item->doc_id) { + t_ctx.init_pos = 0; } } @@ -707,9 +720,14 @@ loop: row_merge_buf_write(buf[t_ctx.buf_used], merge_file[t_ctx.buf_used], block[t_ctx.buf_used]); - row_merge_write(merge_file[t_ctx.buf_used]->fd, - merge_file[t_ctx.buf_used]->offset++, - block[t_ctx.buf_used]); + + if (!row_merge_write(merge_file[t_ctx.buf_used]->fd, + merge_file[t_ctx.buf_used]->offset++, + block[t_ctx.buf_used])) { + error = DB_TEMP_FILE_WRITE_FAILURE; + goto func_exit; + } + UNIV_MEM_INVALID(block[t_ctx.buf_used][0], srv_sort_buf_size); buf[t_ctx.buf_used] = row_merge_buf_empty(buf[t_ctx.buf_used]); mycount[t_ctx.buf_used] += t_ctx.rows_added[t_ctx.buf_used]; @@ -721,13 +739,13 @@ loop: /* Parent done scanning, and if finish processing all the docs, exit */ if (psort_info->state == FTS_PARENT_COMPLETE) { - if (num_doc_processed >= UT_LIST_GET_LEN( - psort_info->fts_doc_list)) { + if (UT_LIST_GET_LEN(psort_info->fts_doc_list) == 0) { goto exit; } else if (retried > 10000) { ut_ad(!doc_item); /* retied too many times and cannot get new record */ - fprintf(stderr, "InnoDB: FTS parallel sort processed " + ib_logf(IB_LOG_LEVEL_ERROR, + "InnoDB: FTS parallel sort processed " "%lu records, the sort queue has " "%lu records. But sort cannot get " "the next records", num_doc_processed, @@ -735,21 +753,18 @@ loop: psort_info->fts_doc_list)); goto exit; } + } else if (psort_info->state == FTS_PARENT_EXITING) { + /* Parent abort */ + goto func_exit; } - if (doc_item) { - doc_item = UT_LIST_GET_NEXT(doc_list, doc_item); - } else if (prev_doc_item) { - os_thread_yield(); - doc_item = UT_LIST_GET_NEXT(doc_list, prev_doc_item); - } else { + if (doc_item == NULL) { os_thread_yield(); - doc_item = UT_LIST_GET_FIRST(psort_info->fts_doc_list); } - if (doc_item) { - prev_doc_item = doc_item; + row_merge_fts_get_next_doc_item(psort_info, &doc_item); + if (doc_item != NULL) { if (last_doc_id != doc_item->doc_id) { t_ctx.init_pos = 0; } @@ -799,9 +814,12 @@ exit: never flush to temp file, it can be held all in memory */ if (merge_file[i]->offset != 0) { - row_merge_write(merge_file[i]->fd, + if (!row_merge_write(merge_file[i]->fd, merge_file[i]->offset++, - block[i]); + block[i])) { + error = DB_TEMP_FILE_WRITE_FAILURE; + goto func_exit; + } UNIV_MEM_INVALID(block[i][0], srv_sort_buf_size); @@ -817,19 +835,24 @@ exit: } for (i = 0; i < FTS_NUM_AUX_INDEX; i++) { - if (!merge_file[i]->offset) { continue; } tmpfd[i] = row_merge_file_create_low(); if (tmpfd[i] < 0) { + error = DB_OUT_OF_MEMORY; + goto func_exit; + } + + error = row_merge_sort(psort_info->psort_common->trx, + psort_info->psort_common->dup, + merge_file[i], block[i], &tmpfd[i]); + if (error != DB_SUCCESS) { + close(tmpfd[i]); goto func_exit; } - row_merge_sort(psort_info->psort_common->trx, - psort_info->psort_common->dup, - merge_file[i], block[i], &tmpfd[i]); total_rec += merge_file[i]->n_rec; close(tmpfd[i]); } @@ -841,6 +864,19 @@ func_exit: mem_heap_free(blob_heap); + mutex_enter(&psort_info->mutex); + psort_info->error = error; + mutex_exit(&psort_info->mutex); + + if (UT_LIST_GET_LEN(psort_info->fts_doc_list) > 0) { + ut_ad(error != DB_SUCCESS); + } + + /* Free fts doc list in case of error. */ + do { + row_merge_fts_get_next_doc_item(psort_info, &doc_item); + } while (doc_item != NULL); + psort_info->child_status = FTS_CHILD_COMPLETE; os_event_set(psort_info->psort_common->sort_event); psort_info->child_status = FTS_CHILD_EXITING; diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index f5eb31191a5..c513320afc1 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2013, 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 @@ -1944,7 +1944,7 @@ PageConverter::update_index_page( page_set_max_trx_id(block, m_page_zip_ptr, m_trx->id, 0); - if (page_get_n_recs(block->frame) == 0) { + if (page_is_empty(block->frame)) { /* Only a root page can be empty. */ if (!is_root_page(block->frame)) { @@ -2269,7 +2269,7 @@ row_import_cleanup( DBUG_EXECUTE_IF("ib_import_before_checkpoint_crash", DBUG_SUICIDE();); - log_make_checkpoint_at(IB_ULONGLONG_MAX, TRUE); + log_make_checkpoint_at(LSN_MAX, TRUE); return(err); } @@ -3659,8 +3659,8 @@ row_import_for_mysql( row_mysql_unlock_data_dictionary(trx); ib_senderrf(trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_FILE_NOT_FOUND, - filepath, err, ut_strerr(err)); + ER_GET_ERRMSG, + err, ut_strerr(err), filepath); mem_free(filepath); diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index 57687e77b2b..5d3f1dd8f24 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -1732,16 +1732,22 @@ do_possible_lock_wait: /* We had temporarily released dict_operation_lock in above lock sleep wait, now we have the lock again, and we will need to re-check whether the foreign key has been - dropped */ - for (const dict_foreign_t* check_foreign = UT_LIST_GET_FIRST( - table->referenced_list); - check_foreign; - check_foreign = UT_LIST_GET_NEXT( - referenced_list, check_foreign)) { - if (check_foreign == foreign) { - verified = true; - break; + dropped. We only need to verify if the table is referenced + table case (check_ref == 0), since MDL lock will prevent + concurrent DDL and DML on the same table */ + if (!check_ref) { + for (const dict_foreign_t* check_foreign + = UT_LIST_GET_FIRST( table->referenced_list); + check_foreign; + check_foreign = UT_LIST_GET_NEXT( + referenced_list, check_foreign)) { + if (check_foreign == foreign) { + verified = true; + break; + } } + } else { + verified = true; } if (!verified) { @@ -1968,6 +1974,7 @@ row_ins_scan_sec_index_for_duplicate( do { const rec_t* rec = btr_pcur_get_rec(&pcur); const buf_block_t* block = btr_pcur_get_block(&pcur); + ulint lock_type; if (page_rec_is_infimum(rec)) { @@ -1977,6 +1984,16 @@ row_ins_scan_sec_index_for_duplicate( offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &offsets_heap); + /* If the transaction isolation level is no stronger than + READ COMMITTED, then avoid gap locks. */ + if (!page_rec_is_supremum(rec) + && thr_get_trx(thr)->isolation_level + <= TRX_ISO_READ_COMMITTED) { + lock_type = LOCK_REC_NOT_GAP; + } else { + lock_type = LOCK_ORDINARY; + } + if (flags & BTR_NO_LOCKING_FLAG) { /* Set no locks when applying log in online table rebuild. */ @@ -1996,13 +2013,11 @@ row_ins_scan_sec_index_for_duplicate( INSERT ON DUPLICATE KEY UPDATE). */ err = row_ins_set_exclusive_rec_lock( - LOCK_ORDINARY, block, - rec, index, offsets, thr); + lock_type, block, rec, index, offsets, thr); } else { err = row_ins_set_shared_rec_lock( - LOCK_ORDINARY, block, - rec, index, offsets, thr); + lock_type, block, rec, index, offsets, thr); } switch (err) { @@ -2028,6 +2043,19 @@ row_ins_scan_sec_index_for_duplicate( thr_get_trx(thr)->error_info = index; + /* If the duplicate is on hidden FTS_DOC_ID, + state so in the error log */ + if (DICT_TF2_FLAG_IS_SET( + index->table, + DICT_TF2_FTS_HAS_DOC_ID) + && strcmp(index->name, + FTS_DOC_ID_INDEX_NAME) == 0) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Duplicate FTS_DOC_ID value" + " on table %s", + index->table->name); + } + goto end_scan; } } else { @@ -2534,7 +2562,7 @@ err_exit: DBUG_EXECUTE_IF( "row_ins_extern_checkpoint", log_make_checkpoint_at( - IB_ULONGLONG_MAX, TRUE);); + LSN_MAX, TRUE);); err = row_ins_index_entry_big_rec( entry, big_rec, offsets, &offsets_heap, index, thr_get_trx(thr)->mysql_thd, diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index 01270300924..c18ef9ee250 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2013, 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 @@ -38,7 +38,7 @@ Created 2011-05-26 Marko Makela #include "que0que.h" #include "handler0alter.h" -#include<set> +#include<map> /** Table row modification operations during online table rebuild. Delete-marked records are not copied to the rebuilt table. */ @@ -72,18 +72,86 @@ static bool row_log_apply_print; /** Size of the modification log entry header, in bytes */ #define ROW_LOG_HEADER_SIZE 2/*op, extra_size*/ -/** Log block for modifications during online index creation */ +/** Log block for modifications during online ALTER TABLE */ struct row_log_buf_t { byte* block; /*!< file block buffer */ mrec_buf_t buf; /*!< buffer for accessing a record that spans two blocks */ ulint blocks; /*!< current position in blocks */ ulint bytes; /*!< current position within buf */ + ulonglong total; /*!< logical position, in bytes from + the start of the row_log_table log; + 0 for row_log_online_op() and + row_log_apply(). */ }; -/** Set of transactions that rolled back inserts of BLOBs during -online table rebuild */ -typedef std::set<trx_id_t> trx_id_set; +/** Tracks BLOB allocation during online ALTER TABLE */ +class row_log_table_blob_t { +public: + /** Constructor (declaring a BLOB freed) + @param offset_arg row_log_t::tail::total */ +#ifdef UNIV_DEBUG + row_log_table_blob_t(ulonglong offset_arg) : + old_offset (0), free_offset (offset_arg), + offset (BLOB_FREED) {} +#else /* UNIV_DEBUG */ + row_log_table_blob_t() : + offset (BLOB_FREED) {} +#endif /* UNIV_DEBUG */ + + /** Declare a BLOB freed again. + @param offset_arg row_log_t::tail::total */ +#ifdef UNIV_DEBUG + void blob_free(ulonglong offset_arg) +#else /* UNIV_DEBUG */ + void blob_free() +#endif /* UNIV_DEBUG */ + { + ut_ad(offset < offset_arg); + ut_ad(offset != BLOB_FREED); + ut_d(old_offset = offset); + ut_d(free_offset = offset_arg); + offset = BLOB_FREED; + } + /** Declare a freed BLOB reused. + @param offset_arg row_log_t::tail::total */ + void blob_alloc(ulonglong offset_arg) { + ut_ad(free_offset <= offset_arg); + ut_d(old_offset = offset); + offset = offset_arg; + } + /** Determine if a BLOB was freed at a given log position + @param offset_arg row_log_t::head::total after the log record + @return true if freed */ + bool is_freed(ulonglong offset_arg) const { + /* This is supposed to be the offset at the end of the + current log record. */ + ut_ad(offset_arg > 0); + /* We should never get anywhere close the magic value. */ + ut_ad(offset_arg < BLOB_FREED); + return(offset_arg < offset); + } +private: + /** Magic value for a freed BLOB */ + static const ulonglong BLOB_FREED = ~0ULL; +#ifdef UNIV_DEBUG + /** Old offset, in case a page was freed, reused, freed, ... */ + ulonglong old_offset; + /** Offset of last blob_free() */ + ulonglong free_offset; +#endif /* UNIV_DEBUG */ + /** Byte offset to the log file */ + ulonglong offset; +}; + +/** @brief Map of off-page column page numbers to 0 or log byte offsets. + +If there is no mapping for a page number, it is safe to access. +If a page number maps to 0, it is an off-page column that has been freed. +If a page number maps to a nonzero number, the number is a byte offset +into the index->online_log, indicating that the page is safe to access +when applying log records starting from that offset. */ +typedef std::map<ulint, row_log_table_blob_t> page_no_map; /** @brief Buffer for logging modifications during online index creation @@ -99,11 +167,12 @@ directly. When also head.bytes == tail.bytes, both counts will be reset to 0 and the file will be truncated. */ struct row_log_t { int fd; /*!< file descriptor */ - ib_mutex_t mutex; /*!< mutex protecting trx_log, error, + ib_mutex_t mutex; /*!< mutex protecting error, max_trx and tail */ - trx_id_set* trx_rb; /*!< set of transactions that rolled back - inserts of BLOBs during online table rebuild; - protected by mutex */ + page_no_map* blobs; /*!< map of page numbers of off-page columns + that have been freed during table-rebuilding + ALTER TABLE (row_log_table_*); protected by + index->lock X-latch only */ dict_table_t* table; /*!< table that is being rebuilt, or NULL when this is a secondary index that is being created online */ @@ -347,6 +416,7 @@ write_failed: ut_ad(b == log->tail.block + log->tail.bytes); } + log->tail.total += size; UNIV_MEM_INVALID(log->tail.buf, sizeof log->tail.buf); mutex_exit(&log->mutex); } @@ -371,6 +441,7 @@ row_log_table_delete( dict_index_t* index, /*!< in/out: clustered index, S-latched or X-latched */ const ulint* offsets,/*!< in: rec_get_offsets(rec,index) */ + bool purge, /*!< in: true=purging BLOBs */ trx_id_t trx_id) /*!< in: DB_TRX_ID of the record before it was deleted */ { @@ -460,6 +531,7 @@ row_log_table_delete( ut_ad(dfield_get_type(dfield)->prtype == (DATA_NOT_NULL | DATA_TRX_ID)); ut_ad(dfield_get_len(dfield) == DATA_TRX_ID_LEN); + dfield_dup(dfield, heap); trx_write_trx_id(static_cast<byte*>(dfield->data), trx_id); } @@ -473,27 +545,25 @@ row_log_table_delete( mrec_size = 4 + old_pk_size; - /* If the row is marked as rollback, we will need to - log the enough prefix of the BLOB unless both the - old and new table are in COMPACT or REDUNDANT format */ - if ((dict_table_get_format(index->table) >= UNIV_FORMAT_B - || dict_table_get_format(new_table) >= UNIV_FORMAT_B) - && row_log_table_is_rollback(index, trx_id)) { - if (rec_offs_any_extern(offsets)) { - /* Build a cache of those off-page column - prefixes that are referenced by secondary - indexes. It can be that none of the off-page - columns are needed. */ - row_build(ROW_COPY_DATA, index, rec, - offsets, NULL, NULL, NULL, &ext, heap); - if (ext) { - /* Log the row_ext_t, ext->ext and ext->buf */ - ext_size = ext->n_ext * ext->max_len - + sizeof(*ext) - + ext->n_ext * sizeof(ulint) - + (ext->n_ext - 1) * sizeof ext->len; - mrec_size += ext_size; - } + /* Log enough prefix of the BLOB unless both the + old and new table are in COMPACT or REDUNDANT format, + which store the prefix in the clustered index record. */ + if (purge && rec_offs_any_extern(offsets) + && (dict_table_get_format(index->table) >= UNIV_FORMAT_B + || dict_table_get_format(new_table) >= UNIV_FORMAT_B)) { + + /* Build a cache of those off-page column prefixes + that are referenced by secondary indexes. It can be + that none of the off-page columns are needed. */ + row_build(ROW_COPY_DATA, index, rec, + offsets, NULL, NULL, NULL, &ext, heap); + if (ext) { + /* Log the row_ext_t, ext->ext and ext->buf */ + ext_size = ext->n_ext * ext->max_len + + sizeof(*ext) + + ext->n_ext * sizeof(ulint) + + (ext->n_ext - 1) * sizeof ext->len; + mrec_size += ext_size; } } @@ -548,7 +618,7 @@ row_log_table_delete( /******************************************************//** Logs an insert or update to a table that is being rebuilt. */ -static __attribute__((nonnull(1,2,3))) +static void row_log_table_low_redundant( /*========================*/ @@ -557,7 +627,6 @@ row_log_table_low_redundant( page X-latched */ dict_index_t* index, /*!< in/out: clustered index, S-latched or X-latched */ - const ulint* offsets,/*!< in: rec_get_offsets(rec,index) */ bool insert, /*!< in: true if insert, false if update */ const dtuple_t* old_pk, /*!< in: old PRIMARY KEY value @@ -578,6 +647,9 @@ row_log_table_low_redundant( ut_ad(!page_is_comp(page_align(rec))); ut_ad(dict_index_get_n_fields(index) == rec_get_n_fields_old(rec)); + ut_ad(dict_tf_is_valid(index->table->flags)); + ut_ad(!dict_table_is_comp(index->table)); /* redundant row format */ + ut_ad(dict_index_is_clust(new_index)); heap = mem_heap_create(DTUPLE_EST_ALLOC(index->n_fields)); tuple = dtuple_create(heap, index->n_fields); @@ -712,7 +784,7 @@ row_log_table_low( if (!rec_offs_comp(offsets)) { row_log_table_low_redundant( - rec, index, offsets, insert, old_pk, new_index); + rec, index, insert, old_pk, new_index); return; } @@ -723,8 +795,8 @@ row_log_table_low( extra_size = rec_offs_extra_size(offsets) - omit_size; - mrec_size = rec_offs_size(offsets) - omit_size - + ROW_LOG_HEADER_SIZE + (extra_size >= 0x80); + mrec_size = ROW_LOG_HEADER_SIZE + + (extra_size >= 0x80) + rec_offs_size(offsets) - omit_size; if (insert || index->online_log->same_pk) { ut_ad(!old_pk); @@ -793,6 +865,93 @@ row_log_table_update( row_log_table_low(rec, index, offsets, false, old_pk); } +/** Gets the old table column of a PRIMARY KEY column. +@param table old table (before ALTER TABLE) +@param col_map mapping of old column numbers to new ones +@param col_no column position in the new table +@return old table column, or NULL if this is an added column */ +static +const dict_col_t* +row_log_table_get_pk_old_col( +/*=========================*/ + const dict_table_t* table, + const ulint* col_map, + ulint col_no) +{ + for (ulint i = 0; i < table->n_cols; i++) { + if (col_no == col_map[i]) { + return(dict_table_get_nth_col(table, i)); + } + } + + return(NULL); +} + +/** Maps an old table column of a PRIMARY KEY column. +@param col old table column (before ALTER TABLE) +@param ifield clustered index field in the new table (after ALTER TABLE) +@param dfield clustered index tuple field in the new table +@param heap memory heap for allocating dfield contents +@param rec clustered index leaf page record in the old table +@param offsets rec_get_offsets(rec) +@param i rec field corresponding to col +@param zip_size compressed page size of the old table, or 0 for uncompressed +@param max_len maximum length of dfield +@retval DB_INVALID_NULL if a NULL value is encountered +@retval DB_TOO_BIG_INDEX_COL if the maximum prefix length is exceeded */ +static +dberr_t +row_log_table_get_pk_col( +/*=====================*/ + const dict_col_t* col, + const dict_field_t* ifield, + dfield_t* dfield, + mem_heap_t* heap, + const rec_t* rec, + const ulint* offsets, + ulint i, + ulint zip_size, + ulint max_len) +{ + const byte* field; + ulint len; + + ut_ad(ut_is_2pow(zip_size)); + + field = rec_get_nth_field(rec, offsets, i, &len); + + if (len == UNIV_SQL_NULL) { + return(DB_INVALID_NULL); + } + + if (rec_offs_nth_extern(offsets, i)) { + ulint field_len = ifield->prefix_len; + byte* blob_field; + + if (!field_len) { + field_len = ifield->fixed_len; + if (!field_len) { + field_len = max_len + 1; + } + } + + blob_field = static_cast<byte*>( + mem_heap_alloc(heap, field_len)); + + len = btr_copy_externally_stored_field_prefix( + blob_field, field_len, zip_size, field, len); + if (len >= max_len + 1) { + return(DB_TOO_BIG_INDEX_COL); + } + + dfield_set_data(dfield, blob_field, len); + } else { + dfield_set_data(dfield, mem_heap_dup(heap, field, len), len); + } + + return(DB_SUCCESS); +} + /******************************************************//** Constructs the old PRIMARY KEY and DB_TRX_ID,DB_ROLL_PTR of a table that is being rebuilt. @@ -865,95 +1024,69 @@ row_log_table_get_pk( dict_index_copy_types(tuple, new_index, tuple->n_fields); dtuple_set_n_fields_cmp(tuple, new_n_uniq); + const ulint max_len = DICT_MAX_FIELD_LEN_BY_FORMAT(new_table); + const ulint zip_size = dict_table_zip_size(index->table); + for (ulint new_i = 0; new_i < new_n_uniq; new_i++) { - dict_field_t* ifield; - dfield_t* dfield; - const dict_col_t* new_col; - const dict_col_t* col; - ulint col_no; - ulint i; - ulint len; - const byte* field; + dict_field_t* ifield; + dfield_t* dfield; + ulint prtype; + ulint mbminmaxlen; ifield = dict_index_get_nth_field(new_index, new_i); dfield = dtuple_get_nth_field(tuple, new_i); - new_col = dict_field_get_col(ifield); - col_no = new_col->ind; - - for (ulint old_i = 0; old_i < index->table->n_cols; - old_i++) { - if (col_no == log->col_map[old_i]) { - col_no = old_i; - goto copy_col; - } - } - - /* No matching column was found in the old - table, so this must be an added column. - Copy the default value. */ - ut_ad(log->add_cols); - dfield_copy(dfield, - dtuple_get_nth_field( - log->add_cols, col_no)); - continue; - -copy_col: - col = dict_table_get_nth_col(index->table, col_no); - - i = dict_col_get_clust_pos(col, index); - - if (i == ULINT_UNDEFINED) { - ut_ad(0); - log->error = DB_CORRUPTION; - tuple = NULL; - goto func_exit; - } - field = rec_get_nth_field(rec, offsets, i, &len); + const ulint col_no + = dict_field_get_col(ifield)->ind; - if (len == UNIV_SQL_NULL) { - log->error = DB_INVALID_NULL; - tuple = NULL; - goto func_exit; - } + if (const dict_col_t* col + = row_log_table_get_pk_old_col( + index->table, log->col_map, col_no)) { + ulint i = dict_col_get_clust_pos(col, index); - if (rec_offs_nth_extern(offsets, i)) { - ulint field_len = ifield->prefix_len; - byte* blob_field; - const ulint max_len = - DICT_MAX_FIELD_LEN_BY_FORMAT( - new_table); - - if (!field_len) { - field_len = ifield->fixed_len; - if (!field_len) { - field_len = max_len + 1; - } + if (i == ULINT_UNDEFINED) { + ut_ad(0); + log->error = DB_CORRUPTION; + goto err_exit; } - blob_field = static_cast<byte*>( - mem_heap_alloc(*heap, field_len)); + log->error = row_log_table_get_pk_col( + col, ifield, dfield, *heap, + rec, offsets, i, zip_size, max_len); - len = btr_copy_externally_stored_field_prefix( - blob_field, field_len, - dict_table_zip_size(index->table), - field, len); - if (len == max_len + 1) { - log->error = DB_TOO_BIG_INDEX_COL; + if (log->error != DB_SUCCESS) { +err_exit: tuple = NULL; goto func_exit; } - dfield_set_data(dfield, blob_field, len); + mbminmaxlen = col->mbminmaxlen; + prtype = col->prtype; } else { - if (ifield->prefix_len - && ifield->prefix_len < len) { - len = ifield->prefix_len; - } + /* No matching column was found in the old + table, so this must be an added column. + Copy the default value. */ + ut_ad(log->add_cols); + + dfield_copy(dfield, dtuple_get_nth_field( + log->add_cols, col_no)); + mbminmaxlen = dfield->type.mbminmaxlen; + prtype = dfield->type.prtype; + } + + ut_ad(!dfield_is_ext(dfield)); + ut_ad(!dfield_is_null(dfield)); - dfield_set_data( - dfield, - mem_heap_dup(*heap, field, len), len); + if (ifield->prefix_len) { + ulint len = dtype_get_at_most_n_mbchars( + prtype, mbminmaxlen, + ifield->prefix_len, + dfield_get_len(dfield), + static_cast<const char*>( + dfield_get_data(dfield))); + + ut_ad(len <= dfield_get_len(dfield)); + dfield_set_len(dfield, len); } } @@ -988,72 +1121,85 @@ row_log_table_insert( } /******************************************************//** -Notes that a transaction is being rolled back. */ +Notes that a BLOB is being freed during online ALTER TABLE. */ UNIV_INTERN void -row_log_table_rollback( -/*===================*/ - dict_index_t* index, /*!< in/out: clustered index */ - trx_id_t trx_id) /*!< in: transaction being rolled back */ +row_log_table_blob_free( +/*====================*/ + dict_index_t* index, /*!< in/out: clustered index, X-latched */ + ulint page_no)/*!< in: starting page number of the BLOB */ { ut_ad(dict_index_is_clust(index)); -#ifdef UNIV_DEBUG - ibool corrupt = FALSE; - ut_ad(trx_rw_is_active(trx_id, &corrupt)); - ut_ad(!corrupt); -#endif /* UNIV_DEBUG */ + ut_ad(dict_index_is_online_ddl(index)); +#ifdef UNIV_SYNC_DEBUG + ut_ad(rw_lock_own(&index->lock, RW_LOCK_EX)); +#endif /* UNIV_SYNC_DEBUG */ + ut_ad(page_no != FIL_NULL); - /* Protect transitions of index->online_status and access to - index->online_log. */ - rw_lock_s_lock(&index->lock); + if (index->online_log->error != DB_SUCCESS) { + return; + } - if (dict_index_is_online_ddl(index)) { - ut_ad(index->online_log); - ut_ad(index->online_log->table); - mutex_enter(&index->online_log->mutex); - trx_id_set* trxs = index->online_log->trx_rb; + page_no_map* blobs = index->online_log->blobs; - if (!trxs) { - index->online_log->trx_rb = trxs = new trx_id_set(); - } + if (!blobs) { + index->online_log->blobs = blobs = new page_no_map(); + } - trxs->insert(trx_id); +#ifdef UNIV_DEBUG + const ulonglong log_pos = index->online_log->tail.total; +#else +# define log_pos /* empty */ +#endif /* UNIV_DEBUG */ - mutex_exit(&index->online_log->mutex); - } + const page_no_map::value_type v(page_no, + row_log_table_blob_t(log_pos)); + + std::pair<page_no_map::iterator,bool> p = blobs->insert(v); - rw_lock_s_unlock(&index->lock); + if (!p.second) { + /* Update the existing mapping. */ + ut_ad(p.first->first == page_no); + p.first->second.blob_free(log_pos); + } +#undef log_pos } /******************************************************//** -Check if a transaction rollback has been initiated. -@return true if inserts of this transaction were rolled back */ +Notes that a BLOB is being allocated during online ALTER TABLE. */ UNIV_INTERN -bool -row_log_table_is_rollback( -/*======================*/ - const dict_index_t* index, /*!< in: clustered index */ - trx_id_t trx_id) /*!< in: transaction id */ +void +row_log_table_blob_alloc( +/*=====================*/ + dict_index_t* index, /*!< in/out: clustered index, X-latched */ + ulint page_no)/*!< in: starting page number of the BLOB */ { ut_ad(dict_index_is_clust(index)); ut_ad(dict_index_is_online_ddl(index)); - ut_ad(index->online_log); - - if (const trx_id_set* trxs = index->online_log->trx_rb) { - mutex_enter(&index->online_log->mutex); - bool is_rollback = trxs->find(trx_id) != trxs->end(); - mutex_exit(&index->online_log->mutex); +#ifdef UNIV_SYNC_DEBUG + ut_ad(rw_lock_own(&index->lock, RW_LOCK_EX)); +#endif /* UNIV_SYNC_DEBUG */ + ut_ad(page_no != FIL_NULL); - return(is_rollback); + if (index->online_log->error != DB_SUCCESS) { + return; } - return(false); + /* Only track allocations if the same page has been freed + earlier. Double allocation without a free is not allowed. */ + if (page_no_map* blobs = index->online_log->blobs) { + page_no_map::iterator p = blobs->find(page_no); + + if (p != blobs->end()) { + ut_ad(p->first == page_no); + p->second.blob_alloc(index->online_log->tail.total); + } + } } /******************************************************//** Converts a log record to a table row. -@return converted row, or NULL if the conversion fails -or the transaction has been rolled back */ +@return converted row, or NULL if the conversion fails */ static __attribute__((nonnull, warn_unused_result)) const dtuple_t* row_log_table_apply_convert_mrec( @@ -1069,17 +1215,6 @@ row_log_table_apply_convert_mrec( { dtuple_t* row; -#ifdef UNIV_SYNC_DEBUG - /* This prevents BLOBs from being freed, in case an insert - transaction rollback starts after row_log_table_is_rollback(). */ - ut_ad(rw_lock_own(dict_index_get_lock(index), RW_LOCK_EX)); -#endif /* UNIV_SYNC_DEBUG */ - - if (row_log_table_is_rollback(index, trx_id)) { - row = NULL; - goto func_exit; - } - /* This is based on row_build(). */ if (log->add_cols) { row = dtuple_copy(log->add_cols, heap); @@ -1121,15 +1256,43 @@ row_log_table_apply_convert_mrec( dfield_t* dfield = dtuple_get_nth_field(row, col_no); ulint len; - const void* data; + const byte* data= NULL; if (rec_offs_nth_extern(offsets, i)) { ut_ad(rec_offs_any_extern(offsets)); - data = btr_rec_copy_externally_stored_field( - mrec, offsets, - dict_table_zip_size(index->table), - i, &len, heap); - ut_a(data); + rw_lock_x_lock(dict_index_get_lock(index)); + + if (const page_no_map* blobs = log->blobs) { + data = rec_get_nth_field( + mrec, offsets, i, &len); + ut_ad(len >= BTR_EXTERN_FIELD_REF_SIZE); + + ulint page_no = mach_read_from_4( + data + len - (BTR_EXTERN_FIELD_REF_SIZE + - BTR_EXTERN_PAGE_NO)); + page_no_map::const_iterator p = blobs->find( + page_no); + if (p != blobs->end() + && p->second.is_freed(log->head.total)) { + /* This BLOB has been freed. + We must not access the row. */ + row = NULL; + } + } + + if (row) { + data = btr_rec_copy_externally_stored_field( + mrec, offsets, + dict_table_zip_size(index->table), + i, &len, heap); + ut_a(data); + } + + rw_lock_x_unlock(dict_index_get_lock(index)); + + if (!row) { + goto func_exit; + } } else { data = rec_get_nth_field(mrec, offsets, i, &len); } @@ -1489,9 +1652,6 @@ dberr_t row_log_table_apply_update( /*=======================*/ que_thr_t* thr, /*!< in: query graph */ - ulint trx_id_col, /*!< in: position of - DB_TRX_ID in the - old clustered index */ ulint new_trx_id_col, /*!< in: position of DB_TRX_ID in the new clustered index */ @@ -1552,14 +1712,14 @@ row_log_table_apply_update( if (page_rec_is_infimum(btr_pcur_get_rec(&pcur)) || btr_pcur_get_low_match(&pcur) < index->n_uniq) { + ut_ad(0); + error = DB_CORRUPTION; +func_exit: mtr_commit(&mtr); -insert: +func_exit_committed: ut_ad(mtr.state == MTR_COMMITTED); - /* The row was not found. Insert it. */ - error = row_log_table_apply_insert_low( - thr, row, trx_id, offsets_heap, heap, dup); + if (error != DB_SUCCESS) { -err_exit: /* Report the erroneous row using the new version of the table. */ innobase_row_to_mysql(dup->table, log->table, row); @@ -1586,26 +1746,17 @@ err_exit: goto func_exit; } - if (rec_offs_any_extern(cur_offsets)) { + const bool pk_updated + = upd_get_nth_field(update, 0)->field_no < new_trx_id_col; + + if (pk_updated || rec_offs_any_extern(cur_offsets)) { /* If the record contains any externally stored columns, perform the update by delete and insert, because we will not write any undo log that would allow purge to free any orphaned externally stored columns. */ -delete_insert: - error = row_log_table_apply_delete_low( - &pcur, cur_offsets, NULL, heap, &mtr); - ut_ad(mtr.state == MTR_COMMITTED); - - if (error != DB_SUCCESS) { - goto err_exit; - } - - goto insert; - } - if (upd_get_nth_field(update, 0)->field_no < new_trx_id_col) { - if (dup->index->online_log->same_pk) { + if (pk_updated && dup->index->online_log->same_pk) { /* The ROW_T_UPDATE log record should only be written when the PRIMARY KEY fields of the record did not change in the old table. We @@ -1617,40 +1768,16 @@ delete_insert: goto func_exit; } - /* The PRIMARY KEY columns have changed. - Delete the record with the old PRIMARY KEY value, - provided that it carries the same - DB_TRX_ID,DB_ROLL_PTR. Then, insert the new row. */ - ulint len; - const byte* cur_trx_roll = rec_get_nth_field( - mrec, offsets, trx_id_col, &len); - ut_ad(len == DATA_TRX_ID_LEN); - const dfield_t* new_trx_roll = dtuple_get_nth_field( - old_pk, new_trx_id_col); - /* We assume that DB_TRX_ID,DB_ROLL_PTR are stored - in one contiguous block. */ - ut_ad(rec_get_nth_field(mrec, offsets, trx_id_col + 1, &len) - == cur_trx_roll + DATA_TRX_ID_LEN); - ut_ad(len == DATA_ROLL_PTR_LEN); - ut_ad(new_trx_roll->len == DATA_TRX_ID_LEN); - ut_ad(dtuple_get_nth_field(old_pk, new_trx_id_col + 1) - -> len == DATA_ROLL_PTR_LEN); - ut_ad(static_cast<const byte*>( - dtuple_get_nth_field(old_pk, new_trx_id_col + 1) - ->data) - == static_cast<const byte*>(new_trx_roll->data) - + DATA_TRX_ID_LEN); - - if (!memcmp(cur_trx_roll, new_trx_roll->data, - DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN)) { - /* The old row exists. Remove it. */ - goto delete_insert; - } - - /* Unless we called row_log_table_apply_delete_low(), - this will likely cause a duplicate key error. */ - mtr_commit(&mtr); - goto insert; + error = row_log_table_apply_delete_low( + &pcur, cur_offsets, NULL, heap, &mtr); + ut_ad(mtr.state == MTR_COMMITTED); + + if (error == DB_SUCCESS) { + error = row_log_table_apply_insert_low( + thr, row, trx_id, offsets_heap, heap, dup); + } + + goto func_exit_committed; } dtuple_t* old_row; @@ -1685,7 +1812,7 @@ delete_insert: | BTR_KEEP_POS_FLAG, btr_pcur_get_btr_cur(&pcur), &cur_offsets, &offsets_heap, heap, &big_rec, - update, 0, NULL, 0, &mtr); + update, 0, thr, 0, &mtr); if (big_rec) { if (error == DB_SUCCESS) { @@ -1749,13 +1876,7 @@ delete_insert: mtr_start(&mtr); } -func_exit: - mtr_commit(&mtr); - if (error != DB_SUCCESS) { - goto err_exit; - } - - return(error); + goto func_exit; } /******************************************************//** @@ -1783,7 +1904,7 @@ row_log_table_apply_op( ulint* offsets) /*!< in/out: work area for parsing mrec */ { - const row_log_t*log = dup->index->online_log; + row_log_t* log = dup->index->online_log; dict_index_t* new_index = dict_table_get_first_index(log->table); ulint extra_size; const mrec_t* next_mrec; @@ -1793,6 +1914,7 @@ row_log_table_apply_op( ut_ad(dict_index_is_clust(dup->index)); ut_ad(dup->index->table != log->table); + ut_ad(log->head.total <= log->tail.total); *error = DB_SUCCESS; @@ -1801,6 +1923,8 @@ row_log_table_apply_op( return(NULL); } + const mrec_t* const mrec_start = mrec; + switch (*mrec++) { default: ut_ad(0); @@ -1830,6 +1954,8 @@ row_log_table_apply_op( if (next_mrec > mrec_end) { return(NULL); } else { + log->head.total += next_mrec - mrec_start; + ulint len; const byte* db_trx_id = rec_get_nth_field( @@ -1863,6 +1989,8 @@ row_log_table_apply_op( return(NULL); } + log->head.total += next_mrec - mrec_start; + /* If there are external fields, retrieve those logged prefix info and reconstruct the row_ext_t */ if (ext_size) { @@ -2019,6 +2147,7 @@ row_log_table_apply_op( } ut_ad(next_mrec <= mrec_end); + log->head.total += next_mrec - mrec_start; dtuple_set_n_fields_cmp(old_pk, new_index->n_uniq); { @@ -2028,7 +2157,7 @@ row_log_table_apply_op( mrec, offsets, trx_id_col, &len); ut_ad(len == DATA_TRX_ID_LEN); *error = row_log_table_apply_update( - thr, trx_id_col, new_trx_id_col, + thr, new_trx_id_col, mrec, offsets, offsets_heap, heap, dup, trx_read_trx_id(db_trx_id), old_pk); } @@ -2036,6 +2165,7 @@ row_log_table_apply_op( break; } + ut_ad(log->head.total <= log->tail.total); mem_heap_empty(offsets_heap); mem_heap_empty(heap); return(next_mrec); @@ -2423,6 +2553,10 @@ row_log_table_apply( }; error = row_log_table_apply_ops(thr, &dup); + + ut_ad(error != DB_SUCCESS + || clust_index->online_log->head.total + == clust_index->online_log->tail.total); } rw_lock_x_unlock(dict_index_get_lock(clust_index)); @@ -2451,6 +2585,7 @@ row_log_allocate( byte* buf; row_log_t* log; ulint size; + DBUG_ENTER("row_log_allocate"); ut_ad(!dict_index_is_online_ddl(index)); ut_ad(dict_index_is_clust(index) == !!table); @@ -2464,7 +2599,7 @@ row_log_allocate( size = 2 * srv_sort_buf_size + sizeof *log; buf = (byte*) os_mem_alloc_large(&size); if (!buf) { - return(false); + DBUG_RETURN(false); } log = (row_log_t*) &buf[2 * srv_sort_buf_size]; @@ -2472,11 +2607,11 @@ row_log_allocate( log->fd = row_merge_file_create_low(); if (log->fd < 0) { os_mem_free_large(buf, size); - return(false); + DBUG_RETURN(false); } mutex_create(index_online_log_key, &log->mutex, SYNC_INDEX_ONLINE_LOG); - log->trx_rb = NULL; + log->blobs = NULL; log->table = table; log->same_pk = same_pk; log->add_cols = add_cols; @@ -2486,7 +2621,9 @@ row_log_allocate( log->head.block = buf; log->tail.block = buf + srv_sort_buf_size; log->tail.blocks = log->tail.bytes = 0; + log->tail.total = 0; log->head.blocks = log->head.bytes = 0; + log->head.total = 0; dict_index_set_online_status(index, ONLINE_INDEX_CREATION); index->online_log = log; @@ -2495,7 +2632,7 @@ row_log_allocate( atomic operations in both cases. */ MONITOR_ATOMIC_INC(MONITOR_ONLINE_CREATE_INDEX); - return(true); + DBUG_RETURN(true); } /******************************************************//** @@ -2508,7 +2645,7 @@ row_log_free( { MONITOR_ATOMIC_DEC(MONITOR_ONLINE_CREATE_INDEX); - delete log->trx_rb; + delete log->blobs; row_merge_file_destroy_low(log->fd); mutex_free(&log->mutex); os_mem_free_large(log->head.block, log->size); @@ -2597,7 +2734,16 @@ row_log_apply_op_low( switch (op) { case ROW_OP_DELETE: if (!exists) { - /* The record was already deleted. */ + /* The existing record matches the + unique secondary index key, but the + PRIMARY KEY columns differ. So, this + exact record does not exist. For + example, we could detect a duplicate + key error in some old index before + logging an ROW_OP_INSERT for our + index. This ROW_OP_DELETE could have + been logged for rolling back + TRX_UNDO_INSERT_REC. */ goto func_exit; } @@ -2637,7 +2783,24 @@ row_log_apply_op_low( case ROW_OP_INSERT: if (exists) { /* The record already exists. There - is nothing to be inserted. */ + is nothing to be inserted. + This could happen when processing + TRX_UNDO_DEL_MARK_REC in statement + rollback: + + UPDATE of PRIMARY KEY can lead to + statement rollback if the updated + value of the PRIMARY KEY already + exists. In this case, the UPDATE would + be mapped to DELETE;INSERT, and we + only wrote undo log for the DELETE + part. The duplicate key error would be + triggered before logging the INSERT + part. + + Theoretically, we could also get a + similar situation when a DELETE operation + is blocked by a FOREIGN KEY constraint. */ goto func_exit; } @@ -2648,17 +2811,18 @@ row_log_apply_op_low( goto insert_the_rec; } - /* Duplicate key error */ - ut_ad(dict_index_is_unique(index)); - row_merge_dup_report(dup, entry->fields); - goto func_exit; + goto duplicate; } } else { switch (op) { rec_t* rec; big_rec_t* big_rec; case ROW_OP_DELETE: - /* The record does not exist. */ + /* The record does not exist. For example, we + could detect a duplicate key error in some old + index before logging an ROW_OP_INSERT for our + index. This ROW_OP_DELETE could be logged for + rolling back TRX_UNDO_INSERT_REC. */ goto func_exit; case ROW_OP_INSERT: if (dict_index_is_unique(index) @@ -2668,8 +2832,11 @@ row_log_apply_op_low( >= dict_index_get_n_unique(index)) && (!index->n_nullable || !dtuple_contains_null(entry))) { +duplicate: /* Duplicate key */ + ut_ad(dict_index_is_unique(index)); row_merge_dup_report(dup, entry->fields); + *error = DB_DUPLICATE_KEY; goto func_exit; } insert_the_rec: @@ -3183,6 +3350,7 @@ row_log_apply( dberr_t error; row_log_t* log; row_merge_dup_t dup = { index, table, NULL, 0 }; + DBUG_ENTER("row_log_apply"); ut_ad(dict_index_is_online_ddl(index)); ut_ad(!dict_index_is_clust(index)); @@ -3197,7 +3365,7 @@ row_log_apply( error = DB_SUCCESS; } - if (error != DB_SUCCESS || dup.n_dup) { + if (error != DB_SUCCESS) { ut_a(!dict_table_is_discarded(index->table)); /* We set the flag directly instead of invoking dict_set_corrupted_index_cache_only(index) here, @@ -3205,12 +3373,9 @@ row_log_apply( index->type |= DICT_CORRUPT; index->table->drop_aborted = TRUE; - if (error == DB_SUCCESS) { - error = DB_DUPLICATE_KEY; - } - dict_index_set_online_status(index, ONLINE_INDEX_ABORTED); } else { + ut_ad(dup.n_dup == 0); dict_index_set_online_status(index, ONLINE_INDEX_COMPLETE); } @@ -3225,5 +3390,5 @@ row_log_apply( row_log_free(log); - return(error); + DBUG_RETURN(error); } diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index a509e2c5ca8..56cf9f1943c 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2013, 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 @@ -64,6 +64,9 @@ static ibool row_merge_print_block_write; /* Whether to disable file system cache */ UNIV_INTERN char srv_disable_sort_file_cache; +/* Maximum pending doc memory limit in bytes for a fts tokenization thread */ +#define FTS_PENDING_DOC_MEMORY_LIMIT 1000000 + #ifdef UNIV_DEBUG /******************************************************//** Display a merge tuple. */ @@ -260,14 +263,15 @@ row_merge_buf_add( ulint bucket = 0; doc_id_t write_doc_id; ulint n_row_added = 0; + DBUG_ENTER("row_merge_buf_add"); if (buf->n_tuples >= buf->max_tuples) { - return(0); + DBUG_RETURN(0); } DBUG_EXECUTE_IF( "ib_row_merge_buf_add_two", - if (buf->n_tuples >= 2) return(0);); + if (buf->n_tuples >= 2) DBUG_RETURN(0);); UNIV_PREFETCH_R(row->fields); @@ -324,19 +328,16 @@ row_merge_buf_add( if (index->type & DICT_FTS) { fts_doc_item_t* doc_item; byte* value; - - if (dfield_is_null(field)) { - n_row_added = 1; - continue; - } - - doc_item = static_cast<fts_doc_item_t*>( - mem_heap_alloc( - buf->heap, - sizeof(fts_doc_item_t))); + void* ptr; + const ulint max_trial_count = 10000; + ulint trial_count = 0; /* fetch Doc ID if it already exists - in the row, and not supplied by the caller */ + in the row, and not supplied by the + caller. Even if the value column is + NULL, we still need to get the Doc + ID so to maintain the correct max + Doc ID */ if (*doc_id == 0) { const dfield_t* doc_field; doc_field = dtuple_get_nth_field( @@ -347,16 +348,24 @@ row_merge_buf_add( dfield_get_data(doc_field))); if (*doc_id == 0) { - fprintf(stderr, "InnoDB FTS: " - "User supplied Doc ID " - "is zero. Record " - "Skipped\n"); - return(0); + ib_logf(IB_LOG_LEVEL_WARN, + "FTS Doc ID is zero. " + "Record Skipped"); + DBUG_RETURN(0); } } - value = static_cast<byte*>( - ut_malloc(field->len)); + if (dfield_is_null(field)) { + n_row_added = 1; + continue; + } + + ptr = ut_malloc(sizeof(*doc_item) + + field->len); + + doc_item = static_cast<fts_doc_item_t*>(ptr); + value = static_cast<byte*>(ptr) + + sizeof(*doc_item); memcpy(value, field->data, field->len); field->data = value; @@ -365,10 +374,29 @@ row_merge_buf_add( bucket = *doc_id % fts_sort_pll_degree; - UT_LIST_ADD_LAST( - doc_list, - psort_info[bucket].fts_doc_list, - doc_item); + /* Add doc item to fts_doc_list */ + mutex_enter(&psort_info[bucket].mutex); + + if (psort_info[bucket].error == DB_SUCCESS) { + UT_LIST_ADD_LAST( + doc_list, + psort_info[bucket].fts_doc_list, + doc_item); + psort_info[bucket].memory_used += + sizeof(*doc_item) + field->len; + } else { + ut_free(doc_item); + } + + mutex_exit(&psort_info[bucket].mutex); + + /* Sleep when memory used exceeds limit*/ + while (psort_info[bucket].memory_used + > FTS_PENDING_DOC_MEMORY_LIMIT + && trial_count++ < max_trial_count) { + os_thread_sleep(1000); + } + n_row_added = 1; continue; } @@ -458,7 +486,7 @@ row_merge_buf_add( /* If this is FTS index, we already populated the sort buffer, return here */ if (index->type & DICT_FTS) { - return(n_row_added); + DBUG_RETURN(n_row_added); } #ifdef UNIV_DEBUG @@ -484,7 +512,7 @@ row_merge_buf_add( /* Reserve one byte for the end marker of row_merge_block_t. */ if (buf->total_size + data_size >= srv_sort_buf_size - 1) { - return(0); + DBUG_RETURN(0); } buf->total_size += data_size; @@ -499,7 +527,7 @@ row_merge_buf_add( dfield_dup(field++, buf->heap); } while (--n_fields); - return(n_row_added); + DBUG_RETURN(n_row_added); } /*************************************************************//** @@ -1180,6 +1208,7 @@ row_merge_read_clustered_index( os_event_t fts_parallel_sort_event = NULL; ibool fts_pll_sort = FALSE; ib_int64_t sig_count = 0; + DBUG_ENTER("row_merge_read_clustered_index"); ut_ad((old_table == new_table) == !col_map); ut_ad(!add_cols || col_map); @@ -1396,13 +1425,26 @@ end_of_index: offsets = rec_get_offsets(rec, clust_index, NULL, ULINT_UNDEFINED, &row_heap); - if (online && new_table != old_table) { - /* When rebuilding the table online, perform a - REPEATABLE READ, so that row_log_table_apply() - will not see a newer state of the table when - applying the log. This is mainly to prevent - false duplicate key errors, because the log - will identify records by the PRIMARY KEY. */ + if (online) { + /* Perform a REPEATABLE READ. + + When rebuilding the table online, + row_log_table_apply() must not see a newer + state of the table when applying the log. + This is mainly to prevent false duplicate key + errors, because the log will identify records + by the PRIMARY KEY, and also to prevent unsafe + BLOB access. + + When creating a secondary index online, this + table scan must not see records that have only + been inserted to the clustered index, but have + not been written to the online_log of + index[]. If we performed READ UNCOMMITTED, it + could happen that the ADD INDEX reaches + ONLINE_INDEX_COMPLETE state between the time + the DML thread has updated the clustered index + but has not yet accessed secondary index. */ ut_ad(trx->read_view); if (!read_view_sees_trx_id( @@ -1445,38 +1487,13 @@ end_of_index: would make it tricky to detect duplicate keys. */ continue; - } else if (UNIV_LIKELY_NULL(rec_offs_any_null_extern( - rec, offsets))) { - /* This is essentially a READ UNCOMMITTED to - fetch the most recent version of the record. */ -#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG - trx_id_t trx_id; - ulint trx_id_offset; - - /* It is possible that the record was - just inserted and the off-page columns - have not yet been written. We will - ignore the record if this is the case, - because it should be covered by the - index->info.online log in that case. */ - - trx_id_offset = clust_index->trx_id_offset; - if (!trx_id_offset) { - trx_id_offset = row_get_trx_id_offset( - clust_index, offsets); - } - - trx_id = trx_read_trx_id(rec + trx_id_offset); - ut_a(trx_rw_is_active(trx_id, NULL)); - ut_a(trx_undo_trx_id_is_insert(rec + trx_id_offset)); -#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */ - - /* When !online, we are holding an X-lock on - old_table, preventing any inserts. */ - ut_ad(online); - continue; } + /* When !online, we are holding a lock on old_table, preventing + any inserts that could have written a record 'stub' before + writing out off-page columns. */ + ut_ad(!rec_offs_any_null_extern(rec, offsets)); + /* Build a row based on the clustered index. */ row = row_build(ROW_COPY_POINTERS, clust_index, @@ -1578,12 +1595,28 @@ write_buffers: max_doc_id = doc_id; } + if (buf->index->type & DICT_FTS) { + /* Check if error occurs in child thread */ + for (ulint j = 0; j < fts_sort_pll_degree; j++) { + if (psort_info[j].error != DB_SUCCESS) { + err = psort_info[j].error; + trx->error_key_num = i; + break; + } + } + + if (err != DB_SUCCESS) { + break; + } + } + continue; } - if ((buf->index->type & DICT_FTS) - && (!row || !doc_id)) { - continue; + if (buf->index->type & DICT_FTS) { + if (!row || !doc_id) { + continue; + } } /* The buffer must be sufficiently large @@ -1641,7 +1674,7 @@ write_buffers: if (!row_merge_write(file->fd, file->offset++, block)) { - err = DB_OUT_OF_FILE_SPACE; + err = DB_TEMP_FILE_WRITE_FAILURE; trx->error_key_num = i; break; } @@ -1692,10 +1725,30 @@ all_done: DEBUG_FTS_SORT_PRINT("FTS_SORT: Complete Scan Table\n"); #endif if (fts_pll_sort) { + bool all_exit = false; + ulint trial_count = 0; + const ulint max_trial_count = 10000; + +wait_again: + /* Check if error occurs in child thread */ + for (ulint j = 0; j < fts_sort_pll_degree; j++) { + if (psort_info[j].error != DB_SUCCESS) { + err = psort_info[j].error; + trx->error_key_num = j; + break; + } + } + + /* Tell all children that parent has done scanning */ for (ulint i = 0; i < fts_sort_pll_degree; i++) { - psort_info[i].state = FTS_PARENT_COMPLETE; + if (err == DB_SUCCESS) { + psort_info[i].state = FTS_PARENT_COMPLETE; + } else { + psort_info[i].state = FTS_PARENT_EXITING; + } } -wait_again: + + /* Now wait all children to report back to be completed */ os_event_wait_time_low(fts_parallel_sort_event, 1000000, sig_count); @@ -1707,6 +1760,31 @@ wait_again: goto wait_again; } } + + /* Now all children should complete, wait a bit until + they all finish setting the event, before we free everything. + This has a 10 second timeout */ + do { + all_exit = true; + + for (ulint j = 0; j < fts_sort_pll_degree; j++) { + if (psort_info[j].child_status + != FTS_CHILD_EXITING) { + all_exit = false; + os_thread_sleep(1000); + break; + } + } + trial_count++; + } while (!all_exit && trial_count < max_trial_count); + + if (!all_exit) { + ut_ad(0); + ib_logf(IB_LOG_LEVEL_FATAL, + "Not all child sort threads exited" + " when creating FTS index '%s'", + fts_sort_idx->name); + } } #ifdef FTS_INTERNAL_DIAG_PRINT @@ -1724,14 +1802,20 @@ wait_again: /* Update the next Doc ID we used. Table should be locked, so no concurrent DML */ - if (max_doc_id) { - fts_update_next_doc_id( - 0, new_table, old_table->name, max_doc_id); + if (max_doc_id && err == DB_SUCCESS) { + /* Sync fts cache for other fts indexes to keep all + fts indexes consistent in sync_doc_id. */ + err = fts_sync_table(const_cast<dict_table_t*>(new_table)); + + if (err == DB_SUCCESS) { + fts_update_next_doc_id( + 0, new_table, old_table->name, max_doc_id); + } } trx->op_info = ""; - return(err); + DBUG_RETURN(err); } /** Write a record via buffer 2 and read the next record to buffer N. @@ -2092,13 +2176,14 @@ row_merge_sort( ulint num_runs; ulint* run_offset; dberr_t error = DB_SUCCESS; + DBUG_ENTER("row_merge_sort"); /* Record the number of merge runs we need to perform */ num_runs = file->offset; /* If num_runs are less than 1, nothing to merge */ if (num_runs <= 1) { - return(error); + DBUG_RETURN(error); } /* "run_offset" records each run's first offset number */ @@ -2126,24 +2211,7 @@ row_merge_sort( mem_free(run_offset); - return(error); -} - -/*************************************************************//** -Set blob fields empty */ -static __attribute__((nonnull)) -void -row_merge_set_blob_empty( -/*=====================*/ - dtuple_t* tuple) /*!< in/out: data tuple */ -{ - for (ulint i = 0; i < dtuple_get_n_fields(tuple); i++) { - dfield_t* field = dtuple_get_nth_field(tuple, i); - - if (dfield_is_ext(field)) { - dfield_set_data(field, NULL, 0); - } - } + DBUG_RETURN(error); } /*************************************************************//** @@ -2211,6 +2279,7 @@ row_merge_insert_index_tuples( ulint foffs = 0; ulint* offsets; mrec_buf_t* buf; + DBUG_ENTER("row_merge_insert_index_tuples"); ut_ad(!srv_read_only_mode); ut_ad(!(index->type & DICT_FTS)); @@ -2272,52 +2341,31 @@ row_merge_insert_index_tuples( if (!n_ext) { /* There are no externally stored columns. */ - } else if (!dict_index_is_online_ddl(old_index)) { + } else { ut_ad(dict_index_is_clust(index)); - /* Modifications to the table are - blocked while we are not rebuilding it - or creating indexes. Off-page columns - can be fetched safely. */ + /* Off-page columns can be fetched safely + when concurrent modifications to the table + are disabled. (Purge can process delete-marked + records, but row_merge_read_clustered_index() + would have skipped them.) + + When concurrent modifications are enabled, + row_merge_read_clustered_index() will + only see rows from transactions that were + committed before the ALTER TABLE started + (REPEATABLE READ). + + Any modifications after the + row_merge_read_clustered_index() scan + will go through row_log_table_apply(). + Any modifications to off-page columns + will be tracked by + row_log_table_blob_alloc() and + row_log_table_blob_free(). */ row_merge_copy_blobs( mrec, offsets, dict_table_zip_size(old_table), dtuple, tuple_heap); - } else { - ut_ad(dict_index_is_clust(index)); - - ulint offset = index->trx_id_offset; - - if (!offset) { - offset = row_get_trx_id_offset( - index, offsets); - } - - /* Copy the off-page columns while - holding old_index->lock, so - that they cannot be freed by - a rollback of a fresh insert. */ - rw_lock_s_lock(&old_index->lock); - - if (row_log_table_is_rollback( - old_index, - trx_read_trx_id(mrec + offset))) { - /* The row and BLOB could - already be freed. They - will be deleted by - row_undo_ins_remove_clust_rec - when rolling back a fresh - insert. So, no need to retrieve - the off-page column. */ - row_merge_set_blob_empty( - dtuple); - } else { - row_merge_copy_blobs( - mrec, offsets, - dict_table_zip_size(old_table), - dtuple, tuple_heap); - } - - rw_lock_s_unlock(&old_index->lock); } ut_ad(dtuple_validate(dtuple)); @@ -2415,7 +2463,7 @@ err_exit: mem_heap_free(ins_heap); mem_heap_free(heap); - return(error); + DBUG_RETURN(error); } /*********************************************************************//** @@ -2903,7 +2951,7 @@ row_merge_file_create_low(void) if (fd < 0) { ib_logf(IB_LOG_LEVEL_ERROR, "Cannot create temporary merge file"); - return -1; + return (-1); } return(fd); } @@ -3114,48 +3162,34 @@ will not be committed. @return error code or DB_SUCCESS */ UNIV_INTERN dberr_t -row_merge_rename_tables( -/*====================*/ +row_merge_rename_tables_dict( +/*=========================*/ dict_table_t* old_table, /*!< in/out: old table, renamed to tmp_name */ dict_table_t* new_table, /*!< in/out: new table, renamed to old_table->name */ const char* tmp_name, /*!< in: new name for old_table */ - trx_t* trx) /*!< in: transaction handle */ + trx_t* trx) /*!< in/out: dictionary transaction */ { dberr_t err = DB_ERROR; pars_info_t* info; - char old_name[MAX_FULL_NAME_LEN + 1]; ut_ad(!srv_read_only_mode); ut_ad(old_table != new_table); ut_ad(mutex_own(&dict_sys->mutex)); ut_a(trx->dict_operation_lock_mode == RW_X_LATCH); - ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_TABLE); - - /* store the old/current name to an automatic variable */ - if (strlen(old_table->name) + 1 <= sizeof(old_name)) { - memcpy(old_name, old_table->name, strlen(old_table->name) + 1); - } else { - ib_logf(IB_LOG_LEVEL_ERROR, - "Too long table name: '%s', max length is %d", - old_table->name, MAX_FULL_NAME_LEN); - ut_error; - } + ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_TABLE + || trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX); trx->op_info = "renaming tables"; - DBUG_EXECUTE_IF( - "ib_rebuild_cannot_rename", - err = DB_ERROR; goto err_exit;); - /* We use the private SQL parser of Innobase to generate the query graphs needed in updating the dictionary data in system tables. */ info = pars_info_create(); pars_info_add_str_literal(info, "new_name", new_table->name); - pars_info_add_str_literal(info, "old_name", old_name); + pars_info_add_str_literal(info, "old_name", old_table->name); pars_info_add_str_literal(info, "tmp_name", tmp_name); err = que_eval_sql(info, @@ -3200,11 +3234,12 @@ row_merge_rename_tables( table is in a non-system tablespace where space > 0. */ if (err == DB_SUCCESS && new_table->space != TRX_SYS_SPACE) { /* Make pathname to update SYS_DATAFILES. */ - char* old_path = row_make_new_pathname(new_table, old_name); + char* old_path = row_make_new_pathname( + new_table, old_table->name); info = pars_info_create(); - pars_info_add_str_literal(info, "old_name", old_name); + pars_info_add_str_literal(info, "old_name", old_table->name); pars_info_add_str_literal(info, "old_path", old_path); pars_info_add_int4_literal(info, "new_space", (lint) new_table->space); @@ -3223,75 +3258,9 @@ row_merge_rename_tables( mem_free(old_path); } - if (err != DB_SUCCESS) { - goto err_exit; - } - - /* Generate the redo logs for file operations */ - fil_mtr_rename_log(old_table->space, old_name, - new_table->space, new_table->name, tmp_name); - - /* What if the redo logs are flushed to disk here? This is - tested with following crash point */ - DBUG_EXECUTE_IF("bug14669848_precommit", log_buffer_flush_to_disk(); - DBUG_SUICIDE();); - - /* File operations cannot be rolled back. So, before proceeding - with file operations, commit the dictionary changes.*/ - trx_commit_for_mysql(trx); - - /* If server crashes here, the dictionary in InnoDB and MySQL - will differ. The .ibd files and the .frm files must be swapped - manually by the administrator. No loss of data. */ - DBUG_EXECUTE_IF("bug14669848", DBUG_SUICIDE();); - - /* Ensure that the redo logs are flushed to disk. The config - innodb_flush_log_at_trx_commit must not affect this. */ - log_buffer_flush_to_disk(); - - /* The following calls will also rename the .ibd data files if - the tables are stored in a single-table tablespace */ - - err = dict_table_rename_in_cache(old_table, tmp_name, FALSE); - - if (err == DB_SUCCESS) { - - ut_ad(dict_table_is_discarded(old_table) - == dict_table_is_discarded(new_table)); - - err = dict_table_rename_in_cache(new_table, old_name, FALSE); - - if (err != DB_SUCCESS) { - - if (dict_table_rename_in_cache( - old_table, old_name, FALSE) - != DB_SUCCESS) { - - ib_logf(IB_LOG_LEVEL_ERROR, - "Cannot undo the rename in cache " - "from %s to %s", old_name, tmp_name); - } - - goto err_exit; - } - - if (dict_table_is_discarded(new_table)) { - - err = row_import_update_discarded_flag( - trx, new_table->id, true, true); - } - } - - DBUG_EXECUTE_IF("ib_rebuild_cannot_load_fk", - err = DB_ERROR; goto err_exit;); - - err = dict_load_foreigns(old_name, FALSE, TRUE); - - if (err != DB_SUCCESS) { -err_exit: - trx->error_state = DB_SUCCESS; - trx_rollback_to_savepoint(trx, NULL); - trx->error_state = DB_SUCCESS; + if (err == DB_SUCCESS && dict_table_is_discarded(new_table)) { + err = row_import_update_discarded_flag( + trx, new_table->id, true, true); } trx->op_info = ""; @@ -3417,7 +3386,7 @@ row_merge_is_index_usable( /*********************************************************************//** Drop a table. The caller must have ensured that the background stats thread is not processing the table. This can be done by calling -dict_stats_wait_bg_to_stop_using_tables() after locking the dictionary and +dict_stats_wait_bg_to_stop_using_table() after locking the dictionary and before calling this function. @return DB_SUCCESS or error code */ UNIV_INTERN @@ -3475,11 +3444,13 @@ row_merge_build_indexes( ulint i; ulint j; dberr_t error; - int tmpfd; + int tmpfd = -1; dict_index_t* fts_sort_idx = NULL; fts_psort_t* psort_info = NULL; fts_psort_t* merge_info = NULL; ib_int64_t sig_count = 0; + bool fts_psort_initiated = false; + DBUG_ENTER("row_merge_build_indexes"); ut_ad(!srv_read_only_mode); ut_ad((old_table == new_table) == !col_map); @@ -3493,7 +3464,7 @@ row_merge_build_indexes( os_mem_alloc_large(&block_size)); if (block == NULL) { - return(DB_OUT_OF_MEMORY); + DBUG_RETURN(DB_OUT_OF_MEMORY); } trx_start_if_not_started_xa(trx); @@ -3501,6 +3472,14 @@ row_merge_build_indexes( merge_files = static_cast<merge_file_t*>( mem_alloc(n_indexes * sizeof *merge_files)); + /* Initialize all the merge file descriptors, so that we + don't call row_merge_file_destroy() on uninitialized + merge file descriptor */ + + for (i = 0; i < n_indexes; i++) { + merge_files[i].fd = -1; + } + for (i = 0; i < n_indexes; i++) { if (row_merge_file_create(&merge_files[i]) < 0) { error = DB_OUT_OF_MEMORY; @@ -3527,6 +3506,10 @@ row_merge_build_indexes( row_fts_psort_info_init( trx, dup, new_table, opt_doc_id_size, &psort_info, &merge_info); + + /* "We need to ensure that we free the resources + allocated */ + fts_psort_initiated = true; } } @@ -3565,41 +3548,16 @@ row_merge_build_indexes( if (indexes[i]->type & DICT_FTS) { os_event_t fts_parallel_merge_event; - bool all_exit = false; - ulint trial_count = 0; sort_idx = fts_sort_idx; - /* Now all children should complete, wait - a bit until they all finish using event */ - while (!all_exit && trial_count < 10000) { - all_exit = true; - - for (j = 0; j < fts_sort_pll_degree; - j++) { - if (psort_info[j].child_status - != FTS_CHILD_EXITING) { - all_exit = false; - os_thread_sleep(1000); - break; - } - } - trial_count++; - } - - if (!all_exit) { - ib_logf(IB_LOG_LEVEL_ERROR, - "Not all child sort threads exited" - " when creating FTS index '%s'", - indexes[i]->name); - } - fts_parallel_merge_event = merge_info[0].psort_common->merge_event; if (FTS_PLL_MERGE) { - trial_count = 0; - all_exit = false; + ulint trial_count = 0; + bool all_exit = false; + os_event_reset(fts_parallel_merge_event); row_fts_start_parallel_merge(merge_info); wait_again: @@ -3674,6 +3632,7 @@ wait_again: if (indexes[i]->type & DICT_FTS) { row_fts_psort_info_destroy(psort_info, merge_info); + fts_psort_initiated = false; } else if (error != DB_SUCCESS || !online) { /* Do not apply any online log. */ } else if (old_table != new_table) { @@ -3710,6 +3669,12 @@ func_exit: error = DB_TOO_MANY_CONCURRENT_TRXS; trx->error_state = error;); + if (fts_psort_initiated) { + /* Clean up FTS psort related resource */ + row_fts_psort_info_destroy(psort_info, merge_info); + fts_psort_initiated = false; + } + row_merge_file_destroy_low(tmpfd); for (i = 0; i < n_indexes; i++) { @@ -3763,5 +3728,5 @@ func_exit: } } - return(error); + DBUG_RETURN(error); } diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index d2315c6d0ca..2a60790f29c 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2013, 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 @@ -62,6 +62,7 @@ Created 9/17/2000 Heikki Tuuri #include "row0import.h" #include "m_string.h" #include "my_sys.h" +#include "ha_prototypes.h" /** Provide optional 4.x backwards compatibility for 5.0 and above */ UNIV_INTERN ibool row_rollback_on_timeout = FALSE; @@ -618,8 +619,8 @@ handle_new_error: case DB_INTERRUPTED: case DB_DICT_CHANGED: if (savept) { - /* Roll back the latest, possibly incomplete - insertion or update */ + /* Roll back the latest, possibly incomplete insertion + or update */ trx_rollback_to_savepoint(trx, savept); } @@ -2521,7 +2522,8 @@ row_table_add_foreign_constraints( if (err == DB_SUCCESS) { /* Check that also referencing constraints are ok */ - err = dict_load_foreigns(name, FALSE, TRUE); + err = dict_load_foreigns(name, NULL, false, true, + DICT_ERR_IGNORE_NONE); } if (err != DB_SUCCESS) { @@ -2801,7 +2803,7 @@ row_discard_tablespace_begin( name, TRUE, FALSE, DICT_ERR_IGNORE_NONE); if (table) { - dict_stats_wait_bg_to_stop_using_tables(table, NULL, trx); + dict_stats_wait_bg_to_stop_using_table(table, trx); ut_a(table->space != TRX_SYS_SPACE); ut_a(table->n_foreign_key_checks_running == 0); } @@ -2874,13 +2876,13 @@ row_discard_tablespace_end( } DBUG_EXECUTE_IF("ib_discard_before_commit_crash", - log_make_checkpoint_at(IB_ULONGLONG_MAX, TRUE); + log_make_checkpoint_at(LSN_MAX, TRUE); DBUG_SUICIDE();); trx_commit_for_mysql(trx); DBUG_EXECUTE_IF("ib_discard_after_commit_crash", - log_make_checkpoint_at(IB_ULONGLONG_MAX, TRUE); + log_make_checkpoint_at(LSN_MAX, TRUE); DBUG_SUICIDE();); row_mysql_unlock_data_dictionary(trx); @@ -3246,7 +3248,7 @@ row_truncate_table_for_mysql( ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ - dict_stats_wait_bg_to_stop_using_tables(table, NULL, trx); + dict_stats_wait_bg_to_stop_using_table(table, trx); /* Check if the table is referenced by foreign key constraints from some other table (not the table itself) */ @@ -3614,7 +3616,7 @@ next_rec: if (has_internal_doc_id && table->fts->cache) { table->fts->fts_status |= TABLE_DICT_LOCKED; fts_update_next_doc_id(trx, table, NULL, 0); - fts_cache_clear(table->fts->cache, TRUE); + fts_cache_clear(table->fts->cache); fts_cache_init(table->fts->cache); table->fts->fts_status &= ~TABLE_DICT_LOCKED; } @@ -3796,8 +3798,8 @@ row_drop_table_for_mysql( tables since we know temp tables do not use persistent stats. */ if (!dict_table_is_temporary(table)) { - dict_stats_wait_bg_to_stop_using_tables( - table, NULL, trx); + dict_stats_wait_bg_to_stop_using_table( + table, trx); } } @@ -4167,6 +4169,11 @@ check_next_foreign: DICT_TF2_FTS flag set. So keep this out of above dict_table_has_fts_index condition */ if (table->fts) { + /* Need to set TABLE_DICT_LOCKED bit, since + fts_que_graph_free_check_lock would try to acquire + dict mutex lock */ + table->fts->fts_status |= TABLE_DICT_LOCKED; + fts_free(table); } @@ -4503,14 +4510,31 @@ loop: } - if (row_is_mysql_tmp_table_name(table->name)) { - /* There could be an orphan temp table left from - interupted alter table rebuild operation */ - dict_table_close(table, TRUE, FALSE); - } else { - ut_a(!table->can_be_evicted || table->ibd_file_missing); + if (!row_is_mysql_tmp_table_name(table->name)) { + /* There could be orphan temp tables left from + interrupted alter table. Leave them, and handle + the rest.*/ + if (table->can_be_evicted) { + ib_logf(IB_LOG_LEVEL_WARN, + "Orphan table encountered during " + "DROP DATABASE. This is possible if " + "'%s.frm' was lost.", table->name); + } + + if (table->ibd_file_missing) { + ib_logf(IB_LOG_LEVEL_WARN, + "Missing %s.ibd file for table %s.", + table->name, table->name); + } } + dict_table_close(table, TRUE, FALSE); + + /* The dict_table_t object must not be accessed before + dict_table_open() or after dict_table_close(). But this is OK + if we are holding, the dict_sys->mutex. */ + ut_ad(mutex_own(&dict_sys->mutex)); + /* Wait until MySQL does not have any queries running on the table */ @@ -4668,6 +4692,7 @@ row_rename_table_for_mysql( ut_a(old_name != NULL); ut_a(new_name != NULL); + ut_ad(trx->state == TRX_STATE_ACTIVE); if (srv_created_new_raw || srv_force_recovery) { fputs("InnoDB: A new raw disk partition was initialized or\n" @@ -4692,7 +4717,6 @@ row_rename_table_for_mysql( } trx->op_info = "renaming table"; - trx_start_if_not_started_xa(trx); old_is_tmp = row_is_mysql_tmp_table_name(old_name); new_is_tmp = row_is_mysql_tmp_table_name(new_name); @@ -4945,6 +4969,24 @@ row_rename_table_for_mysql( } } + if (dict_table_has_fts_index(table) + && !dict_tables_have_same_db(old_name, new_name)) { + err = fts_rename_aux_tables(table, new_name, trx); + + if (err != DB_SUCCESS && (table->space != 0)) { + char* orig_name = table->name; + + /* If rename fails and table has its own tablespace, + we need to call fts_rename_aux_tables again to + revert the ibd file rename, which is not under the + control of trx. Also notice the parent table name + in cache is not changed yet. */ + table->name = const_cast<char*>(new_name); + fts_rename_aux_tables(table, old_name, trx); + table->name = orig_name; + } + } + end: if (err != DB_SUCCESS) { if (err == DB_DUPLICATE_KEY) { @@ -5003,7 +5045,9 @@ end: an ALTER, not in a RENAME. */ err = dict_load_foreigns( - new_name, FALSE, !old_is_tmp || trx->check_foreigns); + new_name, NULL, + false, !old_is_tmp || trx->check_foreigns, + DICT_ERR_IGNORE_NONE); if (err != DB_SUCCESS) { ut_print_timestamp(stderr); @@ -5052,7 +5096,6 @@ end: } funct_exit: - if (table != NULL) { dict_table_close(table, dict_locked, FALSE); } diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index ee603be453a..1b836c26c25 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, 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 @@ -112,28 +112,19 @@ row_purge_reposition_pcur( return(node->found_clust); } -/** Status of row_purge_remove_clust() */ -enum row_purge_status { - ROW_PURGE_DONE, /*!< The row has been removed. */ - ROW_PURGE_FAIL, /*!< The purge was not successful. */ - ROW_PURGE_SUSPEND/*!< Cannot purge now, due to online rebuild. */ -}; - /***********************************************************//** Removes a delete marked clustered index record if possible. -@retval ROW_PURGE_DONE if the row was not found, or it was successfully removed -@retval ROW_PURGE_FAIL if the row was modified after the delete marking -@retval ROW_PURGE_SUSPEND if the row refers to an off-page column and -an online ALTER TABLE (table rebuild) is in progress. */ +@retval true if the row was not found, or it was successfully removed +@retval false if the row was modified after the delete marking */ static __attribute__((nonnull, warn_unused_result)) -enum row_purge_status +bool row_purge_remove_clust_if_poss_low( /*===============================*/ purge_node_t* node, /*!< in/out: row purge node */ ulint mode) /*!< in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE */ { dict_index_t* index; - enum row_purge_status status = ROW_PURGE_DONE; + bool success = true; mtr_t mtr; rec_t* rec; mem_heap_t* heap = NULL; @@ -165,16 +156,9 @@ row_purge_remove_clust_if_poss_low( goto func_exit; } - if (dict_index_get_online_status(index) == ONLINE_INDEX_CREATION - && rec_offs_any_extern(offsets)) { - status = ROW_PURGE_SUSPEND; - goto func_exit; - } - if (mode == BTR_MODIFY_LEAF) { - status = btr_cur_optimistic_delete( - btr_pcur_get_btr_cur(&node->pcur), 0, &mtr) - ? ROW_PURGE_DONE : ROW_PURGE_FAIL; + success = btr_cur_optimistic_delete( + btr_pcur_get_btr_cur(&node->pcur), 0, &mtr); } else { dberr_t err; ut_ad(mode == BTR_MODIFY_TREE); @@ -186,7 +170,7 @@ row_purge_remove_clust_if_poss_low( case DB_SUCCESS: break; case DB_OUT_OF_FILE_SPACE: - status = ROW_PURGE_FAIL; + success = false; break; default: ut_error; @@ -200,43 +184,34 @@ func_exit: btr_pcur_commit_specify_mtr(&node->pcur, &mtr); - return(status); + return(success); } /***********************************************************//** Removes a clustered index record if it has not been modified after the delete marking. @retval true if the row was not found, or it was successfully removed -@retval false the purge needs to be suspended, either because of -running out of file space or because the row refers to an off-page -column and an online ALTER TABLE (table rebuild) is in progress. */ +@retval false the purge needs to be suspended because of running out +of file space. */ static __attribute__((nonnull, warn_unused_result)) bool row_purge_remove_clust_if_poss( /*===========================*/ purge_node_t* node) /*!< in/out: row purge node */ { - switch (row_purge_remove_clust_if_poss_low(node, BTR_MODIFY_LEAF)) { - case ROW_PURGE_DONE: + if (row_purge_remove_clust_if_poss_low(node, BTR_MODIFY_LEAF)) { return(true); - case ROW_PURGE_SUSPEND: - return(false); - case ROW_PURGE_FAIL: - break; } for (ulint n_tries = 0; n_tries < BTR_CUR_RETRY_DELETE_N_TIMES; n_tries++) { - switch (row_purge_remove_clust_if_poss_low( - node, BTR_MODIFY_TREE)) { - case ROW_PURGE_DONE: + if (row_purge_remove_clust_if_poss_low( + node, BTR_MODIFY_TREE)) { return(true); - case ROW_PURGE_SUSPEND: - return(false); - case ROW_PURGE_FAIL: - os_thread_sleep(BTR_CUR_RETRY_SLEEP_TIME); } + + os_thread_sleep(BTR_CUR_RETRY_SLEEP_TIME); } return(false); @@ -529,9 +504,8 @@ retry: /***********************************************************//** Purges a delete marking of a record. @retval true if the row was not found, or it was successfully removed -@retval false the purge needs to be suspended, either because of -running out of file space or because the row refers to an off-page -column and an online ALTER TABLE (table rebuild) is in progress. */ +@retval false the purge needs to be suspended because of +running out of file space */ static __attribute__((nonnull, warn_unused_result)) bool row_purge_del_mark( @@ -567,10 +541,9 @@ row_purge_del_mark( /***********************************************************//** Purges an update of an existing record. Also purges an update of a delete -marked record if that record contained an externally stored field. -@return true if purged, false if skipped */ -static __attribute__((nonnull, warn_unused_result)) -bool +marked record if that record contained an externally stored field. */ +static +void row_purge_upd_exist_or_extern_func( /*===============================*/ #ifdef UNIV_DEBUG @@ -585,20 +558,6 @@ row_purge_upd_exist_or_extern_func( ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_SHARED)); #endif /* UNIV_SYNC_DEBUG */ - if (dict_index_get_online_status(dict_table_get_first_index( - node->table)) - == ONLINE_INDEX_CREATION) { - for (ulint i = 0; i < upd_get_n_fields(node->update); i++) { - - const upd_field_t* ufield - = upd_get_nth_field(node->update, i); - - if (dfield_is_ext(&ufield->new_val)) { - return(false); - } - } - } - if (node->rec_type == TRX_UNDO_UPD_DEL_REC || (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) { @@ -675,16 +634,7 @@ skip_secondaries: index = dict_table_get_first_index(node->table); mtr_x_lock(dict_index_get_lock(index), &mtr); -#ifdef UNIV_DEBUG - switch (dict_index_get_online_status(index)) { - case ONLINE_INDEX_CREATION: - case ONLINE_INDEX_ABORTED_DROPPED: - ut_ad(0); - case ONLINE_INDEX_COMPLETE: - case ONLINE_INDEX_ABORTED: - break; - } -#endif /* UNIV_DEBUG */ + /* NOTE: we must also acquire an X-latch to the root page of the tree. We will need it when we free pages from the tree. If the tree is of height 1, @@ -714,8 +664,6 @@ skip_secondaries: mtr_commit(&mtr); } } - - return(true); } #ifdef UNIV_DEBUG @@ -771,7 +719,8 @@ row_purge_parse_undo_rec( rw_lock_s_lock_inline(&dict_operation_lock, 0, __FILE__, __LINE__); - node->table = dict_table_open_on_id(table_id, FALSE, FALSE); + node->table = dict_table_open_on_id( + table_id, FALSE, DICT_TABLE_OP_NORMAL); if (node->table == NULL) { /* The table has been dropped: no need to do purge */ @@ -866,10 +815,7 @@ row_purge_record_func( } /* fall through */ case TRX_UNDO_UPD_EXIST_REC: - purged = row_purge_upd_exist_or_extern(thr, node, undo_rec); - if (!purged) { - break; - } + row_purge_upd_exist_or_extern(thr, node, undo_rec); MONITOR_INC(MONITOR_N_UPD_EXIST_EXTERN); break; } diff --git a/storage/innobase/row/row0quiesce.cc b/storage/innobase/row/row0quiesce.cc index 72e0bf43d77..a59a6088ad6 100644 --- a/storage/innobase/row/row0quiesce.cc +++ b/storage/innobase/row/row0quiesce.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2013, 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 @@ -532,10 +532,11 @@ row_quiesce_table_start( ut_a(table->id > 0); - ulint count = 0; - - while (ibuf_contract_in_background(table->id, TRUE) != 0) { - if (!(++count % 20)) { + for (ulint count = 0; + ibuf_contract_in_background(table->id, TRUE) != 0 + && !trx_is_interrupted(trx); + ++count) { + if (!(count % 20)) { ib_logf(IB_LOG_LEVEL_INFO, "Merging change buffer entries for '%s'", table_name); @@ -610,7 +611,7 @@ row_quiesce_table_complete( srv_get_meta_data_filename(table, cfg_name, sizeof(cfg_name)); - os_file_delete_if_exists(cfg_name); + os_file_delete_if_exists(innodb_file_data_key, cfg_name); ib_logf(IB_LOG_LEVEL_INFO, "Deleting the meta-data file '%s'", cfg_name); diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index cd98d13082b..09cf75c1050 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -57,6 +57,8 @@ Created 12/19/1997 Heikki Tuuri #include "read0read.h" #include "buf0lru.h" #include "ha_prototypes.h" +#include "m_string.h" /* for my_sys.h */ +#include "my_sys.h" /* DEBUG_SYNC_C */ #include "my_compare.h" /* enum icp_result */ @@ -2957,9 +2959,7 @@ row_sel_store_mysql_rec( && dict_index_is_clust(index)) { prebuilt->fts_doc_id = fts_get_doc_id_from_rec( - prebuilt->table, - rec, - prebuilt->heap); + prebuilt->table, rec, NULL); } return(TRUE); @@ -3219,48 +3219,78 @@ sel_restore_position_for_mysql( mtr_t* mtr) /*!< in: mtr; CAUTION: may commit mtr temporarily! */ { - ibool success; - ulint relative_position; - - relative_position = pcur->rel_pos; + ibool success; success = btr_pcur_restore_position(latch_mode, pcur, mtr); *same_user_rec = success; - if (relative_position == BTR_PCUR_ON) { - if (success) { - return(FALSE); - } - - if (moves_up) { - btr_pcur_move_to_next(pcur, mtr); - } - - return(TRUE); + ut_ad(!success || pcur->rel_pos == BTR_PCUR_ON); +#ifdef UNIV_DEBUG + if (pcur->pos_state == BTR_PCUR_IS_POSITIONED_OPTIMISTIC) { + ut_ad(pcur->rel_pos == BTR_PCUR_BEFORE + || pcur->rel_pos == BTR_PCUR_AFTER); + } else { + ut_ad(pcur->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad((pcur->rel_pos == BTR_PCUR_ON) + == btr_pcur_is_on_user_rec(pcur)); } +#endif - if (relative_position == BTR_PCUR_AFTER - || relative_position == BTR_PCUR_AFTER_LAST_IN_TREE) { + /* The position may need be adjusted for rel_pos and moves_up. */ - if (moves_up) { + switch (pcur->rel_pos) { + case BTR_PCUR_ON: + if (!success && moves_up) { +next: + btr_pcur_move_to_next(pcur, mtr); return(TRUE); } - - if (btr_pcur_is_on_user_rec(pcur)) { + return(!success); + case BTR_PCUR_AFTER_LAST_IN_TREE: + case BTR_PCUR_BEFORE_FIRST_IN_TREE: + return(TRUE); + case BTR_PCUR_AFTER: + /* positioned to record after pcur->old_rec. */ + pcur->pos_state = BTR_PCUR_IS_POSITIONED; +prev: + if (btr_pcur_is_on_user_rec(pcur) && !moves_up) { btr_pcur_move_to_prev(pcur, mtr); } - return(TRUE); + case BTR_PCUR_BEFORE: + /* For non optimistic restoration: + The position is now set to the record before pcur->old_rec. + + For optimistic restoration: + The position also needs to take the previous search_mode into + consideration. */ + + switch (pcur->pos_state) { + case BTR_PCUR_IS_POSITIONED_OPTIMISTIC: + pcur->pos_state = BTR_PCUR_IS_POSITIONED; + if (pcur->search_mode == PAGE_CUR_GE) { + /* Positioned during Greater or Equal search + with BTR_PCUR_BEFORE. Optimistic restore to + the same record. If scanning for lower then + we must move to previous record. + This can happen with: + HANDLER READ idx a = (const); + HANDLER READ idx PREV; */ + goto prev; + } + return(TRUE); + case BTR_PCUR_IS_POSITIONED: + if (moves_up && btr_pcur_is_on_user_rec(pcur)) { + goto next; + } + return(TRUE); + case BTR_PCUR_WAS_POSITIONED: + case BTR_PCUR_NOT_POSITIONED: + break; + } } - - ut_ad(relative_position == BTR_PCUR_BEFORE - || relative_position == BTR_PCUR_BEFORE_FIRST_IN_TREE); - - if (moves_up && btr_pcur_is_on_user_rec(pcur)) { - btr_pcur_move_to_next(pcur, mtr); - } - + ut_ad(0); return(TRUE); } @@ -4154,7 +4184,9 @@ wait_table_again: } rec_loop: + DEBUG_SYNC_C("row_search_rec_loop"); if (trx_is_interrupted(trx)) { + btr_pcur_store_position(pcur, &mtr); err = DB_INTERRUPTED; goto normal_return; } @@ -4356,6 +4388,14 @@ wrong_offs: btr_pcur_store_position(pcur, &mtr); + /* The found record was not a match, but may be used + as NEXT record (index_next). Set the relative position + to BTR_PCUR_BEFORE, to reflect that the position of + the persistent cursor is before the found/stored row + (pcur->old_rec). */ + ut_ad(pcur->rel_pos == BTR_PCUR_ON); + pcur->rel_pos = BTR_PCUR_BEFORE; + err = DB_RECORD_NOT_FOUND; #if 0 ut_print_name(stderr, trx, FALSE, index->name); @@ -4397,6 +4437,14 @@ wrong_offs: btr_pcur_store_position(pcur, &mtr); + /* The found record was not a match, but may be used + as NEXT record (index_next). Set the relative position + to BTR_PCUR_BEFORE, to reflect that the position of + the persistent cursor is before the found/stored row + (pcur->old_rec). */ + ut_ad(pcur->rel_pos == BTR_PCUR_ON); + pcur->rel_pos = BTR_PCUR_BEFORE; + err = DB_RECORD_NOT_FOUND; #if 0 ut_print_name(stderr, trx, FALSE, index->name); @@ -5099,6 +5147,7 @@ normal_return: pre-fetch queue, but we definitely wrote to the record buffer passed to use by MySQL. */ + DEBUG_SYNC_C("row_search_cached_row"); err = DB_SUCCESS; } @@ -5333,7 +5382,7 @@ row_search_max_autoinc( btr_pcur_open_at_index_side( false, index, BTR_SEARCH_LEAF, &pcur, true, 0, &mtr); - if (page_get_n_recs(btr_pcur_get_page(&pcur)) > 0) { + if (!page_is_empty(btr_pcur_get_page(&pcur))) { const rec_t* rec; rec = row_search_autoinc_get_rec(&pcur, &mtr); diff --git a/storage/innobase/row/row0uins.cc b/storage/innobase/row/row0uins.cc index 27881c1f4c3..7b50d8b62ae 100644 --- a/storage/innobase/row/row0uins.cc +++ b/storage/innobase/row/row0uins.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, 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 @@ -79,12 +79,11 @@ row_undo_ins_remove_clust_rec( mtr_start(&mtr); - /* This is similar to row_undo_mod_clust(). Even though we - call row_log_table_rollback() elsewhere, the DDL thread may - already have copied this row to the sort buffers or to the new - table. We must log the removal, so that the row will be - correctly purged. However, we can log the removal out of sync - with the B-tree modification. */ + /* This is similar to row_undo_mod_clust(). The DDL thread may + already have copied this row from the log to the new table. + We must log the removal, so that the row will be correctly + purged. However, we can log the removal out of sync with the + B-tree modification. */ online = dict_index_is_online_ddl(index); if (online) { @@ -111,9 +110,7 @@ row_undo_ins_remove_clust_rec( const ulint* offsets = rec_get_offsets( rec, index, NULL, ULINT_UNDEFINED, &heap); row_log_table_delete( - rec, index, offsets, - trx_read_trx_id(row_get_trx_id_offset(index, offsets) - + rec)); + rec, index, offsets, true, node->trx->id); mem_heap_free(heap); } @@ -319,7 +316,8 @@ row_undo_ins_parse_undo_rec( node->rec_type = type; node->update = NULL; - node->table = dict_table_open_on_id(table_id, dict_locked, FALSE); + node->table = dict_table_open_on_id( + table_id, dict_locked, DICT_TABLE_OP_NORMAL); /* Skip the UNDO if we can't find the table or the .ibd file. */ if (UNIV_UNLIKELY(node->table == NULL)) { @@ -441,14 +439,6 @@ row_undo_ins( node->index = dict_table_get_first_index(node->table); ut_ad(dict_index_is_clust(node->index)); - - if (dict_index_is_online_ddl(node->index)) { - /* Note that we are rolling back this transaction, so - that all inserts and updates with this DB_TRX_ID can - be skipped. */ - row_log_table_rollback(node->index, node->trx->id); - } - /* Skip the clustered index (the first index) */ node->index = dict_table_get_next_index(node->index); diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc index 2fd8a11b35a..efcd63a4d29 100644 --- a/storage/innobase/row/row0umod.cc +++ b/storage/innobase/row/row0umod.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, 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 @@ -208,6 +208,36 @@ row_undo_mod_remove_clust_low( return(DB_SUCCESS); } + trx_id_offset = btr_cur_get_index(btr_cur)->trx_id_offset; + + if (!trx_id_offset) { + mem_heap_t* heap = NULL; + ulint trx_id_col; + const ulint* offsets; + ulint len; + + trx_id_col = dict_index_get_sys_col_pos( + btr_cur_get_index(btr_cur), DATA_TRX_ID); + ut_ad(trx_id_col > 0); + ut_ad(trx_id_col != ULINT_UNDEFINED); + + offsets = rec_get_offsets( + btr_cur_get_rec(btr_cur), btr_cur_get_index(btr_cur), + NULL, trx_id_col + 1, &heap); + + trx_id_offset = rec_get_nth_field_offs( + offsets, trx_id_col, &len); + ut_ad(len == DATA_TRX_ID_LEN); + mem_heap_free(heap); + } + + if (trx_read_trx_id(btr_cur_get_rec(btr_cur) + trx_id_offset) + != node->new_trx_id) { + /* The record must have been purged and then replaced + with a different one. */ + return(DB_SUCCESS); + } + /* We are about to remove an old, delete-marked version of the record that may have been delete-marked by a different transaction than the rolling-back one. */ @@ -323,7 +353,7 @@ row_undo_mod_clust( case TRX_UNDO_UPD_DEL_REC: row_log_table_delete( btr_pcur_get_rec(pcur), index, offsets, - node->trx->id); + true, node->trx->id); break; default: ut_ad(0); @@ -331,6 +361,9 @@ row_undo_mod_clust( } } + ut_ad(rec_get_trx_id(btr_pcur_get_rec(pcur), index) + == node->new_trx_id); + btr_pcur_commit_specify_mtr(pcur, &mtr); if (err == DB_SUCCESS && node->rec_type == TRX_UNDO_UPD_DEL_REC) { @@ -1044,7 +1077,8 @@ row_undo_mod_parse_undo_rec( &dummy_extern, &undo_no, &table_id); node->rec_type = type; - node->table = dict_table_open_on_id(table_id, dict_locked, FALSE); + node->table = dict_table_open_on_id( + table_id, dict_locked, DICT_TABLE_OP_NORMAL); /* TODO: other fixes associated with DROP TABLE + rollback in the same table by another user */ @@ -1119,14 +1153,6 @@ row_undo_mod( node->index = dict_table_get_first_index(node->table); ut_ad(dict_index_is_clust(node->index)); - - if (dict_index_is_online_ddl(node->index)) { - /* Note that we are rolling back this transaction, so - that all inserts and updates with this DB_TRX_ID can - be skipped. */ - row_log_table_rollback(node->index, node->trx->id); - } - /* Skip the clustered index (the first index) */ node->index = dict_table_get_next_index(node->index); diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index 5d236cc40e5..eb5d9e5feb6 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2717,6 +2717,10 @@ row_upd_clust_step( } } + ut_ad(lock_trx_has_rec_x_lock(thr_get_trx(thr), index->table, + btr_pcur_get_block(pcur), + page_rec_get_heap_no(rec))); + /* NOTE: the following function calls will also commit mtr */ if (node->is_delete) { diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc index 3b3da2f070f..ea346566e57 100644 --- a/storage/innobase/srv/srv0mon.cc +++ b/storage/innobase/srv/srv0mon.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2010, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -325,6 +325,11 @@ static monitor_info_t innodb_counter_info[] = MONITOR_SET_MEMBER, MONITOR_FLUSH_BATCH_SCANNED, MONITOR_FLUSH_BATCH_SCANNED_PER_CALL}, + {"buffer_flush_batch_rescan", "buffer", + "Number of times rescan of flush list forced", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_FLUSH_HP_RESCAN}, + /* Cumulative counter for pages flushed in flush batches */ {"buffer_flush_batch_total_pages", "buffer", "Total pages flushed as part of flush batch", @@ -387,7 +392,6 @@ static monitor_info_t innodb_counter_info[] = MONITOR_NONE, MONITOR_DEFAULT_START, MONITOR_FLUSH_SYNC_WAITS}, - /* Cumulative counter for flush batches for adaptive flushing */ {"buffer_flush_adaptive_total_pages", "buffer", "Total pages flushed as part of adaptive flushing", @@ -880,13 +884,33 @@ static monitor_info_t innodb_counter_info[] = MONITOR_MODULE, MONITOR_DEFAULT_START, MONITOR_MODULE_INDEX}, - {"index_splits", "index", "Number of index splits", + {"index_page_splits", "index", "Number of index page splits", MONITOR_NONE, MONITOR_DEFAULT_START, MONITOR_INDEX_SPLIT}, - {"index_merges", "index", "Number of index merges", + {"index_page_merge_attempts", "index", + "Number of index page merge attempts", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_INDEX_MERGE_ATTEMPTS}, + + {"index_page_merge_successful", "index", + "Number of successful index page merges", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_INDEX_MERGE_SUCCESSFUL}, + + {"index_page_reorg_attempts", "index", + "Number of index page reorganization attempts", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_INDEX_REORG_ATTEMPTS}, + + {"index_page_reorg_successful", "index", + "Number of successful index page reorganizations", MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_INDEX_MERGE}, + MONITOR_DEFAULT_START, MONITOR_INDEX_REORG_SUCCESSFUL}, + + {"index_page_discards", "index", "Number of index pages discarded", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_INDEX_DISCARD}, /* ========== Counters for Adaptive Hash Index ========== */ {"module_adaptive_hash", "adaptive_hash_index", "Adpative Hash Index", @@ -1616,7 +1640,7 @@ srv_mon_process_existing_counter( break; case MONITOR_OVLD_RWLOCK_X_SPIN_WAITS: - value = rw_lock_stats.rw_x_os_wait_count; + value = rw_lock_stats.rw_x_spin_wait_count; break; case MONITOR_OVLD_RWLOCK_S_SPIN_ROUNDS: diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 874fdd3d444..15730b4f00a 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. @@ -1475,20 +1475,30 @@ srv_export_innodb_status(void) export_vars.innodb_available_undo_logs = srv_available_undo_logs; #ifdef UNIV_DEBUG - if (purge_sys->done.trx_no == 0 - || trx_sys->rw_max_trx_id < purge_sys->done.trx_no - 1) { + rw_lock_s_lock(&purge_sys->latch); + trx_id_t done_trx_no = purge_sys->done.trx_no; + trx_id_t up_limit_id = purge_sys->view + ? purge_sys->view->up_limit_id + : 0; + rw_lock_s_unlock(&purge_sys->latch); + + mutex_enter(&trx_sys->mutex); + trx_id_t max_trx_id = trx_sys->rw_max_trx_id; + mutex_exit(&trx_sys->mutex); + + if (!done_trx_no || max_trx_id < done_trx_no - 1) { export_vars.innodb_purge_trx_id_age = 0; } else { export_vars.innodb_purge_trx_id_age = - trx_sys->rw_max_trx_id - purge_sys->done.trx_no + 1; + (ulint) (max_trx_id - done_trx_no + 1); } - if (!purge_sys->view - || trx_sys->rw_max_trx_id < purge_sys->view->up_limit_id) { + if (!up_limit_id + || max_trx_id < up_limit_id) { export_vars.innodb_purge_view_trx_id_age = 0; } else { export_vars.innodb_purge_view_trx_id_age = - trx_sys->rw_max_trx_id - purge_sys->view->up_limit_id; + (ulint) (max_trx_id - up_limit_id); } #endif /* UNIV_DEBUG */ @@ -2590,7 +2600,9 @@ srv_do_purge( } do { - if (trx_sys->rseg_history_len > rseg_history_len) { + if (trx_sys->rseg_history_len > rseg_history_len + || (srv_max_purge_lag > 0 + && rseg_history_len > srv_max_purge_lag)) { /* History length is now longer than what it was when we took the last snapshot. Use more threads. */ @@ -2626,7 +2638,8 @@ srv_do_purge( if (!(count++ % TRX_SYS_N_RSEGS)) { /* Force a truncate of the history list. */ - trx_purge(1, srv_purge_batch_size, true); + n_pages_purged += trx_purge( + 1, srv_purge_batch_size, true); } *n_total_purged += n_pages_purged; @@ -2655,9 +2668,10 @@ srv_purge_coordinator_suspend( /** Maximum wait time on the purge event, in micro-seconds. */ static const ulint SRV_PURGE_MAX_TIMEOUT = 10000; + ib_int64_t sig_count = srv_suspend_thread(slot); + do { ulint ret; - ib_int64_t sig_count = srv_suspend_thread(slot); rw_lock_x_lock(&purge_sys->latch); @@ -2694,6 +2708,8 @@ srv_purge_coordinator_suspend( srv_sys_mutex_exit(); + sig_count = srv_suspend_thread(slot); + rw_lock_x_lock(&purge_sys->latch); stop = (purge_sys->state == PURGE_STATE_STOP); @@ -2727,7 +2743,15 @@ srv_purge_coordinator_suspend( } while (stop); - ut_a(!slot->suspended); + srv_sys_mutex_enter(); + + if (slot->suspended) { + slot->suspended = FALSE; + ++srv_sys->n_threads_active[slot->type]; + ut_a(srv_sys->n_threads_active[slot->type] == 1); + } + + srv_sys_mutex_exit(); } /*********************************************************************//** diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index efe9f094c0d..00604a896ca 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2009, Percona Inc. @@ -38,6 +38,9 @@ Starts the InnoDB database server Created 2/16/1996 Heikki Tuuri *************************************************************************/ +#include "mysqld.h" +#include "pars0pars.h" +#include "row0ftsort.h" #include "ut0mem.h" #include "mem0mem.h" #include "data0data.h" @@ -220,9 +223,9 @@ srv_file_check_mode( ib_logf(IB_LOG_LEVEL_ERROR, "%s can't be opened in %s mode", + name, srv_read_only_mode - ? "read-write" : "read", - name); + ? "read" : "read-write"); return(false); } @@ -522,7 +525,13 @@ create_log_file( *file = os_file_create( innodb_file_log_key, name, - OS_FILE_CREATE, OS_FILE_NORMAL, OS_LOG_FILE, &ret); + OS_FILE_CREATE|OS_FILE_ON_ERROR_NO_EXIT, OS_FILE_NORMAL, + OS_LOG_FILE, &ret); + + if (!ret) { + ib_logf(IB_LOG_LEVEL_ERROR, "Cannot create %s", name); + return(DB_ERROR); + } ib_logf(IB_LOG_LEVEL_INFO, "Setting log file %s size to %lu MB", @@ -533,7 +542,9 @@ create_log_file( (os_offset_t) srv_log_file_size << UNIV_PAGE_SIZE_SHIFT); if (!ret) { - ib_logf(IB_LOG_LEVEL_ERROR, "Error in creating %s", name); + ib_logf(IB_LOG_LEVEL_ERROR, "Cannot set log file" + " %s to size %lu MB", name, (ulong) srv_log_file_size + >> (20 - UNIV_PAGE_SIZE_SHIFT)); return(DB_ERROR); } @@ -566,6 +577,8 @@ static dberr_t create_log_files( /*=============*/ + bool create_new_db, /*!< in: TRUE if new database is being + created */ char* logfilename, /*!< in/out: buffer for log file name */ size_t dirnamelen, /*!< in: length of the directory path */ lsn_t lsn, /*!< in: FIL_PAGE_FILE_FLUSH_LSN value */ @@ -577,23 +590,28 @@ create_log_files( return(DB_READ_ONLY); } - /* Remove any old log files. */ - for (unsigned i = 0; i <= INIT_LOG_FILE0; i++) { - sprintf(logfilename + dirnamelen, "ib_logfile%u", i); + /* We prevent system tablespace creation with existing files in + data directory. So we do not delete log files when creating new system + tablespace */ + if (!create_new_db) { + /* Remove any old log files. */ + for (unsigned i = 0; i <= INIT_LOG_FILE0; i++) { + sprintf(logfilename + dirnamelen, "ib_logfile%u", i); - /* Ignore errors about non-existent files or files - that cannot be removed. The create_log_file() will - return an error when the file exists. */ + /* Ignore errors about non-existent files or files + that cannot be removed. The create_log_file() will + return an error when the file exists. */ #ifdef __WIN__ - DeleteFile((LPCTSTR) logfilename); + DeleteFile((LPCTSTR) logfilename); #else - unlink(logfilename); + unlink(logfilename); #endif - /* Crashing after deleting the first - file should be recoverable. The buffer - pool was clean, and we can simply create - all log files from the scratch. */ - RECOVERY_CRASH(6); + /* Crashing after deleting the first + file should be recoverable. The buffer + pool was clean, and we can simply create + all log files from the scratch. */ + RECOVERY_CRASH(6); + } } ut_ad(!buf_pool_check_no_pending_io()); @@ -866,6 +884,7 @@ open_or_create_data_files( } if (ret == FALSE) { + const char* check_msg; /* We open the data file */ if (one_created) { @@ -961,13 +980,20 @@ size_check: return(DB_ERROR); } skip_size_check: - fil_read_first_page( + check_msg = fil_read_first_page( files[i], one_opened, &flags, &space, #ifdef UNIV_LOG_ARCHIVE min_arch_log_no, max_arch_log_no, #endif /* UNIV_LOG_ARCHIVE */ min_flushed_lsn, max_flushed_lsn); + if (check_msg) { + ib_logf(IB_LOG_LEVEL_ERROR, + "%s in data file %s", + check_msg, name); + return(DB_ERROR); + } + /* The first file of the system tablespace must have space ID = TRX_SYS_SPACE. The FSP_SPACE_ID field in files greater than ibdata1 are unreliable. */ @@ -1083,19 +1109,25 @@ srv_undo_tablespace_create( if (srv_read_only_mode && ret) { ib_logf(IB_LOG_LEVEL_INFO, "%s opened in read-only mode", name); - } else if (ret == FALSE - && os_file_get_last_error(false) != OS_FILE_ALREADY_EXISTS + } else if (ret == FALSE) { + if (os_file_get_last_error(false) != OS_FILE_ALREADY_EXISTS #ifdef UNIV_AIX - /* AIX 5.1 after security patch ML7 may have - errno set to 0 here, which causes our function - to return 100; work around that AIX problem */ - && os_file_get_last_error(false) != 100 + /* AIX 5.1 after security patch ML7 may have + errno set to 0 here, which causes our function + to return 100; work around that AIX problem */ + && os_file_get_last_error(false) != 100 #endif /* UNIV_AIX */ ) { - - ib_logf(IB_LOG_LEVEL_ERROR, - "Can't create UNDO tablespace %s", name); - + ib_logf(IB_LOG_LEVEL_ERROR, + "Can't create UNDO tablespace %s", name); + } else { + ib_logf(IB_LOG_LEVEL_ERROR, + "Creating system tablespace with" + " existing undo tablespaces is not" + " supported. Please delete all undo" + " tablespaces before creating new" + " system tablespace."); + } err = DB_ERROR; } else { ut_a(!srv_read_only_mode); @@ -1455,10 +1487,15 @@ innobase_start_or_create_for_mysql(void) ulint io_limit; mtr_t mtr; ib_bh_t* ib_bh; + ulint n_recovered_trx; char logfilename[10000]; char* logfile0 = NULL; size_t dirnamelen; + if (srv_force_recovery > SRV_FORCE_NO_TRX_UNDO) { + srv_read_only_mode = true; + } + if (srv_read_only_mode) { ib_logf(IB_LOG_LEVEL_INFO, "Started in read only mode"); } @@ -1579,10 +1616,6 @@ innobase_start_or_create_for_mysql(void) #endif /* UNIV_ZIP_COPY */ - ib_logf(IB_LOG_LEVEL_INFO, - "CPU %s crc32 instructions", - ut_crc32_sse2_enabled ? "supports" : "does not support"); - /* Since InnoDB does not currently clean up all its internal data structures in MySQL Embedded Server Library server_end(), we print an error message if someone tries to start up InnoDB a @@ -1702,27 +1735,42 @@ innobase_start_or_create_for_mysql(void) maximum number of threads that can wait in the 'srv_conc array' for their time to enter InnoDB. */ - if (srv_buf_pool_size >= 1000 * 1024 * 1024) { - /* If buffer pool is less than 1000 MB, - assume fewer threads. Also use only one - buffer pool instance */ - srv_max_n_threads = 50000; - - } else if (srv_buf_pool_size >= 8 * 1024 * 1024) { - +#define BUF_POOL_SIZE_THRESHOLD (1024 * 1024 * 1024) + srv_max_n_threads = 1 /* io_ibuf_thread */ + + 1 /* io_log_thread */ + + 1 /* lock_wait_timeout_thread */ + + 1 /* srv_error_monitor_thread */ + + 1 /* srv_monitor_thread */ + + 1 /* srv_master_thread */ + + 1 /* srv_purge_coordinator_thread */ + + 1 /* buf_dump_thread */ + + 1 /* dict_stats_thread */ + + 1 /* fts_optimize_thread */ + + 1 /* recv_writer_thread */ + + 1 /* buf_flush_page_cleaner_thread */ + + 1 /* trx_rollback_or_clean_all_recovered */ + + 128 /* added as margin, for use of + InnoDB Memcached etc. */ + + max_connections + + srv_n_read_io_threads + + srv_n_write_io_threads + + srv_n_purge_threads + /* FTS Parallel Sort */ + + fts_sort_pll_degree * FTS_NUM_AUX_INDEX + * max_connections; + + if (srv_buf_pool_size < BUF_POOL_SIZE_THRESHOLD) { + /* If buffer pool is less than 1 GB, + use only one buffer pool instance */ srv_buf_pool_instances = 1; - srv_max_n_threads = 10000; - } else { - srv_buf_pool_instances = 1; - - /* Saves several MB of memory, especially in - 64-bit computers */ - - srv_max_n_threads = 1000; } srv_boot(); + ib_logf(IB_LOG_LEVEL_INFO, + "%s CPU crc32 instructions", + ut_crc32_sse2_enabled ? "Using" : "Not using"); + if (!srv_read_only_mode) { mutex_create(srv_monitor_file_mutex_key, @@ -1876,7 +1924,7 @@ innobase_start_or_create_for_mysql(void) /* Create i/o-handler threads: */ - for (ulint i = 0; i < srv_n_file_io_threads; ++i) { + for (i = 0; i < srv_n_file_io_threads; ++i) { n[i] = i; @@ -2004,7 +2052,7 @@ innobase_start_or_create_for_mysql(void) buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST); - err = create_log_files(logfilename, dirnamelen, + err = create_log_files(create_new_db, logfilename, dirnamelen, max_flushed_lsn, logfile0); if (err != DB_SUCCESS) { @@ -2049,8 +2097,9 @@ innobase_start_or_create_for_mysql(void) } err = create_log_files( - logfilename, dirnamelen, - max_flushed_lsn, logfile0); + create_new_db, logfilename, + dirnamelen, max_flushed_lsn, + logfile0); if (err != DB_SUCCESS) { return(err); @@ -2201,6 +2250,7 @@ files_checked: trx_sys_create_sys_pages(); ib_bh = trx_sys_init_at_db_start(); + n_recovered_trx = UT_LIST_GET_LEN(trx_sys->rw_trx_list); /* The purge system needs to create the purge view and therefore requires that the trx_sys is inited. */ @@ -2252,6 +2302,7 @@ files_checked: } ib_bh = trx_sys_init_at_db_start(); + n_recovered_trx = UT_LIST_GET_LEN(trx_sys->rw_trx_list); /* The purge system needs to create the purge view and therefore requires that the trx_sys is inited. */ @@ -2294,7 +2345,7 @@ files_checked: been shut down normally: this is the normal startup path */ err = recv_recovery_from_checkpoint_start( - LOG_CHECKPOINT, IB_ULONGLONG_MAX, + LOG_CHECKPOINT, LSN_MAX, min_flushed_lsn, max_flushed_lsn); if (err != DB_SUCCESS) { @@ -2315,6 +2366,7 @@ files_checked: } ib_bh = trx_sys_init_at_db_start(); + n_recovered_trx = UT_LIST_GET_LEN(trx_sys->rw_trx_list); /* The purge system needs to create the purge view and therefore requires that the trx_sys is inited. */ @@ -2342,9 +2394,17 @@ files_checked: an .ibd file. We also determine the maximum tablespace id used. */ + dict_check_t dict_check; + + if (recv_needed_recovery) { + dict_check = DICT_CHECK_ALL_LOADED; + } else if (n_recovered_trx) { + dict_check = DICT_CHECK_SOME_LOADED; + } else { + dict_check = DICT_CHECK_NONE_LOADED; + } - dict_check_tablespaces_and_store_max_id( - recv_needed_recovery); + dict_check_tablespaces_and_store_max_id(dict_check); } if (!srv_force_recovery @@ -2420,8 +2480,9 @@ files_checked: srv_log_file_size = srv_log_file_size_requested; - err = create_log_files(logfilename, dirnamelen, - max_flushed_lsn, logfile0); + err = create_log_files(create_new_db, logfilename, + dirnamelen, max_flushed_lsn, + logfile0); if (err != DB_SUCCESS) { return(err); @@ -2511,12 +2572,18 @@ files_checked: srv_undo_tablespaces, srv_undo_logs); if (srv_available_undo_logs == ULINT_UNDEFINED) { - /* Can only happen if force recovery is set. */ - ut_a(srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO - || srv_read_only_mode); + /* Can only happen if server is read only. */ + ut_a(srv_read_only_mode); srv_undo_logs = ULONG_UNDEFINED; } + /* Flush the changes made to TRX_SYS_PAGE by trx_sys_create_rsegs()*/ + if (!srv_force_recovery && !srv_read_only_mode) { + bool success = buf_flush_list(ULINT_MAX, LSN_MAX, NULL); + ut_a(success); + buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST); + } + if (!srv_read_only_mode) { /* Create the thread which watches the timeouts for lock waits */ diff --git a/storage/innobase/sync/sync0arr.cc b/storage/innobase/sync/sync0arr.cc index 749258021f7..e06bc01c890 100644 --- a/storage/innobase/sync/sync0arr.cc +++ b/storage/innobase/sync/sync0arr.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -123,7 +123,7 @@ struct sync_array_t { ulint n_cells; /*!< number of cells in the wait array */ sync_cell_t* array; /*!< pointer to wait array */ - ib_mutex_t mutex; /*!< possible database mutex + ib_mutex_t mutex; /*!< possible database mutex protecting this data structure */ os_ib_mutex_t os_mutex; /*!< Possible operating system mutex protecting the data structure. @@ -304,9 +304,10 @@ sync_cell_get_event( /******************************************************************//** Reserves a wait array cell for waiting for an object. -The event of the cell is reset to nonsignalled state. */ +The event of the cell is reset to nonsignalled state. +@return true if free cell is found, otherwise false */ UNIV_INTERN -void +bool sync_array_reserve_cell( /*====================*/ sync_array_t* arr, /*!< in: wait array */ @@ -365,13 +366,12 @@ sync_array_reserve_cell( cell->thread = os_thread_get_curr_id(); - return; + return(true); } } - ut_error; /* No free cell found */ - - return; + /* No free cell found */ + return false; } /******************************************************************//** @@ -570,10 +570,6 @@ sync_array_deadlock_step( new_cell = sync_array_find_thread(arr, thread); if (new_cell == start) { - /* Stop running of other threads */ - - ut_dbg_stop_threads = TRUE; - /* Deadlock */ fputs("########################################\n" "DEADLOCK of threads detected!\n", stderr); @@ -978,11 +974,15 @@ sync_array_print_long_waits( sync_array_t* arr = sync_wait_array[i]; + sync_array_enter(arr); + if (sync_array_print_long_waits_low( arr, waiter, sema, ¬iced)) { fatal = TRUE; } + + sync_array_exit(arr); } if (noticed) { @@ -1077,7 +1077,7 @@ sync_array_init( ut_a(sync_wait_array == NULL); ut_a(srv_sync_array_size > 0); - ut_a(n_threads > srv_sync_array_size); + ut_a(n_threads > 0); sync_array_size = srv_sync_array_size; diff --git a/storage/innobase/sync/sync0rw.cc b/storage/innobase/sync/sync0rw.cc index 823efecaf6b..ebf73917702 100644 --- a/storage/innobase/sync/sync0rw.cc +++ b/storage/innobase/sync/sync0rw.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -33,6 +33,7 @@ Created 9/11/1995 Heikki Tuuri #include "sync0rw.h" #ifdef UNIV_NONINL #include "sync0rw.ic" +#include "sync0arr.ic" #endif #include "os0thread.h" @@ -405,11 +406,10 @@ lock_loop: rw_lock_stats.rw_s_spin_round_count.add(counter_index, i); - sync_arr = sync_array_get(); - - sync_array_reserve_cell( - sync_arr, lock, RW_LOCK_SHARED, - file_name, line, &index); + sync_arr = sync_array_get_and_reserve_cell(lock, + RW_LOCK_SHARED, + file_name, + line, &index); /* Set waiters before checking lock_word to ensure wake-up signal is sent. This may lead to some unnecessary signals. */ @@ -490,11 +490,10 @@ rw_lock_x_lock_wait( /* If there is still a reader, then go to sleep.*/ rw_lock_stats.rw_x_spin_round_count.add(counter_index, i); - sync_arr = sync_array_get(); - - sync_array_reserve_cell( - sync_arr, lock, RW_LOCK_WAIT_EX, - file_name, line, &index); + sync_arr = sync_array_get_and_reserve_cell(lock, + RW_LOCK_WAIT_EX, + file_name, + line, &index); i = 0; @@ -657,10 +656,8 @@ lock_loop: rw_lock_stats.rw_x_spin_round_count.add(counter_index, i); - sync_arr = sync_array_get(); - - sync_array_reserve_cell( - sync_arr, lock, RW_LOCK_EX, file_name, line, &index); + sync_arr = sync_array_get_and_reserve_cell(lock, RW_LOCK_EX, + file_name, line, &index); /* Waiters must be set before checking lock_word, to ensure signal is sent. This could lead to a few unnecessary wake-up signals. */ diff --git a/storage/innobase/sync/sync0sync.cc b/storage/innobase/sync/sync0sync.cc index d6f7325e2a3..90f16719e20 100644 --- a/storage/innobase/sync/sync0sync.cc +++ b/storage/innobase/sync/sync0sync.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -33,6 +33,7 @@ Created 9/5/1995 Heikki Tuuri #include "sync0sync.h" #ifdef UNIV_NONINL #include "sync0sync.ic" +#include "sync0arr.ic" #endif #include "sync0rw.h" @@ -536,10 +537,8 @@ spin_loop: goto spin_loop; } - sync_arr = sync_array_get(); - - sync_array_reserve_cell( - sync_arr, mutex, SYNC_MUTEX, file_name, line, &index); + sync_arr = sync_array_get_and_reserve_cell(mutex, SYNC_MUTEX, + file_name, line, &index); /* The memory order of the array reservation and the change in the waiters field is important: when we suspend a thread, we first diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index f6d8dfc6b40..56d46311f62 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -1256,11 +1256,13 @@ run_synchronously: ut_a(purge_sys->n_submitted == purge_sys->n_completed); #ifdef UNIV_DEBUG + rw_lock_x_lock(&purge_sys->latch); if (purge_sys->limit.trx_no == 0) { purge_sys->done = purge_sys->iter; } else { purge_sys->done = purge_sys->limit; } + rw_lock_x_unlock(&purge_sys->latch); #endif /* UNIV_DEBUG */ if (truncate) { @@ -1320,7 +1322,7 @@ trx_purge_stop(void) /* We need to wakeup the purge thread in case it is suspended, so that it can acknowledge the state change. */ - srv_wake_purge_thread_if_not_active(); + srv_purge_wakeup(); } purge_sys->state = PURGE_STATE_STOP; @@ -1399,5 +1401,5 @@ trx_purge_run(void) rw_lock_x_unlock(&purge_sys->latch); - srv_wake_purge_thread_if_not_active(); + srv_purge_wakeup(); } diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc index a015d94f660..eb2af877a6d 100644 --- a/storage/innobase/trx/trx0roll.cc +++ b/storage/innobase/trx/trx0roll.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -100,7 +100,7 @@ trx_rollback_to_savepoint_low( trx->error_state = DB_SUCCESS; - if (!trx->read_only) { + if (trx->insert_undo || trx->update_undo) { thr = pars_complete_graph_for_exec(roll_node, trx, heap); ut_a(thr == que_fork_start_command( @@ -113,7 +113,7 @@ trx_rollback_to_savepoint_low( /* Free the memory reserved by the undo graph. */ que_graph_free(static_cast<que_t*>( - roll_node->undo_thr->common.parent)); + roll_node->undo_thr->common.parent)); } if (savept == NULL) { @@ -638,7 +638,8 @@ trx_rollback_active( as DISCARDED. If it still exists. */ table = dict_table_open_on_id( - trx->table_id, dictionary_locked, FALSE); + trx->table_id, dictionary_locked, + DICT_TABLE_OP_NORMAL); if (table && !dict_table_is_discarded(table)) { @@ -699,31 +700,32 @@ trx_rollback_resurrected( to accidentally clean up a non-recovered transaction here. */ trx_mutex_enter(trx); + bool is_recovered = trx->is_recovered; + trx_state_t state = trx->state; + trx_mutex_exit(trx); - if (!trx->is_recovered) { - trx_mutex_exit(trx); + if (!is_recovered) { return(FALSE); } - switch (trx->state) { + switch (state) { case TRX_STATE_COMMITTED_IN_MEMORY: mutex_exit(&trx_sys->mutex); - trx_mutex_exit(trx); fprintf(stderr, "InnoDB: Cleaning up trx with id " TRX_ID_FMT "\n", trx->id); trx_cleanup_at_db_startup(trx); + trx_free_for_background(trx); return(TRUE); case TRX_STATE_ACTIVE: - trx_mutex_exit(trx); if (all || trx_get_dict_operation(trx) != TRX_DICT_OP_NONE) { mutex_exit(&trx_sys->mutex); trx_rollback_active(trx); + trx_free_for_background(trx); return(TRUE); } return(FALSE); case TRX_STATE_PREPARED: - trx_mutex_exit(trx); return(FALSE); case TRX_STATE_NOT_STARTED: break; @@ -1065,7 +1067,8 @@ trx_roll_pop_top_rec( os_thread_get_curr_id(), trx->id, undo->top_undo_no); */ prev_rec = trx_undo_get_prev_rec( - undo_page + offset, undo->hdr_page_no, undo->hdr_offset, mtr); + undo_page + offset, undo->hdr_page_no, undo->hdr_offset, + true, mtr); if (prev_rec == NULL) { diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc index 0b2837a09b5..cc1c095f16e 100644 --- a/storage/innobase/trx/trx0sys.cc +++ b/storage/innobase/trx/trx0sys.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -125,7 +125,7 @@ UNIV_INTERN mysql_pfs_key_t trx_sys_mutex_key; #ifndef UNIV_HOTBACKUP #ifdef UNIV_DEBUG /* Flag to control TRX_RSEG_N_SLOTS behavior debugging. */ -uint trx_rseg_n_slots_debug = 0; +UNIV_INTERN uint trx_rseg_n_slots_debug = 0; #endif /** This is used to track the maximum file format id known to InnoDB. It's @@ -1011,7 +1011,7 @@ trx_sys_create_rsegs( ut_a(n_spaces < TRX_SYS_N_RSEGS); ut_a(n_rsegs <= TRX_SYS_N_RSEGS); - if (srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO || srv_read_only_mode) { + if (srv_read_only_mode) { return(ULINT_UNDEFINED); } diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index fe71fa21a74..c78f609db45 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -42,11 +42,17 @@ Created 3/26/1996 Heikki Tuuri #include "btr0sea.h" #include "os0proc.h" #include "trx0xa.h" +#include "trx0rec.h" #include "trx0purge.h" #include "ha_prototypes.h" #include "srv0mon.h" #include "ut0vec.h" +#include<set> + +/** Set of table_id */ +typedef std::set<table_id_t> table_id_set; + /** Dummy session used currently in MySQL interface */ UNIV_INTERN sess_t* trx_dummy_sess = NULL; @@ -108,7 +114,7 @@ trx_create(void) trx->active_commit_ordered = 0; trx->isolation_level = TRX_ISO_REPEATABLE_READ; - trx->no = IB_ULONGLONG_MAX; + trx->no = TRX_ID_MAX; trx->support_xa = TRUE; @@ -134,6 +140,12 @@ trx_create(void) trx->op_info = ""; + trx->api_trx = false; + + trx->api_auto_commit = false; + + trx->read_write = true; + heap = mem_heap_create(sizeof(ib_vector_t) + sizeof(void*) * 8); heap_alloc = ib_heap_allocator_create(heap); @@ -309,6 +321,9 @@ trx_free_prepared( UT_LIST_REMOVE(trx_list, trx_sys->rw_trx_list, trx); ut_d(trx->in_rw_trx_list = FALSE); + /* Undo trx_resurrect_table_locks(). */ + UT_LIST_INIT(trx->lock.trx_locks); + trx_free(trx); } @@ -375,7 +390,6 @@ trx_list_rw_insert_ordered( if (trx2 == NULL) { UT_LIST_ADD_FIRST(trx_list, trx_sys->rw_trx_list, trx); - ut_d(trx_sys->rw_max_trx_id = trx->id); } else { UT_LIST_INSERT_AFTER( trx_list, trx_sys->rw_trx_list, trx2, trx); @@ -384,11 +398,107 @@ trx_list_rw_insert_ordered( UT_LIST_ADD_LAST(trx_list, trx_sys->rw_trx_list, trx); } +#ifdef UNIV_DEBUG + if (trx->id > trx_sys->rw_max_trx_id) { + trx_sys->rw_max_trx_id = trx->id; + } +#endif /* UNIV_DEBUG */ + ut_ad(!trx->in_rw_trx_list); ut_d(trx->in_rw_trx_list = TRUE); } /****************************************************************//** +Resurrect the table locks for a resurrected transaction. */ +static +void +trx_resurrect_table_locks( +/*======================*/ + trx_t* trx, /*!< in/out: transaction */ + const trx_undo_t* undo) /*!< in: undo log */ +{ + mtr_t mtr; + page_t* undo_page; + trx_undo_rec_t* undo_rec; + table_id_set tables; + + ut_ad(undo == trx->insert_undo || undo == trx->update_undo); + + if (trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY) + || undo->empty) { + return; + } + + mtr_start(&mtr); + /* trx_rseg_mem_create() may have acquired an X-latch on this + page, so we cannot acquire an S-latch. */ + undo_page = trx_undo_page_get( + undo->space, undo->zip_size, undo->top_page_no, &mtr); + undo_rec = undo_page + undo->top_offset; + + do { + ulint type; + ulint cmpl_info; + bool updated_extern; + undo_no_t undo_no; + table_id_t table_id; + + page_t* undo_rec_page = page_align(undo_rec); + + if (undo_rec_page != undo_page) { + if (!mtr_memo_release(&mtr, + buf_block_align(undo_page), + MTR_MEMO_PAGE_X_FIX)) { + /* The page of the previous undo_rec + should have been latched by + trx_undo_page_get() or + trx_undo_get_prev_rec(). */ + ut_ad(0); + } + + undo_page = undo_rec_page; + } + + trx_undo_rec_get_pars( + undo_rec, &type, &cmpl_info, + &updated_extern, &undo_no, &table_id); + tables.insert(table_id); + + undo_rec = trx_undo_get_prev_rec( + undo_rec, undo->hdr_page_no, + undo->hdr_offset, false, &mtr); + } while (undo_rec); + + mtr_commit(&mtr); + + for (table_id_set::const_iterator i = tables.begin(); + i != tables.end(); i++) { + if (dict_table_t* table = dict_table_open_on_id( + *i, FALSE, DICT_TABLE_OP_LOAD_TABLESPACE)) { + if (table->ibd_file_missing + || dict_table_is_temporary(table)) { + mutex_enter(&dict_sys->mutex); + dict_table_close(table, TRUE, FALSE); + dict_table_remove_from_cache(table); + mutex_exit(&dict_sys->mutex); + continue; + } + + lock_table_ix_resurrect(table, trx); + + DBUG_PRINT("ib_trx", + ("resurrect" TRX_ID_FMT + " table '%s' IX lock from %s undo", + trx->id, table->name, + undo == trx->insert_undo + ? "insert" : "update")); + + dict_table_close(table, FALSE, FALSE); + } + } +} + +/****************************************************************//** Resurrect the transactions that were doing inserts the time of the crash, they need to be undone. @return trx_t instance */ @@ -450,9 +560,9 @@ trx_resurrect_insert( trx->state = TRX_STATE_ACTIVE; /* A running transaction always has the number - field inited to IB_ULONGLONG_MAX */ + field inited to TRX_ID_MAX */ - trx->no = IB_ULONGLONG_MAX; + trx->no = TRX_ID_MAX; } if (undo->dict_operation) { @@ -537,9 +647,9 @@ trx_resurrect_update( trx->state = TRX_STATE_ACTIVE; /* A running transaction always has the number field inited to - IB_ULONGLONG_MAX */ + TRX_ID_MAX */ - trx->no = IB_ULONGLONG_MAX; + trx->no = TRX_ID_MAX; } if (undo->dict_operation) { @@ -593,6 +703,8 @@ trx_lists_init_at_db_start(void) trx = trx_resurrect_insert(undo, rseg); trx_list_rw_insert_ordered(trx); + + trx_resurrect_table_locks(trx, undo); } /* Ressurrect transactions that were doing updates. */ @@ -619,6 +731,8 @@ trx_lists_init_at_db_start(void) if (trx_created) { trx_list_rw_insert_ordered(trx); } + + trx_resurrect_table_locks(trx, undo); } } } @@ -637,7 +751,7 @@ trx_assign_rseg_low( trx_rseg_t* rseg; static ulint latest_rseg = 0; - if (srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO || srv_read_only_mode) { + if (srv_read_only_mode) { ut_a(max_undo_logs == ULONG_UNDEFINED); return(NULL); } @@ -653,7 +767,9 @@ trx_assign_rseg_low( the array. Once we implement more flexible rollback segment management this may not hold. The assertion checks for that case. */ - ut_a(trx_sys->rseg_array[0] != NULL); + if (trx_sys->rseg_array[0] == NULL) { + return(NULL); + } /* Skip the system tablespace if we have more than one tablespace defined for rollback segments. We want all UNDO records to be in @@ -708,10 +824,12 @@ trx_start_low( ut_ad(UT_LIST_GET_LEN(trx->lock.trx_locks) == 0); /* Check whether it is an AUTOCOMMIT SELECT */ - trx->auto_commit = thd_trx_is_auto_commit(trx->mysql_thd); + trx->auto_commit = (trx->api_trx && trx->api_auto_commit) + || thd_trx_is_auto_commit(trx->mysql_thd); trx->read_only = - (!trx->ddl && thd_trx_is_read_only(trx->mysql_thd)) + (trx->api_trx && !trx->read_write) + || (!trx->ddl && thd_trx_is_read_only(trx->mysql_thd)) || srv_read_only_mode; if (!trx->auto_commit) { @@ -730,10 +848,10 @@ trx_start_low( trx->xid.formatID = -1; #endif /* WITH_WSREP */ - /* The initial value for trx->no: IB_ULONGLONG_MAX is used in + /* The initial value for trx->no: TRX_ID_MAX is used in read_view_open_now: */ - trx->no = IB_ULONGLONG_MAX; + trx->no = TRX_ID_MAX; ut_a(ib_vector_is_empty(trx->autoinc_locks)); ut_a(ib_vector_is_empty(trx->lock.table_locks)); @@ -770,7 +888,11 @@ trx_start_low( ut_ad(!trx_is_autocommit_non_locking(trx)); UT_LIST_ADD_FIRST(trx_list, trx_sys->rw_trx_list, trx); ut_d(trx->in_rw_trx_list = TRUE); - ut_d(trx_sys->rw_max_trx_id = trx->id); +#ifdef UNIV_DEBUG + if (trx->id > trx_sys->rw_max_trx_id) { + trx_sys->rw_max_trx_id = trx->id; + } +#endif /* UNIV_DEBUG */ } ut_ad(trx_sys_validate_trx_list()); @@ -832,24 +954,21 @@ trx_serialisation_number_get( /****************************************************************//** Assign the transaction its history serialisation number and write the -update UNDO log record to the assigned rollback segment. -@return the LSN of the UNDO log write. */ -static -lsn_t +update UNDO log record to the assigned rollback segment. */ +static __attribute__((nonnull)) +void trx_write_serialisation_history( /*============================*/ - trx_t* trx) /*!< in: transaction */ + trx_t* trx, /*!< in/out: transaction */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { #ifdef WITH_WSREP trx_sysf_t* sys_header; #endif /* WITH_WSREP */ - mtr_t mtr; trx_rseg_t* rseg; rseg = trx->rseg; - mtr_start(&mtr); - /* Change the undo log segment states from TRX_UNDO_ACTIVE to some other state: these modifications to the file data structure define the transaction as committed in the file @@ -877,15 +996,15 @@ trx_write_serialisation_history( because only a single OS thread is allowed to do the transaction commit for this transaction. */ - undo_hdr_page = trx_undo_set_state_at_finish(undo, &mtr); + undo_hdr_page = trx_undo_set_state_at_finish(undo, mtr); - trx_undo_update_cleanup(trx, undo_hdr_page, &mtr); + trx_undo_update_cleanup(trx, undo_hdr_page, mtr); } else { mutex_enter(&rseg->mutex); } if (trx->insert_undo != NULL) { - trx_undo_set_state_at_finish(trx->insert_undo, &mtr); + trx_undo_set_state_at_finish(trx->insert_undo, mtr); } mutex_exit(&rseg->mutex); @@ -893,11 +1012,11 @@ trx_write_serialisation_history( MONITOR_INC(MONITOR_TRX_COMMIT_UNDO); #ifdef WITH_WSREP - sys_header = trx_sysf_get(&mtr); + sys_header = trx_sysf_get(mtr); /* Update latest MySQL wsrep XID in trx sys header. */ - if (wsrep_is_wsrep_xid(&trx->xid)) + if (wsrep_is_wsrep_xid((const void *)&trx->xid)) { - trx_sys_update_wsrep_checkpoint(&trx->xid, sys_header, &mtr); + trx_sys_update_wsrep_checkpoint(&trx->xid, sys_header, mtr); } #endif /* WITH_WSREP */ @@ -915,38 +1034,15 @@ trx_write_serialisation_history( #ifdef WITH_WSREP sys_header, #endif /* WITH_WSREP */ - &mtr); + mtr); trx->mysql_log_file_name = NULL; } - - /* The following call commits the mini-transaction, making the - whole transaction committed in the file-based world, at this - log sequence number. The transaction becomes 'durable' when - we write the log to disk, but in the logical sense the commit - in the file-based data structures (undo logs etc.) happens - here. - - NOTE that transaction numbers, which are assigned only to - transactions with an update undo log, do not necessarily come - in exactly the same order as commit lsn's, if the transactions - have different rollback segments. To get exactly the same - order we should hold the kernel mutex up to this point, - adding to the contention of the kernel mutex. However, if - a transaction T2 is able to see modifications made by - a transaction T1, T2 will always get a bigger transaction - number and a bigger commit lsn than T1. */ - - /*--------------*/ - mtr_commit(&mtr); - /*--------------*/ - - return(mtr.end_lsn); } /******************************************************************** Finalize a transaction containing updates for a FTS table. */ -static +static __attribute__((nonnull)) void trx_finalize_for_fts_table( /*=======================*/ @@ -977,20 +1073,20 @@ trx_finalize_for_fts_table( } } -/******************************************************************** +/******************************************************************//** Finalize a transaction containing updates to FTS tables. */ -static +static __attribute__((nonnull)) void trx_finalize_for_fts( /*=================*/ - trx_t* trx, /* in: transaction */ - ibool is_commit) /* in: TRUE if the transaction was - committed, FALSE if it was rolled back. */ + trx_t* trx, /*!< in/out: transaction */ + bool is_commit) /*!< in: true if the transaction was + committed, false if it was rolled back. */ { if (is_commit) { - const ib_rbt_node_t* node; - ib_rbt_t* tables; - fts_savepoint_t* savepoint; + const ib_rbt_node_t* node; + ib_rbt_t* tables; + fts_savepoint_t* savepoint; savepoint = static_cast<fts_savepoint_t*>( ib_vector_last(trx->fts_trx->savepoints)); @@ -1000,7 +1096,7 @@ trx_finalize_for_fts( for (node = rbt_first(tables); node; node = rbt_next(tables, node)) { - fts_trx_table_t** ftt; + fts_trx_table_t** ftt; ftt = rbt_value(fts_trx_table_t*, node); @@ -1061,50 +1157,16 @@ trx_flush_log_if_needed( } /****************************************************************//** -Commits a transaction. */ -UNIV_INTERN +Commits a transaction in memory. */ +static __attribute__((nonnull)) void -trx_commit( -/*=======*/ - trx_t* trx) /*!< in: transaction */ +trx_commit_in_memory( +/*=================*/ + trx_t* trx, /*!< in/out: transaction */ + lsn_t lsn) /*!< in: log sequence number of the mini-transaction + commit of trx_write_serialisation_history(), or 0 + if the transaction did not modify anything */ { - trx_named_savept_t* savep; - ib_uint64_t lsn = 0; - ibool doing_fts_commit = FALSE; - - assert_trx_nonlocking_or_in_list(trx); - ut_ad(!trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY)); - - /* undo_no is non-zero if we're doing the final commit. */ - if (trx->fts_trx && trx->undo_no != 0) { - ulint error; - - ut_a(!trx_is_autocommit_non_locking(trx)); - - doing_fts_commit = TRUE; - - error = fts_commit(trx); - - /* FTS-FIXME: Temparorily tolerate DB_DUPLICATE_KEY - instead of dying. This is a possible scenario if there - is a crash between insert to DELETED table committing - and transaction committing. The fix would be able to - return error from this function */ - if (error != DB_SUCCESS && error != DB_DUPLICATE_KEY) { - /* FTS-FIXME: once we can return values from this - function, we should do so and signal an error - instead of just dying. */ - - ut_error; - } - } - - if (trx->insert_undo != NULL || trx->update_undo != NULL) { - lsn = trx_write_serialisation_history(trx); - } else { - lsn = 0; - } - trx->must_flush_log_later = FALSE; if (trx_is_autocommit_non_locking(trx)) { @@ -1229,8 +1291,10 @@ trx_commit( trx->commit_lsn = lsn; } + /* undo_no is non-zero if we're doing the final commit. */ + bool not_rollback = trx->undo_no != 0; /* Free all savepoints, starting from the first. */ - savep = UT_LIST_GET_FIRST(trx->trx_savepoints); + trx_named_savept_t* savep = UT_LIST_GET_FIRST(trx->trx_savepoints); trx_roll_savepoints_free(trx, savep); trx->rseg = NULL; @@ -1250,7 +1314,7 @@ trx_commit( trx->auto_commit = FALSE; if (trx->fts_trx) { - trx_finalize_for_fts(trx, doing_fts_commit); + trx_finalize_for_fts(trx, not_rollback); } ut_ad(trx->lock.wait_thr == NULL); @@ -1273,6 +1337,96 @@ trx_commit( } /****************************************************************//** +Commits a transaction and a mini-transaction. */ +UNIV_INTERN +void +trx_commit_low( +/*===========*/ + trx_t* trx, /*!< in/out: transaction */ + mtr_t* mtr) /*!< in/out: mini-transaction (will be committed), + or NULL if trx made no modifications */ +{ + lsn_t lsn; + + assert_trx_nonlocking_or_in_list(trx); + ut_ad(!trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY)); + ut_ad(!mtr || mtr->state == MTR_ACTIVE); + ut_ad(!mtr == !(trx->insert_undo || trx->update_undo)); + + /* undo_no is non-zero if we're doing the final commit. */ + if (trx->fts_trx && trx->undo_no != 0) { + dberr_t error; + + ut_a(!trx_is_autocommit_non_locking(trx)); + + error = fts_commit(trx); + + /* FTS-FIXME: Temporarily tolerate DB_DUPLICATE_KEY + instead of dying. This is a possible scenario if there + is a crash between insert to DELETED table committing + and transaction committing. The fix would be able to + return error from this function */ + if (error != DB_SUCCESS && error != DB_DUPLICATE_KEY) { + /* FTS-FIXME: once we can return values from this + function, we should do so and signal an error + instead of just dying. */ + + ut_error; + } + } + + if (mtr) { + trx_write_serialisation_history(trx, mtr); + /* The following call commits the mini-transaction, making the + whole transaction committed in the file-based world, at this + log sequence number. The transaction becomes 'durable' when + we write the log to disk, but in the logical sense the commit + in the file-based data structures (undo logs etc.) happens + here. + + NOTE that transaction numbers, which are assigned only to + transactions with an update undo log, do not necessarily come + in exactly the same order as commit lsn's, if the transactions + have different rollback segments. To get exactly the same + order we should hold the kernel mutex up to this point, + adding to the contention of the kernel mutex. However, if + a transaction T2 is able to see modifications made by + a transaction T1, T2 will always get a bigger transaction + number and a bigger commit lsn than T1. */ + + /*--------------*/ + mtr_commit(mtr); + /*--------------*/ + lsn = mtr->end_lsn; + } else { + lsn = 0; + } + + trx_commit_in_memory(trx, lsn); +} + +/****************************************************************//** +Commits a transaction. */ +UNIV_INTERN +void +trx_commit( +/*=======*/ + trx_t* trx) /*!< in/out: transaction */ +{ + mtr_t local_mtr; + mtr_t* mtr; + + if (trx->insert_undo || trx->update_undo) { + mtr = &local_mtr; + mtr_start(mtr); + } else { + mtr = NULL; + } + + trx_commit_low(trx, mtr); +} + +/****************************************************************//** Cleans up a transaction at database startup. The cleanup is needed if the transaction already got to the middle of a commit when the database crashed, and we cannot roll it back. */ diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc index c4480b11366..290271c6cab 100644 --- a/storage/innobase/trx/trx0undo.cc +++ b/storage/innobase/trx/trx0undo.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -159,6 +159,7 @@ trx_undo_get_prev_rec_from_prev_page( trx_undo_rec_t* rec, /*!< in: undo record */ ulint page_no,/*!< in: undo log header page number */ ulint offset, /*!< in: undo log header offset on page */ + bool shared, /*!< in: true=S-latch, false=X-latch */ mtr_t* mtr) /*!< in: mtr */ { ulint space; @@ -181,8 +182,12 @@ trx_undo_get_prev_rec_from_prev_page( space = page_get_space_id(undo_page); zip_size = fil_space_get_zip_size(space); - prev_page = trx_undo_page_get_s_latched(space, zip_size, - prev_page_no, mtr); + buf_block_t* block = buf_page_get(space, zip_size, prev_page_no, + shared ? RW_S_LATCH : RW_X_LATCH, + mtr); + buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE); + + prev_page = buf_block_get_frame(block); return(trx_undo_page_get_last_rec(prev_page, page_no, offset)); } @@ -197,6 +202,7 @@ trx_undo_get_prev_rec( trx_undo_rec_t* rec, /*!< in: undo record */ ulint page_no,/*!< in: undo log header page number */ ulint offset, /*!< in: undo log header offset on page */ + bool shared, /*!< in: true=S-latch, false=X-latch */ mtr_t* mtr) /*!< in: mtr */ { trx_undo_rec_t* prev_rec; @@ -212,7 +218,7 @@ trx_undo_get_prev_rec( previous record */ return(trx_undo_get_prev_rec_from_prev_page(rec, page_no, offset, - mtr)); + shared, mtr)); } /***********************************************************************//** diff --git a/storage/innobase/ut/ut0crc32.cc b/storage/innobase/ut/ut0crc32.cc index 695035d6ae8..1caf27ebae3 100644 --- a/storage/innobase/ut/ut0crc32.cc +++ b/storage/innobase/ut/ut0crc32.cc @@ -92,7 +92,7 @@ static ib_uint32_t ut_crc32_slice8_table[8][256]; static ibool ut_crc32_slice8_table_initialized = FALSE; /* Flag that tells whether the CPU supports CRC32 or not */ -UNIV_INTERN bool ut_crc32_sse2_enabled = false; +UNIV_INTERN bool ut_crc32_sse2_enabled = false; /********************************************************************//** Initializes the table that is used to generate the CRC32 if the CPU does diff --git a/storage/innobase/ut/ut0dbg.cc b/storage/innobase/ut/ut0dbg.cc index 37b709785b4..a1cad144da4 100644 --- a/storage/innobase/ut/ut0dbg.cc +++ b/storage/innobase/ut/ut0dbg.cc @@ -35,16 +35,6 @@ Created 1/30/1994 Heikki Tuuri UNIV_INTERN ulint ut_dbg_zero = 0; #endif -#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) -/** If this is set to TRUE by ut_dbg_assertion_failed(), all threads -will stop at the next ut_a() or ut_ad(). */ -UNIV_INTERN ibool ut_dbg_stop_threads = FALSE; -#endif -#ifndef UT_DBG_USE_ABORT -/** A null pointer that will be dereferenced to trigger a memory trap */ -UNIV_INTERN ulint* ut_dbg_null_ptr = NULL; -#endif - /*************************************************************//** Report a failed assertion. */ UNIV_INTERN @@ -80,30 +70,8 @@ ut_dbg_assertion_failed( "InnoDB: corruption in the InnoDB tablespace. Please refer to\n" "InnoDB: " REFMAN "forcing-innodb-recovery.html\n" "InnoDB: about forcing recovery.\n", stderr); -#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) - ut_dbg_stop_threads = TRUE; -#endif } -#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) -/*************************************************************//** -Stop a thread after assertion failure. */ -UNIV_INTERN -void -ut_dbg_stop_thread( -/*===============*/ - const char* file, - ulint line) -{ -#ifndef UNIV_HOTBACKUP - fprintf(stderr, "InnoDB: Thread %lu stopped in file %s line %lu\n", - os_thread_pf(os_thread_get_curr_id()), - innobase_basename(file), line); - os_thread_sleep(1000000000); -#endif /* !UNIV_HOTBACKUP */ -} -#endif - #ifdef UNIV_COMPILE_TEST_FUNCS #include <sys/types.h> diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc index 3c94d96c3ac..939a413b4f3 100644 --- a/storage/innobase/ut/ut0ut.cc +++ b/storage/innobase/ut/ut0ut.cc @@ -814,6 +814,12 @@ ut_strerr( return("Log size exceeded during online index creation"); case DB_DICT_CHANGED: return("Table dictionary has changed"); + case DB_IDENTIFIER_TOO_LONG: + return("Identifier name is too long"); + case DB_FTS_EXCEED_RESULT_CACHE_LIMIT: + return("FTS query exceeds result cache limit"); + case DB_TEMP_FILE_WRITE_FAILURE: + return("Temp file write failure"); /* do not add default: in order to produce a warning if new code is added to the enum but not added here */ diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 6edf7b2574f..081e90f89f7 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -1,5 +1,6 @@ /* Copyright (C) 2004-2008 MySQL AB & MySQL Finland AB & TCX DataKonsult AB Copyright (C) 2008-2009 Sun Microsystems, Inc. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -723,8 +724,8 @@ int maria_check_definition(MARIA_KEYDEF *t1_keyinfo, { DBUG_PRINT("error", ("Key %d has different definition", i)); DBUG_PRINT("error", ("t1_fulltext= %d, t2_fulltext=%d", - test(t1_keyinfo[i].flag & HA_FULLTEXT), - test(t2_keyinfo[i].flag & HA_FULLTEXT))); + MY_TEST(t1_keyinfo[i].flag & HA_FULLTEXT), + MY_TEST(t2_keyinfo[i].flag & HA_FULLTEXT))); DBUG_RETURN(1); } if (t1_keyinfo[i].flag & HA_SPATIAL && t2_keyinfo[i].flag & HA_SPATIAL) @@ -734,8 +735,8 @@ int maria_check_definition(MARIA_KEYDEF *t1_keyinfo, { DBUG_PRINT("error", ("Key %d has different definition", i)); DBUG_PRINT("error", ("t1_spatial= %d, t2_spatial=%d", - test(t1_keyinfo[i].flag & HA_SPATIAL), - test(t2_keyinfo[i].flag & HA_SPATIAL))); + MY_TEST(t1_keyinfo[i].flag & HA_SPATIAL), + MY_TEST(t2_keyinfo[i].flag & HA_SPATIAL))); DBUG_RETURN(1); } if (t1_keyinfo[i].keysegs != t2_keyinfo[i].keysegs || @@ -1333,7 +1334,7 @@ int ha_maria::check(THD * thd, HA_CHECK_OPT * check_opt) share->pack.header_length, 1, MYF(MY_WME)))) { error= maria_chk_data_link(¶m, file, - test(param.testflag & T_EXTEND)); + MY_TEST(param.testflag & T_EXTEND)); end_io_cache(&(param.read_cache)); } param.testflag= old_testflag; @@ -1547,7 +1548,7 @@ int ha_maria::repair(THD *thd, HA_CHECK *param, bool do_optimize) { int error= 0; ulonglong local_testflag= param->testflag; - bool optimize_done= !do_optimize, statistics_done= 0; + bool optimize_done= !do_optimize, statistics_done= 0, full_repair_done= 0; const char *old_proc_info= thd->proc_info; char fixed_name[FN_REFLEN]; MARIA_SHARE *share= file->s; @@ -1581,7 +1582,7 @@ int ha_maria::repair(THD *thd, HA_CHECK *param, bool do_optimize) param->db_name= table->s->db.str; param->table_name= table->alias.c_ptr(); - param->tmpfile_createflag= O_RDWR | O_TRUNC; + param->tmpfile_createflag= O_RDWR | O_TRUNC | O_EXCL; param->using_global_keycache= 1; param->thd= thd; param->tmpdir= &mysql_tmpdir_list; @@ -1626,7 +1627,7 @@ int ha_maria::repair(THD *thd, HA_CHECK *param, bool do_optimize) thd_proc_info(thd, buf); param->testflag|= T_REP_PARALLEL; error= maria_repair_parallel(param, file, fixed_name, - test(param->testflag & T_QUICK)); + MY_TEST(param->testflag & T_QUICK)); /* to reset proc_info, as it was pointing to local buffer */ thd_proc_info(thd, "Repair done"); } @@ -1635,7 +1636,7 @@ int ha_maria::repair(THD *thd, HA_CHECK *param, bool do_optimize) thd_proc_info(thd, "Repair by sorting"); param->testflag|= T_REP_BY_SORT; error= maria_repair_by_sort(param, file, fixed_name, - test(param->testflag & T_QUICK)); + MY_TEST(param->testflag & T_QUICK)); } if (error && file->create_unique_index_by_sort && share->state.dupp_key != MAX_KEY) @@ -1647,10 +1648,15 @@ int ha_maria::repair(THD *thd, HA_CHECK *param, bool do_optimize) thd_proc_info(thd, "Repair with keycache"); param->testflag &= ~(T_REP_BY_SORT | T_REP_PARALLEL); error= maria_repair(param, file, fixed_name, - test(param->testflag & T_QUICK)); + MY_TEST(param->testflag & T_QUICK)); } param->testflag= save_testflag | (param->testflag & T_RETRY_WITHOUT_QUICK); optimize_done= 1; + /* + set full_repair_done if we re-wrote all rows and all keys + (and thus removed all transid's from the table + */ + full_repair_done= !MY_TEST(param->testflag & T_QUICK); } if (!error) { @@ -1674,7 +1680,8 @@ int ha_maria::repair(THD *thd, HA_CHECK *param, bool do_optimize) } } thd_proc_info(thd, "Saving state"); - if (optimize_done && !error && !(param->testflag & T_NO_CREATE_RENAME_LSN)) + if (full_repair_done && !error && + !(param->testflag & T_NO_CREATE_RENAME_LSN)) { /* Set trid (needed if the table was moved from another system) */ share->state.create_trid= trnman_get_min_safe_trid(); @@ -1969,6 +1976,7 @@ int ha_maria::enable_indexes(uint mode) */ param.testflag|= T_NO_CREATE_RENAME_LSN; } + param.myf_rw &= ~MY_WAIT_IF_FULL; param.sort_buffer_length= THDVAR(thd,sort_buffer_size); param.stats_method= (enum_handler_stats_method)THDVAR(thd,stats_method); @@ -2116,7 +2124,7 @@ void ha_maria::start_bulk_insert(ha_rows rows, uint flags) } else { - my_bool all_keys= test(flags & HA_CREATE_UNIQUE_INDEX_BY_SORT); + my_bool all_keys= MY_TEST(flags & HA_CREATE_UNIQUE_INDEX_BY_SORT); maria_disable_indexes_for_rebuild(file, rows, all_keys); } if (share->now_transactional) @@ -3292,7 +3300,7 @@ static int maria_rollback(handlerton *hton __attribute__ ((unused)), bool maria_flush_logs(handlerton *hton) { - return test(translog_purge_at_flush()); + return MY_TEST(translog_purge_at_flush()); } diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h index 7d12f1637b4..2b99c31ec5d 100644 --- a/storage/maria/ha_maria.h +++ b/storage/maria/ha_maria.h @@ -146,7 +146,7 @@ public: bool auto_repair(int error) const { /* Always auto-repair moved tables (error == HA_ERR_OLD_FILE) */ - return ((test(maria_recover_options & HA_RECOVER_ANY) && + return ((MY_TEST(maria_recover_options & HA_RECOVER_ANY) && error == HA_ERR_CRASHED_ON_USAGE) || error == HA_ERR_OLD_FILE); diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c index 7f8fd699e5d..c6371287063 100644 --- a/storage/maria/ma_blockrec.c +++ b/storage/maria/ma_blockrec.c @@ -2367,7 +2367,7 @@ static my_bool extent_to_bitmap_blocks(MARIA_HA *info, DBUG_PRINT("error", ("page: %lu page_count: %u tail: %u length: %ld data_length: %ld", (ulong) block->page, (block->page_count & ~TAIL_BIT), - (uint) test(block->page_count & TAIL_BIT), + (uint) MY_TEST(block->page_count & TAIL_BIT), (ulong) ((block->page + (page_count & ~TAIL_BIT)) * share->block_size), (ulong) share->state.state.data_file_length)); diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index a3928234010..4ac267ffb8a 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -45,6 +45,7 @@ #include "ma_blockrec.h" #include "trnman.h" #include "ma_key_recover.h" +#include <my_check_opt.h> #include <stdarg.h> #include <my_getopt.h> @@ -1453,7 +1454,7 @@ static int check_dynamic_record(HA_CHECK *param, MARIA_HA *info, int extend, if (param->testflag & (T_EXTEND | T_MEDIUM | T_VERBOSE)) { if (_ma_rec_check(info,record, info->rec_buff,block_info.rec_len, - test(share->calc_checksum), checksum)) + MY_TEST(share->calc_checksum), checksum)) { _ma_check_print_error(param,"Found wrong packed record at %s", llstr(start_recpos,llbuff)); @@ -2384,7 +2385,7 @@ static int initialize_variables_for_repair(HA_CHECK *param, sort_param->sort_info= sort_info; sort_param->fix_datafile= ! rep_quick; - sort_param->calc_checksum= test(param->testflag & T_CALC_CHECKSUM); + sort_param->calc_checksum= MY_TEST(param->testflag & T_CALC_CHECKSUM); sort_info->info= sort_info->new_info= info; sort_info->param= param; set_data_file_type(sort_info, info->s); @@ -2394,8 +2395,9 @@ static int initialize_variables_for_repair(HA_CHECK *param, info->rec_cache.file= info->dfile.file; info->update= (short) (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); - if (protect_against_repair_crash(info, param, !test(param->testflag & - T_CREATE_MISSING_KEYS))) + if (protect_against_repair_crash(info, param, + !MY_TEST(param->testflag & + T_CREATE_MISSING_KEYS))) return 1; /* calculate max_records */ @@ -3835,7 +3837,7 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info, if (keyseg[i].flag & HA_SPACE_PACK) sort_param.key_length+=get_pack_length(keyseg[i].length); if (keyseg[i].flag & (HA_BLOB_PART | HA_VAR_LENGTH_PART)) - sort_param.key_length+=2 + test(keyseg[i].length >= 127); + sort_param.key_length+= 2 + MY_TEST(keyseg[i].length >= 127); if (keyseg[i].flag & HA_NULL_PART) sort_param.key_length++; } @@ -4404,7 +4406,7 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info, if (keyseg->flag & HA_SPACE_PACK) sort_param[i].key_length+=get_pack_length(keyseg->length); if (keyseg->flag & (HA_BLOB_PART | HA_VAR_LENGTH_PART)) - sort_param[i].key_length+=2 + test(keyseg->length >= 127); + sort_param[i].key_length+= 2 + MY_TEST(keyseg->length >= 127); if (keyseg->flag & HA_NULL_PART) sort_param[i].key_length++; } @@ -4423,7 +4425,7 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info, sort_info.total_keys=i; sort_param[0].master= 1; sort_param[0].fix_datafile= ! rep_quick; - sort_param[0].calc_checksum= test(param->testflag & T_CALC_CHECKSUM); + sort_param[0].calc_checksum= MY_TEST(param->testflag & T_CALC_CHECKSUM); if (!maria_ftparser_alloc_param(info)) goto err; @@ -5224,7 +5226,7 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param) sort_param->find_length, (param->testflag & T_QUICK) && sort_param->calc_checksum && - test(share->calc_checksum), checksum)) + MY_TEST(share->calc_checksum), checksum)) { _ma_check_print_info(param,"Found wrong packed record at %s", llstr(sort_param->start_recpos,llbuff)); @@ -5412,7 +5414,7 @@ int _ma_sort_write_record(MARIA_SORT_PARAM *sort_param) do { - block_length=reclength+ 3 + test(reclength >= (65520-3)); + block_length= reclength + 3 + MY_TEST(reclength >= (65520 - 3)); if (block_length < share->base.min_block_length) block_length=share->base.min_block_length; info->update|=HA_STATE_WRITE_AT_END; @@ -6411,7 +6413,7 @@ static ha_checksum maria_byte_checksum(const uchar *buf, uint length) const uchar *end=buf+length; for (crc=0; buf != end; buf++) crc=((crc << 1) + *buf) + - test(crc & (((ha_checksum) 1) << (8*sizeof(ha_checksum)-1))); + MY_TEST(crc & (((ha_checksum) 1) << (8 * sizeof(ha_checksum) - 1))); return crc; } diff --git a/storage/maria/ma_check_standalone.h b/storage/maria/ma_check_standalone.h index 3ac8cdb5e38..241bc7c2739 100644 --- a/storage/maria/ma_check_standalone.h +++ b/storage/maria/ma_check_standalone.h @@ -13,6 +13,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <my_check_opt.h> + /* almost every standalone maria program will need it */ void _mi_report_crashed(void *file __attribute__((unused)), const char *message __attribute__((unused)), diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c index 232f4a330eb..1176b2037b5 100644 --- a/storage/maria/ma_create.c +++ b/storage/maria/ma_create.c @@ -209,7 +209,7 @@ int maria_create(const char *name, enum data_file_type datafile_type, options|= HA_OPTION_NULL_FIELDS; /* Use ma_checksum() */ /* We must test for 257 as length includes pack-length */ - if (test(column->length >= 257)) + if (MY_TEST(column->length >= 257)) { long_varchar_count++; max_field_lengths++; @@ -308,7 +308,8 @@ int maria_create(const char *name, enum data_file_type datafile_type, pack_bytes= (packed + 7) / 8; if (pack_reclength != INT_MAX32) pack_reclength+= reclength+pack_bytes + - test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_OPTION_PACK_RECORD)); + MY_TEST(test_all_bits(options, HA_OPTION_CHECKSUM | + HA_OPTION_PACK_RECORD)); min_pack_length+= pack_bytes; /* Calculate min possible row length for rows-in-block */ extra_header_size= MAX_FIXED_HEADER_SIZE; @@ -371,7 +372,7 @@ int maria_create(const char *name, enum data_file_type datafile_type, after the row pointer */ pointer= maria_get_pointer_length((ci->data_file_length / - maria_block_size) * 2, 3) + 1; + maria_block_size) * 2, 4) + 1; set_if_smaller(pointer, BLOCK_RECORD_POINTER_SIZE); if (!max_rows) @@ -730,7 +731,7 @@ int maria_create(const char *name, enum data_file_type datafile_type, share.base.records=ci->max_rows; share.base.reloc= ci->reloc_rows; share.base.reclength=real_reclength; - share.base.pack_reclength=reclength+ test(options & HA_OPTION_CHECKSUM); + share.base.pack_reclength= reclength + MY_TEST(options & HA_OPTION_CHECKSUM); share.base.max_pack_length=pack_reclength; share.base.min_pack_length=min_pack_length; share.base.pack_bytes= pack_bytes; @@ -1033,7 +1034,7 @@ int maria_create(const char *name, enum data_file_type datafile_type, remember if the data file was created or not, to know if Recovery can do it or not, in the future */ - log_data[0]= test(flags & HA_DONT_TOUCH_DATA); + log_data[0]= MY_TEST(flags & HA_DONT_TOUCH_DATA); int2store(log_data + 1, kfile_size_before_extension); int2store(log_data + 1 + 2, share.base.keystart); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= (uchar *)name; diff --git a/storage/maria/ma_dynrec.c b/storage/maria/ma_dynrec.c index 4bb51d0dcf3..b0280f5278b 100644 --- a/storage/maria/ma_dynrec.c +++ b/storage/maria/ma_dynrec.c @@ -406,7 +406,7 @@ static int _ma_find_writepos(MARIA_HA *info, { /* No deleted blocks; Allocate a new block */ *filepos=info->state->data_file_length; - if ((tmp=reclength+3 + test(reclength >= (65520-3))) < + if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) < info->s->base.min_block_length) tmp= info->s->base.min_block_length; else @@ -849,7 +849,7 @@ static my_bool update_dynamic_record(MARIA_HA *info, MARIA_RECORD_POS filepos, if (length < reclength) { uint tmp=MY_ALIGN(reclength - length + 3 + - test(reclength >= 65520L),MARIA_DYN_ALIGN_SIZE); + MY_TEST(reclength >= 65520L), MARIA_DYN_ALIGN_SIZE); /* Don't create a block bigger than MARIA_MAX_BLOCK_LENGTH */ tmp= MY_MIN(length+tmp, MARIA_MAX_BLOCK_LENGTH)-length; /* Check if we can extend this block */ @@ -1014,7 +1014,7 @@ uint _ma_rec_pack(MARIA_HA *info, register uchar *to, pos++; } new_length=(uint) (end-pos); - if (new_length +1 + test(column->length > 255 && new_length > 127) + if (new_length + 1 + MY_TEST(column->length > 255 && new_length > 127) < length) { if (column->length > 255 && new_length > 127) @@ -1138,7 +1138,7 @@ my_bool _ma_rec_check(MARIA_HA *info,const uchar *record, uchar *rec_buff, pos++; } new_length=(uint) (end-pos); - if (new_length +1 + test(column->length > 255 && new_length > 127) + if (new_length + 1 + MY_TEST(column->length > 255 && new_length > 127) < length) { if (!(flag & bit)) @@ -1191,7 +1191,7 @@ my_bool _ma_rec_check(MARIA_HA *info,const uchar *record, uchar *rec_buff, to+= length; } if (packed_length != (uint) (to - rec_buff) + - test(info->s->calc_checksum) || (bit != 1 && (flag & ~(bit - 1)))) + MY_TEST(info->s->calc_checksum) || (bit != 1 && (flag & ~(bit - 1)))) goto err; if (with_checksum && ((uchar) checksum != (uchar) *to)) { diff --git a/storage/maria/ma_extra.c b/storage/maria/ma_extra.c index 66e7b4033c7..fd21d2863f8 100644 --- a/storage/maria/ma_extra.c +++ b/storage/maria/ma_extra.c @@ -58,7 +58,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function, { reinit_io_cache(&info->rec_cache,READ_CACHE,0, (pbool) (info->lock_type != F_UNLCK), - (pbool) test(info->update & HA_STATE_ROW_CHANGED) + (pbool) MY_TEST(info->update & HA_STATE_ROW_CHANGED) ); } info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND | @@ -122,7 +122,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function, { reinit_io_cache(&info->rec_cache, READ_CACHE, info->cur_row.nextpos, (pbool) (info->lock_type != F_UNLCK), - (pbool) test(info->update & HA_STATE_ROW_CHANGED)); + (pbool) MY_TEST(info->update & HA_STATE_ROW_CHANGED)); info->update&= ~HA_STATE_ROW_CHANGED; if (share->non_transactional_concurrent_insert) info->rec_cache.end_of_file= info->state->data_file_length; @@ -316,7 +316,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function, /* Fall trough */ case HA_EXTRA_PREPARE_FOR_RENAME: { - my_bool do_flush= test(function != HA_EXTRA_PREPARE_FOR_DROP); + my_bool do_flush= MY_TEST(function != HA_EXTRA_PREPARE_FOR_DROP); my_bool save_global_changed; enum flush_type type; /* diff --git a/storage/maria/ma_ft_boolean_search.c b/storage/maria/ma_ft_boolean_search.c index e69c90c671c..af2ad6f1ba9 100644 --- a/storage/maria/ma_ft_boolean_search.c +++ b/storage/maria/ma_ft_boolean_search.c @@ -523,7 +523,7 @@ static void _ftb_init_index_search(FT_INFO *ftb) { if (ftbe->flags & FTB_FLAG_NO || /* 2 */ ftbe->up->ythresh - ftbe->up->yweaks > - (uint) test(ftbe->flags & FTB_FLAG_YES)) /* 1 */ + (uint) MY_TEST(ftbe->flags & FTB_FLAG_YES)) /* 1 */ { FTB_EXPR *top_ftbe=ftbe->up; ftbw->docid[0]=HA_OFFSET_ERROR; diff --git a/storage/maria/ma_locking.c b/storage/maria/ma_locking.c index 0ec0244bcbd..dd679f53533 100644 --- a/storage/maria/ma_locking.c +++ b/storage/maria/ma_locking.c @@ -535,7 +535,7 @@ int _ma_decrement_open_count(MARIA_HA *info, my_bool lock_tables) if (!lock_error && !my_disable_locking && lock_tables) lock_error=maria_lock_database(info,old_lock); } - DBUG_RETURN(test(lock_error || write_error)); + DBUG_RETURN(MY_TEST(lock_error || write_error)); } diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index ae58be55105..2538deeb27d 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -1562,7 +1562,7 @@ static my_bool translog_close_log_file(TRANSLOG_FILE *file) } rc|= mysql_file_close(file->handler.file, MYF(MY_WME)); my_free(file); - return test(rc); + return MY_TEST(rc); } @@ -8015,8 +8015,8 @@ retest: /* wait time or next goal */ set_timespec_nsec(abstime, flush_interval - time_spent); mysql_cond_timedwait(&log_descriptor.new_goal_cond, - &log_descriptor.log_flush_lock, - &abstime); + &log_descriptor.log_flush_lock, + &abstime); mysql_mutex_unlock(&log_descriptor.log_flush_lock); DBUG_PRINT("info", ("retest conditions")); goto retest; @@ -8232,9 +8232,9 @@ my_bool translog_is_file(uint file_no) { MY_STAT stat_buff; char path[FN_REFLEN]; - return (test(mysql_file_stat(key_file_translog, - translog_filename_by_fileno(file_no, path), - &stat_buff, MYF(0)))); + return (MY_TEST(mysql_file_stat(key_file_translog, + translog_filename_by_fileno(file_no, path), + &stat_buff, MYF(0)))); } @@ -8529,8 +8529,8 @@ my_bool translog_purge(TRANSLOG_ADDRESS low) { char path[FN_REFLEN], *file_name; file_name= translog_filename_by_fileno(i, path); - rc= test(mysql_file_delete(key_file_translog, - file_name, MYF(MY_WME))); + rc= MY_TEST(mysql_file_delete(key_file_translog, + file_name, MYF(MY_WME))); } } if (unlikely(rc == 1)) @@ -8592,8 +8592,8 @@ my_bool translog_purge_at_flush() char path[FN_REFLEN], *file_name; DBUG_PRINT("info", ("purge file %lu\n", (ulong) i)); file_name= translog_filename_by_fileno(i, path); - rc= test(mysql_file_delete(key_file_translog, - file_name, MYF(MY_WME))); + rc= MY_TEST(mysql_file_delete(key_file_translog, + file_name, MYF(MY_WME))); } mysql_mutex_unlock(&log_descriptor.purger_lock); diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c index eb0dc5f9def..e06084cef07 100644 --- a/storage/maria/ma_open.c +++ b/storage/maria/ma_open.c @@ -153,8 +153,8 @@ static MARIA_HA *maria_clone_internal(MARIA_SHARE *share, const char *name, info.lock_type= F_WRLCK; _ma_set_data_pagecache_callbacks(&info.dfile, share); - bitmap_init(&info.changed_fields, changed_fields_bitmap, - share->base.fields, 0); + my_bitmap_init(&info.changed_fields, changed_fields_bitmap, + share->base.fields, 0); if ((*share->init)(&info)) goto err; @@ -273,7 +273,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags) int kfile,open_mode,save_errno; uint i,j,len,errpos,head_length,base_pos,keys, realpath_err, key_parts,unique_key_parts,fulltext_keys,uniques; - uint internal_table= test(open_flags & HA_OPEN_INTERNAL_TABLE); + uint internal_table= MY_TEST(open_flags & HA_OPEN_INTERNAL_TABLE); size_t info_length; char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN], data_name[FN_REFLEN]; @@ -731,7 +731,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags) share->base.is_nulls_extended + share->base.null_bytes + share->base.pack_bytes + - test(share->options & HA_OPTION_CHECKSUM)); + MY_TEST(share->options & HA_OPTION_CHECKSUM)); share->kfile.file= kfile; if (open_flags & HA_OPEN_COPY) diff --git a/storage/maria/ma_packrec.c b/storage/maria/ma_packrec.c index 9b06c0d4f78..a541a657ed2 100644 --- a/storage/maria/ma_packrec.c +++ b/storage/maria/ma_packrec.c @@ -146,9 +146,9 @@ my_bool _ma_once_init_pack_row(MARIA_SHARE *share, File dfile) share->options|= HA_OPTION_READ_ONLY_DATA; return (_ma_read_pack_info(share, dfile, (pbool) - test(!(share->options & - (HA_OPTION_PACK_RECORD | - HA_OPTION_TEMP_COMPRESS_RECORD))))); + MY_TEST(!(share->options & + (HA_OPTION_PACK_RECORD | + HA_OPTION_TEMP_COMPRESS_RECORD))))); } diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c index 4a3c3efd3fb..8e8ecf945f0 100644 --- a/storage/maria/ma_pagecache.c +++ b/storage/maria/ma_pagecache.c @@ -482,7 +482,7 @@ error: DBUG_PRINT("info", ("info_check_lock: thread: 0x%lx block 0x%lx: info: %d wrt: %d," "to lock: %s, to pin: %s", - (ulong)thread, (ulong)block, test(info), + (ulong) thread, (ulong) block, MY_TEST(info), (info ? info->write_lock : 0), page_cache_page_lock_str[lock], page_cache_page_pin_str[pin])); diff --git a/storage/maria/ma_pagecrc.c b/storage/maria/ma_pagecrc.c index a79f34016c1..d3522fa4e88 100644 --- a/storage/maria/ma_pagecrc.c +++ b/storage/maria/ma_pagecrc.c @@ -88,7 +88,7 @@ static my_bool maria_page_crc_check(uchar *page, } new_crc= maria_page_crc((uint32) page_no, page, data_length); DBUG_ASSERT(new_crc != no_crc_val); - res= test(new_crc != crc); + res= MY_TEST(new_crc != crc); if (res) { /* diff --git a/storage/maria/ma_range.c b/storage/maria/ma_range.c index 2a01359f1a1..7747df6415a 100644 --- a/storage/maria/ma_range.c +++ b/storage/maria/ma_range.c @@ -177,7 +177,7 @@ static ha_rows _ma_record_pos(MARIA_HA *info, const uchar *key_data, This is the reason that we add the SEARCH_UPDATE flag here. It makes the key estimation compare in the same way like key write operations - do. Olny so we will find the keys where they have been inserted. + do. Only so we will find the keys where they have been inserted. Adding the flag unconditionally does not hurt as it is used in the above mentioned condition only. So it can safely be used together @@ -219,7 +219,7 @@ static double _ma_search_pos(MARIA_HA *info, MARIA_KEY *key, LINT_INIT(max_keynr); if (pos == HA_OFFSET_ERROR) - DBUG_RETURN(0.5); + DBUG_RETURN(0.0); if (_ma_fetch_keypage(&page, info, keyinfo, pos, PAGECACHE_LOCK_LEFT_UNLOCKED, DFLT_INIT_HITS, @@ -238,8 +238,8 @@ static double _ma_search_pos(MARIA_HA *info, MARIA_KEY *key, Try to find a smaller, better matching key. Matches keynr + [0-1] */ - if (flag > 0 && ! page.node) - offset= 1.0; + if (! page.node) + offset= 0.0; else if ((offset= _ma_search_pos(info, key, nextflag, _ma_kpos(page.node,keypos))) < 0) DBUG_RETURN(offset); @@ -247,10 +247,19 @@ static double _ma_search_pos(MARIA_HA *info, MARIA_KEY *key, else { /* - Found match. Keypos points at the start of the found key - Matches keynr+1 + Found match. Keypos points at the start of the found key. + + For node pages, we are counting underlying trees and for key + pages we are counting keys. + + If this is a node then we have to search backwards to find the + first occurence of the key. The row position in a node tree + is keynr (starting from 0) + offset for sub tree. If there is + no sub tree to search, then we are at start of next sub tree. + + If this is not a node, then the current key position is correct. */ - offset=1.0; /* Matches keynr+1 */ + offset= (page.node) ? 1.0 : 0.0; if ((nextflag & SEARCH_FIND) && page.node && ((keyinfo->flag & (HA_NOSAME | HA_NULL_PART)) != HA_NOSAME || (nextflag & (SEARCH_PREFIX | SEARCH_NO_FIND | SEARCH_LAST | @@ -267,14 +276,18 @@ static double _ma_search_pos(MARIA_HA *info, MARIA_KEY *key, } DBUG_PRINT("info",("keynr: %d offset: %g max_keynr: %d nod: %d flag: %d", keynr,offset,max_keynr,page.node,flag)); - DBUG_RETURN((keynr+offset)/(max_keynr+1)); + DBUG_RETURN((keynr + offset) / (max_keynr + MY_TEST(page.node))); err: DBUG_PRINT("exit",("Error: %d",my_errno)); DBUG_RETURN (-1.0); } -/* Get keynummer of current key and max number of keys in nod */ +/* + Get keynummer of current key and max number of keys in nod + + keynr >= 0 && key_nr <= max_key +*/ static uint _ma_keynr(MARIA_PAGE *page, uchar *keypos, uint *ret_max_key) { diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c index 3645bf69960..59e0630be8c 100644 --- a/storage/maria/ma_recovery.c +++ b/storage/maria/ma_recovery.c @@ -29,6 +29,7 @@ #include "ma_key_recover.h" #include "ma_recovery_util.h" #include "hash.h" +#include <my_check_opt.h> struct st_trn_for_recovery /* used only in the REDO phase */ { @@ -1175,7 +1176,7 @@ prototype_redo_exec_hook(REDO_REPAIR_TABLE) DBUG_ASSERT(maria_tmpdir); info->s->state.key_map= uint8korr(rec->header + FILEID_STORE_SIZE + 8); - quick_repair= test(param.testflag & T_QUICK); + quick_repair= MY_TEST(param.testflag & T_QUICK); if (param.testflag & T_REP_PARALLEL) { diff --git a/storage/maria/ma_sort.c b/storage/maria/ma_sort.c index 433862ea54a..421dc8392e3 100644 --- a/storage/maria/ma_sort.c +++ b/storage/maria/ma_sort.c @@ -19,6 +19,7 @@ */ #include "ma_fulltext.h" +#include <my_check_opt.h> #if defined(MSDOS) || defined(__WIN__) #include <fcntl.h> #else diff --git a/storage/maria/ma_static.c b/storage/maria/ma_static.c index 8c6bf85b39e..35ad7d5a96a 100644 --- a/storage/maria/ma_static.c +++ b/storage/maria/ma_static.c @@ -51,7 +51,7 @@ ulong maria_concurrent_insert= 2; my_off_t maria_max_temp_length= MAX_FILE_SIZE; ulong maria_bulk_insert_tree_size=8192*1024; -ulong maria_data_pointer_size= 4; +ulong maria_data_pointer_size= 6; PAGECACHE maria_pagecache_var; PAGECACHE *maria_pagecache= &maria_pagecache_var; diff --git a/storage/maria/ma_test1.c b/storage/maria/ma_test1.c index 001717932f9..595b87ef4d0 100644 --- a/storage/maria/ma_test1.c +++ b/storage/maria/ma_test1.c @@ -195,7 +195,7 @@ static int run_test(const char *filename) else uniques=0; - offset_to_key= test(null_fields); + offset_to_key= MY_TEST(null_fields); if (key_field == FIELD_BLOB || key_field == FIELD_VARCHAR) offset_to_key+= 2; diff --git a/storage/maria/ma_test2.c b/storage/maria/ma_test2.c index 7b4f29cf972..52c0839cff6 100644 --- a/storage/maria/ma_test2.c +++ b/storage/maria/ma_test2.c @@ -763,7 +763,7 @@ int main(int argc, char *argv[]) records=0; for (j++ ; j < k ; j++) records+=key1[j]; - if ((long) range_records < (long) records*7/10-2 || + if ((long) range_records < (long) records*6/10-2 || (long) range_records > (long) records*14/10+2) { printf("maria_records_range for key: %d returned %lu; Should be about %lu\n", diff --git a/storage/maria/ma_test_force_start.pl b/storage/maria/ma_test_force_start.pl index 8148b2f212b..8e56d6edeed 100755 --- a/storage/maria/ma_test_force_start.pl +++ b/storage/maria/ma_test_force_start.pl @@ -43,7 +43,7 @@ my $error_log_name= "./var/log/master.err"; my @cmd_output; my $whatever; # garbage data $ENV{MTR_VERSION} = 1; # MTR2 does not have --start-and-exit -my $base_server_cmd= "perl mysql-test-run.pl --mysqld=--aria-force-start-after-recovery-failures=$force_after --suite=maria maria.maria-recover ";
+my $base_server_cmd= "perl mysql-test-run.pl --mysqld=--aria-force-start-after-recovery-failures=$force_after --suite=maria maria.maria-recover "; if ($^O =~ /^mswin/i) { print <<EOF; diff --git a/storage/maria/maria_chk.c b/storage/maria/maria_chk.c index 065063fcb07..623d3c6c92e 100644 --- a/storage/maria/maria_chk.c +++ b/storage/maria/maria_chk.c @@ -21,6 +21,7 @@ #include <m_ctype.h> #include <stdarg.h> #include <my_getopt.h> +#include <my_check_opt.h> #ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> #endif @@ -972,7 +973,7 @@ static int maria_chk(HA_CHECK *param, char *filename) { int error,lock_type,recreate; uint warning_printed_by_chk_status; - my_bool rep_quick= test(param->testflag & (T_QUICK | T_FORCE_UNIQUENESS)); + my_bool rep_quick= MY_TEST(param->testflag & (T_QUICK | T_FORCE_UNIQUENESS)); MARIA_HA *info; File datafile; char llbuff[22],llbuff2[22]; @@ -1365,7 +1366,7 @@ static int maria_chk(HA_CHECK *param, char *filename) if ((info->s->data_file_type != STATIC_RECORD) || (param->testflag & (T_EXTEND | T_MEDIUM))) error|=maria_chk_data_link(param, info, - test(param->testflag & T_EXTEND)); + MY_TEST(param->testflag & T_EXTEND)); end_io_cache(¶m->read_cache); } if (!error) @@ -1390,7 +1391,8 @@ static int maria_chk(HA_CHECK *param, char *filename) if ((param->testflag & T_AUTO_INC) || ((param->testflag & T_REP_ANY) && info->s->base.auto_key)) _ma_update_auto_increment_key(param, info, - (my_bool) !test(param->testflag & T_AUTO_INC)); + (my_bool) + !MY_TEST(param->testflag & T_AUTO_INC)); if (info->update & HA_STATE_CHANGED && ! (param->testflag & T_READONLY)) { diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h index 7389184253f..9b57dd2847d 100644 --- a/storage/maria/maria_def.h +++ b/storage/maria/maria_def.h @@ -1319,6 +1319,13 @@ MARIA_RECORD_POS _ma_write_init_default(MARIA_HA *info, const uchar *record); my_bool _ma_write_abort_default(MARIA_HA *info); int maria_delete_table_files(const char *name, myf sync_dir); +/* + This cannot be in my_base.h as it clashes with HA_SPATIAL. + But it was introduced for Aria engine, and is only used there. + So it can safely stay here, only visible to Aria +*/ +#define HA_RTREE_INDEX 16384 /* For RTREE search */ + C_MODE_START #define MARIA_FLUSH_DATA 1 #define MARIA_FLUSH_INDEX 2 diff --git a/storage/maria/maria_read_log.c b/storage/maria/maria_read_log.c index d9393399da4..f5b91f9628f 100644 --- a/storage/maria/maria_read_log.c +++ b/storage/maria/maria_read_log.c @@ -301,7 +301,7 @@ get_one_option(int optid __attribute__((unused)), if (!my_hash_inited(&tables_to_redo)) { my_hash_init2(&tables_to_redo, 16, &my_charset_bin, - 16, 0, 0, my_hash_get_string, 0, HASH_UNIQUE); + 16, 0, 0, my_hash_get_string, 0, 0, HASH_UNIQUE); } do { diff --git a/storage/maria/trnman.c b/storage/maria/trnman.c index d2d14092cac..daccf3550c2 100644 --- a/storage/maria/trnman.c +++ b/storage/maria/trnman.c @@ -386,8 +386,8 @@ TRN *trnman_new_trn(WT_THD *wt) return 0; } - DBUG_PRINT("exit", ("trn: 0x%lx trid: 0x%lu", - (ulong) trn, (ulong) trn->trid)); + DBUG_PRINT("exit", ("trn: %p trid: 0x%lu min_read_from: 0x%lu", + trn, (ulong) trn->trid, (ulong) trn->min_read_from)); DBUG_RETURN(trn); } diff --git a/storage/maria/unittest/ma_pagecache_single.c b/storage/maria/unittest/ma_pagecache_single.c index d7da87a3821..0031582589e 100644 --- a/storage/maria/unittest/ma_pagecache_single.c +++ b/storage/maria/unittest/ma_pagecache_single.c @@ -166,15 +166,15 @@ int simple_read_write_test() PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, 0); - ok((res= test(memcmp(buffr, buffw, TEST_PAGE_SIZE) == 0)), + ok((res= MY_TEST(memcmp(buffr, buffw, TEST_PAGE_SIZE) == 0)), "Simple write-read page "); if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE)) { diag("Got error during flushing pagecache\n"); exit(1); } - ok((res&= test(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, - simple_read_write_test_file))), + ok((res&= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, + simple_read_write_test_file))), "Simple write-read page file"); if (res) reset_file(&file1, file1_name); @@ -225,7 +225,7 @@ int simple_read_change_write_read_test() PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, 0); - ok((res= test(memcmp(buffr, buffw, TEST_PAGE_SIZE) == 0)), + ok((res= MY_TEST(memcmp(buffr, buffw, TEST_PAGE_SIZE) == 0)), "Simple read-change-write-read page "); DBUG_ASSERT(pagecache.blocks_changed == 1); if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE)) @@ -234,8 +234,8 @@ int simple_read_change_write_read_test() exit(1); } DBUG_ASSERT(pagecache.blocks_changed == 0); - ok((res2= test(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, - simple_read_change_write_read_test_file))), + ok((res2= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, + simple_read_change_write_read_test_file))), "Simple read-change-write-read page file"); if (res && res2) reset_file(&file1, file1_name); @@ -299,8 +299,8 @@ int simple_pin_test() res= 0; goto err; } - ok((res= test(test_file(file1, file1_name, TEST_PAGE_SIZE*2, TEST_PAGE_SIZE*2, - simple_pin_test_file1))), + ok((res= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE * 2, + TEST_PAGE_SIZE * 2, simple_pin_test_file1))), "Simple pin page file with pin"); pagecache_unlock(&pagecache, &file1, @@ -314,8 +314,8 @@ int simple_pin_test() res= 0; goto err; } - ok((res&= test(test_file(file1, file1_name, TEST_PAGE_SIZE*2, TEST_PAGE_SIZE, - simple_pin_test_file2))), + ok((res&= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE * 2, + TEST_PAGE_SIZE, simple_pin_test_file2))), "Simple pin page result file"); if (res) reset_file(&file1, file1_name); @@ -378,8 +378,8 @@ int simple_pin_test2() res= 0; goto err; } - ok((res= test(test_file(file1, file1_name, TEST_PAGE_SIZE*2, TEST_PAGE_SIZE*2, - simple_pin_test_file1))), + ok((res= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE * 2, + TEST_PAGE_SIZE * 2, simple_pin_test_file1))), "Simple pin page file with pin 2"); /* Test that a normal flush goes through */ @@ -401,8 +401,8 @@ int simple_pin_test2() res= 0; goto err; } - ok((res&= test(test_file(file1, file1_name, TEST_PAGE_SIZE*2, TEST_PAGE_SIZE, - simple_pin_test_file2))), + ok((res&= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE * 2, + TEST_PAGE_SIZE, simple_pin_test_file2))), "Simple pin page result file 2"); if (res) reset_file(&file1, file1_name); @@ -451,8 +451,8 @@ int simple_pin_no_lock_test() res= 0; goto err; } - ok((res= test(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, - simple_pin_no_lock_test_file1))), + ok((res= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, + simple_pin_no_lock_test_file1))), "Simple pin (no lock) page file with pin 2"); pagecache_unlock(&pagecache, &file1, @@ -466,8 +466,8 @@ int simple_pin_no_lock_test() res= 0; goto err; } - ok((res&= test(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, - simple_pin_no_lock_test_file2))), + ok((res&= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, + simple_pin_no_lock_test_file2))), "Simple pin (no lock) page result file 2"); bfill(buffw, TEST_PAGE_SIZE, '\6'); @@ -486,8 +486,8 @@ int simple_pin_no_lock_test() res= 0; goto err; } - ok((res= test(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, - simple_pin_no_lock_test_file2))), + ok((res= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, + simple_pin_no_lock_test_file2))), "Simple pin (no lock) page file with pin 3"); pagecache_unpin_by_link(&pagecache, link, 0); if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE)) @@ -496,8 +496,8 @@ int simple_pin_no_lock_test() res= 0; goto err; } - ok((res&= test(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, - simple_pin_no_lock_test_file3))), + ok((res&= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, + simple_pin_no_lock_test_file3))), "Simple pin (no lock) page result file 3"); if (res) reset_file(&file1, file1_name); @@ -536,8 +536,8 @@ int simple_delete_forget_test() pagecache_delete(&pagecache, &file1, 0, PAGECACHE_LOCK_WRITE, 0); flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE); - ok((res= test(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, - simple_delete_forget_test_file))), + ok((res= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, + simple_delete_forget_test_file))), "Simple delete-forget page file"); if (res) reset_file(&file1, file1_name); @@ -583,8 +583,8 @@ int simple_delete_flush_test() exit(1); } flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE); - ok((res= test(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, - simple_delete_flush_test_file))), + ok((res= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, + simple_delete_flush_test_file))), "Simple delete flush (link) page file"); if (res) reset_file(&file1, file1_name); @@ -665,8 +665,8 @@ int simple_big_test() ok(1, "Simple big file random read"); flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE); - ok((res= test(test_file(file1, file1_name, PCACHE_SIZE*2, TEST_PAGE_SIZE, - desc))), + ok((res= MY_TEST(test_file(file1, file1_name, PCACHE_SIZE * 2, TEST_PAGE_SIZE, + desc))), "Simple big file"); if (res) reset_file(&file1, file1_name); diff --git a/storage/maria/unittest/ma_test_loghandler-t.c b/storage/maria/unittest/ma_test_loghandler-t.c index ccaa6f7dc8e..abf2078ce8f 100644 --- a/storage/maria/unittest/ma_test_loghandler-t.c +++ b/storage/maria/unittest/ma_test_loghandler-t.c @@ -661,7 +661,7 @@ err: if (maria_log_remove(maria_data_root)) exit(1); - return(test(exit_status())); + return(MY_TEST(exit_status())); } #include "../ma_check_standalone.h" diff --git a/storage/maria/unittest/ma_test_loghandler_multigroup-t.c b/storage/maria/unittest/ma_test_loghandler_multigroup-t.c index 56329a18d7d..c8e63cb26ab 100644 --- a/storage/maria/unittest/ma_test_loghandler_multigroup-t.c +++ b/storage/maria/unittest/ma_test_loghandler_multigroup-t.c @@ -758,7 +758,7 @@ err: if (maria_log_remove(maria_data_root)) exit(1); - return (test(exit_status())); + return (MY_TEST(exit_status())); } #include "../ma_check_standalone.h" diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c index 70a7037a446..6befe3b2d7a 100644 --- a/storage/myisam/ft_boolean_search.c +++ b/storage/myisam/ft_boolean_search.c @@ -533,7 +533,7 @@ static void _ftb_init_index_search(FT_INFO *ftb) { if (ftbe->flags & FTB_FLAG_NO || /* 2 */ ftbe->up->ythresh - ftbe->up->yweaks > - (uint) test(ftbe->flags & FTB_FLAG_YES)) /* 1 */ + (uint) MY_TEST(ftbe->flags & FTB_FLAG_YES)) /* 1 */ { FTB_EXPR *top_ftbe=ftbe->up; ftbw->docid[0]=HA_OFFSET_ERROR; diff --git a/storage/myisam/ft_stopwords.c b/storage/myisam/ft_stopwords.c index 75a6b23a51c..7b2d520a65a 100644 --- a/storage/myisam/ft_stopwords.c +++ b/storage/myisam/ft_stopwords.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates +/* Copyright (c) 2000, 2010, Oracle and/or its affiliates This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/myisam/ftbench/Ecompare.pl b/storage/myisam/ftbench/Ecompare.pl index 450c5c90a50..ae077cdce37 100755 --- a/storage/myisam/ftbench/Ecompare.pl +++ b/storage/myisam/ftbench/Ecompare.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -# Copyright (C) 2003 MySQL AB +# Copyright (c) 2003, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/myisam/ftbench/Ecreate.pl b/storage/myisam/ftbench/Ecreate.pl index 362a09c40a3..0e81abfbce8 100755 --- a/storage/myisam/ftbench/Ecreate.pl +++ b/storage/myisam/ftbench/Ecreate.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -# Copyright (C) 2003 MySQL AB +# Copyright (c) 2003, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/myisam/ftbench/Ereport.pl b/storage/myisam/ftbench/Ereport.pl index 7ea80ac87d0..0f13f0eac14 100755 --- a/storage/myisam/ftbench/Ereport.pl +++ b/storage/myisam/ftbench/Ereport.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -# Copyright (C) 2003 MySQL AB +# Copyright (c) 2003, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/myisam/ftbench/ft-test-run.sh b/storage/myisam/ftbench/ft-test-run.sh index 5c14b357557..17b13d73d47 100755 --- a/storage/myisam/ftbench/ft-test-run.sh +++ b/storage/myisam/ftbench/ft-test-run.sh @@ -1,7 +1,8 @@ #!/bin/sh -# Copyright (C) 2003 MySQL AB -# +# Copyright (c) 2003, 2005, 2006 MySQL AB +# Use is subject to license terms + # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; version 2 diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 6bedc5c07aa..18f0c3b7f60 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -1,5 +1,6 @@ /* Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -479,8 +480,8 @@ int check_definition(MI_KEYDEF *t1_keyinfo, MI_COLUMNDEF *t1_recinfo, { DBUG_PRINT("error", ("Key %d has different definition", i)); DBUG_PRINT("error", ("t1_fulltext= %d, t2_fulltext=%d", - test(t1_keyinfo[i].flag & HA_FULLTEXT), - test(t2_keyinfo[i].flag & HA_FULLTEXT))); + MY_TEST(t1_keyinfo[i].flag & HA_FULLTEXT), + MY_TEST(t2_keyinfo[i].flag & HA_FULLTEXT))); DBUG_RETURN(1); } if (t1_keyinfo[i].flag & HA_SPATIAL && t2_keyinfo[i].flag & HA_SPATIAL) @@ -490,8 +491,8 @@ int check_definition(MI_KEYDEF *t1_keyinfo, MI_COLUMNDEF *t1_recinfo, { DBUG_PRINT("error", ("Key %d has different definition", i)); DBUG_PRINT("error", ("t1_spatial= %d, t2_spatial=%d", - test(t1_keyinfo[i].flag & HA_SPATIAL), - test(t2_keyinfo[i].flag & HA_SPATIAL))); + MY_TEST(t1_keyinfo[i].flag & HA_SPATIAL), + MY_TEST(t2_keyinfo[i].flag & HA_SPATIAL))); DBUG_RETURN(1); } if ((!mysql_40_compat && @@ -667,7 +668,7 @@ ha_myisam::ha_myisam(handlerton *hton, TABLE_SHARE *table_arg) :handler(hton, table_arg), file(0), int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER | HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | - HA_CAN_VIRTUAL_COLUMNS | + HA_CAN_VIRTUAL_COLUMNS | HA_CAN_EXPORT | HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY | HA_FILE_BASED | HA_CAN_GEOMETRY | HA_NO_TRANSACTIONS | HA_CAN_INSERT_DELAYED | HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS | @@ -774,7 +775,7 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked) true, table)) { /* purecov: begin inspected */ - my_errno= HA_ERR_CRASHED; + my_errno= HA_ERR_INCOMPATIBLE_DEFINITION; goto err; /* purecov: end */ } @@ -912,7 +913,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) my_default_record_cache_size, READ_CACHE, share->pack.header_length, 1, MYF(MY_WME)))) { - error= chk_data_link(¶m, file, test(param.testflag & T_EXTEND)); + error= chk_data_link(¶m, file, MY_TEST(param.testflag & T_EXTEND)); end_io_cache(&(param.read_cache)); } param.testflag= old_testflag; @@ -1079,7 +1080,7 @@ int ha_myisam::repair(THD *thd, HA_CHECK ¶m, bool do_optimize) param.db_name= table->s->db.str; param.table_name= table->alias.c_ptr(); - param.tmpfile_createflag = O_RDWR | O_TRUNC; + param.tmpfile_createflag= O_RDWR | O_TRUNC | O_EXCL; param.using_global_keycache = 1; param.thd= thd; param.tmpdir= &mysql_tmpdir_list; @@ -1108,7 +1109,7 @@ int ha_myisam::repair(THD *thd, HA_CHECK ¶m, bool do_optimize) share->state.key_map); ulonglong testflag= param.testflag; #ifdef HAVE_MMAP - bool remap= test(share->file_map); + bool remap= MY_TEST(share->file_map); /* mi_repair*() functions family use file I/O even if memory mapping is available. @@ -1130,14 +1131,14 @@ int ha_myisam::repair(THD *thd, HA_CHECK ¶m, bool do_optimize) /* TODO: respect myisam_repair_threads variable */ thd_proc_info(thd, "Parallel repair"); error = mi_repair_parallel(¶m, file, fixed_name, - test(param.testflag & T_QUICK)); + MY_TEST(param.testflag & T_QUICK)); } else { thd_proc_info(thd, "Repair by sorting"); DEBUG_SYNC(thd, "myisam_before_repair_by_sort"); error = mi_repair_by_sort(¶m, file, fixed_name, - test(param.testflag & T_QUICK)); + MY_TEST(param.testflag & T_QUICK)); } if (error && file->create_unique_index_by_sort && share->state.dupp_key != MAX_KEY) @@ -1149,7 +1150,7 @@ int ha_myisam::repair(THD *thd, HA_CHECK ¶m, bool do_optimize) thd_proc_info(thd, "Repair with keycache"); param.testflag &= ~T_REP_BY_SORT; error= mi_repair(¶m, file, fixed_name, - test(param.testflag & T_QUICK)); + MY_TEST(param.testflag & T_QUICK)); } param.testflag= testflag | (param.testflag & T_RETRY_WITHOUT_QUICK); #ifdef HAVE_MMAP @@ -1561,7 +1562,7 @@ void ha_myisam::start_bulk_insert(ha_rows rows, uint flags) } else { - my_bool all_keys= test(flags & HA_CREATE_UNIQUE_INDEX_BY_SORT); + my_bool all_keys= MY_TEST(flags & HA_CREATE_UNIQUE_INDEX_BY_SORT); mi_disable_indexes_for_rebuild(file, rows, all_keys); } } diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index a44a6236293..86b7b1875bd 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -1,5 +1,4 @@ -/* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1147,7 +1146,7 @@ int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend) if (param->testflag & (T_EXTEND | T_MEDIUM | T_VERBOSE)) { if (_mi_rec_check(info,record, info->rec_buff,block_info.rec_len, - test(info->s->calc_checksum))) + MY_TEST(info->s->calc_checksum))) { mi_check_print_error(param,"Found wrong packed record at %s", llstr(start_recpos,llbuff)); @@ -2364,7 +2363,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info, if (keyseg[i].flag & HA_SPACE_PACK) sort_param.key_length+=get_pack_length(keyseg[i].length); if (keyseg[i].flag & (HA_BLOB_PART | HA_VAR_LENGTH_PART)) - sort_param.key_length+=2 + test(keyseg[i].length >= 127); + sort_param.key_length+= 2 + MY_TEST(keyseg[i].length >= 127); if (keyseg[i].flag & HA_NULL_PART) sort_param.key_length++; } @@ -2866,7 +2865,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info, if (keyseg->flag & HA_SPACE_PACK) sort_param[i].key_length+=get_pack_length(keyseg->length); if (keyseg->flag & (HA_BLOB_PART | HA_VAR_LENGTH_PART)) - sort_param[i].key_length+=2 + test(keyseg->length >= 127); + sort_param[i].key_length+= 2 + MY_TEST(keyseg->length >= 127); if (keyseg->flag & HA_NULL_PART) sort_param[i].key_length++; } @@ -2884,7 +2883,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info, sort_info.total_keys=i; sort_param[0].master= 1; sort_param[0].fix_datafile= (my_bool)(! rep_quick); - sort_param[0].calc_checksum= test(param->testflag & T_CALC_CHECKSUM); + sort_param[0].calc_checksum= MY_TEST(param->testflag & T_CALC_CHECKSUM); if (!ftparser_alloc_param(info)) goto err; @@ -3573,7 +3572,7 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param) sort_param->find_length, (param->testflag & T_QUICK) && sort_param->calc_checksum && - test(info->s->calc_checksum))) + MY_TEST(info->s->calc_checksum))) { mi_check_print_info(param,"Found wrong packed record at %s", llstr(sort_param->start_recpos,llbuff)); @@ -3734,7 +3733,7 @@ int sort_write_record(MI_SORT_PARAM *sort_param) do { - block_length=reclength+ 3 + test(reclength >= (65520-3)); + block_length= reclength + 3 + MY_TEST(reclength >= (65520 - 3)); if (block_length < share->base.min_block_length) block_length=share->base.min_block_length; info->update|=HA_STATE_WRITE_AT_END; @@ -4661,7 +4660,7 @@ static ha_checksum mi_byte_checksum(const uchar *buf, uint length) const uchar *end=buf+length; for (crc=0; buf != end; buf++) crc=((crc << 1) + *((uchar*) buf)) + - test(crc & (((ha_checksum) 1) << (8*sizeof(ha_checksum)-1))); + MY_TEST(crc & (((ha_checksum) 1) << (8 * sizeof(ha_checksum) - 1))); return crc; } diff --git a/storage/myisam/mi_checksum.c b/storage/myisam/mi_checksum.c index e0a8672760d..b89fd996ba1 100644 --- a/storage/myisam/mi_checksum.c +++ b/storage/myisam/mi_checksum.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2001, 2003-2004 MySQL AB +/* Copyright (c) 2000, 2013, 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,7 +23,7 @@ ha_checksum mi_checksum(MI_INFO *info, const uchar *buf) const uchar *record= buf; MI_COLUMNDEF *column= info->s->rec; MI_COLUMNDEF *column_end= column+ info->s->base.fields; - my_bool skip_null_bits= test(info->s->options & HA_OPTION_NULL_FIELDS); + my_bool skip_null_bits= MY_TEST(info->s->options & HA_OPTION_NULL_FIELDS); for ( ; column != column_end ; buf+= column++->length) { diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c index 4de218864de..88b9da6f8a9 100644 --- a/storage/myisam/mi_create.c +++ b/storage/myisam/mi_create.c @@ -138,7 +138,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, pack_reclength++; min_pack_length++; /* We must test for 257 as length includes pack-length */ - if (test(rec->length >= 257)) + if (MY_TEST(rec->length >= 257)) { long_varchar_count++; pack_reclength+= 2; /* May be packed on 3 bytes */ @@ -205,7 +205,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, pack_bytes= (packed+7)/8; if (pack_reclength != INT_MAX32) pack_reclength+= reclength+packed + - test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_OPTION_PACK_RECORD)); + MY_TEST(test_all_bits(options, HA_OPTION_CHECKSUM | + HA_OPTION_PACK_RECORD)); min_pack_length+= pack_bytes; if (!ci->data_file_length && ci->max_rows) @@ -557,7 +558,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, share.base.records=ci->max_rows; share.base.reloc= ci->reloc_rows; share.base.reclength=real_reclength; - share.base.pack_reclength=reclength+ test(options & HA_OPTION_CHECKSUM); + share.base.pack_reclength= reclength + MY_TEST(options & HA_OPTION_CHECKSUM); share.base.max_pack_length=pack_reclength; share.base.min_pack_length=min_pack_length; share.base.pack_bits= pack_bytes; diff --git a/storage/myisam/mi_delete.c b/storage/myisam/mi_delete.c index 907d8e291f6..3fffa55341b 100644 --- a/storage/myisam/mi_delete.c +++ b/storage/myisam/mi_delete.c @@ -353,8 +353,8 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, DBUG_RETURN(-1); } /* Page will be update later if we return 1 */ - DBUG_RETURN(test(length <= (info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH : - (uint) keyinfo->underflow_block_length))); + DBUG_RETURN(MY_TEST(length <= (info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH : + (uint) keyinfo->underflow_block_length))); } save_flag=1; ret_value=del(info,keyinfo,key,anc_buff,leaf_page,leaf_buff,keypos, diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c index 021809ed892..5241d72014c 100644 --- a/storage/myisam/mi_dynrec.c +++ b/storage/myisam/mi_dynrec.c @@ -416,7 +416,7 @@ static int _mi_find_writepos(MI_INFO *info, { /* No deleted blocks; Allocate a new block */ *filepos=info->state->data_file_length; - if ((tmp=reclength+3 + test(reclength >= (65520-3))) < + if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) < info->s->base.min_block_length) tmp= info->s->base.min_block_length; else @@ -864,7 +864,7 @@ static int update_dynamic_record(MI_INFO *info, my_off_t filepos, uchar *record, if (length < reclength) { uint tmp=MY_ALIGN(reclength - length + 3 + - test(reclength >= 65520L),MI_DYN_ALIGN_SIZE); + MY_TEST(reclength >= 65520L), MI_DYN_ALIGN_SIZE); /* Don't create a block bigger than MI_MAX_BLOCK_LENGTH */ tmp= MY_MIN(length+tmp, MI_MAX_BLOCK_LENGTH)-length; /* Check if we can extend this block */ @@ -1025,7 +1025,7 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to, pos++; } new_length=(uint) (end-pos); - if (new_length +1 + test(rec->length > 255 && new_length > 127) + if (new_length + 1 + MY_TEST(rec->length > 255 && new_length > 127) < length) { if (rec->length > 255 && new_length > 127) @@ -1145,7 +1145,7 @@ my_bool _mi_rec_check(MI_INFO *info,const uchar *record, uchar *rec_buff, pos++; } new_length=(uint) (end-pos); - if (new_length +1 + test(rec->length > 255 && new_length > 127) + if (new_length + 1 + MY_TEST(rec->length > 255 && new_length > 127) < length) { if (!(flag & bit)) @@ -1197,7 +1197,7 @@ my_bool _mi_rec_check(MI_INFO *info,const uchar *record, uchar *rec_buff, else to+= length; } - if (packed_length != (uint) (to - rec_buff) + test(info->s->calc_checksum) || + if (packed_length != (uint) (to - rec_buff) + MY_TEST(info->s->calc_checksum) || (bit != 1 && (flag & ~(bit - 1)))) goto err; if (with_checksum && ((uchar) info->checksum != (uchar) *to)) diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c index f57fba5c2c5..a47c1987e38 100644 --- a/storage/myisam/mi_extra.c +++ b/storage/myisam/mi_extra.c @@ -56,7 +56,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) { reinit_io_cache(&info->rec_cache,READ_CACHE,0, (pbool) (info->lock_type != F_UNLCK), - (pbool) test(info->update & HA_STATE_ROW_CHANGED) + (pbool) MY_TEST(info->update & HA_STATE_ROW_CHANGED) ); } info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND | @@ -117,7 +117,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) { reinit_io_cache(&info->rec_cache,READ_CACHE,info->nextpos, (pbool) (info->lock_type != F_UNLCK), - (pbool) test(info->update & HA_STATE_ROW_CHANGED)); + (pbool) MY_TEST(info->update & HA_STATE_ROW_CHANGED)); info->update&= ~HA_STATE_ROW_CHANGED; if (share->concurrent_insert) info->rec_cache.end_of_file=info->state->data_file_length; diff --git a/storage/myisam/mi_keycache.c b/storage/myisam/mi_keycache.c index b45f0efa2f7..59a1ca27614 100644 --- a/storage/myisam/mi_keycache.c +++ b/storage/myisam/mi_keycache.c @@ -49,19 +49,20 @@ int mi_assign_to_key_cache(MI_INFO *info, ulonglong key_map __attribute__((unused)), - KEY_CACHE *key_cache) + KEY_CACHE *new_key_cache) { int error= 0; MYISAM_SHARE* share= info->s; + KEY_CACHE *old_key_cache= share->key_cache; DBUG_ENTER("mi_assign_to_key_cache"); - DBUG_PRINT("enter",("old_key_cache_handle: 0x%lx new_key_cache_handle: 0x%lx", - (long) share->key_cache, (long) key_cache)); + DBUG_PRINT("enter",("old_key_cache_handle: %p new_key_cache_handle: %p", + old_key_cache, new_key_cache)); /* Skip operation if we didn't change key cache. This can happen if we call this for all open instances of the same table */ - if (share->key_cache == key_cache) + if (old_key_cache == new_key_cache) DBUG_RETURN(0); /* @@ -76,15 +77,17 @@ int mi_assign_to_key_cache(MI_INFO *info, in the old key cache. */ - pthread_mutex_lock(&share->key_cache->op_lock); - if (flush_key_blocks(share->key_cache, share->kfile, &share->dirty_part_map, + pthread_mutex_lock(&old_key_cache->op_lock); + DEBUG_SYNC_C("assign_key_cache_op_lock"); + if (flush_key_blocks(old_key_cache, share->kfile, &share->dirty_part_map, FLUSH_RELEASE)) { error= my_errno; mi_print_error(info->s, HA_ERR_CRASHED); mi_mark_crashed(info); /* Mark that table must be checked */ } - pthread_mutex_unlock(&share->key_cache->op_lock); + pthread_mutex_unlock(&old_key_cache->op_lock); + DEBUG_SYNC_C("assign_key_cache_op_unlock"); /* Flush the new key cache for this file. This is needed to ensure @@ -94,7 +97,7 @@ int mi_assign_to_key_cache(MI_INFO *info, (This can never fail as there is never any not written data in the new key cache) */ - (void) flush_key_blocks(key_cache, share->kfile, &share->dirty_part_map, + (void) flush_key_blocks(new_key_cache, share->kfile, &share->dirty_part_map, FLUSH_RELEASE); /* @@ -106,13 +109,13 @@ int mi_assign_to_key_cache(MI_INFO *info, Tell all threads to use the new key cache This should be seen at the lastes for the next call to an myisam function. */ - share->key_cache= key_cache; + share->key_cache= new_key_cache; share->dirty_part_map= 0; /* store the key cache in the global hash structure for future opens */ if (multi_key_cache_set((uchar*) share->unique_file_name, share->unique_name_length, - share->key_cache)) + new_key_cache)) error= my_errno; mysql_mutex_unlock(&share->intern_lock); DBUG_RETURN(error); diff --git a/storage/myisam/mi_locking.c b/storage/myisam/mi_locking.c index 663a226d850..531b800c63e 100644 --- a/storage/myisam/mi_locking.c +++ b/storage/myisam/mi_locking.c @@ -646,7 +646,7 @@ int _mi_decrement_open_count(MI_INFO *info) if (!lock_error && !my_disable_locking) lock_error=mi_lock_database(info,old_lock); } - return test(lock_error || write_error); + return MY_TEST(lock_error || write_error); } diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index f8213b1a3a5..c6af5195f82 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -523,9 +523,9 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) info.s=share; if (_mi_read_pack_info(&info, (pbool) - test(!(share->options & - (HA_OPTION_PACK_RECORD | - HA_OPTION_TEMP_COMPRESS_RECORD))))) + MY_TEST(!(share->options & + (HA_OPTION_PACK_RECORD | + HA_OPTION_TEMP_COMPRESS_RECORD))))) goto err; } else if (share->options & HA_OPTION_PACK_RECORD) diff --git a/storage/myisam/mi_rfirst.c b/storage/myisam/mi_rfirst.c index 057ad4560e3..5f656229b3b 100644 --- a/storage/myisam/mi_rfirst.c +++ b/storage/myisam/mi_rfirst.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2001 MySQL AB +/* Copyright (c) 2000, 2001, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/mi_rlast.c b/storage/myisam/mi_rlast.c index eb583f30e43..b5465d2eadd 100644 --- a/storage/myisam/mi_rlast.c +++ b/storage/myisam/mi_rlast.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2001 MySQL AB +/* Copyright (c) 2000, 2001, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/mi_rrnd.c b/storage/myisam/mi_rrnd.c index 2d69ddfba27..dd321e19e00 100644 --- a/storage/myisam/mi_rrnd.c +++ b/storage/myisam/mi_rrnd.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002, 2004 MySQL AB +/* Copyright (c) 2000-2002, 2004-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/mi_rsamepos.c b/storage/myisam/mi_rsamepos.c index 1841c063cbc..9a7d46eab14 100644 --- a/storage/myisam/mi_rsamepos.c +++ b/storage/myisam/mi_rsamepos.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2001, 2005 MySQL AB +/* Copyright (c) 2000, 2001, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/mi_scan.c b/storage/myisam/mi_scan.c index 0267f9a5d1d..2ccab7ba306 100644 --- a/storage/myisam/mi_scan.c +++ b/storage/myisam/mi_scan.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2001 MySQL AB +/* Copyright (c) 2000, 2001, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/mi_search.c b/storage/myisam/mi_search.c index 01fa10de7a3..3ce112f7906 100644 --- a/storage/myisam/mi_search.c +++ b/storage/myisam/mi_search.c @@ -83,7 +83,7 @@ int _mi_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, } if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, - test(!(nextflag & SEARCH_SAVE_BUFF))))) + MY_TEST(!(nextflag & SEARCH_SAVE_BUFF))))) goto err; DBUG_DUMP("page", buff, mi_getint(buff)); @@ -129,7 +129,7 @@ int _mi_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, { uchar *old_buff=buff; if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, - test(!(nextflag & SEARCH_SAVE_BUFF))))) + MY_TEST(!(nextflag & SEARCH_SAVE_BUFF))))) goto err; keypos=buff+(keypos-old_buff); maxpos=buff+(maxpos-old_buff); diff --git a/storage/myisam/mi_test1.c b/storage/myisam/mi_test1.c index 9e4e1c46891..87cea2e5566 100644 --- a/storage/myisam/mi_test1.c +++ b/storage/myisam/mi_test1.c @@ -268,14 +268,14 @@ static int run_test(const char *filename) if (verbose || (flags[j] >= 1 || (error && my_errno != HA_ERR_KEY_NOT_FOUND))) printf("key: '%.*s' mi_rkey: %3d errno: %3d\n", - (int) key_length,key+test(null_fields),error,my_errno); + (int) key_length, key + MY_TEST(null_fields), error, my_errno); } else { error=mi_delete(file,read_record); if (verbose || error) printf("key: '%.*s' mi_delete: %3d errno: %3d\n", - (int) key_length, key+test(null_fields), error, my_errno); + (int) key_length, key + MY_TEST(null_fields), error, my_errno); if (! error) { deleted++; @@ -296,7 +296,8 @@ static int run_test(const char *filename) (error && (flags[i] != 0 || my_errno != HA_ERR_KEY_NOT_FOUND))) { printf("key: '%.*s' mi_rkey: %3d errno: %3d record: %s\n", - (int) key_length,key+test(null_fields),error,my_errno,record+1); + (int) key_length, key + MY_TEST(null_fields), error, my_errno, + record + 1); } } diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c index 5ac5a128918..2b922bbaa9e 100644 --- a/storage/myisam/mi_write.c +++ b/storage/myisam/mi_write.c @@ -1,5 +1,4 @@ -/* - Copyright (c) 2000, 2011, Oracle and/or its affiliates +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 7ad35c92e6f..0cd01398cbc 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -814,7 +814,7 @@ static void get_options(register int *argc,register char ***argv) static int myisamchk(HA_CHECK *param, char * filename) { int error,lock_type,recreate; - int rep_quick= test(param->testflag & (T_QUICK | T_FORCE_UNIQUENESS)); + int rep_quick= MY_TEST(param->testflag & (T_QUICK | T_FORCE_UNIQUENESS)); MI_INFO *info; File datafile; char llbuff[22],llbuff2[22]; @@ -1128,7 +1128,8 @@ static int myisamchk(HA_CHECK *param, char * filename) if ((info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) || (param->testflag & (T_EXTEND | T_MEDIUM))) - error|=chk_data_link(param, info, test(param->testflag & T_EXTEND)); + error|= chk_data_link(param, info, + MY_TEST(param->testflag & T_EXTEND)); error|=flush_blocks(param, share->key_cache, share->kfile, &share->dirty_part_map); (void) end_io_cache(¶m->read_cache); @@ -1152,7 +1153,7 @@ static int myisamchk(HA_CHECK *param, char * filename) if ((param->testflag & T_AUTO_INC) || ((param->testflag & T_REP_ANY) && info->s->base.auto_key)) update_auto_increment_key(param, info, - (my_bool) !test(param->testflag & T_AUTO_INC)); + (my_bool) !MY_TEST(param->testflag & T_AUTO_INC)); if (!(param->testflag & T_DESCRIPT)) { diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c index 461a3eddcca..8854a85c3d3 100644 --- a/storage/myisam/myisampack.c +++ b/storage/myisam/myisampack.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates Copyright (c) 2009, 2013, Monty Program Ab. This program is free software; you can redistribute it and/or modify diff --git a/storage/myisam/mysql-test/storage_engine/alter_tablespace.rdiff b/storage/myisam/mysql-test/storage_engine/alter_tablespace.rdiff index 70f94d67816..4215af58011 100644 --- a/storage/myisam/mysql-test/storage_engine/alter_tablespace.rdiff +++ b/storage/myisam/mysql-test/storage_engine/alter_tablespace.rdiff @@ -16,7 +16,7 @@ -ERROR HY000: Tablespace has been discarded for table 't1' -ALTER TABLE t1 IMPORT TABLESPACE; -Warnings: --Warning 1810 <STORAGE_ENGINE>: IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification +-Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification -SELECT a FROM t1; -a -1 diff --git a/storage/myisam/rt_index.h b/storage/myisam/rt_index.h index 0d20cc9eb35..e7f00b1c5df 100644 --- a/storage/myisam/rt_index.h +++ b/storage/myisam/rt_index.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2002, 2004 MySQL AB & Ramil Kalimullin +/* Copyright (c) 2002, 2004-2006 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/rt_key.c b/storage/myisam/rt_key.c index 495fa258662..f4dbf06ae2f 100644 --- a/storage/myisam/rt_key.c +++ b/storage/myisam/rt_key.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB & Ramil Kalimullin +/* Copyright (c) 2000, 2002-2005, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/rt_key.h b/storage/myisam/rt_key.h index 81b1b177864..94d79d08feb 100644 --- a/storage/myisam/rt_key.h +++ b/storage/myisam/rt_key.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2002, 2004 MySQL AB & Ramil Kalimullin +/* Copyright (c) 2002, 2004-2006 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/rt_mbr.c b/storage/myisam/rt_mbr.c index 64e220b2968..05576f0b5e9 100644 --- a/storage/myisam/rt_mbr.c +++ b/storage/myisam/rt_mbr.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2002-2004, 2006 MySQL AB & Ramil Kalimullin +/* Copyright (c) 2002-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/rt_mbr.h b/storage/myisam/rt_mbr.h index 70acc5c19a5..597e938758f 100644 --- a/storage/myisam/rt_mbr.h +++ b/storage/myisam/rt_mbr.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2002, 2004 MySQL AB & Ramil Kalimullin +/* Copyright (c) 2002, 2004-2006 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisam/sp_defs.h b/storage/myisam/sp_defs.h index da7a45e2634..e04f0578fd7 100644 --- a/storage/myisam/sp_defs.h +++ b/storage/myisam/sp_defs.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2002, 2004 MySQL AB & Ramil Kalimullin +/* Copyright (c) 2002, 2004-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/ha_myisammrg.h b/storage/myisammrg/ha_myisammrg.h index 6b4301616d9..e5a74baa1ae 100644 --- a/storage/myisammrg/ha_myisammrg.h +++ b/storage/myisammrg/ha_myisammrg.h @@ -89,7 +89,7 @@ public: HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_NULL_IN_KEY | HA_CAN_INDEX_BLOBS | HA_FILE_BASED | HA_ANY_INDEX_MAY_BE_UNIQUE | HA_CAN_BIT_FIELD | - HA_HAS_RECORDS | + HA_HAS_RECORDS | HA_CAN_EXPORT | HA_NO_COPY_ON_ALTER | HA_DUPLICATE_POS); } diff --git a/storage/myisammrg/myrg_delete.c b/storage/myisammrg/myrg_delete.c index af9fb2877d2..a80020d69cd 100644 --- a/storage/myisammrg/myrg_delete.c +++ b/storage/myisammrg/myrg_delete.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_locking.c b/storage/myisammrg/myrg_locking.c index a3618f95d03..2c48f51991a 100644 --- a/storage/myisammrg/myrg_locking.c +++ b/storage/myisammrg/myrg_locking.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_panic.c b/storage/myisammrg/myrg_panic.c index 223322aff89..63e7462609e 100644 --- a/storage/myisammrg/myrg_panic.c +++ b/storage/myisammrg/myrg_panic.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2001 MySQL AB +/* Copyright (c) 2000, 2001, 2005, 2006 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_range.c b/storage/myisammrg/myrg_range.c index 97292a05b36..7dddf12657b 100644 --- a/storage/myisammrg/myrg_range.c +++ b/storage/myisammrg/myrg_range.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2002, 2004 MySQL AB +/* Copyright (c) 2002, 2004-2006 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_rfirst.c b/storage/myisammrg/myrg_rfirst.c index d47a52779eb..157029e5c3d 100644 --- a/storage/myisammrg/myrg_rfirst.c +++ b/storage/myisammrg/myrg_rfirst.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2001, 2003 MySQL AB +/* Copyright (c) 2000, 2001, 2003, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_rlast.c b/storage/myisammrg/myrg_rlast.c index 06acaccfee3..8fcb424732c 100644 --- a/storage/myisammrg/myrg_rlast.c +++ b/storage/myisammrg/myrg_rlast.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2001, 2003 MySQL AB +/* Copyright (c) 2000, 2001, 2003, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_rnext.c b/storage/myisammrg/myrg_rnext.c index 1804b410048..b19d4d5695d 100644 --- a/storage/myisammrg/myrg_rnext.c +++ b/storage/myisammrg/myrg_rnext.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000-2003, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_rnext_same.c b/storage/myisammrg/myrg_rnext_same.c index 46626dadf72..6b741839a70 100644 --- a/storage/myisammrg/myrg_rnext_same.c +++ b/storage/myisammrg/myrg_rnext_same.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2002, 2004 MySQL AB +/* Copyright (c) 2002, 2004-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_rprev.c b/storage/myisammrg/myrg_rprev.c index 342bbf5bf70..581bc215c52 100644 --- a/storage/myisammrg/myrg_rprev.c +++ b/storage/myisammrg/myrg_rprev.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000-2003, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_rrnd.c b/storage/myisammrg/myrg_rrnd.c index 6eb0107304b..2e6a77ee5b9 100644 --- a/storage/myisammrg/myrg_rrnd.c +++ b/storage/myisammrg/myrg_rrnd.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_rsame.c b/storage/myisammrg/myrg_rsame.c index 7c49d9e4042..34dbbe51007 100644 --- a/storage/myisammrg/myrg_rsame.c +++ b/storage/myisammrg/myrg_rsame.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_update.c b/storage/myisammrg/myrg_update.c index 69b7a1b5382..add6f9f819b 100644 --- a/storage/myisammrg/myrg_update.c +++ b/storage/myisammrg/myrg_update.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2002 MySQL AB +/* Copyright (c) 2000-2002, 2005-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/myrg_write.c b/storage/myisammrg/myrg_write.c index e8ed9a13e9d..dbe3142c43e 100644 --- a/storage/myisammrg/myrg_write.c +++ b/storage/myisammrg/myrg_write.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2001-2002, 2004 MySQL AB +/* Copyright (c) 2001, 2002, 2004-2007 MySQL AB + Use is subject to license terms 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 diff --git a/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff b/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff index aed79e92d2b..19ca1a1b6e1 100644 --- a/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff +++ b/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff @@ -16,7 +16,7 @@ -ERROR HY000: Tablespace has been discarded for table 't1' -ALTER TABLE t1 IMPORT TABLESPACE; -Warnings: --Warning 1810 <STORAGE_ENGINE>: IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification +-Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification -SELECT a FROM t1; -a -1 diff --git a/storage/ndb/config/win-includes b/storage/ndb/config/win-includes index f385723c65c..e3538cd8c5c 100755 --- a/storage/ndb/config/win-includes +++ b/storage/ndb/config/win-includes @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/config/win-libraries b/storage/ndb/config/win-libraries index e38ce1f6b06..01cbab3a74a 100755 --- a/storage/ndb/config/win-libraries +++ b/storage/ndb/config/win-libraries @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/config/win-name b/storage/ndb/config/win-name index 4d797f0584c..1613111006e 100755 --- a/storage/ndb/config/win-name +++ b/storage/ndb/config/win-name @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/config/win-sources b/storage/ndb/config/win-sources index bb829bd30ba..725c1059d3f 100755 --- a/storage/ndb/config/win-sources +++ b/storage/ndb/config/win-sources @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/debugger/DebuggerNames.hpp b/storage/ndb/include/debugger/DebuggerNames.hpp index 03898b6c1de..5e412390f4a 100644 --- a/storage/ndb/include/debugger/DebuggerNames.hpp +++ b/storage/ndb/include/debugger/DebuggerNames.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/debugger/EventLogger.hpp b/storage/ndb/include/debugger/EventLogger.hpp index dca8c817cd2..2da1bd55a78 100644 --- a/storage/ndb/include/debugger/EventLogger.hpp +++ b/storage/ndb/include/debugger/EventLogger.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/debugger/GrepError.hpp b/storage/ndb/include/debugger/GrepError.hpp index 64779e5ea05..da0c7d40525 100644 --- a/storage/ndb/include/debugger/GrepError.hpp +++ b/storage/ndb/include/debugger/GrepError.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/debugger/SignalLoggerManager.hpp b/storage/ndb/include/debugger/SignalLoggerManager.hpp index f1d5b25a8bc..447c9c4d4da 100644 --- a/storage/ndb/include/debugger/SignalLoggerManager.hpp +++ b/storage/ndb/include/debugger/SignalLoggerManager.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/editline/editline.h b/storage/ndb/include/editline/editline.h index 8f1d261da8a..5fe77ab7fbd 100644 --- a/storage/ndb/include/editline/editline.h +++ b/storage/ndb/include/editline/editline.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/AttributeDescriptor.hpp b/storage/ndb/include/kernel/AttributeDescriptor.hpp index f82bd78785a..78b0c917ce4 100644 --- a/storage/ndb/include/kernel/AttributeDescriptor.hpp +++ b/storage/ndb/include/kernel/AttributeDescriptor.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/AttributeHeader.hpp b/storage/ndb/include/kernel/AttributeHeader.hpp index e567a900aac..cd5023187a0 100644 --- a/storage/ndb/include/kernel/AttributeHeader.hpp +++ b/storage/ndb/include/kernel/AttributeHeader.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/AttributeList.hpp b/storage/ndb/include/kernel/AttributeList.hpp index ac89830f6c5..ed9c8facfe1 100644 --- a/storage/ndb/include/kernel/AttributeList.hpp +++ b/storage/ndb/include/kernel/AttributeList.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/BlockNumbers.h b/storage/ndb/include/kernel/BlockNumbers.h index fb8957947a2..ab0b05ab16f 100644 --- a/storage/ndb/include/kernel/BlockNumbers.h +++ b/storage/ndb/include/kernel/BlockNumbers.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/GlobalSignalNumbers.h b/storage/ndb/include/kernel/GlobalSignalNumbers.h index 9c27cea5b0c..84bce8f20d2 100644 --- a/storage/ndb/include/kernel/GlobalSignalNumbers.h +++ b/storage/ndb/include/kernel/GlobalSignalNumbers.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/GrepEvent.hpp b/storage/ndb/include/kernel/GrepEvent.hpp index 885a95f4f9b..74a5afe5907 100644 --- a/storage/ndb/include/kernel/GrepEvent.hpp +++ b/storage/ndb/include/kernel/GrepEvent.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/Interpreter.hpp b/storage/ndb/include/kernel/Interpreter.hpp index 22ad264857d..69f045a551e 100644 --- a/storage/ndb/include/kernel/Interpreter.hpp +++ b/storage/ndb/include/kernel/Interpreter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/LogLevel.hpp b/storage/ndb/include/kernel/LogLevel.hpp index 0232aa32002..beba32f49a7 100644 --- a/storage/ndb/include/kernel/LogLevel.hpp +++ b/storage/ndb/include/kernel/LogLevel.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/NodeBitmask.hpp b/storage/ndb/include/kernel/NodeBitmask.hpp index fb997819bac..902e754e056 100644 --- a/storage/ndb/include/kernel/NodeBitmask.hpp +++ b/storage/ndb/include/kernel/NodeBitmask.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/NodeInfo.hpp b/storage/ndb/include/kernel/NodeInfo.hpp index c00952e5f17..f3f9b2c71fe 100644 --- a/storage/ndb/include/kernel/NodeInfo.hpp +++ b/storage/ndb/include/kernel/NodeInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/NodeState.hpp b/storage/ndb/include/kernel/NodeState.hpp index f66c39655b2..575b6e80e7f 100644 --- a/storage/ndb/include/kernel/NodeState.hpp +++ b/storage/ndb/include/kernel/NodeState.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/RefConvert.hpp b/storage/ndb/include/kernel/RefConvert.hpp index cb63c754d0e..3ce4045e915 100644 --- a/storage/ndb/include/kernel/RefConvert.hpp +++ b/storage/ndb/include/kernel/RefConvert.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/kernel_types.h b/storage/ndb/include/kernel/kernel_types.h index 16c78215292..066792a0fb8 100644 --- a/storage/ndb/include/kernel/kernel_types.h +++ b/storage/ndb/include/kernel/kernel_types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/ndb_limits.h b/storage/ndb/include/kernel/ndb_limits.h index 90481fc35ee..ae69562dd02 100644 --- a/storage/ndb/include/kernel/ndb_limits.h +++ b/storage/ndb/include/kernel/ndb_limits.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/AbortAll.hpp b/storage/ndb/include/kernel/signaldata/AbortAll.hpp index ecad1c49bc4..e82e74e0daf 100644 --- a/storage/ndb/include/kernel/signaldata/AbortAll.hpp +++ b/storage/ndb/include/kernel/signaldata/AbortAll.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/AccFrag.hpp b/storage/ndb/include/kernel/signaldata/AccFrag.hpp index 24cc14dffc9..7bb2f94b1aa 100644 --- a/storage/ndb/include/kernel/signaldata/AccFrag.hpp +++ b/storage/ndb/include/kernel/signaldata/AccFrag.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/AccLock.hpp b/storage/ndb/include/kernel/signaldata/AccLock.hpp index 2e795292a6e..525d9291f24 100644 --- a/storage/ndb/include/kernel/signaldata/AccLock.hpp +++ b/storage/ndb/include/kernel/signaldata/AccLock.hpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB + Use is subject to license terms 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 diff --git a/storage/ndb/include/kernel/signaldata/AccScan.hpp b/storage/ndb/include/kernel/signaldata/AccScan.hpp index 984e39a7c17..e1ba882e418 100644 --- a/storage/ndb/include/kernel/signaldata/AccScan.hpp +++ b/storage/ndb/include/kernel/signaldata/AccScan.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/AccSizeAltReq.hpp b/storage/ndb/include/kernel/signaldata/AccSizeAltReq.hpp index 37d762b298e..9b64498ab72 100644 --- a/storage/ndb/include/kernel/signaldata/AccSizeAltReq.hpp +++ b/storage/ndb/include/kernel/signaldata/AccSizeAltReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/AllocNodeId.hpp b/storage/ndb/include/kernel/signaldata/AllocNodeId.hpp index 5cce7e5c51c..e346b344fb9 100644 --- a/storage/ndb/include/kernel/signaldata/AllocNodeId.hpp +++ b/storage/ndb/include/kernel/signaldata/AllocNodeId.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/AlterIndx.hpp b/storage/ndb/include/kernel/signaldata/AlterIndx.hpp index 3f3ecaf9e2a..9bf29f98dfd 100644 --- a/storage/ndb/include/kernel/signaldata/AlterIndx.hpp +++ b/storage/ndb/include/kernel/signaldata/AlterIndx.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/AlterTab.hpp b/storage/ndb/include/kernel/signaldata/AlterTab.hpp index 6d85b307a5a..c91e068326b 100644 --- a/storage/ndb/include/kernel/signaldata/AlterTab.hpp +++ b/storage/ndb/include/kernel/signaldata/AlterTab.hpp @@ -1,5 +1,5 @@ -/* Copyright (C) 2003 MySQL AB - +/* Copyright (c) 2003, 2005, 2006 MySQL AB + Use is subject to license terms 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. diff --git a/storage/ndb/include/kernel/signaldata/AlterTable.hpp b/storage/ndb/include/kernel/signaldata/AlterTable.hpp index 8b6e2c8a253..f4710366c6a 100644 --- a/storage/ndb/include/kernel/signaldata/AlterTable.hpp +++ b/storage/ndb/include/kernel/signaldata/AlterTable.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/AlterTrig.hpp b/storage/ndb/include/kernel/signaldata/AlterTrig.hpp index 731a055f0a9..839e218ae7e 100644 --- a/storage/ndb/include/kernel/signaldata/AlterTrig.hpp +++ b/storage/ndb/include/kernel/signaldata/AlterTrig.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ApiBroadcast.hpp b/storage/ndb/include/kernel/signaldata/ApiBroadcast.hpp index 13da1aa48c8..0813ca6f94f 100644 --- a/storage/ndb/include/kernel/signaldata/ApiBroadcast.hpp +++ b/storage/ndb/include/kernel/signaldata/ApiBroadcast.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp b/storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp index eaec47bdf09..63e472abde1 100644 --- a/storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp +++ b/storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ApiVersion.hpp b/storage/ndb/include/kernel/signaldata/ApiVersion.hpp index 15867119579..b2b5e82da40 100644 --- a/storage/ndb/include/kernel/signaldata/ApiVersion.hpp +++ b/storage/ndb/include/kernel/signaldata/ApiVersion.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp b/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp index 1973eeb0273..366afa4b477 100644 --- a/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp +++ b/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/AttrInfo.hpp b/storage/ndb/include/kernel/signaldata/AttrInfo.hpp index 5dec2f9029d..fa654ecc889 100644 --- a/storage/ndb/include/kernel/signaldata/AttrInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/AttrInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/BackupContinueB.hpp b/storage/ndb/include/kernel/signaldata/BackupContinueB.hpp index a2cd23450ef..af70e7f69d1 100644 --- a/storage/ndb/include/kernel/signaldata/BackupContinueB.hpp +++ b/storage/ndb/include/kernel/signaldata/BackupContinueB.hpp @@ -1,5 +1,5 @@ -/* Copyright (C) 2003 MySQL AB - +/* Copyright (c) 2003, 2005, 2006 MySQL AB + Use is subject to license terms 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. diff --git a/storage/ndb/include/kernel/signaldata/BackupImpl.hpp b/storage/ndb/include/kernel/signaldata/BackupImpl.hpp index 729fe0f88ea..1a8bef6bbb7 100644 --- a/storage/ndb/include/kernel/signaldata/BackupImpl.hpp +++ b/storage/ndb/include/kernel/signaldata/BackupImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/BackupSignalData.hpp b/storage/ndb/include/kernel/signaldata/BackupSignalData.hpp index cc225aee9ee..3148bfb8dc3 100644 --- a/storage/ndb/include/kernel/signaldata/BackupSignalData.hpp +++ b/storage/ndb/include/kernel/signaldata/BackupSignalData.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/BlockCommitOrd.hpp b/storage/ndb/include/kernel/signaldata/BlockCommitOrd.hpp index 490055a563e..129ca91ded4 100644 --- a/storage/ndb/include/kernel/signaldata/BlockCommitOrd.hpp +++ b/storage/ndb/include/kernel/signaldata/BlockCommitOrd.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/BuildIndx.hpp b/storage/ndb/include/kernel/signaldata/BuildIndx.hpp index 4f00aa0010a..a14a8039308 100644 --- a/storage/ndb/include/kernel/signaldata/BuildIndx.hpp +++ b/storage/ndb/include/kernel/signaldata/BuildIndx.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CheckNodeGroups.hpp b/storage/ndb/include/kernel/signaldata/CheckNodeGroups.hpp index 3b524a17312..e0ffd335806 100644 --- a/storage/ndb/include/kernel/signaldata/CheckNodeGroups.hpp +++ b/storage/ndb/include/kernel/signaldata/CheckNodeGroups.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp b/storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp index 09bbcf1f588..b22c71f1082 100644 --- a/storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp +++ b/storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CmInit.hpp b/storage/ndb/include/kernel/signaldata/CmInit.hpp index e076b0ed234..102309e9602 100644 --- a/storage/ndb/include/kernel/signaldata/CmInit.hpp +++ b/storage/ndb/include/kernel/signaldata/CmInit.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CmRegSignalData.hpp b/storage/ndb/include/kernel/signaldata/CmRegSignalData.hpp index 5035a2a069e..8203d6e5901 100644 --- a/storage/ndb/include/kernel/signaldata/CmRegSignalData.hpp +++ b/storage/ndb/include/kernel/signaldata/CmRegSignalData.hpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB + Use is subject to license terms 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 diff --git a/storage/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp b/storage/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp index c30450a02d7..fbe01a7de02 100644 --- a/storage/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp +++ b/storage/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CntrMasterConf.hpp b/storage/ndb/include/kernel/signaldata/CntrMasterConf.hpp index 13384e8c3fd..f6043428227 100644 --- a/storage/ndb/include/kernel/signaldata/CntrMasterConf.hpp +++ b/storage/ndb/include/kernel/signaldata/CntrMasterConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CntrMasterReq.hpp b/storage/ndb/include/kernel/signaldata/CntrMasterReq.hpp index 6ef6baf4cc7..0df938efe49 100644 --- a/storage/ndb/include/kernel/signaldata/CntrMasterReq.hpp +++ b/storage/ndb/include/kernel/signaldata/CntrMasterReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ConfigParamId.hpp b/storage/ndb/include/kernel/signaldata/ConfigParamId.hpp index b4bd4aab262..950913e1e45 100644 --- a/storage/ndb/include/kernel/signaldata/ConfigParamId.hpp +++ b/storage/ndb/include/kernel/signaldata/ConfigParamId.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ContinueFragmented.hpp b/storage/ndb/include/kernel/signaldata/ContinueFragmented.hpp index c9f3d572fb5..f9ab34a44e2 100644 --- a/storage/ndb/include/kernel/signaldata/ContinueFragmented.hpp +++ b/storage/ndb/include/kernel/signaldata/ContinueFragmented.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CopyActive.hpp b/storage/ndb/include/kernel/signaldata/CopyActive.hpp index a94204854a1..5ded351be75 100644 --- a/storage/ndb/include/kernel/signaldata/CopyActive.hpp +++ b/storage/ndb/include/kernel/signaldata/CopyActive.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CopyFrag.hpp b/storage/ndb/include/kernel/signaldata/CopyFrag.hpp index d89e2c0a35f..d4f6f5c6e50 100644 --- a/storage/ndb/include/kernel/signaldata/CopyFrag.hpp +++ b/storage/ndb/include/kernel/signaldata/CopyFrag.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CopyGCIReq.hpp b/storage/ndb/include/kernel/signaldata/CopyGCIReq.hpp index d8da1238396..27b51260498 100644 --- a/storage/ndb/include/kernel/signaldata/CopyGCIReq.hpp +++ b/storage/ndb/include/kernel/signaldata/CopyGCIReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CreateEvnt.hpp b/storage/ndb/include/kernel/signaldata/CreateEvnt.hpp index 72aa6e160b9..328c5146c6c 100644 --- a/storage/ndb/include/kernel/signaldata/CreateEvnt.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateEvnt.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp b/storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp index a67203c7e6c..7ff27d4305f 100644 --- a/storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp index fdf37d55ea7..21600896f5d 100644 --- a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CreateFrag.hpp b/storage/ndb/include/kernel/signaldata/CreateFrag.hpp index 73050aa68f4..92f3e14829a 100644 --- a/storage/ndb/include/kernel/signaldata/CreateFrag.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateFrag.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CreateFragmentation.hpp b/storage/ndb/include/kernel/signaldata/CreateFragmentation.hpp index cfae4c84d43..7a31a9c4742 100644 --- a/storage/ndb/include/kernel/signaldata/CreateFragmentation.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateFragmentation.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CreateIndx.hpp b/storage/ndb/include/kernel/signaldata/CreateIndx.hpp index ec4d5166399..799bce956c7 100644 --- a/storage/ndb/include/kernel/signaldata/CreateIndx.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateIndx.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CreateObj.hpp b/storage/ndb/include/kernel/signaldata/CreateObj.hpp index a4e6e2f4bf1..fcab3949e48 100644 --- a/storage/ndb/include/kernel/signaldata/CreateObj.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateObj.hpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB + Use is subject to license terms 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 diff --git a/storage/ndb/include/kernel/signaldata/CreateTab.hpp b/storage/ndb/include/kernel/signaldata/CreateTab.hpp index 7e9e3827c5a..ddcdcb9b6a3 100644 --- a/storage/ndb/include/kernel/signaldata/CreateTab.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateTab.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CreateTable.hpp b/storage/ndb/include/kernel/signaldata/CreateTable.hpp index 421a2678102..baa49bb8337 100644 --- a/storage/ndb/include/kernel/signaldata/CreateTable.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateTable.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/CreateTrig.hpp b/storage/ndb/include/kernel/signaldata/CreateTrig.hpp index 9dbceaee326..708d90b9029 100644 --- a/storage/ndb/include/kernel/signaldata/CreateTrig.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateTrig.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DiAddTab.hpp b/storage/ndb/include/kernel/signaldata/DiAddTab.hpp index 8f0b2de800a..37989edcf50 100644 --- a/storage/ndb/include/kernel/signaldata/DiAddTab.hpp +++ b/storage/ndb/include/kernel/signaldata/DiAddTab.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DiGetNodes.hpp b/storage/ndb/include/kernel/signaldata/DiGetNodes.hpp index ea6046c2979..4b151ed6d3f 100644 --- a/storage/ndb/include/kernel/signaldata/DiGetNodes.hpp +++ b/storage/ndb/include/kernel/signaldata/DiGetNodes.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DictLock.hpp b/storage/ndb/include/kernel/signaldata/DictLock.hpp index fc3af298b5e..ad6580b58c6 100644 --- a/storage/ndb/include/kernel/signaldata/DictLock.hpp +++ b/storage/ndb/include/kernel/signaldata/DictLock.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DictObjOp.hpp b/storage/ndb/include/kernel/signaldata/DictObjOp.hpp index 395a5f1bf23..b742f52be4f 100644 --- a/storage/ndb/include/kernel/signaldata/DictObjOp.hpp +++ b/storage/ndb/include/kernel/signaldata/DictObjOp.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DictSchemaInfo.hpp b/storage/ndb/include/kernel/signaldata/DictSchemaInfo.hpp index b9b9ac079b6..c6ce12e16c1 100644 --- a/storage/ndb/include/kernel/signaldata/DictSchemaInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/DictSchemaInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DictSizeAltReq.hpp b/storage/ndb/include/kernel/signaldata/DictSizeAltReq.hpp index b6abbd29d2d..8370b5beae6 100644 --- a/storage/ndb/include/kernel/signaldata/DictSizeAltReq.hpp +++ b/storage/ndb/include/kernel/signaldata/DictSizeAltReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DictStart.hpp b/storage/ndb/include/kernel/signaldata/DictStart.hpp index 2129fec8365..7ec04cc1912 100644 --- a/storage/ndb/include/kernel/signaldata/DictStart.hpp +++ b/storage/ndb/include/kernel/signaldata/DictStart.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp b/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp index bab07c9e39e..80a0da5fb1e 100644 --- a/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DihAddFrag.hpp b/storage/ndb/include/kernel/signaldata/DihAddFrag.hpp index 195f33b0bb0..6c4289cf666 100644 --- a/storage/ndb/include/kernel/signaldata/DihAddFrag.hpp +++ b/storage/ndb/include/kernel/signaldata/DihAddFrag.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DihContinueB.hpp b/storage/ndb/include/kernel/signaldata/DihContinueB.hpp index 458ae9ca155..c5c93d91ff4 100644 --- a/storage/ndb/include/kernel/signaldata/DihContinueB.hpp +++ b/storage/ndb/include/kernel/signaldata/DihContinueB.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DihSizeAltReq.hpp b/storage/ndb/include/kernel/signaldata/DihSizeAltReq.hpp index ca5754a0985..84417dfb062 100644 --- a/storage/ndb/include/kernel/signaldata/DihSizeAltReq.hpp +++ b/storage/ndb/include/kernel/signaldata/DihSizeAltReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DihStartTab.hpp b/storage/ndb/include/kernel/signaldata/DihStartTab.hpp index b63e4e64b31..cf81a0c1e0c 100644 --- a/storage/ndb/include/kernel/signaldata/DihStartTab.hpp +++ b/storage/ndb/include/kernel/signaldata/DihStartTab.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DihSwitchReplica.hpp b/storage/ndb/include/kernel/signaldata/DihSwitchReplica.hpp index 5130aef5373..8018a681f42 100644 --- a/storage/ndb/include/kernel/signaldata/DihSwitchReplica.hpp +++ b/storage/ndb/include/kernel/signaldata/DihSwitchReplica.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DisconnectRep.hpp b/storage/ndb/include/kernel/signaldata/DisconnectRep.hpp index 0aee9322ae1..d8103f829a6 100644 --- a/storage/ndb/include/kernel/signaldata/DisconnectRep.hpp +++ b/storage/ndb/include/kernel/signaldata/DisconnectRep.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DropFilegroup.hpp b/storage/ndb/include/kernel/signaldata/DropFilegroup.hpp index d94c2edadde..0aaf876b5b5 100644 --- a/storage/ndb/include/kernel/signaldata/DropFilegroup.hpp +++ b/storage/ndb/include/kernel/signaldata/DropFilegroup.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp b/storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp index 96b53069b7c..3e211fd0f7b 100644 --- a/storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp +++ b/storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DropIndx.hpp b/storage/ndb/include/kernel/signaldata/DropIndx.hpp index 94cad5e24eb..098641cc635 100644 --- a/storage/ndb/include/kernel/signaldata/DropIndx.hpp +++ b/storage/ndb/include/kernel/signaldata/DropIndx.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DropObj.hpp b/storage/ndb/include/kernel/signaldata/DropObj.hpp index 0e323d5849d..0f331a6adbe 100644 --- a/storage/ndb/include/kernel/signaldata/DropObj.hpp +++ b/storage/ndb/include/kernel/signaldata/DropObj.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DropTab.hpp b/storage/ndb/include/kernel/signaldata/DropTab.hpp index 22c21144d03..7497b085a34 100644 --- a/storage/ndb/include/kernel/signaldata/DropTab.hpp +++ b/storage/ndb/include/kernel/signaldata/DropTab.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DropTabFile.hpp b/storage/ndb/include/kernel/signaldata/DropTabFile.hpp index 82e3695adbb..4c6c4d47270 100644 --- a/storage/ndb/include/kernel/signaldata/DropTabFile.hpp +++ b/storage/ndb/include/kernel/signaldata/DropTabFile.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DropTable.hpp b/storage/ndb/include/kernel/signaldata/DropTable.hpp index e785db83622..73a1ea7dcd2 100644 --- a/storage/ndb/include/kernel/signaldata/DropTable.hpp +++ b/storage/ndb/include/kernel/signaldata/DropTable.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DropTrig.hpp b/storage/ndb/include/kernel/signaldata/DropTrig.hpp index 5638dd780c5..406d1a59596 100644 --- a/storage/ndb/include/kernel/signaldata/DropTrig.hpp +++ b/storage/ndb/include/kernel/signaldata/DropTrig.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp b/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp index b9cc0cd38f9..8cbb2e45202 100644 --- a/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp +++ b/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/EmptyLcp.hpp b/storage/ndb/include/kernel/signaldata/EmptyLcp.hpp index 73783f185eb..6566ddb2b6f 100644 --- a/storage/ndb/include/kernel/signaldata/EmptyLcp.hpp +++ b/storage/ndb/include/kernel/signaldata/EmptyLcp.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/EndTo.hpp b/storage/ndb/include/kernel/signaldata/EndTo.hpp index fb9a91349d8..5905af72915 100644 --- a/storage/ndb/include/kernel/signaldata/EndTo.hpp +++ b/storage/ndb/include/kernel/signaldata/EndTo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/EventReport.hpp b/storage/ndb/include/kernel/signaldata/EventReport.hpp index 055e1841d02..669300c5565 100644 --- a/storage/ndb/include/kernel/signaldata/EventReport.hpp +++ b/storage/ndb/include/kernel/signaldata/EventReport.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/EventSubscribeReq.hpp b/storage/ndb/include/kernel/signaldata/EventSubscribeReq.hpp index b7e88ebc5bc..344cb8d6f29 100644 --- a/storage/ndb/include/kernel/signaldata/EventSubscribeReq.hpp +++ b/storage/ndb/include/kernel/signaldata/EventSubscribeReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ExecFragReq.hpp b/storage/ndb/include/kernel/signaldata/ExecFragReq.hpp index 574623a363d..4b4f98116f1 100644 --- a/storage/ndb/include/kernel/signaldata/ExecFragReq.hpp +++ b/storage/ndb/include/kernel/signaldata/ExecFragReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/Extent.hpp b/storage/ndb/include/kernel/signaldata/Extent.hpp index beca363cff5..fd7421fe113 100644 --- a/storage/ndb/include/kernel/signaldata/Extent.hpp +++ b/storage/ndb/include/kernel/signaldata/Extent.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/FailRep.hpp b/storage/ndb/include/kernel/signaldata/FailRep.hpp index e44e9954c1f..4df6977a718 100644 --- a/storage/ndb/include/kernel/signaldata/FailRep.hpp +++ b/storage/ndb/include/kernel/signaldata/FailRep.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/FireTrigOrd.hpp b/storage/ndb/include/kernel/signaldata/FireTrigOrd.hpp index 6d13112a751..453b1a90a18 100644 --- a/storage/ndb/include/kernel/signaldata/FireTrigOrd.hpp +++ b/storage/ndb/include/kernel/signaldata/FireTrigOrd.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/FsAppendReq.hpp b/storage/ndb/include/kernel/signaldata/FsAppendReq.hpp index 08c79df363c..384035cca68 100644 --- a/storage/ndb/include/kernel/signaldata/FsAppendReq.hpp +++ b/storage/ndb/include/kernel/signaldata/FsAppendReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/FsCloseReq.hpp b/storage/ndb/include/kernel/signaldata/FsCloseReq.hpp index afc4e590161..5e69cec3101 100644 --- a/storage/ndb/include/kernel/signaldata/FsCloseReq.hpp +++ b/storage/ndb/include/kernel/signaldata/FsCloseReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/FsConf.hpp b/storage/ndb/include/kernel/signaldata/FsConf.hpp index c986c1ca623..0000c786965 100644 --- a/storage/ndb/include/kernel/signaldata/FsConf.hpp +++ b/storage/ndb/include/kernel/signaldata/FsConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/FsOpenReq.hpp b/storage/ndb/include/kernel/signaldata/FsOpenReq.hpp index 578cb3e98c6..b9ef8826766 100644 --- a/storage/ndb/include/kernel/signaldata/FsOpenReq.hpp +++ b/storage/ndb/include/kernel/signaldata/FsOpenReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/include/kernel/signaldata/FsReadWriteReq.hpp b/storage/ndb/include/kernel/signaldata/FsReadWriteReq.hpp index c75ab4523a8..a7a2a419392 100644 --- a/storage/ndb/include/kernel/signaldata/FsReadWriteReq.hpp +++ b/storage/ndb/include/kernel/signaldata/FsReadWriteReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/FsRef.hpp b/storage/ndb/include/kernel/signaldata/FsRef.hpp index 2566639a809..90d2bbdb253 100644 --- a/storage/ndb/include/kernel/signaldata/FsRef.hpp +++ b/storage/ndb/include/kernel/signaldata/FsRef.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/FsRemoveReq.hpp b/storage/ndb/include/kernel/signaldata/FsRemoveReq.hpp index e0a1031a2ee..900bbb631a6 100644 --- a/storage/ndb/include/kernel/signaldata/FsRemoveReq.hpp +++ b/storage/ndb/include/kernel/signaldata/FsRemoveReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/GCPSave.hpp b/storage/ndb/include/kernel/signaldata/GCPSave.hpp index 451fd224bc4..2851c3cd548 100644 --- a/storage/ndb/include/kernel/signaldata/GCPSave.hpp +++ b/storage/ndb/include/kernel/signaldata/GCPSave.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/GetTabInfo.hpp b/storage/ndb/include/kernel/signaldata/GetTabInfo.hpp index 569082210d2..a8906678bed 100644 --- a/storage/ndb/include/kernel/signaldata/GetTabInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/GetTabInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/GetTableId.hpp b/storage/ndb/include/kernel/signaldata/GetTableId.hpp index 3e125e67a0b..a4d026efa31 100644 --- a/storage/ndb/include/kernel/signaldata/GetTableId.hpp +++ b/storage/ndb/include/kernel/signaldata/GetTableId.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/GrepImpl.hpp b/storage/ndb/include/kernel/signaldata/GrepImpl.hpp index 8258ee38e7e..d98c61d2b11 100644 --- a/storage/ndb/include/kernel/signaldata/GrepImpl.hpp +++ b/storage/ndb/include/kernel/signaldata/GrepImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/HotSpareRep.hpp b/storage/ndb/include/kernel/signaldata/HotSpareRep.hpp index 61f3a1c3e4e..ab97ee668c8 100644 --- a/storage/ndb/include/kernel/signaldata/HotSpareRep.hpp +++ b/storage/ndb/include/kernel/signaldata/HotSpareRep.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/IndxAttrInfo.hpp b/storage/ndb/include/kernel/signaldata/IndxAttrInfo.hpp index fd63bcc35bb..f02899f03b5 100755 --- a/storage/ndb/include/kernel/signaldata/IndxAttrInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/IndxAttrInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/IndxKeyInfo.hpp b/storage/ndb/include/kernel/signaldata/IndxKeyInfo.hpp index 26acdd958f6..df75ea0617d 100755 --- a/storage/ndb/include/kernel/signaldata/IndxKeyInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/IndxKeyInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp b/storage/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp index c1ad89c29c9..9bee7d7b767 100644 --- a/storage/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp +++ b/storage/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp b/storage/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp index 3438f0ff2cc..f49790c4d3e 100644 --- a/storage/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp +++ b/storage/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/KeyInfo.hpp b/storage/ndb/include/kernel/signaldata/KeyInfo.hpp index 180fb869674..0514fb1d3e8 100644 --- a/storage/ndb/include/kernel/signaldata/KeyInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/KeyInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/LCP.hpp b/storage/ndb/include/kernel/signaldata/LCP.hpp index b493082885d..78f00abd437 100644 --- a/storage/ndb/include/kernel/signaldata/LCP.hpp +++ b/storage/ndb/include/kernel/signaldata/LCP.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp b/storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp index e6df89a9952..eabe06a4efd 100644 --- a/storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp +++ b/storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ListTables.hpp b/storage/ndb/include/kernel/signaldata/ListTables.hpp index 8cc3905515b..17b62706be7 100644 --- a/storage/ndb/include/kernel/signaldata/ListTables.hpp +++ b/storage/ndb/include/kernel/signaldata/ListTables.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/LqhFrag.hpp b/storage/ndb/include/kernel/signaldata/LqhFrag.hpp index 90587c372f5..bdcae2643ee 100644 --- a/storage/ndb/include/kernel/signaldata/LqhFrag.hpp +++ b/storage/ndb/include/kernel/signaldata/LqhFrag.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/LqhKey.hpp b/storage/ndb/include/kernel/signaldata/LqhKey.hpp index 04cfd1156e1..1dc4d32b630 100644 --- a/storage/ndb/include/kernel/signaldata/LqhKey.hpp +++ b/storage/ndb/include/kernel/signaldata/LqhKey.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp b/storage/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp index 833b3e8533a..8f10af2f8d2 100644 --- a/storage/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp +++ b/storage/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/LqhTransConf.hpp b/storage/ndb/include/kernel/signaldata/LqhTransConf.hpp index c571cddbda8..a0d66fc80d2 100644 --- a/storage/ndb/include/kernel/signaldata/LqhTransConf.hpp +++ b/storage/ndb/include/kernel/signaldata/LqhTransConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ManagementServer.hpp b/storage/ndb/include/kernel/signaldata/ManagementServer.hpp index bb62110c609..dc3b2e20c26 100644 --- a/storage/ndb/include/kernel/signaldata/ManagementServer.hpp +++ b/storage/ndb/include/kernel/signaldata/ManagementServer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/MasterGCP.hpp b/storage/ndb/include/kernel/signaldata/MasterGCP.hpp index b1fb65a733b..24cb8a18211 100644 --- a/storage/ndb/include/kernel/signaldata/MasterGCP.hpp +++ b/storage/ndb/include/kernel/signaldata/MasterGCP.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/MasterLCP.hpp b/storage/ndb/include/kernel/signaldata/MasterLCP.hpp index b90baee32e8..16638ee0216 100644 --- a/storage/ndb/include/kernel/signaldata/MasterLCP.hpp +++ b/storage/ndb/include/kernel/signaldata/MasterLCP.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/NFCompleteRep.hpp b/storage/ndb/include/kernel/signaldata/NFCompleteRep.hpp index e3dfa1c0337..4a81dc40120 100644 --- a/storage/ndb/include/kernel/signaldata/NFCompleteRep.hpp +++ b/storage/ndb/include/kernel/signaldata/NFCompleteRep.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/NdbSttor.hpp b/storage/ndb/include/kernel/signaldata/NdbSttor.hpp index f571d91072b..f9d31963496 100644 --- a/storage/ndb/include/kernel/signaldata/NdbSttor.hpp +++ b/storage/ndb/include/kernel/signaldata/NdbSttor.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/NdbfsContinueB.hpp b/storage/ndb/include/kernel/signaldata/NdbfsContinueB.hpp index fd82e769d3a..6e3f9a1e1d4 100644 --- a/storage/ndb/include/kernel/signaldata/NdbfsContinueB.hpp +++ b/storage/ndb/include/kernel/signaldata/NdbfsContinueB.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/NextScan.hpp b/storage/ndb/include/kernel/signaldata/NextScan.hpp index 7797e097f74..77dddd6f5da 100644 --- a/storage/ndb/include/kernel/signaldata/NextScan.hpp +++ b/storage/ndb/include/kernel/signaldata/NextScan.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/NodeFailRep.hpp b/storage/ndb/include/kernel/signaldata/NodeFailRep.hpp index 3dc74386911..418233cae97 100644 --- a/storage/ndb/include/kernel/signaldata/NodeFailRep.hpp +++ b/storage/ndb/include/kernel/signaldata/NodeFailRep.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/NodeStateSignalData.hpp b/storage/ndb/include/kernel/signaldata/NodeStateSignalData.hpp index 5f54e632103..33eafec9249 100644 --- a/storage/ndb/include/kernel/signaldata/NodeStateSignalData.hpp +++ b/storage/ndb/include/kernel/signaldata/NodeStateSignalData.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/PackedSignal.hpp b/storage/ndb/include/kernel/signaldata/PackedSignal.hpp index 0b80fba62ba..e7118518939 100644 --- a/storage/ndb/include/kernel/signaldata/PackedSignal.hpp +++ b/storage/ndb/include/kernel/signaldata/PackedSignal.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp b/storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp index 8d345bcc57a..78f808651f8 100644 --- a/storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp +++ b/storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/PrepDropTab.hpp b/storage/ndb/include/kernel/signaldata/PrepDropTab.hpp index 6598e0d85f0..13c0e2fb654 100644 --- a/storage/ndb/include/kernel/signaldata/PrepDropTab.hpp +++ b/storage/ndb/include/kernel/signaldata/PrepDropTab.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/PrepFailReqRef.hpp b/storage/ndb/include/kernel/signaldata/PrepFailReqRef.hpp index 63965beb6b2..22bfa8de8b8 100644 --- a/storage/ndb/include/kernel/signaldata/PrepFailReqRef.hpp +++ b/storage/ndb/include/kernel/signaldata/PrepFailReqRef.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ReadNodesConf.hpp b/storage/ndb/include/kernel/signaldata/ReadNodesConf.hpp index 1b96a27721e..88622440c9f 100644 --- a/storage/ndb/include/kernel/signaldata/ReadNodesConf.hpp +++ b/storage/ndb/include/kernel/signaldata/ReadNodesConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/RelTabMem.hpp b/storage/ndb/include/kernel/signaldata/RelTabMem.hpp index e3d2f2a249d..f9b9f233202 100644 --- a/storage/ndb/include/kernel/signaldata/RelTabMem.hpp +++ b/storage/ndb/include/kernel/signaldata/RelTabMem.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/RepImpl.hpp b/storage/ndb/include/kernel/signaldata/RepImpl.hpp index 09575ab0930..510fed8e3ac 100644 --- a/storage/ndb/include/kernel/signaldata/RepImpl.hpp +++ b/storage/ndb/include/kernel/signaldata/RepImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp b/storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp index 99dffe4ceed..0d9035ee5fa 100644 --- a/storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp +++ b/storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/RestoreImpl.hpp b/storage/ndb/include/kernel/signaldata/RestoreImpl.hpp index 6ef7c1c6682..83cd898b182 100644 --- a/storage/ndb/include/kernel/signaldata/RestoreImpl.hpp +++ b/storage/ndb/include/kernel/signaldata/RestoreImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ResumeReq.hpp b/storage/ndb/include/kernel/signaldata/ResumeReq.hpp index 96a7978c5ef..692c4626dd5 100644 --- a/storage/ndb/include/kernel/signaldata/ResumeReq.hpp +++ b/storage/ndb/include/kernel/signaldata/ResumeReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/RouteOrd.hpp b/storage/ndb/include/kernel/signaldata/RouteOrd.hpp index a406f005c3b..a4ca4bebd56 100644 --- a/storage/ndb/include/kernel/signaldata/RouteOrd.hpp +++ b/storage/ndb/include/kernel/signaldata/RouteOrd.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ScanFrag.hpp b/storage/ndb/include/kernel/signaldata/ScanFrag.hpp index ee82de19c0f..244828751d8 100644 --- a/storage/ndb/include/kernel/signaldata/ScanFrag.hpp +++ b/storage/ndb/include/kernel/signaldata/ScanFrag.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/ScanTab.hpp b/storage/ndb/include/kernel/signaldata/ScanTab.hpp index 3fd9e8aa6f8..d14be6198ff 100644 --- a/storage/ndb/include/kernel/signaldata/ScanTab.hpp +++ b/storage/ndb/include/kernel/signaldata/ScanTab.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp b/storage/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp index 897cf70e108..2af2e12cb2b 100644 --- a/storage/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp +++ b/storage/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/SetVarReq.hpp b/storage/ndb/include/kernel/signaldata/SetVarReq.hpp index fa732d5d4f8..a583d65028e 100644 --- a/storage/ndb/include/kernel/signaldata/SetVarReq.hpp +++ b/storage/ndb/include/kernel/signaldata/SetVarReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/SignalData.hpp b/storage/ndb/include/kernel/signaldata/SignalData.hpp index 334d50d2b27..c5933d76a85 100644 --- a/storage/ndb/include/kernel/signaldata/SignalData.hpp +++ b/storage/ndb/include/kernel/signaldata/SignalData.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/SignalDataPrint.hpp b/storage/ndb/include/kernel/signaldata/SignalDataPrint.hpp index 16bd78bc028..1a904464004 100644 --- a/storage/ndb/include/kernel/signaldata/SignalDataPrint.hpp +++ b/storage/ndb/include/kernel/signaldata/SignalDataPrint.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/SignalDroppedRep.hpp b/storage/ndb/include/kernel/signaldata/SignalDroppedRep.hpp index 79bee91d3ca..424eaa9ab08 100644 --- a/storage/ndb/include/kernel/signaldata/SignalDroppedRep.hpp +++ b/storage/ndb/include/kernel/signaldata/SignalDroppedRep.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/SrFragidConf.hpp b/storage/ndb/include/kernel/signaldata/SrFragidConf.hpp index 964163d62f9..8d7c71c5721 100644 --- a/storage/ndb/include/kernel/signaldata/SrFragidConf.hpp +++ b/storage/ndb/include/kernel/signaldata/SrFragidConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StartFragReq.hpp b/storage/ndb/include/kernel/signaldata/StartFragReq.hpp index d8bc70c8169..5d7d7c8b81d 100644 --- a/storage/ndb/include/kernel/signaldata/StartFragReq.hpp +++ b/storage/ndb/include/kernel/signaldata/StartFragReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StartInfo.hpp b/storage/ndb/include/kernel/signaldata/StartInfo.hpp index 39ad3eaf4be..d631cd41311 100644 --- a/storage/ndb/include/kernel/signaldata/StartInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/StartInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StartMe.hpp b/storage/ndb/include/kernel/signaldata/StartMe.hpp index 6f69e3f0927..57bdf604139 100644 --- a/storage/ndb/include/kernel/signaldata/StartMe.hpp +++ b/storage/ndb/include/kernel/signaldata/StartMe.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StartOrd.hpp b/storage/ndb/include/kernel/signaldata/StartOrd.hpp index 2c1e8841785..aaac9e8f389 100644 --- a/storage/ndb/include/kernel/signaldata/StartOrd.hpp +++ b/storage/ndb/include/kernel/signaldata/StartOrd.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StartPerm.hpp b/storage/ndb/include/kernel/signaldata/StartPerm.hpp index 4381110e46b..19c1f6307c4 100644 --- a/storage/ndb/include/kernel/signaldata/StartPerm.hpp +++ b/storage/ndb/include/kernel/signaldata/StartPerm.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StartRec.hpp b/storage/ndb/include/kernel/signaldata/StartRec.hpp index 2a8328e3929..07321d0b3b0 100644 --- a/storage/ndb/include/kernel/signaldata/StartRec.hpp +++ b/storage/ndb/include/kernel/signaldata/StartRec.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StartTo.hpp b/storage/ndb/include/kernel/signaldata/StartTo.hpp index f564c15da14..79a5f4f9b9f 100644 --- a/storage/ndb/include/kernel/signaldata/StartTo.hpp +++ b/storage/ndb/include/kernel/signaldata/StartTo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StopMe.hpp b/storage/ndb/include/kernel/signaldata/StopMe.hpp index 3a127433583..a2d998a7c22 100644 --- a/storage/ndb/include/kernel/signaldata/StopMe.hpp +++ b/storage/ndb/include/kernel/signaldata/StopMe.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StopPerm.hpp b/storage/ndb/include/kernel/signaldata/StopPerm.hpp index 5b12433663b..3e0d502e500 100644 --- a/storage/ndb/include/kernel/signaldata/StopPerm.hpp +++ b/storage/ndb/include/kernel/signaldata/StopPerm.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/StopReq.hpp b/storage/ndb/include/kernel/signaldata/StopReq.hpp index b2c5e9a7341..88d23580465 100644 --- a/storage/ndb/include/kernel/signaldata/StopReq.hpp +++ b/storage/ndb/include/kernel/signaldata/StopReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/SumaImpl.hpp b/storage/ndb/include/kernel/signaldata/SumaImpl.hpp index 507acb6f78f..f9d2ecf3437 100644 --- a/storage/ndb/include/kernel/signaldata/SumaImpl.hpp +++ b/storage/ndb/include/kernel/signaldata/SumaImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/SystemError.hpp b/storage/ndb/include/kernel/signaldata/SystemError.hpp index 063899615ce..51d88167808 100644 --- a/storage/ndb/include/kernel/signaldata/SystemError.hpp +++ b/storage/ndb/include/kernel/signaldata/SystemError.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TamperOrd.hpp b/storage/ndb/include/kernel/signaldata/TamperOrd.hpp index 2a45dfdff78..3241673f3ed 100644 --- a/storage/ndb/include/kernel/signaldata/TamperOrd.hpp +++ b/storage/ndb/include/kernel/signaldata/TamperOrd.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcCommit.hpp b/storage/ndb/include/kernel/signaldata/TcCommit.hpp index 7a435ed2f35..995b3781868 100644 --- a/storage/ndb/include/kernel/signaldata/TcCommit.hpp +++ b/storage/ndb/include/kernel/signaldata/TcCommit.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcContinueB.hpp b/storage/ndb/include/kernel/signaldata/TcContinueB.hpp index aee70f2ce1e..32e41258212 100644 --- a/storage/ndb/include/kernel/signaldata/TcContinueB.hpp +++ b/storage/ndb/include/kernel/signaldata/TcContinueB.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcHbRep.hpp b/storage/ndb/include/kernel/signaldata/TcHbRep.hpp index 5a6bb62480a..df42e40cc72 100644 --- a/storage/ndb/include/kernel/signaldata/TcHbRep.hpp +++ b/storage/ndb/include/kernel/signaldata/TcHbRep.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcIndx.hpp b/storage/ndb/include/kernel/signaldata/TcIndx.hpp index 5833dea6f9d..a16702e4c97 100644 --- a/storage/ndb/include/kernel/signaldata/TcIndx.hpp +++ b/storage/ndb/include/kernel/signaldata/TcIndx.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcKeyConf.hpp b/storage/ndb/include/kernel/signaldata/TcKeyConf.hpp index 1dfd4997c6b..4fffdc56bd6 100644 --- a/storage/ndb/include/kernel/signaldata/TcKeyConf.hpp +++ b/storage/ndb/include/kernel/signaldata/TcKeyConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcKeyFailConf.hpp b/storage/ndb/include/kernel/signaldata/TcKeyFailConf.hpp index 14bb231f171..764236bd86b 100644 --- a/storage/ndb/include/kernel/signaldata/TcKeyFailConf.hpp +++ b/storage/ndb/include/kernel/signaldata/TcKeyFailConf.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcKeyRef.hpp b/storage/ndb/include/kernel/signaldata/TcKeyRef.hpp index d073642b00f..a4de1d36216 100644 --- a/storage/ndb/include/kernel/signaldata/TcKeyRef.hpp +++ b/storage/ndb/include/kernel/signaldata/TcKeyRef.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcKeyReq.hpp b/storage/ndb/include/kernel/signaldata/TcKeyReq.hpp index 6330c3a440f..b0ae2a96bd7 100644 --- a/storage/ndb/include/kernel/signaldata/TcKeyReq.hpp +++ b/storage/ndb/include/kernel/signaldata/TcKeyReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcRollbackRep.hpp b/storage/ndb/include/kernel/signaldata/TcRollbackRep.hpp index 7f22f44d039..508a60ae9fc 100644 --- a/storage/ndb/include/kernel/signaldata/TcRollbackRep.hpp +++ b/storage/ndb/include/kernel/signaldata/TcRollbackRep.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TcSizeAltReq.hpp b/storage/ndb/include/kernel/signaldata/TcSizeAltReq.hpp index 34644d1378a..fbb6c36c0ac 100644 --- a/storage/ndb/include/kernel/signaldata/TcSizeAltReq.hpp +++ b/storage/ndb/include/kernel/signaldata/TcSizeAltReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TestOrd.hpp b/storage/ndb/include/kernel/signaldata/TestOrd.hpp index 7db722d9a2e..a8282098d7d 100644 --- a/storage/ndb/include/kernel/signaldata/TestOrd.hpp +++ b/storage/ndb/include/kernel/signaldata/TestOrd.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TransIdAI.hpp b/storage/ndb/include/kernel/signaldata/TransIdAI.hpp index 6192168e60b..e761a8c1817 100755 --- a/storage/ndb/include/kernel/signaldata/TransIdAI.hpp +++ b/storage/ndb/include/kernel/signaldata/TransIdAI.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TrigAttrInfo.hpp b/storage/ndb/include/kernel/signaldata/TrigAttrInfo.hpp index 5cfacf066cd..94fe90843d2 100644 --- a/storage/ndb/include/kernel/signaldata/TrigAttrInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/TrigAttrInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp b/storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp index 51a7316a7da..87401301666 100644 --- a/storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp +++ b/storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TupCommit.hpp b/storage/ndb/include/kernel/signaldata/TupCommit.hpp index 83c4ddfe90b..bd0702b768c 100644 --- a/storage/ndb/include/kernel/signaldata/TupCommit.hpp +++ b/storage/ndb/include/kernel/signaldata/TupCommit.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TupFrag.hpp b/storage/ndb/include/kernel/signaldata/TupFrag.hpp index 9ac0af280f0..b92a6c7ff62 100644 --- a/storage/ndb/include/kernel/signaldata/TupFrag.hpp +++ b/storage/ndb/include/kernel/signaldata/TupFrag.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TupKey.hpp b/storage/ndb/include/kernel/signaldata/TupKey.hpp index 597f10908c3..f1d82e8a444 100644 --- a/storage/ndb/include/kernel/signaldata/TupKey.hpp +++ b/storage/ndb/include/kernel/signaldata/TupKey.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TupSizeAltReq.hpp b/storage/ndb/include/kernel/signaldata/TupSizeAltReq.hpp index d2ae9d913ad..8a10d0e3f1a 100644 --- a/storage/ndb/include/kernel/signaldata/TupSizeAltReq.hpp +++ b/storage/ndb/include/kernel/signaldata/TupSizeAltReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TuxBound.hpp b/storage/ndb/include/kernel/signaldata/TuxBound.hpp index 4586f793b68..d2ed97a124f 100644 --- a/storage/ndb/include/kernel/signaldata/TuxBound.hpp +++ b/storage/ndb/include/kernel/signaldata/TuxBound.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TuxContinueB.hpp b/storage/ndb/include/kernel/signaldata/TuxContinueB.hpp index 507feac6009..6b1e364b6c3 100644 --- a/storage/ndb/include/kernel/signaldata/TuxContinueB.hpp +++ b/storage/ndb/include/kernel/signaldata/TuxContinueB.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TuxMaint.hpp b/storage/ndb/include/kernel/signaldata/TuxMaint.hpp index 9fe56520658..422a393cb19 100644 --- a/storage/ndb/include/kernel/signaldata/TuxMaint.hpp +++ b/storage/ndb/include/kernel/signaldata/TuxMaint.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp b/storage/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp index bcb4cc71085..6b8daca2255 100644 --- a/storage/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp +++ b/storage/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/UpdateTo.hpp b/storage/ndb/include/kernel/signaldata/UpdateTo.hpp index ab7c89cc275..f8c3a6d3b33 100644 --- a/storage/ndb/include/kernel/signaldata/UpdateTo.hpp +++ b/storage/ndb/include/kernel/signaldata/UpdateTo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/UtilDelete.hpp b/storage/ndb/include/kernel/signaldata/UtilDelete.hpp index e3f9217e420..6c48435dfde 100644 --- a/storage/ndb/include/kernel/signaldata/UtilDelete.hpp +++ b/storage/ndb/include/kernel/signaldata/UtilDelete.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/UtilExecute.hpp b/storage/ndb/include/kernel/signaldata/UtilExecute.hpp index ac4be9b3424..7a74f7c8467 100644 --- a/storage/ndb/include/kernel/signaldata/UtilExecute.hpp +++ b/storage/ndb/include/kernel/signaldata/UtilExecute.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/UtilLock.hpp b/storage/ndb/include/kernel/signaldata/UtilLock.hpp index 8cfc92b0570..153073e453e 100644 --- a/storage/ndb/include/kernel/signaldata/UtilLock.hpp +++ b/storage/ndb/include/kernel/signaldata/UtilLock.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/UtilPrepare.hpp b/storage/ndb/include/kernel/signaldata/UtilPrepare.hpp index 72a7fcb4cd5..fd73bf1e448 100644 --- a/storage/ndb/include/kernel/signaldata/UtilPrepare.hpp +++ b/storage/ndb/include/kernel/signaldata/UtilPrepare.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/UtilRelease.hpp b/storage/ndb/include/kernel/signaldata/UtilRelease.hpp index 3e396b9957b..c4d25de78f2 100644 --- a/storage/ndb/include/kernel/signaldata/UtilRelease.hpp +++ b/storage/ndb/include/kernel/signaldata/UtilRelease.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/UtilSequence.hpp b/storage/ndb/include/kernel/signaldata/UtilSequence.hpp index d99c5c18e63..370e982c5f5 100644 --- a/storage/ndb/include/kernel/signaldata/UtilSequence.hpp +++ b/storage/ndb/include/kernel/signaldata/UtilSequence.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/signaldata/WaitGCP.hpp b/storage/ndb/include/kernel/signaldata/WaitGCP.hpp index e738ecf3868..b86a4b14503 100644 --- a/storage/ndb/include/kernel/signaldata/WaitGCP.hpp +++ b/storage/ndb/include/kernel/signaldata/WaitGCP.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/kernel/trigger_definitions.h b/storage/ndb/include/kernel/trigger_definitions.h index 078f97fdd54..7c6c7ef681f 100644 --- a/storage/ndb/include/kernel/trigger_definitions.h +++ b/storage/ndb/include/kernel/trigger_definitions.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/logger/ConsoleLogHandler.hpp b/storage/ndb/include/logger/ConsoleLogHandler.hpp index 5502dd601cc..aa6e3c618c6 100644 --- a/storage/ndb/include/logger/ConsoleLogHandler.hpp +++ b/storage/ndb/include/logger/ConsoleLogHandler.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/logger/FileLogHandler.hpp b/storage/ndb/include/logger/FileLogHandler.hpp index e2345bc1c6a..c2121aa4cab 100644 --- a/storage/ndb/include/logger/FileLogHandler.hpp +++ b/storage/ndb/include/logger/FileLogHandler.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/logger/LogHandler.hpp b/storage/ndb/include/logger/LogHandler.hpp index 5987b6918bb..7b38d6b9044 100644 --- a/storage/ndb/include/logger/LogHandler.hpp +++ b/storage/ndb/include/logger/LogHandler.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/logger/Logger.hpp b/storage/ndb/include/logger/Logger.hpp index f6153884a0d..caa2ae5a20f 100644 --- a/storage/ndb/include/logger/Logger.hpp +++ b/storage/ndb/include/logger/Logger.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/logger/SysLogHandler.hpp b/storage/ndb/include/logger/SysLogHandler.hpp index 565f85339b9..163b9189275 100644 --- a/storage/ndb/include/logger/SysLogHandler.hpp +++ b/storage/ndb/include/logger/SysLogHandler.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/mgmapi/mgmapi.h b/storage/ndb/include/mgmapi/mgmapi.h index 43c81968ea3..09a7576577f 100644 --- a/storage/ndb/include/mgmapi/mgmapi.h +++ b/storage/ndb/include/mgmapi/mgmapi.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/mgmapi/mgmapi_debug.h b/storage/ndb/include/mgmapi/mgmapi_debug.h index 09b89d1b0bd..47d2db78c52 100644 --- a/storage/ndb/include/mgmapi/mgmapi_debug.h +++ b/storage/ndb/include/mgmapi/mgmapi_debug.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/mgmapi/mgmapi_error.h b/storage/ndb/include/mgmapi/mgmapi_error.h index 927902c68f3..aafdc7d5b81 100644 --- a/storage/ndb/include/mgmapi/mgmapi_error.h +++ b/storage/ndb/include/mgmapi/mgmapi_error.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/mgmapi/ndb_logevent.h b/storage/ndb/include/mgmapi/ndb_logevent.h index 080c190a402..b1c959f1113 100644 --- a/storage/ndb/include/mgmapi/ndb_logevent.h +++ b/storage/ndb/include/mgmapi/ndb_logevent.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/mgmapi/ndbd_exit_codes.h b/storage/ndb/include/mgmapi/ndbd_exit_codes.h index f10e7bffcb4..131350ca9b5 100644 --- a/storage/ndb/include/mgmapi/ndbd_exit_codes.h +++ b/storage/ndb/include/mgmapi/ndbd_exit_codes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/mgmcommon/ConfigRetriever.hpp b/storage/ndb/include/mgmcommon/ConfigRetriever.hpp index b3de4a5cf10..3c94c8ad3f3 100644 --- a/storage/ndb/include/mgmcommon/ConfigRetriever.hpp +++ b/storage/ndb/include/mgmcommon/ConfigRetriever.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/mgmcommon/IPCConfig.hpp b/storage/ndb/include/mgmcommon/IPCConfig.hpp index 967576993b4..ddc22437e86 100644 --- a/storage/ndb/include/mgmcommon/IPCConfig.hpp +++ b/storage/ndb/include/mgmcommon/IPCConfig.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp b/storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp index dd9ad04a605..3b04c34414f 100644 --- a/storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp +++ b/storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndb_constants.h b/storage/ndb/include/ndb_constants.h index 2ee9ced8412..ff603f55f02 100644 --- a/storage/ndb/include/ndb_constants.h +++ b/storage/ndb/include/ndb_constants.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndb_global.h.in b/storage/ndb/include/ndb_global.h.in index cf0dd2d2bee..c6b0c08aba9 100644 --- a/storage/ndb/include/ndb_global.h.in +++ b/storage/ndb/include/ndb_global.h.in @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndb_init.h b/storage/ndb/include/ndb_init.h index 65b2e0b981c..db6e5132c23 100644 --- a/storage/ndb/include/ndb_init.h +++ b/storage/ndb/include/ndb_init.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndb_types.h.in b/storage/ndb/include/ndb_types.h.in index d67465316f7..3348cbeccf7 100644 --- a/storage/ndb/include/ndb_types.h.in +++ b/storage/ndb/include/ndb_types.h.in @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndb_version.h.in b/storage/ndb/include/ndb_version.h.in index fad81aba1d5..8ee0d47eb3d 100644 --- a/storage/ndb/include/ndb_version.h.in +++ b/storage/ndb/include/ndb_version.h.in @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/Ndb.hpp b/storage/ndb/include/ndbapi/Ndb.hpp index 633e04916a0..6f6f994010c 100644 --- a/storage/ndb/include/ndbapi/Ndb.hpp +++ b/storage/ndb/include/ndbapi/Ndb.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbApi.hpp b/storage/ndb/include/ndbapi/NdbApi.hpp index 30b7ced2132..af734d0fa8b 100644 --- a/storage/ndb/include/ndbapi/NdbApi.hpp +++ b/storage/ndb/include/ndbapi/NdbApi.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbBlob.hpp b/storage/ndb/include/ndbapi/NdbBlob.hpp index bab252ffe51..923fc82451d 100644 --- a/storage/ndb/include/ndbapi/NdbBlob.hpp +++ b/storage/ndb/include/ndbapi/NdbBlob.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbDictionary.hpp b/storage/ndb/include/ndbapi/NdbDictionary.hpp index ab907aa8a5e..55d024d7c58 100644 --- a/storage/ndb/include/ndbapi/NdbDictionary.hpp +++ b/storage/ndb/include/ndbapi/NdbDictionary.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbError.hpp b/storage/ndb/include/ndbapi/NdbError.hpp index 3fba7cf6ec0..275d42364b8 100644 --- a/storage/ndb/include/ndbapi/NdbError.hpp +++ b/storage/ndb/include/ndbapi/NdbError.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbEventOperation.hpp b/storage/ndb/include/ndbapi/NdbEventOperation.hpp index 4f079171bad..c1bf12f859d 100644 --- a/storage/ndb/include/ndbapi/NdbEventOperation.hpp +++ b/storage/ndb/include/ndbapi/NdbEventOperation.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbIndexOperation.hpp b/storage/ndb/include/ndbapi/NdbIndexOperation.hpp index d7b72aeaa19..ab8afc3e19c 100644 --- a/storage/ndb/include/ndbapi/NdbIndexOperation.hpp +++ b/storage/ndb/include/ndbapi/NdbIndexOperation.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp b/storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp index a1d68be0b58..8a2388b5ea0 100644 --- a/storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp +++ b/storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbIndexStat.hpp b/storage/ndb/include/ndbapi/NdbIndexStat.hpp index cf457716dd9..3d191fc1ad8 100644 --- a/storage/ndb/include/ndbapi/NdbIndexStat.hpp +++ b/storage/ndb/include/ndbapi/NdbIndexStat.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbOperation.hpp b/storage/ndb/include/ndbapi/NdbOperation.hpp index 630ce2d12d4..a3f7723d8c3 100644 --- a/storage/ndb/include/ndbapi/NdbOperation.hpp +++ b/storage/ndb/include/ndbapi/NdbOperation.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbPool.hpp b/storage/ndb/include/ndbapi/NdbPool.hpp index eba6d9a803c..44085fd0fc7 100644 --- a/storage/ndb/include/ndbapi/NdbPool.hpp +++ b/storage/ndb/include/ndbapi/NdbPool.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbRecAttr.hpp b/storage/ndb/include/ndbapi/NdbRecAttr.hpp index 2d353c64471..aa70afb7ea3 100644 --- a/storage/ndb/include/ndbapi/NdbRecAttr.hpp +++ b/storage/ndb/include/ndbapi/NdbRecAttr.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbReceiver.hpp b/storage/ndb/include/ndbapi/NdbReceiver.hpp index 69888c63053..42dc85990fe 100644 --- a/storage/ndb/include/ndbapi/NdbReceiver.hpp +++ b/storage/ndb/include/ndbapi/NdbReceiver.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbScanFilter.hpp b/storage/ndb/include/ndbapi/NdbScanFilter.hpp index ec50710f735..cc509ae49ff 100644 --- a/storage/ndb/include/ndbapi/NdbScanFilter.hpp +++ b/storage/ndb/include/ndbapi/NdbScanFilter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbScanOperation.hpp b/storage/ndb/include/ndbapi/NdbScanOperation.hpp index 23600ac32fd..ca25064b572 100644 --- a/storage/ndb/include/ndbapi/NdbScanOperation.hpp +++ b/storage/ndb/include/ndbapi/NdbScanOperation.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/NdbTransaction.hpp b/storage/ndb/include/ndbapi/NdbTransaction.hpp index c1c91f9276c..6d84c3f6997 100644 --- a/storage/ndb/include/ndbapi/NdbTransaction.hpp +++ b/storage/ndb/include/ndbapi/NdbTransaction.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/ndb_cluster_connection.hpp b/storage/ndb/include/ndbapi/ndb_cluster_connection.hpp index b55fcb2bc48..726e3308eb7 100644 --- a/storage/ndb/include/ndbapi/ndb_cluster_connection.hpp +++ b/storage/ndb/include/ndbapi/ndb_cluster_connection.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/ndb_opt_defaults.h b/storage/ndb/include/ndbapi/ndb_opt_defaults.h index 621bcadac8a..6e90889b0aa 100644 --- a/storage/ndb/include/ndbapi/ndb_opt_defaults.h +++ b/storage/ndb/include/ndbapi/ndb_opt_defaults.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/ndbapi_limits.h b/storage/ndb/include/ndbapi/ndbapi_limits.h index fa0a8b89b36..9471ce8ed45 100644 --- a/storage/ndb/include/ndbapi/ndbapi_limits.h +++ b/storage/ndb/include/ndbapi/ndbapi_limits.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/ndbapi/ndberror.h b/storage/ndb/include/ndbapi/ndberror.h index dfe307a5f5e..7dc8ae7217c 100644 --- a/storage/ndb/include/ndbapi/ndberror.h +++ b/storage/ndb/include/ndbapi/ndberror.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/newtonapi/dba.h b/storage/ndb/include/newtonapi/dba.h index 0c1034ad9d3..77499ac2535 100644 --- a/storage/ndb/include/newtonapi/dba.h +++ b/storage/ndb/include/newtonapi/dba.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/newtonapi/defs/pcn_types.h b/storage/ndb/include/newtonapi/defs/pcn_types.h index 0b166f7fad9..87b563963ac 100644 --- a/storage/ndb/include/newtonapi/defs/pcn_types.h +++ b/storage/ndb/include/newtonapi/defs/pcn_types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbCondition.h b/storage/ndb/include/portlib/NdbCondition.h index c30382b5016..81d7d6ca50a 100644 --- a/storage/ndb/include/portlib/NdbCondition.h +++ b/storage/ndb/include/portlib/NdbCondition.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbConfig.h b/storage/ndb/include/portlib/NdbConfig.h index 135eabac80a..bac014a4612 100644 --- a/storage/ndb/include/portlib/NdbConfig.h +++ b/storage/ndb/include/portlib/NdbConfig.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbDaemon.h b/storage/ndb/include/portlib/NdbDaemon.h index 9e28b342e33..5de641dfa3f 100644 --- a/storage/ndb/include/portlib/NdbDaemon.h +++ b/storage/ndb/include/portlib/NdbDaemon.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbEnv.h b/storage/ndb/include/portlib/NdbEnv.h index b47b1e62dae..7c978fbcdba 100644 --- a/storage/ndb/include/portlib/NdbEnv.h +++ b/storage/ndb/include/portlib/NdbEnv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbHost.h b/storage/ndb/include/portlib/NdbHost.h index 98f0c8beb25..c7cf03a8b52 100644 --- a/storage/ndb/include/portlib/NdbHost.h +++ b/storage/ndb/include/portlib/NdbHost.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbMain.h b/storage/ndb/include/portlib/NdbMain.h index e5ebed6e836..857b8f3c8bf 100644 --- a/storage/ndb/include/portlib/NdbMain.h +++ b/storage/ndb/include/portlib/NdbMain.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbMem.h b/storage/ndb/include/portlib/NdbMem.h index 25ab3765e66..f4f7240b1f3 100644 --- a/storage/ndb/include/portlib/NdbMem.h +++ b/storage/ndb/include/portlib/NdbMem.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbMutex.h b/storage/ndb/include/portlib/NdbMutex.h index 7c35da5b8de..c98d4de2207 100644 --- a/storage/ndb/include/portlib/NdbMutex.h +++ b/storage/ndb/include/portlib/NdbMutex.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbSleep.h b/storage/ndb/include/portlib/NdbSleep.h index b3eb2249567..3c6506641c3 100644 --- a/storage/ndb/include/portlib/NdbSleep.h +++ b/storage/ndb/include/portlib/NdbSleep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbTCP.h b/storage/ndb/include/portlib/NdbTCP.h index 36a9de62453..e8eaf993228 100644 --- a/storage/ndb/include/portlib/NdbTCP.h +++ b/storage/ndb/include/portlib/NdbTCP.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbThread.h b/storage/ndb/include/portlib/NdbThread.h index d39b584838e..68d4781919b 100644 --- a/storage/ndb/include/portlib/NdbThread.h +++ b/storage/ndb/include/portlib/NdbThread.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/NdbTick.h b/storage/ndb/include/portlib/NdbTick.h index 131f6b5440e..e8bbfed9aa5 100644 --- a/storage/ndb/include/portlib/NdbTick.h +++ b/storage/ndb/include/portlib/NdbTick.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/PortDefs.h b/storage/ndb/include/portlib/PortDefs.h index 7b512762cf2..0bc070a98b7 100644 --- a/storage/ndb/include/portlib/PortDefs.h +++ b/storage/ndb/include/portlib/PortDefs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/portlib/prefetch.h b/storage/ndb/include/portlib/prefetch.h index cc34722f044..5b37a2854c9 100644 --- a/storage/ndb/include/portlib/prefetch.h +++ b/storage/ndb/include/portlib/prefetch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/transporter/TransporterCallback.hpp b/storage/ndb/include/transporter/TransporterCallback.hpp index 3cb607261fe..5acfec680b8 100644 --- a/storage/ndb/include/transporter/TransporterCallback.hpp +++ b/storage/ndb/include/transporter/TransporterCallback.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/transporter/TransporterDefinitions.hpp b/storage/ndb/include/transporter/TransporterDefinitions.hpp index d7f2044aa2c..e283e1b4275 100644 --- a/storage/ndb/include/transporter/TransporterDefinitions.hpp +++ b/storage/ndb/include/transporter/TransporterDefinitions.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/transporter/TransporterRegistry.hpp b/storage/ndb/include/transporter/TransporterRegistry.hpp index 297b4bf9dbd..cadcdddb240 100644 --- a/storage/ndb/include/transporter/TransporterRegistry.hpp +++ b/storage/ndb/include/transporter/TransporterRegistry.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/BaseString.hpp b/storage/ndb/include/util/BaseString.hpp index 780b0c9c956..1afbf2290b7 100644 --- a/storage/ndb/include/util/BaseString.hpp +++ b/storage/ndb/include/util/BaseString.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/Bitmask.hpp b/storage/ndb/include/util/Bitmask.hpp index 5a7de7d140a..beca000d6ab 100644 --- a/storage/ndb/include/util/Bitmask.hpp +++ b/storage/ndb/include/util/Bitmask.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/File.hpp b/storage/ndb/include/util/File.hpp index a5610ffdde4..a3de97762f2 100644 --- a/storage/ndb/include/util/File.hpp +++ b/storage/ndb/include/util/File.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/InputStream.hpp b/storage/ndb/include/util/InputStream.hpp index 9fe11309432..5fe64777322 100644 --- a/storage/ndb/include/util/InputStream.hpp +++ b/storage/ndb/include/util/InputStream.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/NdbAutoPtr.hpp b/storage/ndb/include/util/NdbAutoPtr.hpp index 6f0cab2c815..78e7dbe25ad 100644 --- a/storage/ndb/include/util/NdbAutoPtr.hpp +++ b/storage/ndb/include/util/NdbAutoPtr.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/include/util/NdbOut.hpp b/storage/ndb/include/util/NdbOut.hpp index dbc87c178af..65b7b543e93 100644 --- a/storage/ndb/include/util/NdbOut.hpp +++ b/storage/ndb/include/util/NdbOut.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/NdbSqlUtil.hpp b/storage/ndb/include/util/NdbSqlUtil.hpp index 23374b31a96..ca14018e515 100644 --- a/storage/ndb/include/util/NdbSqlUtil.hpp +++ b/storage/ndb/include/util/NdbSqlUtil.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/OutputStream.hpp b/storage/ndb/include/util/OutputStream.hpp index 952bea4c77a..f16621e8a58 100644 --- a/storage/ndb/include/util/OutputStream.hpp +++ b/storage/ndb/include/util/OutputStream.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/Parser.hpp b/storage/ndb/include/util/Parser.hpp index 8707bce8c55..366384621bf 100644 --- a/storage/ndb/include/util/Parser.hpp +++ b/storage/ndb/include/util/Parser.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/Properties.hpp b/storage/ndb/include/util/Properties.hpp index 667b9c99074..7a2c3626af6 100644 --- a/storage/ndb/include/util/Properties.hpp +++ b/storage/ndb/include/util/Properties.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/SimpleProperties.hpp b/storage/ndb/include/util/SimpleProperties.hpp index 863fa989ff1..d7df4a03e2a 100644 --- a/storage/ndb/include/util/SimpleProperties.hpp +++ b/storage/ndb/include/util/SimpleProperties.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/SocketAuthenticator.hpp b/storage/ndb/include/util/SocketAuthenticator.hpp index 8364fd6e37f..852e024043e 100644 --- a/storage/ndb/include/util/SocketAuthenticator.hpp +++ b/storage/ndb/include/util/SocketAuthenticator.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/SocketClient.hpp b/storage/ndb/include/util/SocketClient.hpp index 6c320d210b4..4f37ed8a59c 100644 --- a/storage/ndb/include/util/SocketClient.hpp +++ b/storage/ndb/include/util/SocketClient.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/SocketServer.hpp b/storage/ndb/include/util/SocketServer.hpp index 08e3bbff634..a4921ce3272 100644 --- a/storage/ndb/include/util/SocketServer.hpp +++ b/storage/ndb/include/util/SocketServer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/UtilBuffer.hpp b/storage/ndb/include/util/UtilBuffer.hpp index c1eaf4e5663..021328a0824 100644 --- a/storage/ndb/include/util/UtilBuffer.hpp +++ b/storage/ndb/include/util/UtilBuffer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/Vector.hpp b/storage/ndb/include/util/Vector.hpp index c72a4579dc7..288e406cc4b 100644 --- a/storage/ndb/include/util/Vector.hpp +++ b/storage/ndb/include/util/Vector.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/basestring_vsnprintf.h b/storage/ndb/include/util/basestring_vsnprintf.h index ae54a144ac0..cf059cabeb7 100644 --- a/storage/ndb/include/util/basestring_vsnprintf.h +++ b/storage/ndb/include/util/basestring_vsnprintf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/md5_hash.hpp b/storage/ndb/include/util/md5_hash.hpp index 9bfa030fe37..4cdfe3d5b75 100644 --- a/storage/ndb/include/util/md5_hash.hpp +++ b/storage/ndb/include/util/md5_hash.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/ndb_opts.h b/storage/ndb/include/util/ndb_opts.h index 10f23df2ae9..d47a0243247 100644 --- a/storage/ndb/include/util/ndb_opts.h +++ b/storage/ndb/include/util/ndb_opts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/include/util/ndb_rand.h b/storage/ndb/include/util/ndb_rand.h index 48c1aacb8bd..4767c002da7 100644 --- a/storage/ndb/include/util/ndb_rand.h +++ b/storage/ndb/include/util/ndb_rand.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/random.h b/storage/ndb/include/util/random.h index 3c4a8392235..f635b96145f 100644 --- a/storage/ndb/include/util/random.h +++ b/storage/ndb/include/util/random.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/socket_io.h b/storage/ndb/include/util/socket_io.h index 3b8562e71ad..fa00e19f9de 100644 --- a/storage/ndb/include/util/socket_io.h +++ b/storage/ndb/include/util/socket_io.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/uucode.h b/storage/ndb/include/util/uucode.h index 5b1ccac4c68..cb8cdd82218 100644 --- a/storage/ndb/include/util/uucode.h +++ b/storage/ndb/include/util/uucode.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/include/util/version.h b/storage/ndb/include/util/version.h index c87e7d49c33..800b71c1280 100644 --- a/storage/ndb/include/util/version.h +++ b/storage/ndb/include/util/version.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/mgmapi_logevent/main.cpp b/storage/ndb/ndbapi-examples/mgmapi_logevent/main.cpp index e0f0d4ca56f..c0447fb8974 100644 --- a/storage/ndb/ndbapi-examples/mgmapi_logevent/main.cpp +++ b/storage/ndb/ndbapi-examples/mgmapi_logevent/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/mgmapi_logevent2/main.cpp b/storage/ndb/ndbapi-examples/mgmapi_logevent2/main.cpp index 857a0a10104..c59e9ae944a 100644 --- a/storage/ndb/ndbapi-examples/mgmapi_logevent2/main.cpp +++ b/storage/ndb/ndbapi-examples/mgmapi_logevent2/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/ndbapi_async/ndbapi_async.cpp b/storage/ndb/ndbapi-examples/ndbapi_async/ndbapi_async.cpp index 4a1fda114e5..0845073e85e 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_async/ndbapi_async.cpp +++ b/storage/ndb/ndbapi-examples/ndbapi_async/ndbapi_async.cpp @@ -1,6 +1,6 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/ndbapi_async1/ndbapi_async1.cpp b/storage/ndb/ndbapi-examples/ndbapi_async1/ndbapi_async1.cpp index 69ea7906ef9..c5bbeba5907 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_async1/ndbapi_async1.cpp +++ b/storage/ndb/ndbapi-examples/ndbapi_async1/ndbapi_async1.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp b/storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp index ec5f0240b44..e2d01a065f4 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp +++ b/storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/ndbapi_retries/ndbapi_retries.cpp b/storage/ndb/ndbapi-examples/ndbapi_retries/ndbapi_retries.cpp index 2db5bf37bac..638ff871e58 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_retries/ndbapi_retries.cpp +++ b/storage/ndb/ndbapi-examples/ndbapi_retries/ndbapi_retries.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/ndbapi_scan/ndbapi_scan.cpp b/storage/ndb/ndbapi-examples/ndbapi_scan/ndbapi_scan.cpp index 6316e514abc..875ad86cb16 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_scan/ndbapi_scan.cpp +++ b/storage/ndb/ndbapi-examples/ndbapi_scan/ndbapi_scan.cpp @@ -1,5 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/ndbapi_simple/ndbapi_simple.cpp b/storage/ndb/ndbapi-examples/ndbapi_simple/ndbapi_simple.cpp index e8228331b15..e2695734c81 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_simple/ndbapi_simple.cpp +++ b/storage/ndb/ndbapi-examples/ndbapi_simple/ndbapi_simple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/ndbapi_simple_dual/main.cpp b/storage/ndb/ndbapi-examples/ndbapi_simple_dual/main.cpp index 152426d2b89..b2c5a491a73 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_simple_dual/main.cpp +++ b/storage/ndb/ndbapi-examples/ndbapi_simple_dual/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/ndbapi-examples/ndbapi_simple_index/main.cpp b/storage/ndb/ndbapi-examples/ndbapi_simple_index/main.cpp index a9677abdc0a..b98133950e0 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_simple_index/main.cpp +++ b/storage/ndb/ndbapi-examples/ndbapi_simple_index/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/BlockNames.cpp b/storage/ndb/src/common/debugger/BlockNames.cpp index 887508fb814..e2ae1456913 100644 --- a/storage/ndb/src/common/debugger/BlockNames.cpp +++ b/storage/ndb/src/common/debugger/BlockNames.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/DebuggerNames.cpp b/storage/ndb/src/common/debugger/DebuggerNames.cpp index 03b2feeea06..0d44a3c00f2 100644 --- a/storage/ndb/src/common/debugger/DebuggerNames.cpp +++ b/storage/ndb/src/common/debugger/DebuggerNames.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/EventLogger.cpp b/storage/ndb/src/common/debugger/EventLogger.cpp index 99011812110..69e9dcd56a3 100644 --- a/storage/ndb/src/common/debugger/EventLogger.cpp +++ b/storage/ndb/src/common/debugger/EventLogger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/GrepError.cpp b/storage/ndb/src/common/debugger/GrepError.cpp index 82bfe3cd89b..8f7c5c8d2fb 100644 --- a/storage/ndb/src/common/debugger/GrepError.cpp +++ b/storage/ndb/src/common/debugger/GrepError.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/SignalLoggerManager.cpp b/storage/ndb/src/common/debugger/SignalLoggerManager.cpp index 6f38ff7efee..27da26a181e 100644 --- a/storage/ndb/src/common/debugger/SignalLoggerManager.cpp +++ b/storage/ndb/src/common/debugger/SignalLoggerManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/AccLock.cpp b/storage/ndb/src/common/debugger/signaldata/AccLock.cpp index c36bb8e4ef2..26384f2d3a1 100644 --- a/storage/ndb/src/common/debugger/signaldata/AccLock.cpp +++ b/storage/ndb/src/common/debugger/signaldata/AccLock.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/AlterIndx.cpp b/storage/ndb/src/common/debugger/signaldata/AlterIndx.cpp index ee825a457cd..8db3b683d47 100644 --- a/storage/ndb/src/common/debugger/signaldata/AlterIndx.cpp +++ b/storage/ndb/src/common/debugger/signaldata/AlterIndx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/AlterTab.cpp b/storage/ndb/src/common/debugger/signaldata/AlterTab.cpp index a09b59a1557..6a956c4a897 100644 --- a/storage/ndb/src/common/debugger/signaldata/AlterTab.cpp +++ b/storage/ndb/src/common/debugger/signaldata/AlterTab.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/AlterTable.cpp b/storage/ndb/src/common/debugger/signaldata/AlterTable.cpp index 5c05fb6e688..c1d48429925 100644 --- a/storage/ndb/src/common/debugger/signaldata/AlterTable.cpp +++ b/storage/ndb/src/common/debugger/signaldata/AlterTable.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/AlterTrig.cpp b/storage/ndb/src/common/debugger/signaldata/AlterTrig.cpp index b5f1f1e63c8..6d082373279 100644 --- a/storage/ndb/src/common/debugger/signaldata/AlterTrig.cpp +++ b/storage/ndb/src/common/debugger/signaldata/AlterTrig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp b/storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp index 3b4b6416f2b..ac16b5a1389 100644 --- a/storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp +++ b/storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp b/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp index b0f04457380..f31a3d9ae5e 100644 --- a/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp +++ b/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp b/storage/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp index 269618b9c7f..afd1e40a851 100644 --- a/storage/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp +++ b/storage/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/ContinueB.cpp b/storage/ndb/src/common/debugger/signaldata/ContinueB.cpp index 284677571a4..40212dbffe1 100644 --- a/storage/ndb/src/common/debugger/signaldata/ContinueB.cpp +++ b/storage/ndb/src/common/debugger/signaldata/ContinueB.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/CopyGCI.cpp b/storage/ndb/src/common/debugger/signaldata/CopyGCI.cpp index 8e6e5cf08ad..8787341ea61 100644 --- a/storage/ndb/src/common/debugger/signaldata/CopyGCI.cpp +++ b/storage/ndb/src/common/debugger/signaldata/CopyGCI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/CreateEvnt.cpp b/storage/ndb/src/common/debugger/signaldata/CreateEvnt.cpp index 5a0828d7625..25f5bdd232e 100644 --- a/storage/ndb/src/common/debugger/signaldata/CreateEvnt.cpp +++ b/storage/ndb/src/common/debugger/signaldata/CreateEvnt.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp b/storage/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp index 5e7cfaa0d89..d1d6f6ca1a2 100644 --- a/storage/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp +++ b/storage/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/CreateIndx.cpp b/storage/ndb/src/common/debugger/signaldata/CreateIndx.cpp index 9ef8d3c4a5a..4171809b78c 100644 --- a/storage/ndb/src/common/debugger/signaldata/CreateIndx.cpp +++ b/storage/ndb/src/common/debugger/signaldata/CreateIndx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/CreateTrig.cpp b/storage/ndb/src/common/debugger/signaldata/CreateTrig.cpp index 657fa5e71cd..75ef300847e 100644 --- a/storage/ndb/src/common/debugger/signaldata/CreateTrig.cpp +++ b/storage/ndb/src/common/debugger/signaldata/CreateTrig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp b/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp index 2250e3dccbe..d4475523591 100644 --- a/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp +++ b/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/DihContinueB.cpp b/storage/ndb/src/common/debugger/signaldata/DihContinueB.cpp index 08dad102c25..febd70200c3 100644 --- a/storage/ndb/src/common/debugger/signaldata/DihContinueB.cpp +++ b/storage/ndb/src/common/debugger/signaldata/DihContinueB.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp b/storage/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp index a0e72a53013..5076a26a23a 100644 --- a/storage/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp +++ b/storage/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/DisconnectRep.cpp b/storage/ndb/src/common/debugger/signaldata/DisconnectRep.cpp index 47a645b6bc7..a5f91a0d24e 100644 --- a/storage/ndb/src/common/debugger/signaldata/DisconnectRep.cpp +++ b/storage/ndb/src/common/debugger/signaldata/DisconnectRep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/DropIndx.cpp b/storage/ndb/src/common/debugger/signaldata/DropIndx.cpp index 25f872a9f0b..a708446e034 100644 --- a/storage/ndb/src/common/debugger/signaldata/DropIndx.cpp +++ b/storage/ndb/src/common/debugger/signaldata/DropIndx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/DropTab.cpp b/storage/ndb/src/common/debugger/signaldata/DropTab.cpp index b0f07497eeb..ae90db2f74b 100644 --- a/storage/ndb/src/common/debugger/signaldata/DropTab.cpp +++ b/storage/ndb/src/common/debugger/signaldata/DropTab.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/DropTrig.cpp b/storage/ndb/src/common/debugger/signaldata/DropTrig.cpp index 127270dbe62..826d0cc0536 100644 --- a/storage/ndb/src/common/debugger/signaldata/DropTrig.cpp +++ b/storage/ndb/src/common/debugger/signaldata/DropTrig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/FailRep.cpp b/storage/ndb/src/common/debugger/signaldata/FailRep.cpp index 23fdeb87503..00949b3217f 100644 --- a/storage/ndb/src/common/debugger/signaldata/FailRep.cpp +++ b/storage/ndb/src/common/debugger/signaldata/FailRep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp b/storage/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp index eac876c801d..54742a5030e 100644 --- a/storage/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp +++ b/storage/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/FsAppendReq.cpp b/storage/ndb/src/common/debugger/signaldata/FsAppendReq.cpp index ef6cd4cf5f6..09709770b9b 100644 --- a/storage/ndb/src/common/debugger/signaldata/FsAppendReq.cpp +++ b/storage/ndb/src/common/debugger/signaldata/FsAppendReq.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/FsCloseReq.cpp b/storage/ndb/src/common/debugger/signaldata/FsCloseReq.cpp index 358b8e171c7..cef67d14b47 100644 --- a/storage/ndb/src/common/debugger/signaldata/FsCloseReq.cpp +++ b/storage/ndb/src/common/debugger/signaldata/FsCloseReq.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/FsConf.cpp b/storage/ndb/src/common/debugger/signaldata/FsConf.cpp index ba52b5b3d35..d839b4e5f7c 100644 --- a/storage/ndb/src/common/debugger/signaldata/FsConf.cpp +++ b/storage/ndb/src/common/debugger/signaldata/FsConf.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/FsOpenReq.cpp b/storage/ndb/src/common/debugger/signaldata/FsOpenReq.cpp index a7240f4741c..039d1dda130 100644 --- a/storage/ndb/src/common/debugger/signaldata/FsOpenReq.cpp +++ b/storage/ndb/src/common/debugger/signaldata/FsOpenReq.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp b/storage/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp index 641fc9cf047..682e0675b0b 100644 --- a/storage/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp +++ b/storage/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/FsRef.cpp b/storage/ndb/src/common/debugger/signaldata/FsRef.cpp index 4ea87d600c3..7a722fb8d2d 100644 --- a/storage/ndb/src/common/debugger/signaldata/FsRef.cpp +++ b/storage/ndb/src/common/debugger/signaldata/FsRef.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/GCPSave.cpp b/storage/ndb/src/common/debugger/signaldata/GCPSave.cpp index 298156b5850..3e31f18fc8a 100644 --- a/storage/ndb/src/common/debugger/signaldata/GCPSave.cpp +++ b/storage/ndb/src/common/debugger/signaldata/GCPSave.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp b/storage/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp index 679965538c9..9c4f4338efc 100755 --- a/storage/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp +++ b/storage/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp b/storage/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp index fa38eeffe14..9d498489891 100755 --- a/storage/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp +++ b/storage/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/LCP.cpp b/storage/ndb/src/common/debugger/signaldata/LCP.cpp index ffc37275f39..b4667ec800e 100644 --- a/storage/ndb/src/common/debugger/signaldata/LCP.cpp +++ b/storage/ndb/src/common/debugger/signaldata/LCP.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp b/storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp index 479e84f69ad..5a385b6940a 100644 --- a/storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp +++ b/storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/LqhKey.cpp b/storage/ndb/src/common/debugger/signaldata/LqhKey.cpp index 50d425c3a7f..2f175489489 100644 --- a/storage/ndb/src/common/debugger/signaldata/LqhKey.cpp +++ b/storage/ndb/src/common/debugger/signaldata/LqhKey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/LqhTrans.cpp b/storage/ndb/src/common/debugger/signaldata/LqhTrans.cpp index 690156dc019..58a01d7daeb 100644 --- a/storage/ndb/src/common/debugger/signaldata/LqhTrans.cpp +++ b/storage/ndb/src/common/debugger/signaldata/LqhTrans.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/MasterLCP.cpp b/storage/ndb/src/common/debugger/signaldata/MasterLCP.cpp index 84dbc5e67a7..a7d8012b619 100644 --- a/storage/ndb/src/common/debugger/signaldata/MasterLCP.cpp +++ b/storage/ndb/src/common/debugger/signaldata/MasterLCP.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp b/storage/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp index 8701ef50eea..ab67b0fad59 100644 --- a/storage/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp +++ b/storage/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/NdbSttor.cpp b/storage/ndb/src/common/debugger/signaldata/NdbSttor.cpp index 4c0ed4798cd..9909f7c1b8a 100644 --- a/storage/ndb/src/common/debugger/signaldata/NdbSttor.cpp +++ b/storage/ndb/src/common/debugger/signaldata/NdbSttor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp b/storage/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp index 1a64cc9a324..1eddd7224db 100644 --- a/storage/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp +++ b/storage/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp b/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp index 078aafef351..554daecb91f 100644 --- a/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp +++ b/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/PrepDropTab.cpp b/storage/ndb/src/common/debugger/signaldata/PrepDropTab.cpp index f93a1aaf501..e005d8244e1 100644 --- a/storage/ndb/src/common/debugger/signaldata/PrepDropTab.cpp +++ b/storage/ndb/src/common/debugger/signaldata/PrepDropTab.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp b/storage/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp index 3d57f3adff5..9775e7e2a79 100644 --- a/storage/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp +++ b/storage/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/ScanFrag.cpp b/storage/ndb/src/common/debugger/signaldata/ScanFrag.cpp index 9e6dc146fca..feb0bb95469 100644 --- a/storage/ndb/src/common/debugger/signaldata/ScanFrag.cpp +++ b/storage/ndb/src/common/debugger/signaldata/ScanFrag.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/ScanTab.cpp b/storage/ndb/src/common/debugger/signaldata/ScanTab.cpp index 2ace95b3307..0d49e6ea695 100644 --- a/storage/ndb/src/common/debugger/signaldata/ScanTab.cpp +++ b/storage/ndb/src/common/debugger/signaldata/ScanTab.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp b/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp index d0070bb326d..2c3fc190ae5 100644 --- a/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp +++ b/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp b/storage/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp index be0b60af3ef..504447ebbe8 100644 --- a/storage/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp +++ b/storage/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp b/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp index 54eb0936dcd..5b465bb8993 100644 --- a/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp +++ b/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/StartRec.cpp b/storage/ndb/src/common/debugger/signaldata/StartRec.cpp index eada7a92571..7309f62e61e 100644 --- a/storage/ndb/src/common/debugger/signaldata/StartRec.cpp +++ b/storage/ndb/src/common/debugger/signaldata/StartRec.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/SumaImpl.cpp b/storage/ndb/src/common/debugger/signaldata/SumaImpl.cpp index 14ee3038708..db46260ed2e 100644 --- a/storage/ndb/src/common/debugger/signaldata/SumaImpl.cpp +++ b/storage/ndb/src/common/debugger/signaldata/SumaImpl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/SystemError.cpp b/storage/ndb/src/common/debugger/signaldata/SystemError.cpp index 01a544a4e3d..2afce976ce8 100644 --- a/storage/ndb/src/common/debugger/signaldata/SystemError.cpp +++ b/storage/ndb/src/common/debugger/signaldata/SystemError.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/TcIndx.cpp b/storage/ndb/src/common/debugger/signaldata/TcIndx.cpp index 97bd069e9da..37d4761217c 100644 --- a/storage/ndb/src/common/debugger/signaldata/TcIndx.cpp +++ b/storage/ndb/src/common/debugger/signaldata/TcIndx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp b/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp index a66adebcc21..516561e76bc 100644 --- a/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp +++ b/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/TcKeyRef.cpp b/storage/ndb/src/common/debugger/signaldata/TcKeyRef.cpp index 0c793b6d827..61783b09fef 100644 --- a/storage/ndb/src/common/debugger/signaldata/TcKeyRef.cpp +++ b/storage/ndb/src/common/debugger/signaldata/TcKeyRef.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/TcKeyReq.cpp b/storage/ndb/src/common/debugger/signaldata/TcKeyReq.cpp index 8904793611d..c20bd715c15 100644 --- a/storage/ndb/src/common/debugger/signaldata/TcKeyReq.cpp +++ b/storage/ndb/src/common/debugger/signaldata/TcKeyReq.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp b/storage/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp index 4de5ab7dc1e..e3b07a74677 100644 --- a/storage/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp +++ b/storage/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp b/storage/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp index cfcbb400d83..11ef1250edf 100644 --- a/storage/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp +++ b/storage/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/TupCommit.cpp b/storage/ndb/src/common/debugger/signaldata/TupCommit.cpp index 6a610363bde..72112e0ed57 100644 --- a/storage/ndb/src/common/debugger/signaldata/TupCommit.cpp +++ b/storage/ndb/src/common/debugger/signaldata/TupCommit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/TupKey.cpp b/storage/ndb/src/common/debugger/signaldata/TupKey.cpp index 465aa3dcf87..945eb79aab5 100644 --- a/storage/ndb/src/common/debugger/signaldata/TupKey.cpp +++ b/storage/ndb/src/common/debugger/signaldata/TupKey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp b/storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp index 94e36aa8d6f..2b8e25f0ed8 100644 --- a/storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp +++ b/storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/UtilDelete.cpp b/storage/ndb/src/common/debugger/signaldata/UtilDelete.cpp index 5686184bca6..edcbfb3ca54 100644 --- a/storage/ndb/src/common/debugger/signaldata/UtilDelete.cpp +++ b/storage/ndb/src/common/debugger/signaldata/UtilDelete.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp b/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp index e9e61f1aa66..b889bf1f298 100644 --- a/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp +++ b/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/UtilLock.cpp b/storage/ndb/src/common/debugger/signaldata/UtilLock.cpp index bb50e24fafe..4d5ad46b25e 100644 --- a/storage/ndb/src/common/debugger/signaldata/UtilLock.cpp +++ b/storage/ndb/src/common/debugger/signaldata/UtilLock.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/UtilPrepare.cpp b/storage/ndb/src/common/debugger/signaldata/UtilPrepare.cpp index ca2154cba33..9b6f4c7ea93 100644 --- a/storage/ndb/src/common/debugger/signaldata/UtilPrepare.cpp +++ b/storage/ndb/src/common/debugger/signaldata/UtilPrepare.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/debugger/signaldata/UtilSequence.cpp b/storage/ndb/src/common/debugger/signaldata/UtilSequence.cpp index 888edfbb621..e800683d03a 100644 --- a/storage/ndb/src/common/debugger/signaldata/UtilSequence.cpp +++ b/storage/ndb/src/common/debugger/signaldata/UtilSequence.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/ConsoleLogHandler.cpp b/storage/ndb/src/common/logger/ConsoleLogHandler.cpp index 2ad522060a5..e991643a86a 100644 --- a/storage/ndb/src/common/logger/ConsoleLogHandler.cpp +++ b/storage/ndb/src/common/logger/ConsoleLogHandler.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/FileLogHandler.cpp b/storage/ndb/src/common/logger/FileLogHandler.cpp index 7a2904eff71..2a2b7b66b0d 100644 --- a/storage/ndb/src/common/logger/FileLogHandler.cpp +++ b/storage/ndb/src/common/logger/FileLogHandler.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/LogHandler.cpp b/storage/ndb/src/common/logger/LogHandler.cpp index 858830792ee..1f69e78f010 100644 --- a/storage/ndb/src/common/logger/LogHandler.cpp +++ b/storage/ndb/src/common/logger/LogHandler.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/LogHandlerList.cpp b/storage/ndb/src/common/logger/LogHandlerList.cpp index c3de9c7d843..983e445bb73 100644 --- a/storage/ndb/src/common/logger/LogHandlerList.cpp +++ b/storage/ndb/src/common/logger/LogHandlerList.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/LogHandlerList.hpp b/storage/ndb/src/common/logger/LogHandlerList.hpp index bb6c5030156..fcb017dacb8 100644 --- a/storage/ndb/src/common/logger/LogHandlerList.hpp +++ b/storage/ndb/src/common/logger/LogHandlerList.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/Logger.cpp b/storage/ndb/src/common/logger/Logger.cpp index c834df1fa91..9b81ab02031 100644 --- a/storage/ndb/src/common/logger/Logger.cpp +++ b/storage/ndb/src/common/logger/Logger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/SysLogHandler.cpp b/storage/ndb/src/common/logger/SysLogHandler.cpp index e2e73cd67b7..f579c24447f 100644 --- a/storage/ndb/src/common/logger/SysLogHandler.cpp +++ b/storage/ndb/src/common/logger/SysLogHandler.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp b/storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp index 88e899551a2..c223581da39 100644 --- a/storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp +++ b/storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp b/storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp index a1f81296bc3..4242b0efdd7 100644 --- a/storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp +++ b/storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp b/storage/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp index c35ee2ebd7d..f74350486eb 100644 --- a/storage/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp +++ b/storage/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp b/storage/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp index 1f60eea1466..81b457b9054 100644 --- a/storage/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp +++ b/storage/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp index bd6ef470b3b..3274539a5bb 100644 --- a/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp +++ b/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/mgmcommon/IPCConfig.cpp b/storage/ndb/src/common/mgmcommon/IPCConfig.cpp index ae4e2ed1a11..4569e123a88 100644 --- a/storage/ndb/src/common/mgmcommon/IPCConfig.cpp +++ b/storage/ndb/src/common/mgmcommon/IPCConfig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/mgmcommon/printConfig/printConfig.cpp b/storage/ndb/src/common/mgmcommon/printConfig/printConfig.cpp index 4f7811e3eb9..1b53e94233f 100644 --- a/storage/ndb/src/common/mgmcommon/printConfig/printConfig.cpp +++ b/storage/ndb/src/common/mgmcommon/printConfig/printConfig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbCondition.c b/storage/ndb/src/common/portlib/NdbCondition.c index 6707702f43c..b73cb763d0f 100644 --- a/storage/ndb/src/common/portlib/NdbCondition.c +++ b/storage/ndb/src/common/portlib/NdbCondition.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbConfig.c b/storage/ndb/src/common/portlib/NdbConfig.c index 8b731f50eb4..b0d5655774b 100644 --- a/storage/ndb/src/common/portlib/NdbConfig.c +++ b/storage/ndb/src/common/portlib/NdbConfig.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbDaemon.c b/storage/ndb/src/common/portlib/NdbDaemon.c index 2aa2b405572..8c5d5119075 100644 --- a/storage/ndb/src/common/portlib/NdbDaemon.c +++ b/storage/ndb/src/common/portlib/NdbDaemon.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbEnv.c b/storage/ndb/src/common/portlib/NdbEnv.c index 323b897f1eb..101d61d72e4 100644 --- a/storage/ndb/src/common/portlib/NdbEnv.c +++ b/storage/ndb/src/common/portlib/NdbEnv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbHost.c b/storage/ndb/src/common/portlib/NdbHost.c index 92670ae3cc1..93e2048d32d 100644 --- a/storage/ndb/src/common/portlib/NdbHost.c +++ b/storage/ndb/src/common/portlib/NdbHost.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbMem.c b/storage/ndb/src/common/portlib/NdbMem.c index aba696c3637..74f667e9c44 100644 --- a/storage/ndb/src/common/portlib/NdbMem.c +++ b/storage/ndb/src/common/portlib/NdbMem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbMutex.c b/storage/ndb/src/common/portlib/NdbMutex.c index 5d44ccdb824..77a3e55e0b0 100644 --- a/storage/ndb/src/common/portlib/NdbMutex.c +++ b/storage/ndb/src/common/portlib/NdbMutex.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/common/portlib/NdbPortLibTest.cpp b/storage/ndb/src/common/portlib/NdbPortLibTest.cpp index 86623a865b1..aade2db8fd9 100644 --- a/storage/ndb/src/common/portlib/NdbPortLibTest.cpp +++ b/storage/ndb/src/common/portlib/NdbPortLibTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbSleep.c b/storage/ndb/src/common/portlib/NdbSleep.c index 9760e1a1d53..dec954ad1d7 100644 --- a/storage/ndb/src/common/portlib/NdbSleep.c +++ b/storage/ndb/src/common/portlib/NdbSleep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbTCP.cpp b/storage/ndb/src/common/portlib/NdbTCP.cpp index f16fc14e72d..ea322645bfc 100644 --- a/storage/ndb/src/common/portlib/NdbTCP.cpp +++ b/storage/ndb/src/common/portlib/NdbTCP.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbThread.c b/storage/ndb/src/common/portlib/NdbThread.c index 1093aa38dce..a8c0d17225e 100644 --- a/storage/ndb/src/common/portlib/NdbThread.c +++ b/storage/ndb/src/common/portlib/NdbThread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/NdbTick.c b/storage/ndb/src/common/portlib/NdbTick.c index d8e4109ca5f..919e6f443d4 100644 --- a/storage/ndb/src/common/portlib/NdbTick.c +++ b/storage/ndb/src/common/portlib/NdbTick.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/memtest.c b/storage/ndb/src/common/portlib/memtest.c index 42e405d6405..d732c28cfaa 100644 --- a/storage/ndb/src/common/portlib/memtest.c +++ b/storage/ndb/src/common/portlib/memtest.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/mmstest.cpp b/storage/ndb/src/common/portlib/mmstest.cpp index 455f969c93f..00317f8d38b 100644 --- a/storage/ndb/src/common/portlib/mmstest.cpp +++ b/storage/ndb/src/common/portlib/mmstest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/munmaptest.cpp b/storage/ndb/src/common/portlib/munmaptest.cpp index 608a7dc61a3..a10d3ff1c50 100644 --- a/storage/ndb/src/common/portlib/munmaptest.cpp +++ b/storage/ndb/src/common/portlib/munmaptest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbCondition.c b/storage/ndb/src/common/portlib/win32/NdbCondition.c index 184c80e4b10..8a4843f5c20 100644 --- a/storage/ndb/src/common/portlib/win32/NdbCondition.c +++ b/storage/ndb/src/common/portlib/win32/NdbCondition.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbDaemon.c b/storage/ndb/src/common/portlib/win32/NdbDaemon.c index 9323bbc47a7..af0ae5b8cc6 100644 --- a/storage/ndb/src/common/portlib/win32/NdbDaemon.c +++ b/storage/ndb/src/common/portlib/win32/NdbDaemon.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbEnv.c b/storage/ndb/src/common/portlib/win32/NdbEnv.c index 2318d52d662..1394f494cdf 100644 --- a/storage/ndb/src/common/portlib/win32/NdbEnv.c +++ b/storage/ndb/src/common/portlib/win32/NdbEnv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbHost.c b/storage/ndb/src/common/portlib/win32/NdbHost.c index 3d0ad765211..c2143413757 100644 --- a/storage/ndb/src/common/portlib/win32/NdbHost.c +++ b/storage/ndb/src/common/portlib/win32/NdbHost.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbMem.c b/storage/ndb/src/common/portlib/win32/NdbMem.c index c4f4a18af92..06af280e904 100644 --- a/storage/ndb/src/common/portlib/win32/NdbMem.c +++ b/storage/ndb/src/common/portlib/win32/NdbMem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbMutex.c b/storage/ndb/src/common/portlib/win32/NdbMutex.c index f1e2a585173..e4e8bdeebb0 100644 --- a/storage/ndb/src/common/portlib/win32/NdbMutex.c +++ b/storage/ndb/src/common/portlib/win32/NdbMutex.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbSleep.c b/storage/ndb/src/common/portlib/win32/NdbSleep.c index bf39400dca0..58353ad1a30 100644 --- a/storage/ndb/src/common/portlib/win32/NdbSleep.c +++ b/storage/ndb/src/common/portlib/win32/NdbSleep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbTCP.c b/storage/ndb/src/common/portlib/win32/NdbTCP.c index 50ba5e4c06e..03e5e492fa0 100644 --- a/storage/ndb/src/common/portlib/win32/NdbTCP.c +++ b/storage/ndb/src/common/portlib/win32/NdbTCP.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbThread.c b/storage/ndb/src/common/portlib/win32/NdbThread.c index 1c4c93f1b16..760ed47218a 100644 --- a/storage/ndb/src/common/portlib/win32/NdbThread.c +++ b/storage/ndb/src/common/portlib/win32/NdbThread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/portlib/win32/NdbTick.c b/storage/ndb/src/common/portlib/win32/NdbTick.c index 7adaabb1caf..232cc597d0c 100644 --- a/storage/ndb/src/common/portlib/win32/NdbTick.c +++ b/storage/ndb/src/common/portlib/win32/NdbTick.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/Packer.cpp b/storage/ndb/src/common/transporter/Packer.cpp index c16132e5cac..23775b064ac 100644 --- a/storage/ndb/src/common/transporter/Packer.cpp +++ b/storage/ndb/src/common/transporter/Packer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/Packer.hpp b/storage/ndb/src/common/transporter/Packer.hpp index d52555c0b41..119f01ea286 100644 --- a/storage/ndb/src/common/transporter/Packer.hpp +++ b/storage/ndb/src/common/transporter/Packer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/SCI_Transporter.cpp b/storage/ndb/src/common/transporter/SCI_Transporter.cpp index eb3c2da9672..c387d0224c6 100644 --- a/storage/ndb/src/common/transporter/SCI_Transporter.cpp +++ b/storage/ndb/src/common/transporter/SCI_Transporter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/SCI_Transporter.hpp b/storage/ndb/src/common/transporter/SCI_Transporter.hpp index 3140b4d822b..c2b2cf0cec0 100644 --- a/storage/ndb/src/common/transporter/SCI_Transporter.hpp +++ b/storage/ndb/src/common/transporter/SCI_Transporter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/SHM_Buffer.hpp b/storage/ndb/src/common/transporter/SHM_Buffer.hpp index 0056874c78e..62fa02c6f29 100644 --- a/storage/ndb/src/common/transporter/SHM_Buffer.hpp +++ b/storage/ndb/src/common/transporter/SHM_Buffer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/SHM_Transporter.cpp b/storage/ndb/src/common/transporter/SHM_Transporter.cpp index 7b47bf91adc..42bb784166e 100644 --- a/storage/ndb/src/common/transporter/SHM_Transporter.cpp +++ b/storage/ndb/src/common/transporter/SHM_Transporter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/SHM_Transporter.hpp b/storage/ndb/src/common/transporter/SHM_Transporter.hpp index b313e458771..9363649c60a 100644 --- a/storage/ndb/src/common/transporter/SHM_Transporter.hpp +++ b/storage/ndb/src/common/transporter/SHM_Transporter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp b/storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp index 3d5bf4d9718..6466c57adf7 100644 --- a/storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp +++ b/storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp b/storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp index ae9d8dd2c76..8d0f7f84a93 100644 --- a/storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp +++ b/storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/SendBuffer.cpp b/storage/ndb/src/common/transporter/SendBuffer.cpp index faf044d5caf..4c46841ab6f 100644 --- a/storage/ndb/src/common/transporter/SendBuffer.cpp +++ b/storage/ndb/src/common/transporter/SendBuffer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/SendBuffer.hpp b/storage/ndb/src/common/transporter/SendBuffer.hpp index b4e0670bc1a..3497201c328 100644 --- a/storage/ndb/src/common/transporter/SendBuffer.hpp +++ b/storage/ndb/src/common/transporter/SendBuffer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/TCP_Transporter.cpp b/storage/ndb/src/common/transporter/TCP_Transporter.cpp index 7014691dc4b..5c49fa9c938 100644 --- a/storage/ndb/src/common/transporter/TCP_Transporter.cpp +++ b/storage/ndb/src/common/transporter/TCP_Transporter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/TCP_Transporter.hpp b/storage/ndb/src/common/transporter/TCP_Transporter.hpp index 1b53f337ba2..11a36751e27 100644 --- a/storage/ndb/src/common/transporter/TCP_Transporter.hpp +++ b/storage/ndb/src/common/transporter/TCP_Transporter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/Transporter.cpp b/storage/ndb/src/common/transporter/Transporter.cpp index 89f984774de..165e9b01fb0 100644 --- a/storage/ndb/src/common/transporter/Transporter.cpp +++ b/storage/ndb/src/common/transporter/Transporter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/Transporter.hpp b/storage/ndb/src/common/transporter/Transporter.hpp index fd53fbd3506..82ed1d2b315 100644 --- a/storage/ndb/src/common/transporter/Transporter.hpp +++ b/storage/ndb/src/common/transporter/Transporter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/TransporterInternalDefinitions.hpp b/storage/ndb/src/common/transporter/TransporterInternalDefinitions.hpp index 49c8b04c74a..75d31d9803d 100644 --- a/storage/ndb/src/common/transporter/TransporterInternalDefinitions.hpp +++ b/storage/ndb/src/common/transporter/TransporterInternalDefinitions.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/TransporterRegistry.cpp b/storage/ndb/src/common/transporter/TransporterRegistry.cpp index 5f8cdad47db..0f871d08735 100644 --- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp +++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/basictest/basicTransporterTest.cpp b/storage/ndb/src/common/transporter/basictest/basicTransporterTest.cpp index c5f87ab6577..46303c33763 100644 --- a/storage/ndb/src/common/transporter/basictest/basicTransporterTest.cpp +++ b/storage/ndb/src/common/transporter/basictest/basicTransporterTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/buddy.cpp b/storage/ndb/src/common/transporter/buddy.cpp index 08624e8a70e..476aa2fa3fa 100644 --- a/storage/ndb/src/common/transporter/buddy.cpp +++ b/storage/ndb/src/common/transporter/buddy.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/buddy.hpp b/storage/ndb/src/common/transporter/buddy.hpp index 86fc5fbf36e..ca9e0017732 100644 --- a/storage/ndb/src/common/transporter/buddy.hpp +++ b/storage/ndb/src/common/transporter/buddy.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp b/storage/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp index 48089f41e7f..fceb7322dda 100644 --- a/storage/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp +++ b/storage/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/perftest/perfTransporterTest.cpp b/storage/ndb/src/common/transporter/perftest/perfTransporterTest.cpp index 0089be2e132..87718405547 100644 --- a/storage/ndb/src/common/transporter/perftest/perfTransporterTest.cpp +++ b/storage/ndb/src/common/transporter/perftest/perfTransporterTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp b/storage/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp index 0915ac57dc0..804e75a9edd 100644 --- a/storage/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp +++ b/storage/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp b/storage/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp index abedf926809..229b1517211 100644 --- a/storage/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp +++ b/storage/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp b/storage/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp index dd692a2797c..b090042f68b 100644 --- a/storage/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp +++ b/storage/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/priotest/prioTransporterTest.cpp b/storage/ndb/src/common/transporter/priotest/prioTransporterTest.cpp index 6f6c40dbdf2..7c822daa7a3 100644 --- a/storage/ndb/src/common/transporter/priotest/prioTransporterTest.cpp +++ b/storage/ndb/src/common/transporter/priotest/prioTransporterTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/transporter/priotest/prioTransporterTest.hpp b/storage/ndb/src/common/transporter/priotest/prioTransporterTest.hpp index ab4e1b523ec..ecbece1ac2a 100644 --- a/storage/ndb/src/common/transporter/priotest/prioTransporterTest.hpp +++ b/storage/ndb/src/common/transporter/priotest/prioTransporterTest.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/BaseString.cpp b/storage/ndb/src/common/util/BaseString.cpp index 6be114a7a4f..91f8b470ba2 100644 --- a/storage/ndb/src/common/util/BaseString.cpp +++ b/storage/ndb/src/common/util/BaseString.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/File.cpp b/storage/ndb/src/common/util/File.cpp index bd79aa68c8b..07e8309f507 100644 --- a/storage/ndb/src/common/util/File.cpp +++ b/storage/ndb/src/common/util/File.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/InputStream.cpp b/storage/ndb/src/common/util/InputStream.cpp index afc7176623e..66f997dfd04 100644 --- a/storage/ndb/src/common/util/InputStream.cpp +++ b/storage/ndb/src/common/util/InputStream.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/NdbOut.cpp b/storage/ndb/src/common/util/NdbOut.cpp index 87c3c0036d9..5069231f673 100644 --- a/storage/ndb/src/common/util/NdbOut.cpp +++ b/storage/ndb/src/common/util/NdbOut.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/NdbSqlUtil.cpp b/storage/ndb/src/common/util/NdbSqlUtil.cpp index 343ac9737b8..d179c1f298e 100644 --- a/storage/ndb/src/common/util/NdbSqlUtil.cpp +++ b/storage/ndb/src/common/util/NdbSqlUtil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/OutputStream.cpp b/storage/ndb/src/common/util/OutputStream.cpp index e05b48791fc..acda12bd2f9 100644 --- a/storage/ndb/src/common/util/OutputStream.cpp +++ b/storage/ndb/src/common/util/OutputStream.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/Parser.cpp b/storage/ndb/src/common/util/Parser.cpp index 35364e70d11..c0e6e9efb68 100644 --- a/storage/ndb/src/common/util/Parser.cpp +++ b/storage/ndb/src/common/util/Parser.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/Properties.cpp b/storage/ndb/src/common/util/Properties.cpp index 27f44bf1791..c8c62896193 100644 --- a/storage/ndb/src/common/util/Properties.cpp +++ b/storage/ndb/src/common/util/Properties.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/SimpleProperties.cpp b/storage/ndb/src/common/util/SimpleProperties.cpp index fa81bed8a94..ba798e396db 100644 --- a/storage/ndb/src/common/util/SimpleProperties.cpp +++ b/storage/ndb/src/common/util/SimpleProperties.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/SocketAuthenticator.cpp b/storage/ndb/src/common/util/SocketAuthenticator.cpp index 53111c6cb0f..d1b36119a59 100644 --- a/storage/ndb/src/common/util/SocketAuthenticator.cpp +++ b/storage/ndb/src/common/util/SocketAuthenticator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/SocketClient.cpp b/storage/ndb/src/common/util/SocketClient.cpp index 8dbdd94fb60..2d0ed66d9b6 100644 --- a/storage/ndb/src/common/util/SocketClient.cpp +++ b/storage/ndb/src/common/util/SocketClient.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/SocketServer.cpp b/storage/ndb/src/common/util/SocketServer.cpp index f5fcf491c0c..acc797a86d0 100644 --- a/storage/ndb/src/common/util/SocketServer.cpp +++ b/storage/ndb/src/common/util/SocketServer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/basestring_vsnprintf.c b/storage/ndb/src/common/util/basestring_vsnprintf.c index 5dd366d0cd6..54eeff0911d 100644 --- a/storage/ndb/src/common/util/basestring_vsnprintf.c +++ b/storage/ndb/src/common/util/basestring_vsnprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/filetest/FileUnitTest.cpp b/storage/ndb/src/common/util/filetest/FileUnitTest.cpp index c4ef7491b88..b469ce2b3ac 100644 --- a/storage/ndb/src/common/util/filetest/FileUnitTest.cpp +++ b/storage/ndb/src/common/util/filetest/FileUnitTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/filetest/FileUnitTest.hpp b/storage/ndb/src/common/util/filetest/FileUnitTest.hpp index 03c9f87ccb3..6627ef74599 100644 --- a/storage/ndb/src/common/util/filetest/FileUnitTest.hpp +++ b/storage/ndb/src/common/util/filetest/FileUnitTest.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/md5_hash.cpp b/storage/ndb/src/common/util/md5_hash.cpp index f5692707744..32fc5fcbc8c 100644 --- a/storage/ndb/src/common/util/md5_hash.cpp +++ b/storage/ndb/src/common/util/md5_hash.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/ndb_init.c b/storage/ndb/src/common/util/ndb_init.c index 4d7ec6812e7..5582b6923e2 100644 --- a/storage/ndb/src/common/util/ndb_init.c +++ b/storage/ndb/src/common/util/ndb_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/ndb_rand.c b/storage/ndb/src/common/util/ndb_rand.c index 2189d487e1e..95a91d566b3 100644 --- a/storage/ndb/src/common/util/ndb_rand.c +++ b/storage/ndb/src/common/util/ndb_rand.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/random.c b/storage/ndb/src/common/util/random.c index 16763526df1..9c2548e41a1 100644 --- a/storage/ndb/src/common/util/random.c +++ b/storage/ndb/src/common/util/random.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/socket_io.cpp b/storage/ndb/src/common/util/socket_io.cpp index 27836481106..67842ada01a 100644 --- a/storage/ndb/src/common/util/socket_io.cpp +++ b/storage/ndb/src/common/util/socket_io.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/strdup.c b/storage/ndb/src/common/util/strdup.c index 6688122995d..a1b796cfc46 100644 --- a/storage/ndb/src/common/util/strdup.c +++ b/storage/ndb/src/common/util/strdup.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/testProperties/testProperties.cpp b/storage/ndb/src/common/util/testProperties/testProperties.cpp index 31ca1d3cdec..ce45f742234 100644 --- a/storage/ndb/src/common/util/testProperties/testProperties.cpp +++ b/storage/ndb/src/common/util/testProperties/testProperties.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/testSimpleProperties/sp_test.cpp b/storage/ndb/src/common/util/testSimpleProperties/sp_test.cpp index fafd77f2fb8..ec5e134cc63 100644 --- a/storage/ndb/src/common/util/testSimpleProperties/sp_test.cpp +++ b/storage/ndb/src/common/util/testSimpleProperties/sp_test.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/uucode.c b/storage/ndb/src/common/util/uucode.c index 950b2b4bb72..4f2d66c9903 100644 --- a/storage/ndb/src/common/util/uucode.c +++ b/storage/ndb/src/common/util/uucode.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/common/util/version.c b/storage/ndb/src/common/util/version.c index 47b39c2f455..2806b710d6f 100644 --- a/storage/ndb/src/common/util/version.c +++ b/storage/ndb/src/common/util/version.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp b/storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp index d8414af480c..a12f5df11dd 100644 --- a/storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp +++ b/storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h b/storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h index 7867849d6de..90fd59e4423 100644 --- a/storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h +++ b/storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp b/storage/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp index a4ed4a7f5d0..45a95171193 100644 --- a/storage/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp +++ b/storage/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp b/storage/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp index 9fae2778b5c..6da72011fe3 100644 --- a/storage/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp +++ b/storage/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/C++/StdAfx.h b/storage/ndb/src/cw/cpcc-win32/C++/StdAfx.h index 54ae5414991..9895cf9a158 100644 --- a/storage/ndb/src/cw/cpcc-win32/C++/StdAfx.h +++ b/storage/ndb/src/cw/cpcc-win32/C++/StdAfx.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/C++/TreeView.cpp b/storage/ndb/src/cw/cpcc-win32/C++/TreeView.cpp index 9287ff86179..40cfa2ffd56 100644 --- a/storage/ndb/src/cw/cpcc-win32/C++/TreeView.cpp +++ b/storage/ndb/src/cw/cpcc-win32/C++/TreeView.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/C++/TreeView.h b/storage/ndb/src/cw/cpcc-win32/C++/TreeView.h index 34c5cbe38af..80874110ce5 100644 --- a/storage/ndb/src/cw/cpcc-win32/C++/TreeView.h +++ b/storage/ndb/src/cw/cpcc-win32/C++/TreeView.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/C++/resource.h b/storage/ndb/src/cw/cpcc-win32/C++/resource.h index 189220e0a87..8e94ed80ff8 100644 --- a/storage/ndb/src/cw/cpcc-win32/C++/resource.h +++ b/storage/ndb/src/cw/cpcc-win32/C++/resource.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs b/storage/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs index b475829d767..6982c882f46 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/Computer.cs b/storage/ndb/src/cw/cpcc-win32/csharp/Computer.cs index 62ef27391af..15685a711e1 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/Computer.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/Computer.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs b/storage/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs index 9e7272a302d..ca718b270e2 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs b/storage/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs index b6032a02e06..b42e79f489c 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/Database.cs b/storage/ndb/src/cw/cpcc-win32/csharp/Database.cs index f377e986caf..99c63036e4c 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/Database.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/Database.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs b/storage/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs index 4d0b8e0de42..4ca78b714bd 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/Process.cs b/storage/ndb/src/cw/cpcc-win32/csharp/Process.cs index 12c65c8d8a8..0786239e009 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/Process.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/Process.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs b/storage/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs index a2491ce7bb3..87cb2ff7bba 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs b/storage/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs index ddf1bd29086..8bd203f17c2 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs b/storage/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs index 90bf1df21fd..dc7fb51caee 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs b/storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs index 540bcedf84d..202cf506e0e 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs b/storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs index 0ef04dc4b4c..0cdae6ce796 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs b/storage/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs index 3619c17e701..32a236908fe 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs b/storage/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs index 81b6375cad9..92ccf674ad6 100644 --- a/storage/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs +++ b/storage/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcd/APIService.cpp b/storage/ndb/src/cw/cpcd/APIService.cpp index 9ed28c320b4..d5cb079849f 100644 --- a/storage/ndb/src/cw/cpcd/APIService.cpp +++ b/storage/ndb/src/cw/cpcd/APIService.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcd/APIService.hpp b/storage/ndb/src/cw/cpcd/APIService.hpp index bcc571df259..67986e8c00c 100644 --- a/storage/ndb/src/cw/cpcd/APIService.hpp +++ b/storage/ndb/src/cw/cpcd/APIService.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcd/CPCD.cpp b/storage/ndb/src/cw/cpcd/CPCD.cpp index dd3487f458d..3e49167e814 100644 --- a/storage/ndb/src/cw/cpcd/CPCD.cpp +++ b/storage/ndb/src/cw/cpcd/CPCD.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcd/CPCD.hpp b/storage/ndb/src/cw/cpcd/CPCD.hpp index c2069110d09..5733ea75c16 100644 --- a/storage/ndb/src/cw/cpcd/CPCD.hpp +++ b/storage/ndb/src/cw/cpcd/CPCD.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcd/Monitor.cpp b/storage/ndb/src/cw/cpcd/Monitor.cpp index 2d9256d27a6..bdd06aa3a1f 100644 --- a/storage/ndb/src/cw/cpcd/Monitor.cpp +++ b/storage/ndb/src/cw/cpcd/Monitor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcd/Process.cpp b/storage/ndb/src/cw/cpcd/Process.cpp index 2bcecfc2059..5b46433ea3e 100644 --- a/storage/ndb/src/cw/cpcd/Process.cpp +++ b/storage/ndb/src/cw/cpcd/Process.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcd/common.cpp b/storage/ndb/src/cw/cpcd/common.cpp index 5038bc2e11e..b340b0a1c13 100644 --- a/storage/ndb/src/cw/cpcd/common.cpp +++ b/storage/ndb/src/cw/cpcd/common.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcd/common.hpp b/storage/ndb/src/cw/cpcd/common.hpp index 786666cbed6..a58e599a02b 100644 --- a/storage/ndb/src/cw/cpcd/common.hpp +++ b/storage/ndb/src/cw/cpcd/common.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/cpcd/main.cpp b/storage/ndb/src/cw/cpcd/main.cpp index 4737a7c7cde..c90d0f43f1b 100644 --- a/storage/ndb/src/cw/cpcd/main.cpp +++ b/storage/ndb/src/cw/cpcd/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/cw/test/socketclient/socketClientTest.cpp b/storage/ndb/src/cw/test/socketclient/socketClientTest.cpp index 43c0e20a1f5..d2b898dac1f 100644 --- a/storage/ndb/src/cw/test/socketclient/socketClientTest.cpp +++ b/storage/ndb/src/cw/test/socketclient/socketClientTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/util/ClientInterface.cpp b/storage/ndb/src/cw/util/ClientInterface.cpp index 2136220cc84..dc7bc52c1c9 100644 --- a/storage/ndb/src/cw/util/ClientInterface.cpp +++ b/storage/ndb/src/cw/util/ClientInterface.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/util/ClientInterface.hpp b/storage/ndb/src/cw/util/ClientInterface.hpp index de0fa81723a..dddf38e3679 100644 --- a/storage/ndb/src/cw/util/ClientInterface.hpp +++ b/storage/ndb/src/cw/util/ClientInterface.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/util/SocketRegistry.cpp b/storage/ndb/src/cw/util/SocketRegistry.cpp index dbcb0e7ceea..2d5f04d7cc4 100644 --- a/storage/ndb/src/cw/util/SocketRegistry.cpp +++ b/storage/ndb/src/cw/util/SocketRegistry.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/util/SocketRegistry.hpp b/storage/ndb/src/cw/util/SocketRegistry.hpp index d0fa775f4ec..94860a18fe6 100644 --- a/storage/ndb/src/cw/util/SocketRegistry.hpp +++ b/storage/ndb/src/cw/util/SocketRegistry.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/util/SocketService.cpp b/storage/ndb/src/cw/util/SocketService.cpp index f02f47c288f..5201f2afc84 100644 --- a/storage/ndb/src/cw/util/SocketService.cpp +++ b/storage/ndb/src/cw/util/SocketService.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/cw/util/SocketService.hpp b/storage/ndb/src/cw/util/SocketService.hpp index feac551a202..4671c43cffc 100644 --- a/storage/ndb/src/cw/util/SocketService.hpp +++ b/storage/ndb/src/cw/util/SocketService.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/SimBlockList.cpp b/storage/ndb/src/kernel/SimBlockList.cpp index d55d67074a2..ea1ee7c4dc9 100644 --- a/storage/ndb/src/kernel/SimBlockList.cpp +++ b/storage/ndb/src/kernel/SimBlockList.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/backup/Backup.cpp b/storage/ndb/src/kernel/blocks/backup/Backup.cpp index 9a7710f35e5..b607422b35c 100644 --- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp +++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/backup/Backup.hpp b/storage/ndb/src/kernel/blocks/backup/Backup.hpp index 675805a0f0a..236bd55419d 100644 --- a/storage/ndb/src/kernel/blocks/backup/Backup.hpp +++ b/storage/ndb/src/kernel/blocks/backup/Backup.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp b/storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp index 3496b897eb1..a6c89a879ed 100644 --- a/storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp +++ b/storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp b/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp index 8af9d8d4c7b..87051fb0e4f 100644 --- a/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp +++ b/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/backup/FsBuffer.hpp b/storage/ndb/src/kernel/blocks/backup/FsBuffer.hpp index 6fc36123de7..048a96df576 100644 --- a/storage/ndb/src/kernel/blocks/backup/FsBuffer.hpp +++ b/storage/ndb/src/kernel/blocks/backup/FsBuffer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/backup/read.cpp b/storage/ndb/src/kernel/blocks/backup/read.cpp index 7bf90d0d408..d3b65bc6da0 100644 --- a/storage/ndb/src/kernel/blocks/backup/read.cpp +++ b/storage/ndb/src/kernel/blocks/backup/read.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp index b921979f166..70f175741ec 100644 --- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp +++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp index 371d1862f79..6d8de9375ec 100644 --- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp +++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp b/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp index 11339a8a4cb..48491da39b8 100644 --- a/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp +++ b/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp b/storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp index 221bdd25c4d..98fa09c0448 100644 --- a/storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp +++ b/storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp index 8415ccc835f..cfc0a340e64 100644 --- a/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 4392d16ba2e..d27e012bb77 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp index ed926f81a2a..a1139edb4ef 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp +++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp b/storage/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp index caa96aa8ef6..8deffad009f 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp +++ b/storage/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp b/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp index 32787b75d40..aaee7836902 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp +++ b/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp b/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp index 093f061ca2d..738305f866c 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp +++ b/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp index c9394958311..c7a1aae6ad4 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index fcca4345e56..3c293103c26 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdih/Sysfile.hpp b/storage/ndb/src/kernel/blocks/dbdih/Sysfile.hpp index f0f65fa17d5..a86a9733f41 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/Sysfile.hpp +++ b/storage/ndb/src/kernel/blocks/dbdih/Sysfile.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp b/storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp index 747a261efb4..58744974219 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp b/storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp index cd211bc55a9..fc908d8b8af 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp b/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp index e7cf052f317..509136918f5 100644 --- a/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp +++ b/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp b/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp index fce32cfd5ef..4d196d5c505 100644 --- a/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp +++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index 0a6a42bcbe2..94eaddeb696 100644 --- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp index 50a66924680..d065092afdd 100644 --- a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp +++ b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp index d0ecaa1da6d..16d0bd13615 100644 --- a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp +++ b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp index 00fc825b90c..2119056fe0a 100644 --- a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp +++ b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp index 635c2e5691e..40c88b3cddb 100644 --- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp +++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp b/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp index fa70a32dd16..df7798a0fc5 100644 --- a/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp +++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp index d72cb4a0ec9..20ecc7ff73d 100644 --- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp b/storage/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp index 94283ed1c16..65692051f97 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp +++ b/storage/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index 56fb23252a6..18f000a66b8 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp index bd82226a6aa..2574607ddb0 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp index d5373ff1c32..050fb7f7f7d 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp index 59443f17b59..4edcbe12219 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp index b82e6cfc4e1..b0b93d0dfa6 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp index 000951327c0..a301e92cafb 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index 38e9e975687..28122384d93 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp index 94808b63308..94a1dd7c7eb 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp index c4fca153744..0f6ebb4ca32 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp index 5a73dcf3dfb..ec0c1422274 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp index 58936fad8ed..1d21fcbdaec 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp index 56f24529b72..28cd0864249 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp index 9856d4984b3..6b768294451 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp index 0436e7413bf..0731840285a 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp index 1f09faf72a3..b7538d85d26 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp index b91658ef74a..d399bd9863b 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp index cc836a65865..7237cf86254 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp index d71869587f8..c4840c732a6 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp index 0b026f92369..956c9af84d5 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 MySQL AB +/* Copyright (c) 2004-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp b/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp index dacc55ae9ba..82f8028b3f3 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp b/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp index 6c55947a8ff..40d47412253 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp +++ b/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp b/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp index 1cae49fd13b..6911e9144a8 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp b/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp index c130a80f846..20e9f3d5a33 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp +++ b/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp index efc3dea83c2..55a0c97b74a 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp +++ b/storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp index dd34361c5da..aabcdb76a8f 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp index bc991a07dbf..f336c688985 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp index 9fca0b2436f..743597adb14 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp index bb9ea57a588..a8b98ae86a8 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp index 01c31ef4991..633496a3875 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp index 351bc46c09f..8f6be4492ae 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp index 2296cfd12fd..c698516cfce 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp index 125c095513b..3b7310e1b49 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp index 12b8254812f..ce3db24d048 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp index 9d4a77270ca..fd29e585bff 100644 --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp index 24470370210..dcb9c96bb4e 100644 --- a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp +++ b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp index 3979fe02e82..db4f9421b2a 100644 --- a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp +++ b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/diskpage.hpp b/storage/ndb/src/kernel/blocks/diskpage.hpp index 92790a6f83c..ef393833a18 100644 --- a/storage/ndb/src/kernel/blocks/diskpage.hpp +++ b/storage/ndb/src/kernel/blocks/diskpage.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/lgman.hpp b/storage/ndb/src/kernel/blocks/lgman.hpp index 34a27acd7cd..c667dbfdef1 100644 --- a/storage/ndb/src/kernel/blocks/lgman.hpp +++ b/storage/ndb/src/kernel/blocks/lgman.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/mutexes.hpp b/storage/ndb/src/kernel/blocks/mutexes.hpp index fe4fb9c70c2..fbefd9edd55 100644 --- a/storage/ndb/src/kernel/blocks/mutexes.hpp +++ b/storage/ndb/src/kernel/blocks/mutexes.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp b/storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp index f73e2ce4f80..29c187ea123 100644 --- a/storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp +++ b/storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp b/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp index 362fc34f72f..ba3c480e865 100644 --- a/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp +++ b/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp b/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp index 0191e11805b..4d9e09b57fb 100644 --- a/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp +++ b/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp b/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp index aef6f7d063e..e0e71a3882a 100644 --- a/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp +++ b/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp index 074c675305e..c619d5f9c05 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp index 9b6601edccc..fdb57af5102 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp index 48b39386f4d..20c4ca6560b 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp b/storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp index 2a9763746f1..938b17069e1 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp b/storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp index eeac67e8911..ab044b8cffc 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp b/storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp index 268f0740491..dd762e6d361 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Filename.hpp b/storage/ndb/src/kernel/blocks/ndbfs/Filename.hpp index 413c2ce1182..0e3687ee912 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/Filename.hpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/Filename.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp b/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp index b764ccbddf9..e94c6ff1d19 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp b/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp index e9273610c9a..8ab49e6c644 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp b/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp index 29c32ba4b46..0cfe123d0ee 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp index a04ce447462..ec73aa1eed6 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp index b26722c7ab4..77e6dbbc982 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp b/storage/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp index 52354f5e376..594b065ebf0 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Pool.hpp b/storage/ndb/src/kernel/blocks/ndbfs/Pool.hpp index 96f0b8008d8..36e45c7e4d8 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/Pool.hpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/Pool.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp b/storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp index c973d88b2ed..7b8d1874ff8 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/pgman.cpp b/storage/ndb/src/kernel/blocks/pgman.cpp index a605b3f5a09..2241374f29a 100644 --- a/storage/ndb/src/kernel/blocks/pgman.cpp +++ b/storage/ndb/src/kernel/blocks/pgman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/pgman.hpp b/storage/ndb/src/kernel/blocks/pgman.hpp index 2f0b9fc9693..0c6c26b58b7 100644 --- a/storage/ndb/src/kernel/blocks/pgman.hpp +++ b/storage/ndb/src/kernel/blocks/pgman.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/print_file.cpp b/storage/ndb/src/kernel/blocks/print_file.cpp index b1dff39deff..c5aefc97d83 100644 --- a/storage/ndb/src/kernel/blocks/print_file.cpp +++ b/storage/ndb/src/kernel/blocks/print_file.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp b/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp index bfd68d7144d..86ec63dc307 100644 --- a/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp +++ b/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp b/storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp index 5e15e94b3c0..83539bfbe9f 100644 --- a/storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp +++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp index adb96db02d0..a0a77c7565b 100644 --- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp +++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/qmgr/timer.hpp b/storage/ndb/src/kernel/blocks/qmgr/timer.hpp index 8376186244e..d02f4f3a1b7 100644 --- a/storage/ndb/src/kernel/blocks/qmgr/timer.hpp +++ b/storage/ndb/src/kernel/blocks/qmgr/timer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/record_types.hpp b/storage/ndb/src/kernel/blocks/record_types.hpp index ffa4737cb61..f6cc398ff4f 100644 --- a/storage/ndb/src/kernel/blocks/record_types.hpp +++ b/storage/ndb/src/kernel/blocks/record_types.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/restore.cpp b/storage/ndb/src/kernel/blocks/restore.cpp index 256b632f7ca..70991c3b523 100644 --- a/storage/ndb/src/kernel/blocks/restore.cpp +++ b/storage/ndb/src/kernel/blocks/restore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/restore.hpp b/storage/ndb/src/kernel/blocks/restore.hpp index 4bc77925c10..7ff7cb11042 100644 --- a/storage/ndb/src/kernel/blocks/restore.hpp +++ b/storage/ndb/src/kernel/blocks/restore.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/suma/Suma.cpp b/storage/ndb/src/kernel/blocks/suma/Suma.cpp index 0c4c61c055b..ad811cada5e 100644 --- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp +++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/suma/Suma.hpp b/storage/ndb/src/kernel/blocks/suma/Suma.hpp index 899c5f275db..6d0aead653d 100644 --- a/storage/ndb/src/kernel/blocks/suma/Suma.hpp +++ b/storage/ndb/src/kernel/blocks/suma/Suma.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp b/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp index edf93370ab4..40c9ce75e2b 100644 --- a/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp +++ b/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/trix/Trix.cpp b/storage/ndb/src/kernel/blocks/trix/Trix.cpp index 9f2f1313608..1ab322ecfa0 100644 --- a/storage/ndb/src/kernel/blocks/trix/Trix.cpp +++ b/storage/ndb/src/kernel/blocks/trix/Trix.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/trix/Trix.hpp b/storage/ndb/src/kernel/blocks/trix/Trix.hpp index b554e7f4ade..3d6f924419e 100644 --- a/storage/ndb/src/kernel/blocks/trix/Trix.hpp +++ b/storage/ndb/src/kernel/blocks/trix/Trix.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/tsman.cpp b/storage/ndb/src/kernel/blocks/tsman.cpp index 4cc6c86f032..24f6954fe0e 100644 --- a/storage/ndb/src/kernel/blocks/tsman.cpp +++ b/storage/ndb/src/kernel/blocks/tsman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/blocks/tsman.hpp b/storage/ndb/src/kernel/blocks/tsman.hpp index 0e7da726709..892944eacbc 100644 --- a/storage/ndb/src/kernel/blocks/tsman.hpp +++ b/storage/ndb/src/kernel/blocks/tsman.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/error/ErrorHandlingMacros.hpp b/storage/ndb/src/kernel/error/ErrorHandlingMacros.hpp index cc284180994..7c28ca65d38 100644 --- a/storage/ndb/src/kernel/error/ErrorHandlingMacros.hpp +++ b/storage/ndb/src/kernel/error/ErrorHandlingMacros.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/error/ErrorReporter.cpp b/storage/ndb/src/kernel/error/ErrorReporter.cpp index 5d210c7bf9d..a24b9054345 100644 --- a/storage/ndb/src/kernel/error/ErrorReporter.cpp +++ b/storage/ndb/src/kernel/error/ErrorReporter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/error/ErrorReporter.hpp b/storage/ndb/src/kernel/error/ErrorReporter.hpp index 8ce6aec9a42..1cd2f0894fb 100644 --- a/storage/ndb/src/kernel/error/ErrorReporter.hpp +++ b/storage/ndb/src/kernel/error/ErrorReporter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/error/TimeModule.cpp b/storage/ndb/src/kernel/error/TimeModule.cpp index b0ac93c30bf..33acdbbf1cf 100644 --- a/storage/ndb/src/kernel/error/TimeModule.cpp +++ b/storage/ndb/src/kernel/error/TimeModule.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/error/TimeModule.hpp b/storage/ndb/src/kernel/error/TimeModule.hpp index 6accd0535af..23ff1f03632 100644 --- a/storage/ndb/src/kernel/error/TimeModule.hpp +++ b/storage/ndb/src/kernel/error/TimeModule.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/error/ndbd_exit_codes.c b/storage/ndb/src/kernel/error/ndbd_exit_codes.c index 1f43be040df..4d2976675c8 100644 --- a/storage/ndb/src/kernel/error/ndbd_exit_codes.c +++ b/storage/ndb/src/kernel/error/ndbd_exit_codes.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/main.cpp b/storage/ndb/src/kernel/main.cpp index d2899318fd6..e84c8e53579 100644 --- a/storage/ndb/src/kernel/main.cpp +++ b/storage/ndb/src/kernel/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Array.hpp b/storage/ndb/src/kernel/vm/Array.hpp index 547f3d800cd..3c4995c1f9c 100644 --- a/storage/ndb/src/kernel/vm/Array.hpp +++ b/storage/ndb/src/kernel/vm/Array.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/ArrayPool.hpp b/storage/ndb/src/kernel/vm/ArrayPool.hpp index 0c2bbd4f803..9c8e8732556 100644 --- a/storage/ndb/src/kernel/vm/ArrayPool.hpp +++ b/storage/ndb/src/kernel/vm/ArrayPool.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/CArray.hpp b/storage/ndb/src/kernel/vm/CArray.hpp index dea389be5b0..20e60051dc5 100644 --- a/storage/ndb/src/kernel/vm/CArray.hpp +++ b/storage/ndb/src/kernel/vm/CArray.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Callback.hpp b/storage/ndb/src/kernel/vm/Callback.hpp index 2be8d6cbf51..08797615ce7 100644 --- a/storage/ndb/src/kernel/vm/Callback.hpp +++ b/storage/ndb/src/kernel/vm/Callback.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/ClusterConfiguration.cpp b/storage/ndb/src/kernel/vm/ClusterConfiguration.cpp index 2455b5acaf0..37529fdda97 100644 --- a/storage/ndb/src/kernel/vm/ClusterConfiguration.cpp +++ b/storage/ndb/src/kernel/vm/ClusterConfiguration.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/ClusterConfiguration.hpp b/storage/ndb/src/kernel/vm/ClusterConfiguration.hpp index 3e70f918aa0..0c7b5fb5d6c 100644 --- a/storage/ndb/src/kernel/vm/ClusterConfiguration.hpp +++ b/storage/ndb/src/kernel/vm/ClusterConfiguration.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Configuration.cpp b/storage/ndb/src/kernel/vm/Configuration.cpp index aa678f67bb5..c84b068ce9c 100644 --- a/storage/ndb/src/kernel/vm/Configuration.cpp +++ b/storage/ndb/src/kernel/vm/Configuration.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/kernel/vm/Configuration.hpp b/storage/ndb/src/kernel/vm/Configuration.hpp index bef53e1f446..7f4ec20ac85 100644 --- a/storage/ndb/src/kernel/vm/Configuration.hpp +++ b/storage/ndb/src/kernel/vm/Configuration.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/DLCFifoList.hpp b/storage/ndb/src/kernel/vm/DLCFifoList.hpp index 084514ebd58..b27a04db31c 100644 --- a/storage/ndb/src/kernel/vm/DLCFifoList.hpp +++ b/storage/ndb/src/kernel/vm/DLCFifoList.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/DLCHashTable.hpp b/storage/ndb/src/kernel/vm/DLCHashTable.hpp index 2891c4aa92f..f54da1d8569 100644 --- a/storage/ndb/src/kernel/vm/DLCHashTable.hpp +++ b/storage/ndb/src/kernel/vm/DLCHashTable.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/DLFifoList.hpp b/storage/ndb/src/kernel/vm/DLFifoList.hpp index fedbedc1320..52ef5ffb358 100644 --- a/storage/ndb/src/kernel/vm/DLFifoList.hpp +++ b/storage/ndb/src/kernel/vm/DLFifoList.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/DLHashTable.hpp b/storage/ndb/src/kernel/vm/DLHashTable.hpp index a43aca5b803..a03dd15c8a9 100644 --- a/storage/ndb/src/kernel/vm/DLHashTable.hpp +++ b/storage/ndb/src/kernel/vm/DLHashTable.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/DLHashTable2.hpp b/storage/ndb/src/kernel/vm/DLHashTable2.hpp index 69bd15dd34a..c32cbca0325 100644 --- a/storage/ndb/src/kernel/vm/DLHashTable2.hpp +++ b/storage/ndb/src/kernel/vm/DLHashTable2.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/DLList.hpp b/storage/ndb/src/kernel/vm/DLList.hpp index adc289e0696..d3df0c5cebf 100644 --- a/storage/ndb/src/kernel/vm/DLList.hpp +++ b/storage/ndb/src/kernel/vm/DLList.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/DataBuffer.hpp b/storage/ndb/src/kernel/vm/DataBuffer.hpp index 4a1df09d3de..7d2b5d50e5c 100644 --- a/storage/ndb/src/kernel/vm/DataBuffer.hpp +++ b/storage/ndb/src/kernel/vm/DataBuffer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/DynArr256.cpp b/storage/ndb/src/kernel/vm/DynArr256.cpp index 67cfde6811b..2c9a56d2d60 100644 --- a/storage/ndb/src/kernel/vm/DynArr256.cpp +++ b/storage/ndb/src/kernel/vm/DynArr256.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/DynArr256.hpp b/storage/ndb/src/kernel/vm/DynArr256.hpp index 5b4f2395bf0..9c2045ab1ea 100644 --- a/storage/ndb/src/kernel/vm/DynArr256.hpp +++ b/storage/ndb/src/kernel/vm/DynArr256.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Emulator.cpp b/storage/ndb/src/kernel/vm/Emulator.cpp index 77748916b0d..7d1d3f80b04 100644 --- a/storage/ndb/src/kernel/vm/Emulator.cpp +++ b/storage/ndb/src/kernel/vm/Emulator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Emulator.hpp b/storage/ndb/src/kernel/vm/Emulator.hpp index 767f5b03498..3adc17ed3d6 100644 --- a/storage/ndb/src/kernel/vm/Emulator.hpp +++ b/storage/ndb/src/kernel/vm/Emulator.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/FastScheduler.cpp b/storage/ndb/src/kernel/vm/FastScheduler.cpp index 3199c9d741d..f4a3a5c658f 100644 --- a/storage/ndb/src/kernel/vm/FastScheduler.cpp +++ b/storage/ndb/src/kernel/vm/FastScheduler.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/FastScheduler.hpp b/storage/ndb/src/kernel/vm/FastScheduler.hpp index 02391ab477e..23638c168ca 100644 --- a/storage/ndb/src/kernel/vm/FastScheduler.hpp +++ b/storage/ndb/src/kernel/vm/FastScheduler.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/GlobalData.hpp b/storage/ndb/src/kernel/vm/GlobalData.hpp index 5806ee61de3..fa9f23da4e1 100644 --- a/storage/ndb/src/kernel/vm/GlobalData.hpp +++ b/storage/ndb/src/kernel/vm/GlobalData.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/KeyDescriptor.hpp b/storage/ndb/src/kernel/vm/KeyDescriptor.hpp index 3e695d4adeb..3292db2eede 100644 --- a/storage/ndb/src/kernel/vm/KeyDescriptor.hpp +++ b/storage/ndb/src/kernel/vm/KeyDescriptor.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/KeyTable.hpp b/storage/ndb/src/kernel/vm/KeyTable.hpp index 229d9a8c9d8..6f36f781217 100644 --- a/storage/ndb/src/kernel/vm/KeyTable.hpp +++ b/storage/ndb/src/kernel/vm/KeyTable.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/KeyTable2.hpp b/storage/ndb/src/kernel/vm/KeyTable2.hpp index 59d6028bd23..76076b72688 100644 --- a/storage/ndb/src/kernel/vm/KeyTable2.hpp +++ b/storage/ndb/src/kernel/vm/KeyTable2.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/KeyTable2Ref.hpp b/storage/ndb/src/kernel/vm/KeyTable2Ref.hpp index 651c2835e18..2a78422c1c6 100644 --- a/storage/ndb/src/kernel/vm/KeyTable2Ref.hpp +++ b/storage/ndb/src/kernel/vm/KeyTable2Ref.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/LinearPool.hpp b/storage/ndb/src/kernel/vm/LinearPool.hpp index 3d561f342bd..06992abfdac 100644 --- a/storage/ndb/src/kernel/vm/LinearPool.hpp +++ b/storage/ndb/src/kernel/vm/LinearPool.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/LongSignal.hpp b/storage/ndb/src/kernel/vm/LongSignal.hpp index 6faf67bead5..a8417be8215 100644 --- a/storage/ndb/src/kernel/vm/LongSignal.hpp +++ b/storage/ndb/src/kernel/vm/LongSignal.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Mutex.cpp b/storage/ndb/src/kernel/vm/Mutex.cpp index 17b4620d7d9..c75f8385376 100644 --- a/storage/ndb/src/kernel/vm/Mutex.cpp +++ b/storage/ndb/src/kernel/vm/Mutex.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Mutex.hpp b/storage/ndb/src/kernel/vm/Mutex.hpp index 16b7c6cc93d..1a39ef10996 100644 --- a/storage/ndb/src/kernel/vm/Mutex.hpp +++ b/storage/ndb/src/kernel/vm/Mutex.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/NdbdSuperPool.cpp b/storage/ndb/src/kernel/vm/NdbdSuperPool.cpp index 2e8b422295f..22bb7044bdb 100644 --- a/storage/ndb/src/kernel/vm/NdbdSuperPool.cpp +++ b/storage/ndb/src/kernel/vm/NdbdSuperPool.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/NdbdSuperPool.hpp b/storage/ndb/src/kernel/vm/NdbdSuperPool.hpp index 171732d6a48..49c91f7c83d 100644 --- a/storage/ndb/src/kernel/vm/NdbdSuperPool.hpp +++ b/storage/ndb/src/kernel/vm/NdbdSuperPool.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Pool.cpp b/storage/ndb/src/kernel/vm/Pool.cpp index 7753b62b17c..523c3238844 100644 --- a/storage/ndb/src/kernel/vm/Pool.cpp +++ b/storage/ndb/src/kernel/vm/Pool.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Pool.hpp b/storage/ndb/src/kernel/vm/Pool.hpp index 8facb931a74..aee7fda160d 100644 --- a/storage/ndb/src/kernel/vm/Pool.hpp +++ b/storage/ndb/src/kernel/vm/Pool.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Prio.hpp b/storage/ndb/src/kernel/vm/Prio.hpp index 701fdd8a1f8..606713f0064 100644 --- a/storage/ndb/src/kernel/vm/Prio.hpp +++ b/storage/ndb/src/kernel/vm/Prio.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/RWPool.cpp b/storage/ndb/src/kernel/vm/RWPool.cpp index 7982682c827..878ce9cb73b 100644 --- a/storage/ndb/src/kernel/vm/RWPool.cpp +++ b/storage/ndb/src/kernel/vm/RWPool.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/RWPool.hpp b/storage/ndb/src/kernel/vm/RWPool.hpp index c0136ef1711..6a2d92b7970 100644 --- a/storage/ndb/src/kernel/vm/RWPool.hpp +++ b/storage/ndb/src/kernel/vm/RWPool.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/RequestTracker.hpp b/storage/ndb/src/kernel/vm/RequestTracker.hpp index b9c20ec805e..d0df66bb37c 100644 --- a/storage/ndb/src/kernel/vm/RequestTracker.hpp +++ b/storage/ndb/src/kernel/vm/RequestTracker.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/Rope.hpp b/storage/ndb/src/kernel/vm/Rope.hpp index 65ff5474f5e..60f29bf277e 100644 --- a/storage/ndb/src/kernel/vm/Rope.hpp +++ b/storage/ndb/src/kernel/vm/Rope.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SLFifoList.hpp b/storage/ndb/src/kernel/vm/SLFifoList.hpp index ec887578907..d068397cab6 100644 --- a/storage/ndb/src/kernel/vm/SLFifoList.hpp +++ b/storage/ndb/src/kernel/vm/SLFifoList.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SLList.hpp b/storage/ndb/src/kernel/vm/SLList.hpp index 2fb5cee27a1..0b2bcde07a0 100644 --- a/storage/ndb/src/kernel/vm/SLList.hpp +++ b/storage/ndb/src/kernel/vm/SLList.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SafeCounter.cpp b/storage/ndb/src/kernel/vm/SafeCounter.cpp index d7bd16f28fb..3c6037d40e2 100644 --- a/storage/ndb/src/kernel/vm/SafeCounter.cpp +++ b/storage/ndb/src/kernel/vm/SafeCounter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SafeCounter.hpp b/storage/ndb/src/kernel/vm/SafeCounter.hpp index 0238067aefb..2fe69040ed9 100644 --- a/storage/ndb/src/kernel/vm/SafeCounter.hpp +++ b/storage/ndb/src/kernel/vm/SafeCounter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SectionReader.cpp b/storage/ndb/src/kernel/vm/SectionReader.cpp index a74c4d28b0e..f01ee011218 100644 --- a/storage/ndb/src/kernel/vm/SectionReader.cpp +++ b/storage/ndb/src/kernel/vm/SectionReader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SectionReader.hpp b/storage/ndb/src/kernel/vm/SectionReader.hpp index 05090298758..e440c48a7a4 100644 --- a/storage/ndb/src/kernel/vm/SectionReader.hpp +++ b/storage/ndb/src/kernel/vm/SectionReader.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SignalCounter.hpp b/storage/ndb/src/kernel/vm/SignalCounter.hpp index e5aae598690..1f8bda12d39 100644 --- a/storage/ndb/src/kernel/vm/SignalCounter.hpp +++ b/storage/ndb/src/kernel/vm/SignalCounter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SimBlockList.hpp b/storage/ndb/src/kernel/vm/SimBlockList.hpp index cc23daf0a97..2271b40e4fe 100644 --- a/storage/ndb/src/kernel/vm/SimBlockList.hpp +++ b/storage/ndb/src/kernel/vm/SimBlockList.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SimplePropertiesSection.cpp b/storage/ndb/src/kernel/vm/SimplePropertiesSection.cpp index 4287367375c..ce1a012dc62 100644 --- a/storage/ndb/src/kernel/vm/SimplePropertiesSection.cpp +++ b/storage/ndb/src/kernel/vm/SimplePropertiesSection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SimulatedBlock.cpp b/storage/ndb/src/kernel/vm/SimulatedBlock.cpp index 1be27a63ebc..a3dac39dcc9 100644 --- a/storage/ndb/src/kernel/vm/SimulatedBlock.cpp +++ b/storage/ndb/src/kernel/vm/SimulatedBlock.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp index 315de9311ca..111f2a6d8f1 100644 --- a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp +++ b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SuperPool.cpp b/storage/ndb/src/kernel/vm/SuperPool.cpp index 1a29334f9a8..da19abcf90b 100644 --- a/storage/ndb/src/kernel/vm/SuperPool.cpp +++ b/storage/ndb/src/kernel/vm/SuperPool.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/SuperPool.hpp b/storage/ndb/src/kernel/vm/SuperPool.hpp index d4cd49476dc..98de1dd3dd7 100644 --- a/storage/ndb/src/kernel/vm/SuperPool.hpp +++ b/storage/ndb/src/kernel/vm/SuperPool.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/ThreadConfig.cpp b/storage/ndb/src/kernel/vm/ThreadConfig.cpp index f56ccb11f5f..7f7f1bac583 100644 --- a/storage/ndb/src/kernel/vm/ThreadConfig.cpp +++ b/storage/ndb/src/kernel/vm/ThreadConfig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/ThreadConfig.hpp b/storage/ndb/src/kernel/vm/ThreadConfig.hpp index cc81d724f34..be273939a16 100644 --- a/storage/ndb/src/kernel/vm/ThreadConfig.hpp +++ b/storage/ndb/src/kernel/vm/ThreadConfig.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/TimeQueue.cpp b/storage/ndb/src/kernel/vm/TimeQueue.cpp index dda021a2da8..7f290469a0d 100644 --- a/storage/ndb/src/kernel/vm/TimeQueue.cpp +++ b/storage/ndb/src/kernel/vm/TimeQueue.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/TimeQueue.hpp b/storage/ndb/src/kernel/vm/TimeQueue.hpp index efec937f4aa..9db358fd02d 100644 --- a/storage/ndb/src/kernel/vm/TimeQueue.hpp +++ b/storage/ndb/src/kernel/vm/TimeQueue.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/TransporterCallback.cpp b/storage/ndb/src/kernel/vm/TransporterCallback.cpp index cad4ade75cc..ff1aa3c8d2a 100644 --- a/storage/ndb/src/kernel/vm/TransporterCallback.cpp +++ b/storage/ndb/src/kernel/vm/TransporterCallback.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/VMSignal.cpp b/storage/ndb/src/kernel/vm/VMSignal.cpp index 7139676cfaf..fb32408b7ec 100644 --- a/storage/ndb/src/kernel/vm/VMSignal.cpp +++ b/storage/ndb/src/kernel/vm/VMSignal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/VMSignal.hpp b/storage/ndb/src/kernel/vm/VMSignal.hpp index 8f949a95c48..c34fd9f3d5f 100644 --- a/storage/ndb/src/kernel/vm/VMSignal.hpp +++ b/storage/ndb/src/kernel/vm/VMSignal.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/WOPool.cpp b/storage/ndb/src/kernel/vm/WOPool.cpp index 1407081abff..99318fc32df 100644 --- a/storage/ndb/src/kernel/vm/WOPool.cpp +++ b/storage/ndb/src/kernel/vm/WOPool.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/WOPool.hpp b/storage/ndb/src/kernel/vm/WOPool.hpp index c5528ff8796..781d4831bac 100644 --- a/storage/ndb/src/kernel/vm/WOPool.hpp +++ b/storage/ndb/src/kernel/vm/WOPool.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/WaitQueue.hpp b/storage/ndb/src/kernel/vm/WaitQueue.hpp index ea604c5a8ff..1da853bacad 100644 --- a/storage/ndb/src/kernel/vm/WaitQueue.hpp +++ b/storage/ndb/src/kernel/vm/WaitQueue.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/WatchDog.cpp b/storage/ndb/src/kernel/vm/WatchDog.cpp index a759dc408de..5714b4d27f5 100644 --- a/storage/ndb/src/kernel/vm/WatchDog.cpp +++ b/storage/ndb/src/kernel/vm/WatchDog.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/WatchDog.hpp b/storage/ndb/src/kernel/vm/WatchDog.hpp index ebafa183a53..20bb39e3710 100644 --- a/storage/ndb/src/kernel/vm/WatchDog.hpp +++ b/storage/ndb/src/kernel/vm/WatchDog.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/al_test/arrayListTest.cpp b/storage/ndb/src/kernel/vm/al_test/arrayListTest.cpp index 6273b935b8d..0a67bc71b57 100644 --- a/storage/ndb/src/kernel/vm/al_test/arrayListTest.cpp +++ b/storage/ndb/src/kernel/vm/al_test/arrayListTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp b/storage/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp index 29f71f58fd6..d644b23cafc 100644 --- a/storage/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp +++ b/storage/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/al_test/main.cpp b/storage/ndb/src/kernel/vm/al_test/main.cpp index f34c9218cf5..ef6ae5263de 100644 --- a/storage/ndb/src/kernel/vm/al_test/main.cpp +++ b/storage/ndb/src/kernel/vm/al_test/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/bench_pool.cpp b/storage/ndb/src/kernel/vm/bench_pool.cpp index 4a10578365c..db573715894 100644 --- a/storage/ndb/src/kernel/vm/bench_pool.cpp +++ b/storage/ndb/src/kernel/vm/bench_pool.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/ndbd_malloc.cpp b/storage/ndb/src/kernel/vm/ndbd_malloc.cpp index 8e99093fbe4..aff61503701 100644 --- a/storage/ndb/src/kernel/vm/ndbd_malloc.cpp +++ b/storage/ndb/src/kernel/vm/ndbd_malloc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/ndbd_malloc.hpp b/storage/ndb/src/kernel/vm/ndbd_malloc.hpp index 9c1d8f6cc60..0159b9cd7e7 100644 --- a/storage/ndb/src/kernel/vm/ndbd_malloc.hpp +++ b/storage/ndb/src/kernel/vm/ndbd_malloc.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp index bed1a03df17..1e7c5e2dafe 100644 --- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp +++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp index cfe55450341..87cd35aedc0 100644 --- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp +++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/pc.hpp b/storage/ndb/src/kernel/vm/pc.hpp index c63805cce26..dd11bcd1a22 100644 --- a/storage/ndb/src/kernel/vm/pc.hpp +++ b/storage/ndb/src/kernel/vm/pc.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/testCopy/rr.cpp b/storage/ndb/src/kernel/vm/testCopy/rr.cpp index a2820857d19..7ba0b797293 100644 --- a/storage/ndb/src/kernel/vm/testCopy/rr.cpp +++ b/storage/ndb/src/kernel/vm/testCopy/rr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/testCopy/testCopy.cpp b/storage/ndb/src/kernel/vm/testCopy/testCopy.cpp index 97de6268725..4f3160144a2 100644 --- a/storage/ndb/src/kernel/vm/testCopy/testCopy.cpp +++ b/storage/ndb/src/kernel/vm/testCopy/testCopy.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp b/storage/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp index 1dfcb1c2f78..1372f47d0ee 100644 --- a/storage/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp +++ b/storage/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/testLongSig/testLongSig.cpp b/storage/ndb/src/kernel/vm/testLongSig/testLongSig.cpp index 5d796fdccd5..6a5083e5cd6 100644 --- a/storage/ndb/src/kernel/vm/testLongSig/testLongSig.cpp +++ b/storage/ndb/src/kernel/vm/testLongSig/testLongSig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp b/storage/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp index 45b13f0626a..0d1afbfa636 100644 --- a/storage/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp +++ b/storage/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/kernel/vm/testSuperPool.cpp b/storage/ndb/src/kernel/vm/testSuperPool.cpp index 9c720cfbd18..35630a15147 100644 --- a/storage/ndb/src/kernel/vm/testSuperPool.cpp +++ b/storage/ndb/src/kernel/vm/testSuperPool.cpp @@ -6,7 +6,7 @@ _eof_ exit $? #endif -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmapi/LocalConfig.cpp b/storage/ndb/src/mgmapi/LocalConfig.cpp index 037cabceaa1..986761d53cc 100644 --- a/storage/ndb/src/mgmapi/LocalConfig.cpp +++ b/storage/ndb/src/mgmapi/LocalConfig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmapi/LocalConfig.hpp b/storage/ndb/src/mgmapi/LocalConfig.hpp index c7de2b9870b..0485bb73093 100644 --- a/storage/ndb/src/mgmapi/LocalConfig.hpp +++ b/storage/ndb/src/mgmapi/LocalConfig.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmapi/mgmapi.cpp b/storage/ndb/src/mgmapi/mgmapi.cpp index 23e6fad5559..9ae066d0f6e 100644 --- a/storage/ndb/src/mgmapi/mgmapi.cpp +++ b/storage/ndb/src/mgmapi/mgmapi.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2003 MySQL AB + /* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/mgmapi/mgmapi_configuration.hpp b/storage/ndb/src/mgmapi/mgmapi_configuration.hpp index a00bbe11fed..f597f90ed00 100644 --- a/storage/ndb/src/mgmapi/mgmapi_configuration.hpp +++ b/storage/ndb/src/mgmapi/mgmapi_configuration.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmapi/mgmapi_internal.h b/storage/ndb/src/mgmapi/mgmapi_internal.h index d27b34f5ccd..24227bb7d5d 100644 --- a/storage/ndb/src/mgmapi/mgmapi_internal.h +++ b/storage/ndb/src/mgmapi/mgmapi_internal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 MySQL AB +/* Copyright (c) 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmapi/ndb_logevent.cpp b/storage/ndb/src/mgmapi/ndb_logevent.cpp index b3155b6f413..5aeb48440c3 100644 --- a/storage/ndb/src/mgmapi/ndb_logevent.cpp +++ b/storage/ndb/src/mgmapi/ndb_logevent.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/mgmapi/ndb_logevent.hpp b/storage/ndb/src/mgmapi/ndb_logevent.hpp index 791f4718b3f..a88d4fc72b8 100644 --- a/storage/ndb/src/mgmapi/ndb_logevent.hpp +++ b/storage/ndb/src/mgmapi/ndb_logevent.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmapi/test/keso.c b/storage/ndb/src/mgmapi/test/keso.c index d56994e4256..465045de920 100644 --- a/storage/ndb/src/mgmapi/test/keso.c +++ b/storage/ndb/src/mgmapi/test/keso.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmapi/test/mgmSrvApi.cpp b/storage/ndb/src/mgmapi/test/mgmSrvApi.cpp index 0e866d5e55c..e2bc9a23d86 100644 --- a/storage/ndb/src/mgmapi/test/mgmSrvApi.cpp +++ b/storage/ndb/src/mgmapi/test/mgmSrvApi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmclient/CommandInterpreter.cpp b/storage/ndb/src/mgmclient/CommandInterpreter.cpp index 64508d07303..1c33b648783 100644 --- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmclient/main.cpp b/storage/ndb/src/mgmclient/main.cpp index 71dddac14f2..4622152de82 100644 --- a/storage/ndb/src/mgmclient/main.cpp +++ b/storage/ndb/src/mgmclient/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/mgmclient/ndb_mgmclient.h b/storage/ndb/src/mgmclient/ndb_mgmclient.h index 505c5aba7fc..54b0caf18ef 100644 --- a/storage/ndb/src/mgmclient/ndb_mgmclient.h +++ b/storage/ndb/src/mgmclient/ndb_mgmclient.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmclient/ndb_mgmclient.hpp b/storage/ndb/src/mgmclient/ndb_mgmclient.hpp index 96d8741a94a..d2e366a8b8f 100644 --- a/storage/ndb/src/mgmclient/ndb_mgmclient.hpp +++ b/storage/ndb/src/mgmclient/ndb_mgmclient.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp b/storage/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp index 3f201558ef0..09ab6b17d59 100644 --- a/storage/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp +++ b/storage/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/Config.cpp b/storage/ndb/src/mgmsrv/Config.cpp index ebed8530c21..c67a2ae6a40 100644 --- a/storage/ndb/src/mgmsrv/Config.cpp +++ b/storage/ndb/src/mgmsrv/Config.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/Config.hpp b/storage/ndb/src/mgmsrv/Config.hpp index aaa6ef27a84..baada4756a1 100644 --- a/storage/ndb/src/mgmsrv/Config.hpp +++ b/storage/ndb/src/mgmsrv/Config.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.cpp b/storage/ndb/src/mgmsrv/ConfigInfo.cpp index 8bc6a18bb1d..d615185e870 100644 --- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.hpp b/storage/ndb/src/mgmsrv/ConfigInfo.hpp index dae15f49803..6226b721840 100644 --- a/storage/ndb/src/mgmsrv/ConfigInfo.hpp +++ b/storage/ndb/src/mgmsrv/ConfigInfo.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp index ecc8f9db0ac..c44cb37880a 100644 --- a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp +++ b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/mgmsrv/InitConfigFileParser.hpp b/storage/ndb/src/mgmsrv/InitConfigFileParser.hpp index bc518662187..caf0c44d492 100644 --- a/storage/ndb/src/mgmsrv/InitConfigFileParser.hpp +++ b/storage/ndb/src/mgmsrv/InitConfigFileParser.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp index 11a11b69a0d..285cee0b983 100644 --- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp +++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/MgmtSrvr.hpp b/storage/ndb/src/mgmsrv/MgmtSrvr.hpp index 2fe080ee6eb..4d6de2cee52 100644 --- a/storage/ndb/src/mgmsrv/MgmtSrvr.hpp +++ b/storage/ndb/src/mgmsrv/MgmtSrvr.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp b/storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp index 090d8609fa5..74d4ff5ded1 100644 --- a/storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp +++ b/storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp b/storage/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp index ed86febcc00..cf5740d6748 100644 --- a/storage/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp +++ b/storage/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/Services.cpp b/storage/ndb/src/mgmsrv/Services.cpp index f20d57e4362..db9d11c8a72 100644 --- a/storage/ndb/src/mgmsrv/Services.cpp +++ b/storage/ndb/src/mgmsrv/Services.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/Services.hpp b/storage/ndb/src/mgmsrv/Services.hpp index 76d8ccba669..26495135696 100644 --- a/storage/ndb/src/mgmsrv/Services.hpp +++ b/storage/ndb/src/mgmsrv/Services.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/SignalQueue.cpp b/storage/ndb/src/mgmsrv/SignalQueue.cpp index 42eabdc03ea..89e3e1b2655 100644 --- a/storage/ndb/src/mgmsrv/SignalQueue.cpp +++ b/storage/ndb/src/mgmsrv/SignalQueue.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/SignalQueue.hpp b/storage/ndb/src/mgmsrv/SignalQueue.hpp index a8c3de911f4..5570fc32896 100644 --- a/storage/ndb/src/mgmsrv/SignalQueue.hpp +++ b/storage/ndb/src/mgmsrv/SignalQueue.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/convertStrToInt.cpp b/storage/ndb/src/mgmsrv/convertStrToInt.cpp index 04af66f5052..b81de9ba999 100644 --- a/storage/ndb/src/mgmsrv/convertStrToInt.cpp +++ b/storage/ndb/src/mgmsrv/convertStrToInt.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/convertStrToInt.hpp b/storage/ndb/src/mgmsrv/convertStrToInt.hpp index 89444d16eeb..23241b538e9 100644 --- a/storage/ndb/src/mgmsrv/convertStrToInt.hpp +++ b/storage/ndb/src/mgmsrv/convertStrToInt.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/mgmsrv/main.cpp b/storage/ndb/src/mgmsrv/main.cpp index 0547a2837de..7cf286db969 100644 --- a/storage/ndb/src/mgmsrv/main.cpp +++ b/storage/ndb/src/mgmsrv/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/mgmsrv/mkconfig/mkconfig.cpp b/storage/ndb/src/mgmsrv/mkconfig/mkconfig.cpp index 0fde8591f95..19be88c314b 100644 --- a/storage/ndb/src/mgmsrv/mkconfig/mkconfig.cpp +++ b/storage/ndb/src/mgmsrv/mkconfig/mkconfig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/API.hpp b/storage/ndb/src/ndbapi/API.hpp index a9da220f00c..c8b04ddf4d9 100644 --- a/storage/ndb/src/ndbapi/API.hpp +++ b/storage/ndb/src/ndbapi/API.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/ClusterMgr.cpp b/storage/ndb/src/ndbapi/ClusterMgr.cpp index 54cd626dfb3..7948f272e58 100644 --- a/storage/ndb/src/ndbapi/ClusterMgr.cpp +++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/ClusterMgr.hpp b/storage/ndb/src/ndbapi/ClusterMgr.hpp index d29a79783f3..1904cc1a65b 100644 --- a/storage/ndb/src/ndbapi/ClusterMgr.hpp +++ b/storage/ndb/src/ndbapi/ClusterMgr.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/DictCache.cpp b/storage/ndb/src/ndbapi/DictCache.cpp index e889ba2dccb..44f258526b3 100644 --- a/storage/ndb/src/ndbapi/DictCache.cpp +++ b/storage/ndb/src/ndbapi/DictCache.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/ndbapi/DictCache.hpp b/storage/ndb/src/ndbapi/DictCache.hpp index e0a1239d260..274c23c8fdb 100644 --- a/storage/ndb/src/ndbapi/DictCache.hpp +++ b/storage/ndb/src/ndbapi/DictCache.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/Ndb.cpp b/storage/ndb/src/ndbapi/Ndb.cpp index 5e5401e308c..ebe062d6974 100644 --- a/storage/ndb/src/ndbapi/Ndb.cpp +++ b/storage/ndb/src/ndbapi/Ndb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbApiSignal.cpp b/storage/ndb/src/ndbapi/NdbApiSignal.cpp index 5fe93910250..a73868da556 100644 --- a/storage/ndb/src/ndbapi/NdbApiSignal.cpp +++ b/storage/ndb/src/ndbapi/NdbApiSignal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbApiSignal.hpp b/storage/ndb/src/ndbapi/NdbApiSignal.hpp index 57f41600fc6..0718cc40dd4 100644 --- a/storage/ndb/src/ndbapi/NdbApiSignal.hpp +++ b/storage/ndb/src/ndbapi/NdbApiSignal.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbBlob.cpp b/storage/ndb/src/ndbapi/NdbBlob.cpp index a77bc285fd2..fddde006615 100644 --- a/storage/ndb/src/ndbapi/NdbBlob.cpp +++ b/storage/ndb/src/ndbapi/NdbBlob.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbBlobImpl.hpp b/storage/ndb/src/ndbapi/NdbBlobImpl.hpp index 1b954a0104f..9c77444f7a7 100644 --- a/storage/ndb/src/ndbapi/NdbBlobImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbBlobImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbDictionary.cpp b/storage/ndb/src/ndbapi/NdbDictionary.cpp index 24123852e3c..12910450d27 100644 --- a/storage/ndb/src/ndbapi/NdbDictionary.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionary.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp index ee5238503ed..f453a15bc3e 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp index 8f5d3742db8..c7eab6c98e8 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbErrorOut.cpp b/storage/ndb/src/ndbapi/NdbErrorOut.cpp index 00ebfa37897..47a7a32c254 100644 --- a/storage/ndb/src/ndbapi/NdbErrorOut.cpp +++ b/storage/ndb/src/ndbapi/NdbErrorOut.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbEventOperation.cpp b/storage/ndb/src/ndbapi/NdbEventOperation.cpp index 69555b378fe..1d32779a23b 100644 --- a/storage/ndb/src/ndbapi/NdbEventOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbEventOperation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp index 536bb110e90..5836276610c 100644 --- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp index 70413229de8..cf97cb8ec01 100644 --- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbImpl.hpp b/storage/ndb/src/ndbapi/NdbImpl.hpp index c4e0069bb2c..55c97c64d07 100644 --- a/storage/ndb/src/ndbapi/NdbImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbIndexOperation.cpp b/storage/ndb/src/ndbapi/NdbIndexOperation.cpp index 3ee39a20e41..02b6990effb 100644 --- a/storage/ndb/src/ndbapi/NdbIndexOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbIndexOperation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbIndexStat.cpp b/storage/ndb/src/ndbapi/NdbIndexStat.cpp index 363ea81c5a7..c1ac8aa8496 100644 --- a/storage/ndb/src/ndbapi/NdbIndexStat.cpp +++ b/storage/ndb/src/ndbapi/NdbIndexStat.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbLinHash.hpp b/storage/ndb/src/ndbapi/NdbLinHash.hpp index 38055f00a1c..68e31bf8794 100644 --- a/storage/ndb/src/ndbapi/NdbLinHash.hpp +++ b/storage/ndb/src/ndbapi/NdbLinHash.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbOperation.cpp b/storage/ndb/src/ndbapi/NdbOperation.cpp index e1f6041dba3..8a836cc82f7 100644 --- a/storage/ndb/src/ndbapi/NdbOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbOperation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbOperationDefine.cpp b/storage/ndb/src/ndbapi/NdbOperationDefine.cpp index aeef7b5b637..7afe8ab1c60 100644 --- a/storage/ndb/src/ndbapi/NdbOperationDefine.cpp +++ b/storage/ndb/src/ndbapi/NdbOperationDefine.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbOperationExec.cpp b/storage/ndb/src/ndbapi/NdbOperationExec.cpp index 9317fbfa711..2b13d8001f4 100644 --- a/storage/ndb/src/ndbapi/NdbOperationExec.cpp +++ b/storage/ndb/src/ndbapi/NdbOperationExec.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbOperationInt.cpp b/storage/ndb/src/ndbapi/NdbOperationInt.cpp index f9eeaf62179..05790aabc35 100644 --- a/storage/ndb/src/ndbapi/NdbOperationInt.cpp +++ b/storage/ndb/src/ndbapi/NdbOperationInt.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbOperationScan.cpp b/storage/ndb/src/ndbapi/NdbOperationScan.cpp index 09d85fe5dea..c5eaa75675e 100644 --- a/storage/ndb/src/ndbapi/NdbOperationScan.cpp +++ b/storage/ndb/src/ndbapi/NdbOperationScan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbOperationSearch.cpp b/storage/ndb/src/ndbapi/NdbOperationSearch.cpp index 6c052ec2f02..d382d7d63dd 100644 --- a/storage/ndb/src/ndbapi/NdbOperationSearch.cpp +++ b/storage/ndb/src/ndbapi/NdbOperationSearch.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbPool.cpp b/storage/ndb/src/ndbapi/NdbPool.cpp index 840542aeb1f..b9d031a7038 100644 --- a/storage/ndb/src/ndbapi/NdbPool.cpp +++ b/storage/ndb/src/ndbapi/NdbPool.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbPoolImpl.cpp b/storage/ndb/src/ndbapi/NdbPoolImpl.cpp index af4fcc43263..77e6c4fa53c 100644 --- a/storage/ndb/src/ndbapi/NdbPoolImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbPoolImpl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbPoolImpl.hpp b/storage/ndb/src/ndbapi/NdbPoolImpl.hpp index 50f81b8c123..713eb260f46 100644 --- a/storage/ndb/src/ndbapi/NdbPoolImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbPoolImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbRecAttr.cpp b/storage/ndb/src/ndbapi/NdbRecAttr.cpp index 0dc7630a9bc..deaa0715ef5 100644 --- a/storage/ndb/src/ndbapi/NdbRecAttr.cpp +++ b/storage/ndb/src/ndbapi/NdbRecAttr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbReceiver.cpp b/storage/ndb/src/ndbapi/NdbReceiver.cpp index f69f0b399e3..a4f0be8217d 100644 --- a/storage/ndb/src/ndbapi/NdbReceiver.cpp +++ b/storage/ndb/src/ndbapi/NdbReceiver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbScanFilter.cpp b/storage/ndb/src/ndbapi/NdbScanFilter.cpp index 1dd1f43de5f..82cb8d73d48 100644 --- a/storage/ndb/src/ndbapi/NdbScanFilter.cpp +++ b/storage/ndb/src/ndbapi/NdbScanFilter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp index b30ef6299c0..6f46b557b0e 100644 --- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbTransaction.cpp b/storage/ndb/src/ndbapi/NdbTransaction.cpp index c077979cf09..cc974cdbe1a 100644 --- a/storage/ndb/src/ndbapi/NdbTransaction.cpp +++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbTransactionScan.cpp b/storage/ndb/src/ndbapi/NdbTransactionScan.cpp index aa59b8d3815..f1679b440bf 100644 --- a/storage/ndb/src/ndbapi/NdbTransactionScan.cpp +++ b/storage/ndb/src/ndbapi/NdbTransactionScan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbUtil.cpp b/storage/ndb/src/ndbapi/NdbUtil.cpp index 6baa3722ab2..f9006ecfc2c 100644 --- a/storage/ndb/src/ndbapi/NdbUtil.cpp +++ b/storage/ndb/src/ndbapi/NdbUtil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbUtil.hpp b/storage/ndb/src/ndbapi/NdbUtil.hpp index 1246951992f..19ac5e26b0a 100644 --- a/storage/ndb/src/ndbapi/NdbUtil.hpp +++ b/storage/ndb/src/ndbapi/NdbUtil.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/NdbWaiter.hpp b/storage/ndb/src/ndbapi/NdbWaiter.hpp index dd0420d4e96..f2fdb072fe2 100644 --- a/storage/ndb/src/ndbapi/NdbWaiter.hpp +++ b/storage/ndb/src/ndbapi/NdbWaiter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. diff --git a/storage/ndb/src/ndbapi/Ndberr.cpp b/storage/ndb/src/ndbapi/Ndberr.cpp index 44de8141cbe..7012050df1c 100644 --- a/storage/ndb/src/ndbapi/Ndberr.cpp +++ b/storage/ndb/src/ndbapi/Ndberr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/Ndbif.cpp b/storage/ndb/src/ndbapi/Ndbif.cpp index ebeba4dcf4c..2227c410326 100644 --- a/storage/ndb/src/ndbapi/Ndbif.cpp +++ b/storage/ndb/src/ndbapi/Ndbif.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/Ndbinit.cpp b/storage/ndb/src/ndbapi/Ndbinit.cpp index 16f8ec8402d..16fb852afb1 100644 --- a/storage/ndb/src/ndbapi/Ndbinit.cpp +++ b/storage/ndb/src/ndbapi/Ndbinit.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/Ndblist.cpp b/storage/ndb/src/ndbapi/Ndblist.cpp index 978afda76c5..398eaf3fa60 100644 --- a/storage/ndb/src/ndbapi/Ndblist.cpp +++ b/storage/ndb/src/ndbapi/Ndblist.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/ObjectMap.cpp b/storage/ndb/src/ndbapi/ObjectMap.cpp index 1c475ed42e4..49cce09499c 100644 --- a/storage/ndb/src/ndbapi/ObjectMap.cpp +++ b/storage/ndb/src/ndbapi/ObjectMap.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/ObjectMap.hpp b/storage/ndb/src/ndbapi/ObjectMap.hpp index 64c6e420a99..68667a5b808 100644 --- a/storage/ndb/src/ndbapi/ObjectMap.hpp +++ b/storage/ndb/src/ndbapi/ObjectMap.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/SignalSender.cpp b/storage/ndb/src/ndbapi/SignalSender.cpp index 8a38acf1601..ce0c3d93cfb 100644 --- a/storage/ndb/src/ndbapi/SignalSender.cpp +++ b/storage/ndb/src/ndbapi/SignalSender.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/SignalSender.hpp b/storage/ndb/src/ndbapi/SignalSender.hpp index 9e4c9c5d15f..7c150cfc9f4 100644 --- a/storage/ndb/src/ndbapi/SignalSender.hpp +++ b/storage/ndb/src/ndbapi/SignalSender.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/TransporterFacade.cpp b/storage/ndb/src/ndbapi/TransporterFacade.cpp index 5329d0a01b3..7876ba6ae32 100644 --- a/storage/ndb/src/ndbapi/TransporterFacade.cpp +++ b/storage/ndb/src/ndbapi/TransporterFacade.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/TransporterFacade.hpp b/storage/ndb/src/ndbapi/TransporterFacade.hpp index fb11bb94bf9..2870565f60a 100644 --- a/storage/ndb/src/ndbapi/TransporterFacade.hpp +++ b/storage/ndb/src/ndbapi/TransporterFacade.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp b/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp index 3947e215161..ebc1cc39b35 100644 --- a/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp +++ b/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp b/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp index e3ad8595036..e71c91d5aac 100644 --- a/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp +++ b/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index c790d7bfecb..cf4ec733f96 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/signal-sender/SignalSender.cpp b/storage/ndb/src/ndbapi/signal-sender/SignalSender.cpp index 73fb968e549..30c74291d6c 100644 --- a/storage/ndb/src/ndbapi/signal-sender/SignalSender.cpp +++ b/storage/ndb/src/ndbapi/signal-sender/SignalSender.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/src/ndbapi/signal-sender/SignalSender.hpp b/storage/ndb/src/ndbapi/signal-sender/SignalSender.hpp index b75e7e74fb3..3dc2827f794 100644 --- a/storage/ndb/src/ndbapi/signal-sender/SignalSender.hpp +++ b/storage/ndb/src/ndbapi/signal-sender/SignalSender.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/AtrtClient.hpp b/storage/ndb/test/include/AtrtClient.hpp index e360887b636..df546add02e 100644 --- a/storage/ndb/test/include/AtrtClient.hpp +++ b/storage/ndb/test/include/AtrtClient.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/CpcClient.hpp b/storage/ndb/test/include/CpcClient.hpp index f0bfaa6f74e..8997e5d35c8 100644 --- a/storage/ndb/test/include/CpcClient.hpp +++ b/storage/ndb/test/include/CpcClient.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/DbUtil.hpp b/storage/ndb/test/include/DbUtil.hpp index 22ce5a2f9d8..0fa45172848 100755 --- a/storage/ndb/test/include/DbUtil.hpp +++ b/storage/ndb/test/include/DbUtil.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2007 MySQL AB +/* Copyright (c) 2007, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/HugoAsynchTransactions.hpp b/storage/ndb/test/include/HugoAsynchTransactions.hpp index fcbb55d1393..919e4ee6e88 100644 --- a/storage/ndb/test/include/HugoAsynchTransactions.hpp +++ b/storage/ndb/test/include/HugoAsynchTransactions.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/HugoCalculator.hpp b/storage/ndb/test/include/HugoCalculator.hpp index 75d111b383b..af6d7a83dea 100644 --- a/storage/ndb/test/include/HugoCalculator.hpp +++ b/storage/ndb/test/include/HugoCalculator.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/HugoOperations.hpp b/storage/ndb/test/include/HugoOperations.hpp index 07029c4966c..e7ccaacd775 100644 --- a/storage/ndb/test/include/HugoOperations.hpp +++ b/storage/ndb/test/include/HugoOperations.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/HugoTransactions.hpp b/storage/ndb/test/include/HugoTransactions.hpp index c2fd9f106f3..bc50e327cfa 100644 --- a/storage/ndb/test/include/HugoTransactions.hpp +++ b/storage/ndb/test/include/HugoTransactions.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT.hpp b/storage/ndb/test/include/NDBT.hpp index f294bc462a4..e3746c863e1 100644 --- a/storage/ndb/test/include/NDBT.hpp +++ b/storage/ndb/test/include/NDBT.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_DataSet.hpp b/storage/ndb/test/include/NDBT_DataSet.hpp index 511254044fc..86508c46c52 100644 --- a/storage/ndb/test/include/NDBT_DataSet.hpp +++ b/storage/ndb/test/include/NDBT_DataSet.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_DataSetTransaction.hpp b/storage/ndb/test/include/NDBT_DataSetTransaction.hpp index 5650f50547f..fe277092e60 100644 --- a/storage/ndb/test/include/NDBT_DataSetTransaction.hpp +++ b/storage/ndb/test/include/NDBT_DataSetTransaction.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_Error.hpp b/storage/ndb/test/include/NDBT_Error.hpp index 10286d258c9..34903e31436 100644 --- a/storage/ndb/test/include/NDBT_Error.hpp +++ b/storage/ndb/test/include/NDBT_Error.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_Output.hpp b/storage/ndb/test/include/NDBT_Output.hpp index d9eab72e1e2..35f41297f95 100644 --- a/storage/ndb/test/include/NDBT_Output.hpp +++ b/storage/ndb/test/include/NDBT_Output.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_ResultRow.hpp b/storage/ndb/test/include/NDBT_ResultRow.hpp index ff48cbffec0..54cabec034d 100644 --- a/storage/ndb/test/include/NDBT_ResultRow.hpp +++ b/storage/ndb/test/include/NDBT_ResultRow.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_ReturnCodes.h b/storage/ndb/test/include/NDBT_ReturnCodes.h index 8489080761f..5bd0ee94cd4 100644 --- a/storage/ndb/test/include/NDBT_ReturnCodes.h +++ b/storage/ndb/test/include/NDBT_ReturnCodes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_Stats.hpp b/storage/ndb/test/include/NDBT_Stats.hpp index 44dde76eb51..63b491c9acd 100644 --- a/storage/ndb/test/include/NDBT_Stats.hpp +++ b/storage/ndb/test/include/NDBT_Stats.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_Table.hpp b/storage/ndb/test/include/NDBT_Table.hpp index 2464c51851f..75fabe8c482 100644 --- a/storage/ndb/test/include/NDBT_Table.hpp +++ b/storage/ndb/test/include/NDBT_Table.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_Tables.hpp b/storage/ndb/test/include/NDBT_Tables.hpp index 116886b7a2d..61ca66e1fe7 100644 --- a/storage/ndb/test/include/NDBT_Tables.hpp +++ b/storage/ndb/test/include/NDBT_Tables.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_Test.hpp b/storage/ndb/test/include/NDBT_Test.hpp index 193705e7bc6..3ba62cdb603 100644 --- a/storage/ndb/test/include/NDBT_Test.hpp +++ b/storage/ndb/test/include/NDBT_Test.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NDBT_Thread.hpp b/storage/ndb/test/include/NDBT_Thread.hpp index ee28a6c0161..36ead6ce0d4 100644 --- a/storage/ndb/test/include/NDBT_Thread.hpp +++ b/storage/ndb/test/include/NDBT_Thread.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbBackup.hpp b/storage/ndb/test/include/NdbBackup.hpp index 1719a6836ec..23088e31858 100644 --- a/storage/ndb/test/include/NdbBackup.hpp +++ b/storage/ndb/test/include/NdbBackup.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbConfig.hpp b/storage/ndb/test/include/NdbConfig.hpp index 27c1bff50ef..2548092b786 100644 --- a/storage/ndb/test/include/NdbConfig.hpp +++ b/storage/ndb/test/include/NdbConfig.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbGrep.hpp b/storage/ndb/test/include/NdbGrep.hpp index cc822d695ce..cb8b2e88cb0 100644 --- a/storage/ndb/test/include/NdbGrep.hpp +++ b/storage/ndb/test/include/NdbGrep.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbMixRestarter.hpp b/storage/ndb/test/include/NdbMixRestarter.hpp index 3bb97425802..b5e5fc70c42 100644 --- a/storage/ndb/test/include/NdbMixRestarter.hpp +++ b/storage/ndb/test/include/NdbMixRestarter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbRestarter.hpp b/storage/ndb/test/include/NdbRestarter.hpp index 39c9bbcd15d..17641f54a85 100644 --- a/storage/ndb/test/include/NdbRestarter.hpp +++ b/storage/ndb/test/include/NdbRestarter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbRestarts.hpp b/storage/ndb/test/include/NdbRestarts.hpp index 47eda2d44a2..b397689f0e6 100644 --- a/storage/ndb/test/include/NdbRestarts.hpp +++ b/storage/ndb/test/include/NdbRestarts.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbSchemaCon.hpp b/storage/ndb/test/include/NdbSchemaCon.hpp index 74be49d3b93..de0161361e0 100644 --- a/storage/ndb/test/include/NdbSchemaCon.hpp +++ b/storage/ndb/test/include/NdbSchemaCon.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbSchemaOp.hpp b/storage/ndb/test/include/NdbSchemaOp.hpp index 793ad153b4a..d58ef142495 100644 --- a/storage/ndb/test/include/NdbSchemaOp.hpp +++ b/storage/ndb/test/include/NdbSchemaOp.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbTest.hpp b/storage/ndb/test/include/NdbTest.hpp index 16e3dc47564..5e9b1b65227 100644 --- a/storage/ndb/test/include/NdbTest.hpp +++ b/storage/ndb/test/include/NdbTest.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/NdbTimer.hpp b/storage/ndb/test/include/NdbTimer.hpp index 543ef93a697..b09213db1f0 100644 --- a/storage/ndb/test/include/NdbTimer.hpp +++ b/storage/ndb/test/include/NdbTimer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/TestNdbEventOperation.hpp b/storage/ndb/test/include/TestNdbEventOperation.hpp index 2301f278a3c..56a75973257 100644 --- a/storage/ndb/test/include/TestNdbEventOperation.hpp +++ b/storage/ndb/test/include/TestNdbEventOperation.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/UtilTransactions.hpp b/storage/ndb/test/include/UtilTransactions.hpp index ad47acc5c7b..098b39c9e58 100644 --- a/storage/ndb/test/include/UtilTransactions.hpp +++ b/storage/ndb/test/include/UtilTransactions.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/include/getarg.h b/storage/ndb/test/include/getarg.h index 7b638aaaf58..1cfce708d9b 100644 --- a/storage/ndb/test/include/getarg.h +++ b/storage/ndb/test/include/getarg.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/InsertRecs.cpp b/storage/ndb/test/ndbapi/InsertRecs.cpp index 3f76271fff5..d91def237b2 100644 --- a/storage/ndb/test/ndbapi/InsertRecs.cpp +++ b/storage/ndb/test/ndbapi/InsertRecs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ScanFilter.hpp b/storage/ndb/test/ndbapi/ScanFilter.hpp index 743dbbfff35..1db1c4acf19 100644 --- a/storage/ndb/test/ndbapi/ScanFilter.hpp +++ b/storage/ndb/test/ndbapi/ScanFilter.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ScanFunctions.hpp b/storage/ndb/test/ndbapi/ScanFunctions.hpp index 28e01b5c2b6..81729d67114 100644 --- a/storage/ndb/test/ndbapi/ScanFunctions.hpp +++ b/storage/ndb/test/ndbapi/ScanFunctions.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ScanInterpretTest.hpp b/storage/ndb/test/ndbapi/ScanInterpretTest.hpp index 17f46d5c2f8..a678f001781 100644 --- a/storage/ndb/test/ndbapi/ScanInterpretTest.hpp +++ b/storage/ndb/test/ndbapi/ScanInterpretTest.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/TraceNdbApi.cpp b/storage/ndb/test/ndbapi/TraceNdbApi.cpp index 3025a859243..3d1d08f4b3a 100644 --- a/storage/ndb/test/ndbapi/TraceNdbApi.cpp +++ b/storage/ndb/test/ndbapi/TraceNdbApi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/VerifyNdbApi.cpp b/storage/ndb/test/ndbapi/VerifyNdbApi.cpp index 33a9c5b7fc2..2329c0c952a 100644 --- a/storage/ndb/test/ndbapi/VerifyNdbApi.cpp +++ b/storage/ndb/test/ndbapi/VerifyNdbApi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/acid.cpp b/storage/ndb/test/ndbapi/acid.cpp index 9f3be0fc981..d1c38e4877d 100644 --- a/storage/ndb/test/ndbapi/acid.cpp +++ b/storage/ndb/test/ndbapi/acid.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/acid2.cpp b/storage/ndb/test/ndbapi/acid2.cpp index 39067e7f90e..def6fb3dd64 100644 --- a/storage/ndb/test/ndbapi/acid2.cpp +++ b/storage/ndb/test/ndbapi/acid2.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp index 5d2bd238e38..5151c96f1ba 100644 --- a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp +++ b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/adoInsertRecs.cpp b/storage/ndb/test/ndbapi/adoInsertRecs.cpp index 76e8382b455..f85540bc129 100644 --- a/storage/ndb/test/ndbapi/adoInsertRecs.cpp +++ b/storage/ndb/test/ndbapi/adoInsertRecs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/asyncGenerator.cpp b/storage/ndb/test/ndbapi/asyncGenerator.cpp index 9257002058b..afc70388ded 100644 --- a/storage/ndb/test/ndbapi/asyncGenerator.cpp +++ b/storage/ndb/test/ndbapi/asyncGenerator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/Bank.cpp b/storage/ndb/test/ndbapi/bank/Bank.cpp index 7e42db90b23..1ee8e24a57d 100644 --- a/storage/ndb/test/ndbapi/bank/Bank.cpp +++ b/storage/ndb/test/ndbapi/bank/Bank.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/Bank.hpp b/storage/ndb/test/ndbapi/bank/Bank.hpp index aef21a8741b..68336899179 100644 --- a/storage/ndb/test/ndbapi/bank/Bank.hpp +++ b/storage/ndb/test/ndbapi/bank/Bank.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/BankLoad.cpp b/storage/ndb/test/ndbapi/bank/BankLoad.cpp index 00a1419244b..71bdeb0635d 100644 --- a/storage/ndb/test/ndbapi/bank/BankLoad.cpp +++ b/storage/ndb/test/ndbapi/bank/BankLoad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/bankCreator.cpp b/storage/ndb/test/ndbapi/bank/bankCreator.cpp index f3848f5ec24..9536f950269 100644 --- a/storage/ndb/test/ndbapi/bank/bankCreator.cpp +++ b/storage/ndb/test/ndbapi/bank/bankCreator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/bankMakeGL.cpp b/storage/ndb/test/ndbapi/bank/bankMakeGL.cpp index 238b7a64a5f..abcf8dceeba 100644 --- a/storage/ndb/test/ndbapi/bank/bankMakeGL.cpp +++ b/storage/ndb/test/ndbapi/bank/bankMakeGL.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp b/storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp index 9457233de1e..12cad4f0638 100644 --- a/storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp +++ b/storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/bankTimer.cpp b/storage/ndb/test/ndbapi/bank/bankTimer.cpp index 8b742cef2d0..547be6b17e8 100644 --- a/storage/ndb/test/ndbapi/bank/bankTimer.cpp +++ b/storage/ndb/test/ndbapi/bank/bankTimer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp b/storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp index 55e1a13c7d4..23e6548a096 100644 --- a/storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp +++ b/storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp b/storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp index 492705e5a2e..9277d31879f 100644 --- a/storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp +++ b/storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bank/testBank.cpp b/storage/ndb/test/ndbapi/bank/testBank.cpp index 0b49e456127..9cece4add45 100644 --- a/storage/ndb/test/ndbapi/bank/testBank.cpp +++ b/storage/ndb/test/ndbapi/bank/testBank.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/asyncGenerator.cpp b/storage/ndb/test/ndbapi/bench/asyncGenerator.cpp index 22c955fb1bb..f9d54c9e7f3 100644 --- a/storage/ndb/test/ndbapi/bench/asyncGenerator.cpp +++ b/storage/ndb/test/ndbapi/bench/asyncGenerator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/dbGenerator.h b/storage/ndb/test/ndbapi/bench/dbGenerator.h index 23a40c57f69..9c66aaaa2a6 100644 --- a/storage/ndb/test/ndbapi/bench/dbGenerator.h +++ b/storage/ndb/test/ndbapi/bench/dbGenerator.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/dbPopulate.cpp b/storage/ndb/test/ndbapi/bench/dbPopulate.cpp index 6545d813c4a..ff346e46612 100644 --- a/storage/ndb/test/ndbapi/bench/dbPopulate.cpp +++ b/storage/ndb/test/ndbapi/bench/dbPopulate.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/dbPopulate.h b/storage/ndb/test/ndbapi/bench/dbPopulate.h index 942c8a0df42..141a10c11c5 100644 --- a/storage/ndb/test/ndbapi/bench/dbPopulate.h +++ b/storage/ndb/test/ndbapi/bench/dbPopulate.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/macros.h b/storage/ndb/test/ndbapi/bench/macros.h index e333858e12b..85ce53e91df 100644 --- a/storage/ndb/test/ndbapi/bench/macros.h +++ b/storage/ndb/test/ndbapi/bench/macros.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp b/storage/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp index 7487ad58752..36c24c871b4 100644 --- a/storage/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp +++ b/storage/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/mainPopulate.cpp b/storage/ndb/test/ndbapi/bench/mainPopulate.cpp index 8019c415d1e..913a4aeb3be 100644 --- a/storage/ndb/test/ndbapi/bench/mainPopulate.cpp +++ b/storage/ndb/test/ndbapi/bench/mainPopulate.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_async1.cpp b/storage/ndb/test/ndbapi/bench/ndb_async1.cpp index 5c450268178..83951caabad 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_async1.cpp +++ b/storage/ndb/test/ndbapi/bench/ndb_async1.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_async2.cpp b/storage/ndb/test/ndbapi/bench/ndb_async2.cpp index 9d379b90f41..b481811dc1e 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_async2.cpp +++ b/storage/ndb/test/ndbapi/bench/ndb_async2.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_error.hpp b/storage/ndb/test/ndbapi/bench/ndb_error.hpp index 13c04b4ee4e..fdc3d592441 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_error.hpp +++ b/storage/ndb/test/ndbapi/bench/ndb_error.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_schema.hpp b/storage/ndb/test/ndbapi/bench/ndb_schema.hpp index a3ac6dbb614..55adff3d5e7 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_schema.hpp +++ b/storage/ndb/test/ndbapi/bench/ndb_schema.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_user_transaction.cpp b/storage/ndb/test/ndbapi/bench/ndb_user_transaction.cpp index 1fe94cde9f8..930a9dfa7aa 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_user_transaction.cpp +++ b/storage/ndb/test/ndbapi/bench/ndb_user_transaction.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp b/storage/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp index 272b45069cd..07943e344ce 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp +++ b/storage/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp b/storage/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp index 985dc2e70bc..33cb1567a56 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp +++ b/storage/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp b/storage/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp index 4869fb479ee..567aa1be4cf 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp +++ b/storage/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp b/storage/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp index f3eba55d8c6..af3bb73051e 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp +++ b/storage/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp b/storage/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp index 96292b98fd4..6dee6e02886 100644 --- a/storage/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp +++ b/storage/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/testData.h b/storage/ndb/test/ndbapi/bench/testData.h index 6f70970f2b0..c756afc6854 100644 --- a/storage/ndb/test/ndbapi/bench/testData.h +++ b/storage/ndb/test/ndbapi/bench/testData.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/testDefinitions.h b/storage/ndb/test/ndbapi/bench/testDefinitions.h index 938ec3a61e2..133955b634a 100644 --- a/storage/ndb/test/ndbapi/bench/testDefinitions.h +++ b/storage/ndb/test/ndbapi/bench/testDefinitions.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/userInterface.cpp b/storage/ndb/test/ndbapi/bench/userInterface.cpp index c179418f156..bf903c189d4 100644 --- a/storage/ndb/test/ndbapi/bench/userInterface.cpp +++ b/storage/ndb/test/ndbapi/bench/userInterface.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bench/userInterface.h b/storage/ndb/test/ndbapi/bench/userInterface.h index 8b63b85ec92..7827c4fcb5c 100644 --- a/storage/ndb/test/ndbapi/bench/userInterface.h +++ b/storage/ndb/test/ndbapi/bench/userInterface.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/benchronja.cpp b/storage/ndb/test/ndbapi/benchronja.cpp index 125f5f5d445..d33bd6ceee6 100644 --- a/storage/ndb/test/ndbapi/benchronja.cpp +++ b/storage/ndb/test/ndbapi/benchronja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/bulk_copy.cpp b/storage/ndb/test/ndbapi/bulk_copy.cpp index f1c5b901c4c..917bf6e9032 100644 --- a/storage/ndb/test/ndbapi/bulk_copy.cpp +++ b/storage/ndb/test/ndbapi/bulk_copy.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/cdrserver.cpp b/storage/ndb/test/ndbapi/cdrserver.cpp index 607cc5f0144..4a735a7954d 100644 --- a/storage/ndb/test/ndbapi/cdrserver.cpp +++ b/storage/ndb/test/ndbapi/cdrserver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/celloDb.cpp b/storage/ndb/test/ndbapi/celloDb.cpp index 5bd1b1dba72..5cb6312f2b4 100644 --- a/storage/ndb/test/ndbapi/celloDb.cpp +++ b/storage/ndb/test/ndbapi/celloDb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/create_all_tabs.cpp b/storage/ndb/test/ndbapi/create_all_tabs.cpp index a8f81a11ba1..7a65a7ec021 100644 --- a/storage/ndb/test/ndbapi/create_all_tabs.cpp +++ b/storage/ndb/test/ndbapi/create_all_tabs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/create_tab.cpp b/storage/ndb/test/ndbapi/create_tab.cpp index 2ab28170c81..12e8fbfac80 100644 --- a/storage/ndb/test/ndbapi/create_tab.cpp +++ b/storage/ndb/test/ndbapi/create_tab.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/drop_all_tabs.cpp b/storage/ndb/test/ndbapi/drop_all_tabs.cpp index 2a57693870b..0af214b9a8b 100644 --- a/storage/ndb/test/ndbapi/drop_all_tabs.cpp +++ b/storage/ndb/test/ndbapi/drop_all_tabs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/flexAsynch.cpp b/storage/ndb/test/ndbapi/flexAsynch.cpp index 30989913f8c..df9fbaa03b5 100644 --- a/storage/ndb/test/ndbapi/flexAsynch.cpp +++ b/storage/ndb/test/ndbapi/flexAsynch.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/flexBench.cpp b/storage/ndb/test/ndbapi/flexBench.cpp index 8994bccd8f7..45dc836fb90 100644 --- a/storage/ndb/test/ndbapi/flexBench.cpp +++ b/storage/ndb/test/ndbapi/flexBench.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/flexHammer.cpp b/storage/ndb/test/ndbapi/flexHammer.cpp index b326450b114..6baeb8104b6 100644 --- a/storage/ndb/test/ndbapi/flexHammer.cpp +++ b/storage/ndb/test/ndbapi/flexHammer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/flexScan.cpp b/storage/ndb/test/ndbapi/flexScan.cpp index 29590cf0f65..d269eb66f11 100644 --- a/storage/ndb/test/ndbapi/flexScan.cpp +++ b/storage/ndb/test/ndbapi/flexScan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/flexTT.cpp b/storage/ndb/test/ndbapi/flexTT.cpp index 5d3d12fea5d..fa8b88ad924 100644 --- a/storage/ndb/test/ndbapi/flexTT.cpp +++ b/storage/ndb/test/ndbapi/flexTT.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/flexTimedAsynch.cpp b/storage/ndb/test/ndbapi/flexTimedAsynch.cpp index bae94929985..afc14b47a62 100644 --- a/storage/ndb/test/ndbapi/flexTimedAsynch.cpp +++ b/storage/ndb/test/ndbapi/flexTimedAsynch.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/flex_bench_mysql.cpp b/storage/ndb/test/ndbapi/flex_bench_mysql.cpp index 9562b70550e..7a3ed0912b7 100644 --- a/storage/ndb/test/ndbapi/flex_bench_mysql.cpp +++ b/storage/ndb/test/ndbapi/flex_bench_mysql.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/index.cpp b/storage/ndb/test/ndbapi/index.cpp index 30e6bb38b2c..c822d96760c 100644 --- a/storage/ndb/test/ndbapi/index.cpp +++ b/storage/ndb/test/ndbapi/index.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/index2.cpp b/storage/ndb/test/ndbapi/index2.cpp index a46b45d1b89..3f7c378e07b 100644 --- a/storage/ndb/test/ndbapi/index2.cpp +++ b/storage/ndb/test/ndbapi/index2.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/initronja.cpp b/storage/ndb/test/ndbapi/initronja.cpp index 435a8fa0c5d..924539f8920 100644 --- a/storage/ndb/test/ndbapi/initronja.cpp +++ b/storage/ndb/test/ndbapi/initronja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/interpreterInTup.cpp b/storage/ndb/test/ndbapi/interpreterInTup.cpp index a88fb167e99..cdbf09065e2 100644 --- a/storage/ndb/test/ndbapi/interpreterInTup.cpp +++ b/storage/ndb/test/ndbapi/interpreterInTup.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/mainAsyncGenerator.cpp b/storage/ndb/test/ndbapi/mainAsyncGenerator.cpp index ee35211f193..9202af4da23 100644 --- a/storage/ndb/test/ndbapi/mainAsyncGenerator.cpp +++ b/storage/ndb/test/ndbapi/mainAsyncGenerator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/msa.cpp b/storage/ndb/test/ndbapi/msa.cpp index 04e66b7526a..0e23f6b3557 100644 --- a/storage/ndb/test/ndbapi/msa.cpp +++ b/storage/ndb/test/ndbapi/msa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ndb_async1.cpp b/storage/ndb/test/ndbapi/ndb_async1.cpp index 5c450268178..90f2772b217 100644 --- a/storage/ndb/test/ndbapi/ndb_async1.cpp +++ b/storage/ndb/test/ndbapi/ndb_async1.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ndb_async2.cpp b/storage/ndb/test/ndbapi/ndb_async2.cpp index 10547c54b46..7bc9202a880 100644 --- a/storage/ndb/test/ndbapi/ndb_async2.cpp +++ b/storage/ndb/test/ndbapi/ndb_async2.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ndb_user_populate.cpp b/storage/ndb/test/ndbapi/ndb_user_populate.cpp index 601ed205550..02bf7245646 100644 --- a/storage/ndb/test/ndbapi/ndb_user_populate.cpp +++ b/storage/ndb/test/ndbapi/ndb_user_populate.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ndb_user_transaction.cpp b/storage/ndb/test/ndbapi/ndb_user_transaction.cpp index 1fe94cde9f8..4bf243cae79 100644 --- a/storage/ndb/test/ndbapi/ndb_user_transaction.cpp +++ b/storage/ndb/test/ndbapi/ndb_user_transaction.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ndb_user_transaction2.cpp b/storage/ndb/test/ndbapi/ndb_user_transaction2.cpp index 272b45069cd..a83d1f24ecf 100644 --- a/storage/ndb/test/ndbapi/ndb_user_transaction2.cpp +++ b/storage/ndb/test/ndbapi/ndb_user_transaction2.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ndb_user_transaction3.cpp b/storage/ndb/test/ndbapi/ndb_user_transaction3.cpp index 985dc2e70bc..dc889495aee 100644 --- a/storage/ndb/test/ndbapi/ndb_user_transaction3.cpp +++ b/storage/ndb/test/ndbapi/ndb_user_transaction3.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ndb_user_transaction4.cpp b/storage/ndb/test/ndbapi/ndb_user_transaction4.cpp index 4869fb479ee..66a8283fa5c 100644 --- a/storage/ndb/test/ndbapi/ndb_user_transaction4.cpp +++ b/storage/ndb/test/ndbapi/ndb_user_transaction4.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ndb_user_transaction5.cpp b/storage/ndb/test/ndbapi/ndb_user_transaction5.cpp index f3eba55d8c6..1939f74d9d4 100644 --- a/storage/ndb/test/ndbapi/ndb_user_transaction5.cpp +++ b/storage/ndb/test/ndbapi/ndb_user_transaction5.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/ndb_user_transaction6.cpp b/storage/ndb/test/ndbapi/ndb_user_transaction6.cpp index 96292b98fd4..488d7a766c2 100644 --- a/storage/ndb/test/ndbapi/ndb_user_transaction6.cpp +++ b/storage/ndb/test/ndbapi/ndb_user_transaction6.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/restarter.cpp b/storage/ndb/test/ndbapi/restarter.cpp index 01727c889c2..a3f4a9347c9 100644 --- a/storage/ndb/test/ndbapi/restarter.cpp +++ b/storage/ndb/test/ndbapi/restarter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/restarter2.cpp b/storage/ndb/test/ndbapi/restarter2.cpp index a6f330dab6d..52a76054858 100644 --- a/storage/ndb/test/ndbapi/restarter2.cpp +++ b/storage/ndb/test/ndbapi/restarter2.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/restarts.cpp b/storage/ndb/test/ndbapi/restarts.cpp index c876525d885..571cc863b5d 100644 --- a/storage/ndb/test/ndbapi/restarts.cpp +++ b/storage/ndb/test/ndbapi/restarts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/size.cpp b/storage/ndb/test/ndbapi/size.cpp index 53636caebed..756ec8eee20 100644 --- a/storage/ndb/test/ndbapi/size.cpp +++ b/storage/ndb/test/ndbapi/size.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testBackup.cpp b/storage/ndb/test/ndbapi/testBackup.cpp index 8cab5d97ceb..3709bb68294 100644 --- a/storage/ndb/test/ndbapi/testBackup.cpp +++ b/storage/ndb/test/ndbapi/testBackup.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testBasic.cpp b/storage/ndb/test/ndbapi/testBasic.cpp index 6f99da0940f..d553ba03afc 100644 --- a/storage/ndb/test/ndbapi/testBasic.cpp +++ b/storage/ndb/test/ndbapi/testBasic.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testBasicAsynch.cpp b/storage/ndb/test/ndbapi/testBasicAsynch.cpp index 770569e9168..d9114c90151 100644 --- a/storage/ndb/test/ndbapi/testBasicAsynch.cpp +++ b/storage/ndb/test/ndbapi/testBasicAsynch.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testBlobs.cpp b/storage/ndb/test/ndbapi/testBlobs.cpp index 40efb0870b0..1f3bea719e7 100644 --- a/storage/ndb/test/ndbapi/testBlobs.cpp +++ b/storage/ndb/test/ndbapi/testBlobs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testDataBuffers.cpp b/storage/ndb/test/ndbapi/testDataBuffers.cpp index 554d7dd5770..ae6851d947c 100644 --- a/storage/ndb/test/ndbapi/testDataBuffers.cpp +++ b/storage/ndb/test/ndbapi/testDataBuffers.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testDeadlock.cpp b/storage/ndb/test/ndbapi/testDeadlock.cpp index fb1473f53f4..4f611182534 100644 --- a/storage/ndb/test/ndbapi/testDeadlock.cpp +++ b/storage/ndb/test/ndbapi/testDeadlock.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testDict.cpp b/storage/ndb/test/ndbapi/testDict.cpp index 00dbb08bc3b..c3d01d5a43e 100644 --- a/storage/ndb/test/ndbapi/testDict.cpp +++ b/storage/ndb/test/ndbapi/testDict.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testGrepVerify.cpp b/storage/ndb/test/ndbapi/testGrepVerify.cpp index 38688d6c166..00e45a1af6a 100644 --- a/storage/ndb/test/ndbapi/testGrepVerify.cpp +++ b/storage/ndb/test/ndbapi/testGrepVerify.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testIndex.cpp b/storage/ndb/test/ndbapi/testIndex.cpp index 203522127ce..0b71230e454 100644 --- a/storage/ndb/test/ndbapi/testIndex.cpp +++ b/storage/ndb/test/ndbapi/testIndex.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testIndexStat.cpp b/storage/ndb/test/ndbapi/testIndexStat.cpp index 9c7d10b8279..4dd110650fe 100644 --- a/storage/ndb/test/ndbapi/testIndexStat.cpp +++ b/storage/ndb/test/ndbapi/testIndexStat.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 MySQL AB +/* 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 diff --git a/storage/ndb/test/ndbapi/testInterpreter.cpp b/storage/ndb/test/ndbapi/testInterpreter.cpp index 8237c28a319..d9c50b804b0 100644 --- a/storage/ndb/test/ndbapi/testInterpreter.cpp +++ b/storage/ndb/test/ndbapi/testInterpreter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testMgm.cpp b/storage/ndb/test/ndbapi/testMgm.cpp index 2c1829b8c1f..12956d73bec 100644 --- a/storage/ndb/test/ndbapi/testMgm.cpp +++ b/storage/ndb/test/ndbapi/testMgm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testNDBT.cpp b/storage/ndb/test/ndbapi/testNDBT.cpp index 6603090e9d8..4c83c914eed 100644 --- a/storage/ndb/test/ndbapi/testNDBT.cpp +++ b/storage/ndb/test/ndbapi/testNDBT.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testNdbApi.cpp b/storage/ndb/test/ndbapi/testNdbApi.cpp index 0b755c585e7..296aea1cd48 100644 --- a/storage/ndb/test/ndbapi/testNdbApi.cpp +++ b/storage/ndb/test/ndbapi/testNdbApi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testNodeRestart.cpp b/storage/ndb/test/ndbapi/testNodeRestart.cpp index dd622782b99..8ea0e08855e 100644 --- a/storage/ndb/test/ndbapi/testNodeRestart.cpp +++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testOIBasic.cpp b/storage/ndb/test/ndbapi/testOIBasic.cpp index a3dc4bf3f23..9895ca76b24 100644 --- a/storage/ndb/test/ndbapi/testOIBasic.cpp +++ b/storage/ndb/test/ndbapi/testOIBasic.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testOperations.cpp b/storage/ndb/test/ndbapi/testOperations.cpp index d0fa053eed6..d002038c06d 100644 --- a/storage/ndb/test/ndbapi/testOperations.cpp +++ b/storage/ndb/test/ndbapi/testOperations.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testOrderedIndex.cpp b/storage/ndb/test/ndbapi/testOrderedIndex.cpp index c6a321f8d3a..0464ce1c182 100644 --- a/storage/ndb/test/ndbapi/testOrderedIndex.cpp +++ b/storage/ndb/test/ndbapi/testOrderedIndex.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testPartitioning.cpp b/storage/ndb/test/ndbapi/testPartitioning.cpp index 3d11742a87a..8e91764df50 100644 --- a/storage/ndb/test/ndbapi/testPartitioning.cpp +++ b/storage/ndb/test/ndbapi/testPartitioning.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testReadPerf.cpp b/storage/ndb/test/ndbapi/testReadPerf.cpp index 68af450799a..c3cdc513b19 100644 --- a/storage/ndb/test/ndbapi/testReadPerf.cpp +++ b/storage/ndb/test/ndbapi/testReadPerf.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testRestartGci.cpp b/storage/ndb/test/ndbapi/testRestartGci.cpp index ffb99751a42..26b1b24112e 100644 --- a/storage/ndb/test/ndbapi/testRestartGci.cpp +++ b/storage/ndb/test/ndbapi/testRestartGci.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testSRBank.cpp b/storage/ndb/test/ndbapi/testSRBank.cpp index 56743fbfc51..e7f6a696560 100644 --- a/storage/ndb/test/ndbapi/testSRBank.cpp +++ b/storage/ndb/test/ndbapi/testSRBank.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testScan.cpp b/storage/ndb/test/ndbapi/testScan.cpp index c9dc41116b5..d7b5c2104f3 100644 --- a/storage/ndb/test/ndbapi/testScan.cpp +++ b/storage/ndb/test/ndbapi/testScan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testScanInterpreter.cpp b/storage/ndb/test/ndbapi/testScanInterpreter.cpp index 19e46f3f7f4..e65eaef42b6 100644 --- a/storage/ndb/test/ndbapi/testScanInterpreter.cpp +++ b/storage/ndb/test/ndbapi/testScanInterpreter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testScanPerf.cpp b/storage/ndb/test/ndbapi/testScanPerf.cpp index f63352046a8..c7f6935e607 100644 --- a/storage/ndb/test/ndbapi/testScanPerf.cpp +++ b/storage/ndb/test/ndbapi/testScanPerf.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testSystemRestart.cpp b/storage/ndb/test/ndbapi/testSystemRestart.cpp index 0d58548a6d1..cce31d5d2a3 100644 --- a/storage/ndb/test/ndbapi/testSystemRestart.cpp +++ b/storage/ndb/test/ndbapi/testSystemRestart.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testTimeout.cpp b/storage/ndb/test/ndbapi/testTimeout.cpp index bd694252a8b..feb2e780d7e 100644 --- a/storage/ndb/test/ndbapi/testTimeout.cpp +++ b/storage/ndb/test/ndbapi/testTimeout.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/testTransactions.cpp b/storage/ndb/test/ndbapi/testTransactions.cpp index 26b4fd7192b..813eadadef1 100644 --- a/storage/ndb/test/ndbapi/testTransactions.cpp +++ b/storage/ndb/test/ndbapi/testTransactions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/test_event.cpp b/storage/ndb/test/ndbapi/test_event.cpp index 140a2120503..0aca6522225 100644 --- a/storage/ndb/test/ndbapi/test_event.cpp +++ b/storage/ndb/test/ndbapi/test_event.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbapi/test_event_merge.cpp b/storage/ndb/test/ndbapi/test_event_merge.cpp index 1e34f456511..1df7fba0920 100644 --- a/storage/ndb/test/ndbapi/test_event_merge.cpp +++ b/storage/ndb/test/ndbapi/test_event_merge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 MySQL AB +/* 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 diff --git a/storage/ndb/test/ndbapi/test_event_multi_table.cpp b/storage/ndb/test/ndbapi/test_event_multi_table.cpp index 6091c7baea4..a8cf0fa86c0 100644 --- a/storage/ndb/test/ndbapi/test_event_multi_table.cpp +++ b/storage/ndb/test/ndbapi/test_event_multi_table.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 MySQL AB +/* 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 diff --git a/storage/ndb/test/ndbapi/userInterface.cpp b/storage/ndb/test/ndbapi/userInterface.cpp index 6f54401ae8d..b4110420b32 100644 --- a/storage/ndb/test/ndbapi/userInterface.cpp +++ b/storage/ndb/test/ndbapi/userInterface.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/ndbnet/test.run b/storage/ndb/test/ndbnet/test.run index ee6d970d247..48508e607a8 100644 --- a/storage/ndb/test/ndbnet/test.run +++ b/storage/ndb/test/ndbnet/test.run @@ -1,4 +1,4 @@ -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/ndbnet/testError.run b/storage/ndb/test/ndbnet/testError.run index 43ed7f36f02..fbbcb6d92b8 100644 --- a/storage/ndb/test/ndbnet/testError.run +++ b/storage/ndb/test/ndbnet/testError.run @@ -1,4 +1,4 @@ -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/ndbnet/testMNF.run b/storage/ndb/test/ndbnet/testMNF.run index 30675308edc..c35fc221afe 100644 --- a/storage/ndb/test/ndbnet/testMNF.run +++ b/storage/ndb/test/ndbnet/testMNF.run @@ -1,4 +1,4 @@ -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/ndbnet/testNR.run b/storage/ndb/test/ndbnet/testNR.run index ff1c3ee3a88..0708f74da98 100644 --- a/storage/ndb/test/ndbnet/testNR.run +++ b/storage/ndb/test/ndbnet/testNR.run @@ -1,4 +1,4 @@ -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/ndbnet/testNR1.run b/storage/ndb/test/ndbnet/testNR1.run index 2198a2660fe..d2fb74495d7 100644 --- a/storage/ndb/test/ndbnet/testNR1.run +++ b/storage/ndb/test/ndbnet/testNR1.run @@ -1,4 +1,4 @@ -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/ndbnet/testNR4.run b/storage/ndb/test/ndbnet/testNR4.run index cff41e81f38..fca8e9486e7 100644 --- a/storage/ndb/test/ndbnet/testNR4.run +++ b/storage/ndb/test/ndbnet/testNR4.run @@ -1,4 +1,4 @@ -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/ndbnet/testSRhang.run b/storage/ndb/test/ndbnet/testSRhang.run index c3886649333..e92bd96821f 100644 --- a/storage/ndb/test/ndbnet/testSRhang.run +++ b/storage/ndb/test/ndbnet/testSRhang.run @@ -1,4 +1,4 @@ -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/ndbnet/testTR295.run b/storage/ndb/test/ndbnet/testTR295.run index 9fae900f8de..9847cfa9846 100644 --- a/storage/ndb/test/ndbnet/testTR295.run +++ b/storage/ndb/test/ndbnet/testTR295.run @@ -1,4 +1,4 @@ -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/newtonapi/basic_test/basic/basic.cpp b/storage/ndb/test/newtonapi/basic_test/basic/basic.cpp index bd11f6fc52e..c3905f289f6 100644 --- a/storage/ndb/test/newtonapi/basic_test/basic/basic.cpp +++ b/storage/ndb/test/newtonapi/basic_test/basic/basic.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp b/storage/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp index 8a53fe0272e..e710771baba 100644 --- a/storage/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp +++ b/storage/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/newtonapi/basic_test/common.cpp b/storage/ndb/test/newtonapi/basic_test/common.cpp index 84c785b7690..c0ad490acdf 100644 --- a/storage/ndb/test/newtonapi/basic_test/common.cpp +++ b/storage/ndb/test/newtonapi/basic_test/common.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/newtonapi/basic_test/common.hpp b/storage/ndb/test/newtonapi/basic_test/common.hpp index ca8a6e58904..0a64b9659d2 100644 --- a/storage/ndb/test/newtonapi/basic_test/common.hpp +++ b/storage/ndb/test/newtonapi/basic_test/common.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp b/storage/ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp index 1498782c929..f8c03fd18be 100644 --- a/storage/ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp +++ b/storage/ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/newtonapi/basic_test/too_basic.cpp b/storage/ndb/test/newtonapi/basic_test/too_basic.cpp index 1dca0f028a7..832d09a2672 100644 --- a/storage/ndb/test/newtonapi/basic_test/too_basic.cpp +++ b/storage/ndb/test/newtonapi/basic_test/too_basic.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/newtonapi/perf_test/perf.cpp b/storage/ndb/test/newtonapi/perf_test/perf.cpp index 8ecd98fca21..fd0a58954db 100644 --- a/storage/ndb/test/newtonapi/perf_test/perf.cpp +++ b/storage/ndb/test/newtonapi/perf_test/perf.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/SQL99_test/SQL99_test.cpp b/storage/ndb/test/odbc/SQL99_test/SQL99_test.cpp index 33574107fd9..6d9f168670b 100644 --- a/storage/ndb/test/odbc/SQL99_test/SQL99_test.cpp +++ b/storage/ndb/test/odbc/SQL99_test/SQL99_test.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/SQL99_test/SQL99_test.h b/storage/ndb/test/odbc/SQL99_test/SQL99_test.h index e9f9320b37c..0e7db439f01 100644 --- a/storage/ndb/test/odbc/SQL99_test/SQL99_test.h +++ b/storage/ndb/test/odbc/SQL99_test/SQL99_test.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp b/storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp index e84fcd1184d..ff74afc2b57 100644 --- a/storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp +++ b/storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp b/storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp index 3f1f6d2a5c4..f092541da57 100644 --- a/storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp +++ b/storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/NDBT_SQLConnect.cpp b/storage/ndb/test/odbc/client/NDBT_SQLConnect.cpp index a9b10680705..3bef33c6db4 100644 --- a/storage/ndb/test/odbc/client/NDBT_SQLConnect.cpp +++ b/storage/ndb/test/odbc/client/NDBT_SQLConnect.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/NDBT_SQLPrepare.cpp b/storage/ndb/test/odbc/client/NDBT_SQLPrepare.cpp index 231cb401f98..39e44eda334 100644 --- a/storage/ndb/test/odbc/client/NDBT_SQLPrepare.cpp +++ b/storage/ndb/test/odbc/client/NDBT_SQLPrepare.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLAllocEnvTest.cpp b/storage/ndb/test/odbc/client/SQLAllocEnvTest.cpp index 810273dc5e7..80952523ef5 100644 --- a/storage/ndb/test/odbc/client/SQLAllocEnvTest.cpp +++ b/storage/ndb/test/odbc/client/SQLAllocEnvTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLAllocHandleTest.cpp b/storage/ndb/test/odbc/client/SQLAllocHandleTest.cpp index b49574f40da..47991335248 100644 --- a/storage/ndb/test/odbc/client/SQLAllocHandleTest.cpp +++ b/storage/ndb/test/odbc/client/SQLAllocHandleTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp b/storage/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp index 510b29d011e..35d79dfb073 100644 --- a/storage/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp +++ b/storage/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLBindColTest.cpp b/storage/ndb/test/odbc/client/SQLBindColTest.cpp index 79a8e848e84..f3613a01e1c 100644 --- a/storage/ndb/test/odbc/client/SQLBindColTest.cpp +++ b/storage/ndb/test/odbc/client/SQLBindColTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLBindParameterTest.cpp b/storage/ndb/test/odbc/client/SQLBindParameterTest.cpp index 25c7132962b..2745501ab6c 100644 --- a/storage/ndb/test/odbc/client/SQLBindParameterTest.cpp +++ b/storage/ndb/test/odbc/client/SQLBindParameterTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLCancelTest.cpp b/storage/ndb/test/odbc/client/SQLCancelTest.cpp index d1c5dd873a0..8c5f4b4a4ed 100644 --- a/storage/ndb/test/odbc/client/SQLCancelTest.cpp +++ b/storage/ndb/test/odbc/client/SQLCancelTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLCloseCursorTest.cpp b/storage/ndb/test/odbc/client/SQLCloseCursorTest.cpp index d8e9f423ee5..123055d4462 100644 --- a/storage/ndb/test/odbc/client/SQLCloseCursorTest.cpp +++ b/storage/ndb/test/odbc/client/SQLCloseCursorTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLColAttributeTest.cpp b/storage/ndb/test/odbc/client/SQLColAttributeTest.cpp index e460200d0b6..aac045dc75a 100644 --- a/storage/ndb/test/odbc/client/SQLColAttributeTest.cpp +++ b/storage/ndb/test/odbc/client/SQLColAttributeTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLColAttributeTest1.cpp b/storage/ndb/test/odbc/client/SQLColAttributeTest1.cpp index 3e526213b06..76426082fbd 100644 --- a/storage/ndb/test/odbc/client/SQLColAttributeTest1.cpp +++ b/storage/ndb/test/odbc/client/SQLColAttributeTest1.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLColAttributeTest2.cpp b/storage/ndb/test/odbc/client/SQLColAttributeTest2.cpp index 12bcf60ccb8..2742ab7d883 100644 --- a/storage/ndb/test/odbc/client/SQLColAttributeTest2.cpp +++ b/storage/ndb/test/odbc/client/SQLColAttributeTest2.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLColAttributeTest3.cpp b/storage/ndb/test/odbc/client/SQLColAttributeTest3.cpp index 9a345068bd9..90a96081521 100644 --- a/storage/ndb/test/odbc/client/SQLColAttributeTest3.cpp +++ b/storage/ndb/test/odbc/client/SQLColAttributeTest3.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLConnectTest.cpp b/storage/ndb/test/odbc/client/SQLConnectTest.cpp index 7032889ada1..81e9a5f90f8 100644 --- a/storage/ndb/test/odbc/client/SQLConnectTest.cpp +++ b/storage/ndb/test/odbc/client/SQLConnectTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLCopyDescTest.cpp b/storage/ndb/test/odbc/client/SQLCopyDescTest.cpp index 7c9fc43169b..fa6713c075b 100644 --- a/storage/ndb/test/odbc/client/SQLCopyDescTest.cpp +++ b/storage/ndb/test/odbc/client/SQLCopyDescTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLDescribeColTest.cpp b/storage/ndb/test/odbc/client/SQLDescribeColTest.cpp index 2ab1f3029d4..6ec43c69301 100644 --- a/storage/ndb/test/odbc/client/SQLDescribeColTest.cpp +++ b/storage/ndb/test/odbc/client/SQLDescribeColTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLDisconnectTest.cpp b/storage/ndb/test/odbc/client/SQLDisconnectTest.cpp index 5d6e0d134bc..e031c3accac 100644 --- a/storage/ndb/test/odbc/client/SQLDisconnectTest.cpp +++ b/storage/ndb/test/odbc/client/SQLDisconnectTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLDriverConnectTest.cpp b/storage/ndb/test/odbc/client/SQLDriverConnectTest.cpp index d81a05cadd0..257a59016c6 100644 --- a/storage/ndb/test/odbc/client/SQLDriverConnectTest.cpp +++ b/storage/ndb/test/odbc/client/SQLDriverConnectTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLEndTranTest.cpp b/storage/ndb/test/odbc/client/SQLEndTranTest.cpp index 87aa4e6f3a2..3686fbdec7c 100644 --- a/storage/ndb/test/odbc/client/SQLEndTranTest.cpp +++ b/storage/ndb/test/odbc/client/SQLEndTranTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLErrorTest.cpp b/storage/ndb/test/odbc/client/SQLErrorTest.cpp index c27c8cf3381..9f43efceb3f 100644 --- a/storage/ndb/test/odbc/client/SQLErrorTest.cpp +++ b/storage/ndb/test/odbc/client/SQLErrorTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLExecDirectTest.cpp b/storage/ndb/test/odbc/client/SQLExecDirectTest.cpp index 54e1993edc2..4269ef33fec 100644 --- a/storage/ndb/test/odbc/client/SQLExecDirectTest.cpp +++ b/storage/ndb/test/odbc/client/SQLExecDirectTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLExecuteTest.cpp b/storage/ndb/test/odbc/client/SQLExecuteTest.cpp index 58f32ca8cce..049fe78e91e 100644 --- a/storage/ndb/test/odbc/client/SQLExecuteTest.cpp +++ b/storage/ndb/test/odbc/client/SQLExecuteTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLFetchScrollTest.cpp b/storage/ndb/test/odbc/client/SQLFetchScrollTest.cpp index 099d62b3a15..484142cbf28 100644 --- a/storage/ndb/test/odbc/client/SQLFetchScrollTest.cpp +++ b/storage/ndb/test/odbc/client/SQLFetchScrollTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLFetchTest.cpp b/storage/ndb/test/odbc/client/SQLFetchTest.cpp index 61c9a1fef34..bd353787a46 100644 --- a/storage/ndb/test/odbc/client/SQLFetchTest.cpp +++ b/storage/ndb/test/odbc/client/SQLFetchTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLFreeHandleTest.cpp b/storage/ndb/test/odbc/client/SQLFreeHandleTest.cpp index d953abe6089..93cb5840e2b 100644 --- a/storage/ndb/test/odbc/client/SQLFreeHandleTest.cpp +++ b/storage/ndb/test/odbc/client/SQLFreeHandleTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLFreeStmtTest.cpp b/storage/ndb/test/odbc/client/SQLFreeStmtTest.cpp index 82fde392bf2..9607515f035 100644 --- a/storage/ndb/test/odbc/client/SQLFreeStmtTest.cpp +++ b/storage/ndb/test/odbc/client/SQLFreeStmtTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp b/storage/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp index a804d792cde..8a1036f6d2d 100644 --- a/storage/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetCursorNameTest.cpp b/storage/ndb/test/odbc/client/SQLGetCursorNameTest.cpp index 18acc938766..a73804bd34c 100644 --- a/storage/ndb/test/odbc/client/SQLGetCursorNameTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetCursorNameTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetDataTest.cpp b/storage/ndb/test/odbc/client/SQLGetDataTest.cpp index 597f3552f36..f2174124d32 100644 --- a/storage/ndb/test/odbc/client/SQLGetDataTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetDataTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetDescFieldTest.cpp b/storage/ndb/test/odbc/client/SQLGetDescFieldTest.cpp index 4b1114acf33..60b11651a38 100644 --- a/storage/ndb/test/odbc/client/SQLGetDescFieldTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetDescFieldTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetDescRecTest.cpp b/storage/ndb/test/odbc/client/SQLGetDescRecTest.cpp index 8648cc0824e..35582bb8992 100644 --- a/storage/ndb/test/odbc/client/SQLGetDescRecTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetDescRecTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp b/storage/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp index e67b3dc298d..51e44cad962 100644 --- a/storage/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp b/storage/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp index 0ba2509996d..c8a14b6b6ed 100644 --- a/storage/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetDiagRecTest.cpp b/storage/ndb/test/odbc/client/SQLGetDiagRecTest.cpp index db99d5e75cd..72c48a45627 100644 --- a/storage/ndb/test/odbc/client/SQLGetDiagRecTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetDiagRecTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp b/storage/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp index ed2c29b74da..22131ed1877 100644 --- a/storage/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetFunctionsTest.cpp b/storage/ndb/test/odbc/client/SQLGetFunctionsTest.cpp index e9432e64eb8..0600a63a7b9 100644 --- a/storage/ndb/test/odbc/client/SQLGetFunctionsTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetFunctionsTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetInfoTest.cpp b/storage/ndb/test/odbc/client/SQLGetInfoTest.cpp index ee45060191f..47c24f806ad 100644 --- a/storage/ndb/test/odbc/client/SQLGetInfoTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetInfoTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp b/storage/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp index 1a05618b4d8..300779d522e 100644 --- a/storage/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp b/storage/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp index 9ad025f25dd..03f9a642f26 100644 --- a/storage/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp +++ b/storage/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLMoreResultsTest.cpp b/storage/ndb/test/odbc/client/SQLMoreResultsTest.cpp index 597a80d9dea..40646d40f11 100644 --- a/storage/ndb/test/odbc/client/SQLMoreResultsTest.cpp +++ b/storage/ndb/test/odbc/client/SQLMoreResultsTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLNumResultColsTest.cpp b/storage/ndb/test/odbc/client/SQLNumResultColsTest.cpp index 6da12f23f89..69070d712e5 100644 --- a/storage/ndb/test/odbc/client/SQLNumResultColsTest.cpp +++ b/storage/ndb/test/odbc/client/SQLNumResultColsTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLParamDataTest.cpp b/storage/ndb/test/odbc/client/SQLParamDataTest.cpp index a7d6cd4bf4a..94109d7a260 100644 --- a/storage/ndb/test/odbc/client/SQLParamDataTest.cpp +++ b/storage/ndb/test/odbc/client/SQLParamDataTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLPrepareTest.cpp b/storage/ndb/test/odbc/client/SQLPrepareTest.cpp index 10e0937bd3c..b3700a32964 100644 --- a/storage/ndb/test/odbc/client/SQLPrepareTest.cpp +++ b/storage/ndb/test/odbc/client/SQLPrepareTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLPutDataTest.cpp b/storage/ndb/test/odbc/client/SQLPutDataTest.cpp index cc35fe41718..ef6ff683fd2 100644 --- a/storage/ndb/test/odbc/client/SQLPutDataTest.cpp +++ b/storage/ndb/test/odbc/client/SQLPutDataTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLRowCountTest.cpp b/storage/ndb/test/odbc/client/SQLRowCountTest.cpp index 63739cc31ea..73f8e9864b3 100644 --- a/storage/ndb/test/odbc/client/SQLRowCountTest.cpp +++ b/storage/ndb/test/odbc/client/SQLRowCountTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp b/storage/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp index f866ade6e04..598a4fd445d 100644 --- a/storage/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp +++ b/storage/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLSetCursorNameTest.cpp b/storage/ndb/test/odbc/client/SQLSetCursorNameTest.cpp index 852cd107a0d..1ec3fcfadfb 100644 --- a/storage/ndb/test/odbc/client/SQLSetCursorNameTest.cpp +++ b/storage/ndb/test/odbc/client/SQLSetCursorNameTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLSetDescFieldTest.cpp b/storage/ndb/test/odbc/client/SQLSetDescFieldTest.cpp index 10ceda94f19..e9b4b768bd3 100644 --- a/storage/ndb/test/odbc/client/SQLSetDescFieldTest.cpp +++ b/storage/ndb/test/odbc/client/SQLSetDescFieldTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLSetDescRecTest.cpp b/storage/ndb/test/odbc/client/SQLSetDescRecTest.cpp index 81d5cc3e234..9eb657e6b87 100644 --- a/storage/ndb/test/odbc/client/SQLSetDescRecTest.cpp +++ b/storage/ndb/test/odbc/client/SQLSetDescRecTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp b/storage/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp index d045008f2e9..2e9611e3e29 100644 --- a/storage/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp +++ b/storage/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp b/storage/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp index 9746c993e43..2549eba0779 100644 --- a/storage/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp +++ b/storage/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLTablesTest.cpp b/storage/ndb/test/odbc/client/SQLTablesTest.cpp index 4b063f2d1a0..3915ba74632 100644 --- a/storage/ndb/test/odbc/client/SQLTablesTest.cpp +++ b/storage/ndb/test/odbc/client/SQLTablesTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/SQLTransactTest.cpp b/storage/ndb/test/odbc/client/SQLTransactTest.cpp index a1495be3702..147e470a9ce 100644 --- a/storage/ndb/test/odbc/client/SQLTransactTest.cpp +++ b/storage/ndb/test/odbc/client/SQLTransactTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/common.hpp b/storage/ndb/test/odbc/client/common.hpp index 1379582b8f6..1524335aa29 100644 --- a/storage/ndb/test/odbc/client/common.hpp +++ b/storage/ndb/test/odbc/client/common.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/client/main.cpp b/storage/ndb/test/odbc/client/main.cpp index ee0d3f29e70..6c891e6b798 100644 --- a/storage/ndb/test/odbc/client/main.cpp +++ b/storage/ndb/test/odbc/client/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/driver/testOdbcDriver.cpp b/storage/ndb/test/odbc/driver/testOdbcDriver.cpp index d5c3cfac1ac..c233992139b 100644 --- a/storage/ndb/test/odbc/driver/testOdbcDriver.cpp +++ b/storage/ndb/test/odbc/driver/testOdbcDriver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/odbc/test_compiler/test_compiler.cpp b/storage/ndb/test/odbc/test_compiler/test_compiler.cpp index db196a6dd1d..1db1ad35dd8 100644 --- a/storage/ndb/test/odbc/test_compiler/test_compiler.cpp +++ b/storage/ndb/test/odbc/test_compiler/test_compiler.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/run-test/atrt-analyze-result.sh b/storage/ndb/test/run-test/atrt-analyze-result.sh index 9341033dd47..d7b0c72c8d8 100755 --- a/storage/ndb/test/run-test/atrt-analyze-result.sh +++ b/storage/ndb/test/run-test/atrt-analyze-result.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/run-test/atrt-clear-result.sh b/storage/ndb/test/run-test/atrt-clear-result.sh index e4dc52a5acb..65617e12515 100755 --- a/storage/ndb/test/run-test/atrt-clear-result.sh +++ b/storage/ndb/test/run-test/atrt-clear-result.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/run-test/atrt-gather-result.sh b/storage/ndb/test/run-test/atrt-gather-result.sh index 0c2820edcfe..8af45e97041 100755 --- a/storage/ndb/test/run-test/atrt-gather-result.sh +++ b/storage/ndb/test/run-test/atrt-gather-result.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005, 2007 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/run-test/atrt-setup.sh b/storage/ndb/test/run-test/atrt-setup.sh index 5d48c7316b6..b42919c85fe 100755 --- a/storage/ndb/test/run-test/atrt-setup.sh +++ b/storage/ndb/test/run-test/atrt-setup.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/run-test/atrt-testBackup b/storage/ndb/test/run-test/atrt-testBackup index 7bb1a875225..3f8ff9e4655 100755 --- a/storage/ndb/test/run-test/atrt-testBackup +++ b/storage/ndb/test/run-test/atrt-testBackup @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/run-test/atrt.hpp b/storage/ndb/test/run-test/atrt.hpp index fc92638c59a..a3adf4c05ae 100644 --- a/storage/ndb/test/run-test/atrt.hpp +++ b/storage/ndb/test/run-test/atrt.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/run-test/main.cpp b/storage/ndb/test/run-test/main.cpp index 8a8e5d73f2a..8618081bac7 100644 --- a/storage/ndb/test/run-test/main.cpp +++ b/storage/ndb/test/run-test/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/test/run-test/make-index.sh b/storage/ndb/test/run-test/make-index.sh index 1818fa22ac9..75736c93cb7 100755 --- a/storage/ndb/test/run-test/make-index.sh +++ b/storage/ndb/test/run-test/make-index.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/storage/ndb/test/src/CpcClient.cpp b/storage/ndb/test/src/CpcClient.cpp index de63300d05d..cf67fdea223 100644 --- a/storage/ndb/test/src/CpcClient.cpp +++ b/storage/ndb/test/src/CpcClient.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/DbUtil.cpp b/storage/ndb/test/src/DbUtil.cpp index c17f81f9cb4..a95f9d1eed9 100755 --- a/storage/ndb/test/src/DbUtil.cpp +++ b/storage/ndb/test/src/DbUtil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 MySQL AB +/* Copyright (c) 2007, 2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/HugoAsynchTransactions.cpp b/storage/ndb/test/src/HugoAsynchTransactions.cpp index 8c2fcf72b43..42ab7190733 100644 --- a/storage/ndb/test/src/HugoAsynchTransactions.cpp +++ b/storage/ndb/test/src/HugoAsynchTransactions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/HugoCalculator.cpp b/storage/ndb/test/src/HugoCalculator.cpp index ef7258ab306..e42ab7b3dba 100644 --- a/storage/ndb/test/src/HugoCalculator.cpp +++ b/storage/ndb/test/src/HugoCalculator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/HugoOperations.cpp b/storage/ndb/test/src/HugoOperations.cpp index 2af8ae21760..b8499114c97 100644 --- a/storage/ndb/test/src/HugoOperations.cpp +++ b/storage/ndb/test/src/HugoOperations.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/HugoTransactions.cpp b/storage/ndb/test/src/HugoTransactions.cpp index 22346a99354..09a26a47880 100644 --- a/storage/ndb/test/src/HugoTransactions.cpp +++ b/storage/ndb/test/src/HugoTransactions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NDBT_Error.cpp b/storage/ndb/test/src/NDBT_Error.cpp index ba0160e780e..0a708ddf690 100644 --- a/storage/ndb/test/src/NDBT_Error.cpp +++ b/storage/ndb/test/src/NDBT_Error.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NDBT_Output.cpp b/storage/ndb/test/src/NDBT_Output.cpp index 395f6e5222c..0773d0a5a22 100644 --- a/storage/ndb/test/src/NDBT_Output.cpp +++ b/storage/ndb/test/src/NDBT_Output.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NDBT_ResultRow.cpp b/storage/ndb/test/src/NDBT_ResultRow.cpp index 559b1845a51..04a626e8777 100644 --- a/storage/ndb/test/src/NDBT_ResultRow.cpp +++ b/storage/ndb/test/src/NDBT_ResultRow.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NDBT_ReturnCodes.cpp b/storage/ndb/test/src/NDBT_ReturnCodes.cpp index 47b57a8c614..7bffe36365f 100644 --- a/storage/ndb/test/src/NDBT_ReturnCodes.cpp +++ b/storage/ndb/test/src/NDBT_ReturnCodes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NDBT_Table.cpp b/storage/ndb/test/src/NDBT_Table.cpp index 26021718b13..e3f6413304e 100644 --- a/storage/ndb/test/src/NDBT_Table.cpp +++ b/storage/ndb/test/src/NDBT_Table.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NDBT_Tables.cpp b/storage/ndb/test/src/NDBT_Tables.cpp index 8b07119a943..e52115be9a7 100644 --- a/storage/ndb/test/src/NDBT_Tables.cpp +++ b/storage/ndb/test/src/NDBT_Tables.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NDBT_Test.cpp b/storage/ndb/test/src/NDBT_Test.cpp index 535f423cb9d..891c0d91ae1 100644 --- a/storage/ndb/test/src/NDBT_Test.cpp +++ b/storage/ndb/test/src/NDBT_Test.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/test/src/NDBT_Thread.cpp b/storage/ndb/test/src/NDBT_Thread.cpp index 71bb8949474..f7b4a17bd14 100644 --- a/storage/ndb/test/src/NDBT_Thread.cpp +++ b/storage/ndb/test/src/NDBT_Thread.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NdbBackup.cpp b/storage/ndb/test/src/NdbBackup.cpp index a4e35256b8c..976bcac5467 100644 --- a/storage/ndb/test/src/NdbBackup.cpp +++ b/storage/ndb/test/src/NdbBackup.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NdbConfig.cpp b/storage/ndb/test/src/NdbConfig.cpp index d463078c64d..f2bd4888792 100644 --- a/storage/ndb/test/src/NdbConfig.cpp +++ b/storage/ndb/test/src/NdbConfig.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NdbGrep.cpp b/storage/ndb/test/src/NdbGrep.cpp index db0fa398140..61505c75754 100644 --- a/storage/ndb/test/src/NdbGrep.cpp +++ b/storage/ndb/test/src/NdbGrep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NdbMixRestarter.cpp b/storage/ndb/test/src/NdbMixRestarter.cpp index 6993bba1887..94b5ab9422b 100644 --- a/storage/ndb/test/src/NdbMixRestarter.cpp +++ b/storage/ndb/test/src/NdbMixRestarter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NdbRestarter.cpp b/storage/ndb/test/src/NdbRestarter.cpp index fbfd6993722..c46f6f89f2f 100644 --- a/storage/ndb/test/src/NdbRestarter.cpp +++ b/storage/ndb/test/src/NdbRestarter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NdbRestarts.cpp b/storage/ndb/test/src/NdbRestarts.cpp index e234aeb9451..5c5aaa5c671 100644 --- a/storage/ndb/test/src/NdbRestarts.cpp +++ b/storage/ndb/test/src/NdbRestarts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NdbSchemaCon.cpp b/storage/ndb/test/src/NdbSchemaCon.cpp index 8092ecd6d5a..65cb9c0e83a 100644 --- a/storage/ndb/test/src/NdbSchemaCon.cpp +++ b/storage/ndb/test/src/NdbSchemaCon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/NdbSchemaOp.cpp b/storage/ndb/test/src/NdbSchemaOp.cpp index 707ae9ca5c0..1694ed34e51 100644 --- a/storage/ndb/test/src/NdbSchemaOp.cpp +++ b/storage/ndb/test/src/NdbSchemaOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/src/UtilTransactions.cpp b/storage/ndb/test/src/UtilTransactions.cpp index 2a1076e0f32..e744b11c4d7 100644 --- a/storage/ndb/test/src/UtilTransactions.cpp +++ b/storage/ndb/test/src/UtilTransactions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/connect.cpp b/storage/ndb/test/tools/connect.cpp index 5d0e39d7b38..947cca95d46 100644 --- a/storage/ndb/test/tools/connect.cpp +++ b/storage/ndb/test/tools/connect.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/test/tools/copy_tab.cpp b/storage/ndb/test/tools/copy_tab.cpp index ac1c9e89a32..285be8068be 100644 --- a/storage/ndb/test/tools/copy_tab.cpp +++ b/storage/ndb/test/tools/copy_tab.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/cpcc.cpp b/storage/ndb/test/tools/cpcc.cpp index e2006ed27d2..a46d9714fa6 100644 --- a/storage/ndb/test/tools/cpcc.cpp +++ b/storage/ndb/test/tools/cpcc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/create_index.cpp b/storage/ndb/test/tools/create_index.cpp index caea012a828..6098a681cb2 100644 --- a/storage/ndb/test/tools/create_index.cpp +++ b/storage/ndb/test/tools/create_index.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoCalculator.cpp b/storage/ndb/test/tools/hugoCalculator.cpp index 307ec20ad0e..872cb3ecb5b 100644 --- a/storage/ndb/test/tools/hugoCalculator.cpp +++ b/storage/ndb/test/tools/hugoCalculator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoFill.cpp b/storage/ndb/test/tools/hugoFill.cpp index b48fac3adb6..6778f640115 100644 --- a/storage/ndb/test/tools/hugoFill.cpp +++ b/storage/ndb/test/tools/hugoFill.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoLoad.cpp b/storage/ndb/test/tools/hugoLoad.cpp index b2e5715a2e6..3bea628cb1d 100644 --- a/storage/ndb/test/tools/hugoLoad.cpp +++ b/storage/ndb/test/tools/hugoLoad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoLockRecords.cpp b/storage/ndb/test/tools/hugoLockRecords.cpp index 86218720738..7c52d553beb 100644 --- a/storage/ndb/test/tools/hugoLockRecords.cpp +++ b/storage/ndb/test/tools/hugoLockRecords.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoPkDelete.cpp b/storage/ndb/test/tools/hugoPkDelete.cpp index 772a01427ba..154cbfec169 100644 --- a/storage/ndb/test/tools/hugoPkDelete.cpp +++ b/storage/ndb/test/tools/hugoPkDelete.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoPkRead.cpp b/storage/ndb/test/tools/hugoPkRead.cpp index 26d3d9fcddf..03617d053b5 100644 --- a/storage/ndb/test/tools/hugoPkRead.cpp +++ b/storage/ndb/test/tools/hugoPkRead.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoPkReadRecord.cpp b/storage/ndb/test/tools/hugoPkReadRecord.cpp index 6abbbc09442..ef38cec3f13 100644 --- a/storage/ndb/test/tools/hugoPkReadRecord.cpp +++ b/storage/ndb/test/tools/hugoPkReadRecord.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoPkUpdate.cpp b/storage/ndb/test/tools/hugoPkUpdate.cpp index 83df05adb17..38eed5677bb 100644 --- a/storage/ndb/test/tools/hugoPkUpdate.cpp +++ b/storage/ndb/test/tools/hugoPkUpdate.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoScanRead.cpp b/storage/ndb/test/tools/hugoScanRead.cpp index 096f2bac77b..b28f035684c 100644 --- a/storage/ndb/test/tools/hugoScanRead.cpp +++ b/storage/ndb/test/tools/hugoScanRead.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/hugoScanUpdate.cpp b/storage/ndb/test/tools/hugoScanUpdate.cpp index 39a83ede826..e47ecb74628 100644 --- a/storage/ndb/test/tools/hugoScanUpdate.cpp +++ b/storage/ndb/test/tools/hugoScanUpdate.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/listen.cpp b/storage/ndb/test/tools/listen.cpp index 669bbd18405..a009b2bad82 100644 --- a/storage/ndb/test/tools/listen.cpp +++ b/storage/ndb/test/tools/listen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2005-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/rep_latency.cpp b/storage/ndb/test/tools/rep_latency.cpp index 927ecb9ad37..3171cbc8b3a 100644 --- a/storage/ndb/test/tools/rep_latency.cpp +++ b/storage/ndb/test/tools/rep_latency.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/restart.cpp b/storage/ndb/test/tools/restart.cpp index d543d65762d..7f080158284 100644 --- a/storage/ndb/test/tools/restart.cpp +++ b/storage/ndb/test/tools/restart.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/transproxy.cpp b/storage/ndb/test/tools/transproxy.cpp index 9b07e5dae43..56f422da290 100644 --- a/storage/ndb/test/tools/transproxy.cpp +++ b/storage/ndb/test/tools/transproxy.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/test/tools/verify_index.cpp b/storage/ndb/test/tools/verify_index.cpp index e44c21b4949..7bab01ad0e5 100644 --- a/storage/ndb/test/tools/verify_index.cpp +++ b/storage/ndb/test/tools/verify_index.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/clean-links.sh b/storage/ndb/tools/clean-links.sh index 703315df9ac..be4ce12b34a 100755 --- a/storage/ndb/tools/clean-links.sh +++ b/storage/ndb/tools/clean-links.sh @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/delete_all.cpp b/storage/ndb/tools/delete_all.cpp index 87c7cfe8acb..0721c699fb8 100644 --- a/storage/ndb/tools/delete_all.cpp +++ b/storage/ndb/tools/delete_all.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/desc.cpp b/storage/ndb/tools/desc.cpp index 29313a7a5a8..f85915d5a87 100644 --- a/storage/ndb/tools/desc.cpp +++ b/storage/ndb/tools/desc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/drop_index.cpp b/storage/ndb/tools/drop_index.cpp index 1162fb8fb0d..244e13c76c9 100644 --- a/storage/ndb/tools/drop_index.cpp +++ b/storage/ndb/tools/drop_index.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/drop_tab.cpp b/storage/ndb/tools/drop_tab.cpp index b4884e0043c..09b17196b39 100644 --- a/storage/ndb/tools/drop_tab.cpp +++ b/storage/ndb/tools/drop_tab.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/listTables.cpp b/storage/ndb/tools/listTables.cpp index a5a092bd460..9e5ebf5fc33 100644 --- a/storage/ndb/tools/listTables.cpp +++ b/storage/ndb/tools/listTables.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/make-errors.pl b/storage/ndb/tools/make-errors.pl index 06f1ca0b72d..45241f16eb0 100644 --- a/storage/ndb/tools/make-errors.pl +++ b/storage/ndb/tools/make-errors.pl @@ -1,6 +1,6 @@ #! /usr/local/bin/perl -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/make-links.sh b/storage/ndb/tools/make-links.sh index 53fa7fca3e3..2a53c53da69 100755 --- a/storage/ndb/tools/make-links.sh +++ b/storage/ndb/tools/make-links.sh @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/ndb_config.cpp b/storage/ndb/tools/ndb_config.cpp index 3b4b22c0ef7..0845b08f95f 100644 --- a/storage/ndb/tools/ndb_config.cpp +++ b/storage/ndb/tools/ndb_config.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/ndb_error_reporter b/storage/ndb/tools/ndb_error_reporter index 03151903d2d..7fb9845dba0 100644 --- a/storage/ndb/tools/ndb_error_reporter +++ b/storage/ndb/tools/ndb_error_reporter @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# Copyright (C) 2005 MySQL AB +# Copyright (c) 2005-2007 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/ndb_test_platform.cpp b/storage/ndb/tools/ndb_test_platform.cpp index 051af49a7a6..9772e3ae70f 100644 --- a/storage/ndb/tools/ndb_test_platform.cpp +++ b/storage/ndb/tools/ndb_test_platform.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/ndbsql.cpp b/storage/ndb/tools/ndbsql.cpp index 6b9dd33f4fb..366da2223a5 100644 --- a/storage/ndb/tools/ndbsql.cpp +++ b/storage/ndb/tools/ndbsql.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2005 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/Restore.cpp b/storage/ndb/tools/restore/Restore.cpp index ff5a07c41cf..d681b1c07ad 100644 --- a/storage/ndb/tools/restore/Restore.cpp +++ b/storage/ndb/tools/restore/Restore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/Restore.hpp b/storage/ndb/tools/restore/Restore.hpp index 7a8aa955644..2be9c70c865 100644 --- a/storage/ndb/tools/restore/Restore.hpp +++ b/storage/ndb/tools/restore/Restore.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/consumer.cpp b/storage/ndb/tools/restore/consumer.cpp index 027289821bb..c32f79ebf56 100644 --- a/storage/ndb/tools/restore/consumer.cpp +++ b/storage/ndb/tools/restore/consumer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/consumer.hpp b/storage/ndb/tools/restore/consumer.hpp index a0c0eb33282..d8a689632bf 100644 --- a/storage/ndb/tools/restore/consumer.hpp +++ b/storage/ndb/tools/restore/consumer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/consumer_printer.cpp b/storage/ndb/tools/restore/consumer_printer.cpp index 185bc6eb227..ee52d14fe76 100644 --- a/storage/ndb/tools/restore/consumer_printer.cpp +++ b/storage/ndb/tools/restore/consumer_printer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/consumer_printer.hpp b/storage/ndb/tools/restore/consumer_printer.hpp index f64f2f8f725..f5c4a30629e 100644 --- a/storage/ndb/tools/restore/consumer_printer.hpp +++ b/storage/ndb/tools/restore/consumer_printer.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp index 950c5acc703..c39af7fcd8b 100644 --- a/storage/ndb/tools/restore/consumer_restore.cpp +++ b/storage/ndb/tools/restore/consumer_restore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/restore/consumer_restore.hpp b/storage/ndb/tools/restore/consumer_restore.hpp index ec2231f947e..c80890e4e6d 100644 --- a/storage/ndb/tools/restore/consumer_restore.hpp +++ b/storage/ndb/tools/restore/consumer_restore.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/consumer_restorem.cpp b/storage/ndb/tools/restore/consumer_restorem.cpp index 429b3b2e0af..612624ef78d 100644 --- a/storage/ndb/tools/restore/consumer_restorem.cpp +++ b/storage/ndb/tools/restore/consumer_restorem.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/ndb_nodegroup_map.h b/storage/ndb/tools/restore/ndb_nodegroup_map.h index f265a0f9b38..116cb92c79f 100644 --- a/storage/ndb/tools/restore/ndb_nodegroup_map.h +++ b/storage/ndb/tools/restore/ndb_nodegroup_map.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/restore/restore_main.cpp b/storage/ndb/tools/restore/restore_main.cpp index 996df613770..9af989e457a 100644 --- a/storage/ndb/tools/restore/restore_main.cpp +++ b/storage/ndb/tools/restore/restore_main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/rgrep b/storage/ndb/tools/rgrep index 681db7ecc7c..8d9fb9c0ac7 100755 --- a/storage/ndb/tools/rgrep +++ b/storage/ndb/tools/rgrep @@ -1,6 +1,6 @@ #!/vobs/wds/swt/bin/perl -# Copyright (C) 2004 MySQL AB +# Copyright (c) 2004, 2005 MySQL AB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/storage/ndb/tools/select_all.cpp b/storage/ndb/tools/select_all.cpp index 0949f72ec1e..b8fbf977125 100644 --- a/storage/ndb/tools/select_all.cpp +++ b/storage/ndb/tools/select_all.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/select_count.cpp b/storage/ndb/tools/select_count.cpp index c66c3efd4d5..4c523371cc0 100644 --- a/storage/ndb/tools/select_count.cpp +++ b/storage/ndb/tools/select_count.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/ndb/tools/waiter.cpp b/storage/ndb/tools/waiter.cpp index 59347a09014..c9127358c69 100644 --- a/storage/ndb/tools/waiter.cpp +++ b/storage/ndb/tools/waiter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt index 74d05873f6f..0c361e27707 100644 --- a/storage/oqgraph/CMakeLists.txt +++ b/storage/oqgraph/CMakeLists.txt @@ -3,14 +3,14 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") MESSAGE(STATUS "Configuring OQGraph") FIND_PACKAGE(Boost) IF(NOT Boost_FOUND) - MESSAGE(STATUS "Boost not found") + MESSAGE(STATUS "Boost not found. OQGraph will not be compiled") RETURN() ENDIF() INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS}) FIND_PACKAGE(Judy) IF(NOT Judy_FOUND) - MESSAGE(STATUS "Judy not found") + MESSAGE(STATUS "Judy not found. OQGraph will not be compiled") RETURN() ENDIF() INCLUDE_DIRECTORIES(${Judy_INCLUDE_DIR}) @@ -51,8 +51,10 @@ IF(BOOST_OK) oqgraph_shim.cc oqgraph_thunk.cc oqgraph_judy.cc STORAGE_ENGINE MODULE_ONLY + RECOMPILE_FOR_EMBEDDED COMPONENT oqgraph-engine LINK_LIBRARIES ${Judy_LIBRARIES}) + MESSAGE(STATUS "OQGraph OK") ELSE(BOOST_OK) - MESSAGE(STATUS "Requisites for OQGraph not met") + MESSAGE(STATUS "Requisites for OQGraph not met. OQGraph will not be compiled") ENDIF(BOOST_OK) diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index 12a39e0f230..650be75ceda 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -538,7 +538,11 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked) origid= destid= weight= 0; + // Here we're abusing init_tmp_table_share() which is normally only works for thread-local shares. init_tmp_table_share( thd, share, table->s->db.str, table->s->db.length, options->table_name, ""); + // because of that, we need to reinitialize the memroot (to reset MY_THREAD_SPECIFIC flag) + DBUG_ASSERT(share->mem_root.used == NULL); // it's still empty + init_sql_alloc(&share->mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, MYF(0)); // What I think this code is doing: // * Our OQGRAPH table is `database_blah/name` diff --git a/storage/oqgraph/ha_oqgraph.h b/storage/oqgraph/ha_oqgraph.h index 2a998425c27..14490270031 100644 --- a/storage/oqgraph/ha_oqgraph.h +++ b/storage/oqgraph/ha_oqgraph.h @@ -115,6 +115,20 @@ public: virtual const char *table_type() const { return hton_name(ht)->str; } #endif + my_bool register_query_cache_table(THD *thd, char *table_key, + uint key_length, + qc_engine_callback + *engine_callback, + ulonglong *engine_data) + { + /* + Do not put data from OQGRAPH tables into query cache (because there + is no way to tell whether the data in the backing table has changed or + not) + */ + return FALSE; + } + private: int oqgraph_check_table_structure (TABLE *table_arg); diff --git a/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.result b/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.result index 9aa806eace9..7cb65bc07ea 100644 --- a/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.result +++ b/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.result @@ -1,6 +1,7 @@ DROP TABLE IF EXISTS graph_base; DROP TABLE IF EXISTS graph; DROP TABLE IF EXISTS graph2; +call mtr.add_suppression("graph_base is open on delete"); CREATE TABLE graph2 ( latch VARCHAR(32) NULL, origid BIGINT UNSIGNED NULL, diff --git a/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.test b/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.test index 869994aa208..a6dae0e2678 100644 --- a/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.test +++ b/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.test @@ -4,6 +4,8 @@ DROP TABLE IF EXISTS graph; DROP TABLE IF EXISTS graph2; --enable_warnings +call mtr.add_suppression("graph_base is open on delete"); + CREATE TABLE graph2 ( latch VARCHAR(32) NULL, origid BIGINT UNSIGNED NULL, diff --git a/storage/oqgraph/mysql-test/oqgraph/connections_mdev5748.result b/storage/oqgraph/mysql-test/oqgraph/connections_mdev5748.result new file mode 100644 index 00000000000..3d9c13bd733 --- /dev/null +++ b/storage/oqgraph/mysql-test/oqgraph/connections_mdev5748.result @@ -0,0 +1,32 @@ +CREATE TABLE oq_backing ( +origid INT UNSIGNED NOT NULL, +destid INT UNSIGNED NOT NULL, +weight DOUBLE NOT NULL, +PRIMARY KEY (origid, destid), +KEY (destid) +); +CREATE TABLE oq_table ( +latch VARCHAR(32) NULL, +origid BIGINT UNSIGNED NULL, +destid BIGINT UNSIGNED NULL, +weight DOUBLE NULL, +seq BIGINT UNSIGNED NULL, +linkid BIGINT UNSIGNED NULL, +KEY (latch, origid, destid) USING HASH, +KEY (latch, destid, origid) USING HASH +) ENGINE=OQGRAPH +data_table='oq_backing' origid='origid' destid='destid' weight='weight'; +flush tables; +show fields in oq_table; +Field Type Null Key Default Extra +latch varchar(32) YES MUL NULL +origid bigint(20) unsigned YES NULL +destid bigint(20) unsigned YES NULL +weight double YES NULL +seq bigint(20) unsigned YES NULL +linkid bigint(20) unsigned YES NULL +show tables; +Tables_in_test +oq_backing +oq_table +drop table oq_table, oq_backing; diff --git a/storage/oqgraph/mysql-test/oqgraph/connections_mdev5748.test b/storage/oqgraph/mysql-test/oqgraph/connections_mdev5748.test new file mode 100644 index 00000000000..9d7fab722c0 --- /dev/null +++ b/storage/oqgraph/mysql-test/oqgraph/connections_mdev5748.test @@ -0,0 +1,37 @@ +# +# MDEV-5748 Assertion `status_var.memory_used == 0' fails on disconnect after opening an OQGRAPH table +# + +# try to open oqgraph table in one connection and use in another: + +--connect (con1,localhost,root,,) + +CREATE TABLE oq_backing ( + origid INT UNSIGNED NOT NULL, + destid INT UNSIGNED NOT NULL, + weight DOUBLE NOT NULL, + PRIMARY KEY (origid, destid), + KEY (destid) +); + +CREATE TABLE oq_table ( + latch VARCHAR(32) NULL, + origid BIGINT UNSIGNED NULL, + destid BIGINT UNSIGNED NULL, + weight DOUBLE NULL, + seq BIGINT UNSIGNED NULL, + linkid BIGINT UNSIGNED NULL, + KEY (latch, origid, destid) USING HASH, + KEY (latch, destid, origid) USING HASH +) ENGINE=OQGRAPH +data_table='oq_backing' origid='origid' destid='destid' weight='weight'; + +flush tables; +show fields in oq_table; +--disconnect con1 + +--connection default +show tables; + +drop table oq_table, oq_backing; + diff --git a/storage/oqgraph/mysql-test/oqgraph/create_attr.result b/storage/oqgraph/mysql-test/oqgraph/create_attr.result index 57b44c05770..e9499cb7d21 100644 --- a/storage/oqgraph/mysql-test/oqgraph/create_attr.result +++ b/storage/oqgraph/mysql-test/oqgraph/create_attr.result @@ -91,7 +91,7 @@ DROP TABLE IF EXISTS oqtable; CREATE TABLE oqtable ( latch varchar(32) NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='not_id_type'; # Expect 'Column 'backing.not_id_type' is not a not-null integer type' DESCRIBE oqtable; -ERROR HY000: Got error -1 'Column 'backing.not_id_type' (destid) is not a not-null integer type or is a different type to origi' from OQGRAPH +ERROR HY000: Got error -1 'Column 'backing.not_id_type' (destid) is not a not-null integer type or is a different type to origid attribute.' from OQGRAPH DROP TABLE IF EXISTS oqtable; CREATE TABLE oqtable ( latch varchar(32) NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='id'; # Expect 'Invalid OQGRAPH backing store ('/oqtable'.destid attribute set to same column as origid attribute)' diff --git a/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result b/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result index 3af2359506d..47777b0f0a7 100644 --- a/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result +++ b/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result @@ -89,7 +89,7 @@ CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL Warnings: Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead DESCRIBE oqtable; -ERROR HY000: Got error -1 'Column 'backing.not_id_type' (destid) is not a not-null integer type or is a different type to origi' from OQGRAPH +ERROR HY000: Got error -1 'Column 'backing.not_id_type' (destid) is not a not-null integer type or is a different type to origid attribute.' from OQGRAPH DROP TABLE IF EXISTS oqtable; CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='bogus',DESTID='id'; Warnings: @@ -131,7 +131,7 @@ CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL Warnings: Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead DESCRIBE oqtable; -ERROR HY000: Got error -1 'Column 'backing.nullparent' (destid) is not a not-null integer type or is a different type to origid' from OQGRAPH +ERROR HY000: Got error -1 'Column 'backing.nullparent' (destid) is not a not-null integer type or is a different type to origid attribute.' from OQGRAPH DROP TABLE IF EXISTS oqtable; CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='parent',WEIGHT='weight'; Warnings: diff --git a/storage/oqgraph/mysql-test/oqgraph/invalid_operations.result b/storage/oqgraph/mysql-test/oqgraph/invalid_operations.result index 046c468b768..49639c278d0 100644 --- a/storage/oqgraph/mysql-test/oqgraph/invalid_operations.result +++ b/storage/oqgraph/mysql-test/oqgraph/invalid_operations.result @@ -1,5 +1,6 @@ DROP TABLE IF EXISTS graph_base; DROP TABLE IF EXISTS graph; +call mtr.add_suppression("graph_base is open on delete"); CREATE TABLE graph_base ( from_id INT UNSIGNED NOT NULL, to_id INT UNSIGNED NOT NULL, diff --git a/storage/oqgraph/mysql-test/oqgraph/invalid_operations.test b/storage/oqgraph/mysql-test/oqgraph/invalid_operations.test index 8f79b23ed43..cab99ec5018 100644 --- a/storage/oqgraph/mysql-test/oqgraph/invalid_operations.test +++ b/storage/oqgraph/mysql-test/oqgraph/invalid_operations.test @@ -3,6 +3,8 @@ DROP TABLE IF EXISTS graph_base; DROP TABLE IF EXISTS graph; --enable_warnings +call mtr.add_suppression("graph_base is open on delete"); + # Create the backing store CREATE TABLE graph_base ( from_id INT UNSIGNED NOT NULL, diff --git a/storage/oqgraph/mysql-test/oqgraph/isnull.result b/storage/oqgraph/mysql-test/oqgraph/isnull.result index 38ebf12413c..d9af33222dc 100644 --- a/storage/oqgraph/mysql-test/oqgraph/isnull.result +++ b/storage/oqgraph/mysql-test/oqgraph/isnull.result @@ -38,5 +38,5 @@ NULL 1 NULL 1 1 2 select * from graph where latch is null and destid=2; latch origid destid weight seq linkid NULL NULL 2 1 1 1 -DROP TABLE graph_base; DROP TABLE graph; +DROP TABLE graph_base; diff --git a/storage/oqgraph/mysql-test/oqgraph/isnull.test b/storage/oqgraph/mysql-test/oqgraph/isnull.test index 93105887834..dc7622daa0d 100644 --- a/storage/oqgraph/mysql-test/oqgraph/isnull.test +++ b/storage/oqgraph/mysql-test/oqgraph/isnull.test @@ -34,6 +34,5 @@ select * from graph where latch is null; select * from graph where latch is null and origid=1; select * from graph where latch is null and destid=2; -DROP TABLE graph_base; DROP TABLE graph; - +DROP TABLE graph_base; diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_1233113.result b/storage/oqgraph/mysql-test/oqgraph/regression_1233113.result index 415b2181bbb..2b0ea4b2acb 100644 --- a/storage/oqgraph/mysql-test/oqgraph/regression_1233113.result +++ b/storage/oqgraph/mysql-test/oqgraph/regression_1233113.result @@ -1,5 +1,6 @@ DROP TABLE IF EXISTS graph_base; DROP TABLE IF EXISTS graph; +call mtr.add_suppression("graph_base is open on delete"); CREATE TABLE graph_base ( from_id INT UNSIGNED NOT NULL, to_id INT UNSIGNED NOT NULL, diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_1233113.test b/storage/oqgraph/mysql-test/oqgraph/regression_1233113.test index 26e6656eea5..db53b2b39ae 100644 --- a/storage/oqgraph/mysql-test/oqgraph/regression_1233113.test +++ b/storage/oqgraph/mysql-test/oqgraph/regression_1233113.test @@ -3,6 +3,8 @@ DROP TABLE IF EXISTS graph_base; DROP TABLE IF EXISTS graph; --enable_warnings +call mtr.add_suppression("graph_base is open on delete"); + # Create the backing store CREATE TABLE graph_base ( from_id INT UNSIGNED NOT NULL, diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_drop_after.result b/storage/oqgraph/mysql-test/oqgraph/regression_drop_after.result index 84902676ef2..cace2c40564 100644 --- a/storage/oqgraph/mysql-test/oqgraph/regression_drop_after.result +++ b/storage/oqgraph/mysql-test/oqgraph/regression_drop_after.result @@ -1,5 +1,6 @@ DROP TABLE IF EXISTS graph_base; DROP TABLE IF EXISTS graph; +call mtr.add_suppression("graph_base is open on delete"); CREATE TABLE graph_base ( from_id INT UNSIGNED NOT NULL, to_id INT UNSIGNED NOT NULL, diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_drop_after.test b/storage/oqgraph/mysql-test/oqgraph/regression_drop_after.test index b6f4418112c..673eb867032 100644 --- a/storage/oqgraph/mysql-test/oqgraph/regression_drop_after.test +++ b/storage/oqgraph/mysql-test/oqgraph/regression_drop_after.test @@ -3,6 +3,8 @@ DROP TABLE IF EXISTS graph_base; DROP TABLE IF EXISTS graph; --enable_warnings +call mtr.add_suppression("graph_base is open on delete"); + # Create the backing store CREATE TABLE graph_base ( from_id INT UNSIGNED NOT NULL, diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.opt b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.opt new file mode 100644 index 00000000000..a4548161f9b --- /dev/null +++ b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.opt @@ -0,0 +1 @@ +--query_cache_type=ON diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.result b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.result new file mode 100644 index 00000000000..efe520e16a5 --- /dev/null +++ b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.result @@ -0,0 +1,41 @@ +DROP TABLE IF EXISTS graph_base; +DROP TABLE IF EXISTS graph; +CREATE TABLE graph_base ( +from_id INT UNSIGNED NOT NULL, +to_id INT UNSIGNED NOT NULL, +PRIMARY KEY (from_id,to_id), +INDEX (to_id) +) ENGINE=MyISAM; +CREATE TABLE graph ( +latch VARCHAR(32) NULL, +origid BIGINT UNSIGNED NULL, +destid BIGINT UNSIGNED NULL, +weight DOUBLE NULL, +seq BIGINT UNSIGNED NULL, +linkid BIGINT UNSIGNED NULL, +KEY (latch, origid, destid) USING HASH, +KEY (latch, destid, origid) USING HASH +) ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id', DESTID='to_id'; +INSERT INTO graph_base(from_id, to_id) VALUES (1,2), (2,1); +SET @query_cache_size.saved = @@query_cache_size; +SET GLOBAL query_cache_size = 1024*1024; +SELECT * FROM graph; +latch origid destid weight seq linkid +NULL 1 2 1 NULL NULL +NULL 2 1 1 NULL NULL +UPDATE graph_base SET to_id = 20 WHERE from_id = 1; +SELECT * FROM graph; +latch origid destid weight seq linkid +NULL 1 20 1 NULL NULL +NULL 2 1 1 NULL NULL +SELECT SQL_NO_CACHE * FROM graph; +latch origid destid weight seq linkid +NULL 1 20 1 NULL NULL +NULL 2 1 1 NULL NULL +SET GLOBAL query_cache_size = 0; +SELECT SQL_NO_CACHE * FROM graph; +latch origid destid weight seq linkid +NULL 1 20 1 NULL NULL +NULL 2 1 1 NULL NULL +DROP TABLE graph_base, graph; +SET GLOBAL query_cache_size = @query_cache_size.saved; diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.test b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.test new file mode 100644 index 00000000000..9ba30ee2f76 --- /dev/null +++ b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.test @@ -0,0 +1,48 @@ +# Regression test for https://mariadb.atlassian.net/browse/MDEV-5744 +#--reproduce bug where changes to backing table data are not reflected +# in a graph table due to query caching + +--disable_warnings +DROP TABLE IF EXISTS graph_base; +DROP TABLE IF EXISTS graph; +--enable_warnings + +# Create the backing store +CREATE TABLE graph_base ( + from_id INT UNSIGNED NOT NULL, + to_id INT UNSIGNED NOT NULL, + PRIMARY KEY (from_id,to_id), + INDEX (to_id) + ) ENGINE=MyISAM; + + +CREATE TABLE graph ( + latch VARCHAR(32) NULL, + origid BIGINT UNSIGNED NULL, + destid BIGINT UNSIGNED NULL, + weight DOUBLE NULL, + seq BIGINT UNSIGNED NULL, + linkid BIGINT UNSIGNED NULL, + KEY (latch, origid, destid) USING HASH, + KEY (latch, destid, origid) USING HASH + ) ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id', DESTID='to_id'; + + +INSERT INTO graph_base(from_id, to_id) VALUES (1,2), (2,1); + +SET @query_cache_size.saved = @@query_cache_size; +SET GLOBAL query_cache_size = 1024*1024; + +SELECT * FROM graph; +UPDATE graph_base SET to_id = 20 WHERE from_id = 1; + +SELECT * FROM graph; +SELECT SQL_NO_CACHE * FROM graph; + +SET GLOBAL query_cache_size = 0; + +SELECT SQL_NO_CACHE * FROM graph; + +DROP TABLE graph_base, graph; +SET GLOBAL query_cache_size = @query_cache_size.saved; + diff --git a/storage/oqgraph/mysql-test/oqgraph/suite.pm b/storage/oqgraph/mysql-test/oqgraph/suite.pm index 172c71c0e4c..118ecfa7c60 100644 --- a/storage/oqgraph/mysql-test/oqgraph/suite.pm +++ b/storage/oqgraph/mysql-test/oqgraph/suite.pm @@ -5,6 +5,9 @@ package My::Suite::OQGraph; return "No OQGraph" unless $ENV{HA_OQGRAPH_SO} or $::mysqld_variables{'oqgraph'} eq "ON"; +# as long as OQGraph defines MYSQL_SERVER it cannot run in embedded +return "Not run for embedded server" if $::opt_embedded_server; + sub is_default { 1 } bless { }; diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt index 422d29464ae..718baa8296b 100644 --- a/storage/perfschema/CMakeLists.txt +++ b/storage/perfschema/CMakeLists.txt @@ -16,8 +16,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql - ${CMAKE_BINARY_DIR}/pcre - ${CMAKE_SOURCE_DIR}/pcre + ${PCRE_INCLUDES} ${CMAKE_SOURCE_DIR}/extra/yassl/include) ADD_DEFINITIONS(-DMYSQL_SERVER) diff --git a/storage/perfschema/pfs_check.cc b/storage/perfschema/pfs_check.cc index 2ab54ab1a4a..fb438f105ab 100644 --- a/storage/perfschema/pfs_check.cc +++ b/storage/perfschema/pfs_check.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 2013, 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 @@ -55,6 +55,7 @@ void check_performance_schema() PFS_engine_table_share::check_all_tables(thd); + thd->reset_globals(); delete thd; /* Remember that we don't have a THD */ set_current_thd(0); diff --git a/storage/perfschema/pfs_events_waits.cc b/storage/perfschema/pfs_events_waits.cc index c8a9d20a2f1..e823a0605e8 100644 --- a/storage/perfschema/pfs_events_waits.cc +++ b/storage/perfschema/pfs_events_waits.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2013, 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 diff --git a/storage/perfschema/pfs_global.cc b/storage/perfschema/pfs_global.cc index 546597ef33e..0744bbab7d5 100644 --- a/storage/perfschema/pfs_global.cc +++ b/storage/perfschema/pfs_global.cc @@ -29,6 +29,10 @@ #include <unistd.h> #endif +#ifdef HAVE_STRING_H +#include <string.h> +#endif + #ifdef __WIN__ #include <winsock2.h> #else diff --git a/storage/perfschema/table_events_waits.cc b/storage/perfschema/table_events_waits.cc index 8fb7ca91c44..35b90816713 100644 --- a/storage/perfschema/table_events_waits.cc +++ b/storage/perfschema/table_events_waits.cc @@ -315,11 +315,15 @@ int table_events_waits_common::make_socket_object_columns(volatile PFS_events_wa uint port; char port_str[128]; char ip_str[INET6_ADDRSTRLEN+1]; - uint ip_len= 0; + /* + "ip_length" was "ip_len" originally. + but it conflicted with some macro on AIX. Renamed. + */ + uint ip_length= 0; port_str[0]= ':'; /* Get the IP address and port number */ - ip_len= pfs_get_socket_address(ip_str, sizeof(ip_str), &port, + ip_length= pfs_get_socket_address(ip_str, sizeof(ip_str), &port, &safe_socket->m_sock_addr, safe_socket->m_addr_len); @@ -327,15 +331,15 @@ int table_events_waits_common::make_socket_object_columns(volatile PFS_events_wa int port_len= int10_to_str(port, (port_str+1), 10) - port_str + 1; /* OBJECT NAME */ - m_row.m_object_name_length= ip_len + port_len; + m_row.m_object_name_length= ip_length + port_len; if (unlikely((m_row.m_object_name_length == 0) || (m_row.m_object_name_length > sizeof(m_row.m_object_name)))) return 1; char *name= m_row.m_object_name; - memcpy(name, ip_str, ip_len); - memcpy(name + ip_len, port_str, port_len); + memcpy(name, ip_str, ip_length); + memcpy(name + ip_length, port_str, port_len); } else { diff --git a/storage/perfschema/unittest/CMakeLists.txt b/storage/perfschema/unittest/CMakeLists.txt index d42d448d1e9..b44d0173029 100644 --- a/storage/perfschema/unittest/CMakeLists.txt +++ b/storage/perfschema/unittest/CMakeLists.txt @@ -15,8 +15,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/include/mysql - ${CMAKE_BINARY_DIR}/pcre - ${CMAKE_SOURCE_DIR}/pcre + ${PCRE_INCLUDES} ${CMAKE_SOURCE_DIR}/sql ${SSL_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/unittest/mytap diff --git a/storage/sequence/mysql-test/sequence/simple.result b/storage/sequence/mysql-test/sequence/simple.result index 2802cdeb977..8ce4722aeff 100644 --- a/storage/sequence/mysql-test/sequence/simple.result +++ b/storage/sequence/mysql-test/sequence/simple.result @@ -40,6 +40,10 @@ show create table se; ERROR 42S02: Table 'test.se' doesn't exist show create table seq_1_to_15_step_0; ERROR HY000: Got error 140 "Wrong create options" from storage engine SEQUENCE +show create table `seq_-1_to_15`; +ERROR 42S02: Table 'test.seq_-1_to_15' doesn't exist +show create table `seq_1_to_+2`; +ERROR 42S02: Table 'test.seq_1_to_+2' doesn't exist select * from seq_1_to_15_step_2; seq 1 diff --git a/storage/sequence/mysql-test/sequence/simple.test b/storage/sequence/mysql-test/sequence/simple.test index fd5b6c6d50c..fbf2b0ebc66 100644 --- a/storage/sequence/mysql-test/sequence/simple.test +++ b/storage/sequence/mysql-test/sequence/simple.test @@ -26,6 +26,14 @@ show create table se; --error ER_GET_ERRNO show create table seq_1_to_15_step_0; +# +# MDEV-5735 Selecting from SEQUENCE table with negative number hangs server +# +--error ER_NO_SUCH_TABLE +show create table `seq_-1_to_15`; +--error ER_NO_SUCH_TABLE +show create table `seq_1_to_+2`; + # simple select select * from seq_1_to_15_step_2; select * from seq_1_to_15; diff --git a/storage/sequence/mysql-test/sequence/suite.pm b/storage/sequence/mysql-test/sequence/suite.pm index 42333bb2870..3964415db73 100644 --- a/storage/sequence/mysql-test/sequence/suite.pm +++ b/storage/sequence/mysql-test/sequence/suite.pm @@ -1,5 +1,4 @@ package My::Suite::Sequence; - @ISA = qw(My::Suite); sub is_default { 1 } diff --git a/storage/sequence/sequence.cc b/storage/sequence/sequence.cc index ab22037d884..0d92c324724 100644 --- a/storage/sequence/sequence.cc +++ b/storage/sequence/sequence.cc @@ -20,6 +20,7 @@ a engine that auto-creates tables with rows filled with sequential values */ +#include <ctype.h> #include <mysql_version.h> #include <handler.h> #include <table.h> @@ -265,14 +266,19 @@ static handler *create_handler(handlerton *hton, TABLE_SHARE *table, static bool parse_table_name(const char *name, size_t name_length, ulonglong *from, ulonglong *to, ulonglong *step) { - uint n1= 0, n2= 0; + uint n0=0, n1= 0, n2= 0; *step= 1; // the table is discovered if its name matches the pattern of seq_1_to_10 or // seq_1_to_10_step_3 - sscanf(name, "seq_%llu_to_%llu%n_step_%llu%n", - from, to, &n1, step, &n2); - return n1 != name_length && n2 != name_length; + sscanf(name, "seq_%llu_to_%n%llu%n_step_%llu%n", + from, &n0, to, &n1, step, &n2); + // I consider this a bug in sscanf() - when an unsigned number + // is requested, -5 should *not* be accepted. But is is :( + // hence the additional check below: + return + n0 == 0 || !isdigit(name[4]) || !isdigit(name[n0]) || // reject negative numbers + (n1 != name_length && n2 != name_length); } diff --git a/storage/sphinx/CMakeLists.txt b/storage/sphinx/CMakeLists.txt index 2e10da7903a..e4b50827fe7 100644 --- a/storage/sphinx/CMakeLists.txt +++ b/storage/sphinx/CMakeLists.txt @@ -1,15 +1,15 @@ +INCLUDE(CheckCCompilerFlag) + ADD_DEFINITIONS(-DMYSQL_SERVER) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") + +CHECK_C_COMPILER_FLAG("-Wno-write-strings" WNO_WRITE_STRING) +IF(WNO_WRITE_STRING) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-write-strings") +ENDIF() + IF(MSVC) LINK_LIBRARIES(ws2_32) ENDIF(MSVC) -MYSQL_ADD_PLUGIN(sphinx ha_sphinx.cc STORAGE_ENGINE) - -IF(NOT WITHOUT_SPHINX_STORAGE_ENGINE) - ADD_LIBRARY(snippets_udf MODULE snippets_udf.cc) - TARGET_LINK_LIBRARIES(snippets_udf mysys) # my_error - ADD_DEPENDENCIES(snippets_udf GenError) # uses generated error constants - SET_TARGET_PROPERTIES(snippets_udf PROPERTIES OUTPUT_NAME sphinx PREFIX "") - INSTALL(TARGETS snippets_udf COMPONENT Server DESTINATION ${INSTALL_PLUGINDIR}) -ENDIF() +SET(SPHINX_SOURCES ha_sphinx.cc snippets_udf.cc) +MYSQL_ADD_PLUGIN(sphinx ${SPHINX_SOURCES} STORAGE_ENGINE) diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc index 866bd9e4d31..080496ce826 100644 --- a/storage/sphinx/ha_sphinx.cc +++ b/storage/sphinx/ha_sphinx.cc @@ -1,10 +1,10 @@ // -// $Id: ha_sphinx.cc 3133 2012-03-01 13:47:52Z shodan $ +// $Id: ha_sphinx.cc 4507 2014-01-22 15:24:34Z deogar $ // // -// Copyright (c) 2001-2012, Andrew Aksyonoff -// Copyright (c) 2008-2012, Sphinx Technologies Inc +// Copyright (c) 2001-2014, Andrew Aksyonoff +// Copyright (c) 2008-2014, Sphinx Technologies Inc // All rights reserved // // This program is free software; you can redistribute it and/or modify @@ -153,7 +153,7 @@ void sphUnalignedWrite ( void * pPtr, const T & tVal ) #define SPHINXSE_MAX_ALLOC (16*1024*1024) #define SPHINXSE_MAX_KEYWORDSTATS 4096 -#define SPHINXSE_VERSION "2.0.4-release" +#define SPHINXSE_VERSION "2.1.5-release" // FIXME? the following is cut-n-paste from sphinx.h and searchd.cpp // cut-n-paste is somewhat simpler that adding dependencies however.. @@ -302,7 +302,11 @@ struct CSphSEShare bool m_bSphinxQL; ///< is this read-only SphinxAPI table, or write-only SphinxQL table? uint m_iTableNameLen; uint m_iUseCount; +#if MYSQL_VERSION_ID<50610 CHARSET_INFO * m_pTableQueryCharset; +#else + const CHARSET_INFO * m_pTableQueryCharset; +#endif int m_iTableFields; char ** m_sTableField; @@ -431,7 +435,11 @@ struct CSphSEThreadData bool m_bQuery; char m_sQuery[MAX_QUERY_LEN]; +#if MYSQL_VERSION_ID<50610 CHARSET_INFO * m_pQueryCharset; +#else + const CHARSET_INFO * m_pQueryCharset; +#endif bool m_bReplace; ///< are we doing an INSERT or REPLACE @@ -521,7 +529,7 @@ private: int m_iWeights; ESphMatchMode m_eMode; ESphRankMode m_eRanker; - const char * m_sRankExpr; + char * m_sRankExpr; ESphSortOrder m_eSort; const char * m_sSortBy; int m_iMaxMatches; @@ -552,8 +560,8 @@ private: float m_fGeoLatitude; float m_fGeoLongitude; - const char * m_sComment; - const char * m_sSelect; + char * m_sComment; + char * m_sSelect; struct Override_t { @@ -626,7 +634,7 @@ bool sphinx_show_status ( THD * thd ); ////////////////////////////////////////////////////////////////////////////// static const char sphinx_hton_name[] = "SPHINX"; -static const char sphinx_hton_comment[] = "Sphinx storage engine"; +static const char sphinx_hton_comment[] = "Sphinx storage engine " SPHINXSE_VERSION; #if MYSQL_VERSION_ID<50100 handlerton sphinx_hton = @@ -740,13 +748,12 @@ static int sphinx_done_func ( void * ) { SPH_ENTER_FUNC(); + int error __attribute__ ((unused)) = 0; if ( sphinx_init ) { sphinx_init = 0; -#ifdef NOT_USED if ( sphinx_open_tables.records ) error = 1; -#endif sphinx_hash_free ( &sphinx_open_tables ); pthread_mutex_destroy ( &sphinx_mutex ); } @@ -1002,8 +1009,8 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate ) bool bOk = true; bool bQL = false; char * sScheme = NULL; - char * sHost = (char*) SPHINXAPI_DEFAULT_HOST; - char * sIndex = (char*) SPHINXAPI_DEFAULT_INDEX; + char * sHost = SPHINXAPI_DEFAULT_HOST; + char * sIndex = SPHINXAPI_DEFAULT_INDEX; int iPort = SPHINXAPI_DEFAULT_PORT; // parse connection string, if any @@ -1029,12 +1036,12 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate ) sHost--; // reuse last slash iPort = 0; if (!( sIndex = strrchr ( sHost, ':' ) )) - sIndex = (char*) SPHINXAPI_DEFAULT_INDEX; + sIndex = SPHINXAPI_DEFAULT_INDEX; else { *sIndex++ = '\0'; if ( !*sIndex ) - sIndex = (char*) SPHINXAPI_DEFAULT_INDEX; + sIndex = SPHINXAPI_DEFAULT_INDEX; } bOk = true; break; @@ -1056,7 +1063,7 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate ) if ( sIndex ) *sIndex++ = '\0'; else - sIndex = (char*) SPHINXAPI_DEFAULT_INDEX; + sIndex = SPHINXAPI_DEFAULT_INDEX; iPort = atoi(sPort); if ( !iPort ) @@ -1068,7 +1075,7 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate ) if ( sIndex ) *sIndex++ = '\0'; else - sIndex = (char*) SPHINXAPI_DEFAULT_INDEX; + sIndex = SPHINXAPI_DEFAULT_INDEX; } bOk = true; break; @@ -1371,6 +1378,11 @@ static bool myisattr ( char c ) c=='_'; } +static bool myismagic ( char c ) +{ + return c=='@'; +} + bool CSphSEQuery::ParseField ( char * sField ) { @@ -1553,8 +1565,8 @@ bool CSphSEQuery::ParseField ( char * sField ) if ( tFilter.m_eType==SPH_FILTER_RANGE ) { - tFilter.m_uMinValue = strtoll ( sValue, NULL, 0 ); - tFilter.m_uMaxValue = strtoll ( p, NULL, 0 ); + tFilter.m_uMinValue = strtoll ( sValue, NULL, 10 ); + tFilter.m_uMaxValue = strtoll ( p, NULL, 10 ); } else { tFilter.m_fMinValue = (float)atof(sValue); @@ -1576,13 +1588,13 @@ bool CSphSEQuery::ParseField ( char * sField ) tFilter.m_bExclude = ( strcmp ( sName, "!filter" )==0 ); // get the attr name - while ( (*sValue) && !myisattr(*sValue) ) + while ( (*sValue) && !( myisattr(*sValue) || myismagic(*sValue) ) ) sValue++; if ( !*sValue ) break; tFilter.m_sAttrName = sValue; - while ( (*sValue) && myisattr(*sValue) ) + while ( (*sValue) && ( myisattr(*sValue) || myismagic(*sValue) ) ) sValue++; if ( !*sValue ) break; @@ -2333,11 +2345,10 @@ int ha_sphinx::write_row ( byte * ) SPH_RET ( ER_OUT_OF_RESOURCES ); unsigned int uTimeout = 1; + mysql_options ( pConn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&uTimeout ); + my_bool my_true= 1; - mysql_options(pConn, MYSQL_OPT_CONNECT_TIMEOUT, - (const char*) &uTimeout); - mysql_options(pConn, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY, - (char*) &my_true); + mysql_options(pConn, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY, (char*) &my_true); if ( !mysql_real_connect ( pConn, m_pShare->m_sHost, "root", "", "", m_pShare->m_iPort, m_pShare->m_sSocket, 0 ) ) SPH_RET ( HandleMysqlError ( pConn, ER_CONNECT_TO_FOREIGN_DATA_SOURCE ) ); @@ -2396,11 +2407,10 @@ int ha_sphinx::delete_row ( const byte * ) SPH_RET ( ER_OUT_OF_RESOURCES ); unsigned int uTimeout = 1; + mysql_options ( pConn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&uTimeout ); + my_bool my_true= 1; - mysql_options(pConn, MYSQL_OPT_CONNECT_TIMEOUT, - (const char*) &uTimeout); - mysql_options(pConn, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY, - (char*) &my_true); + mysql_options(pConn, MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY, (char*) &my_true); if ( !mysql_real_connect ( pConn, m_pShare->m_sHost, "root", "", "", m_pShare->m_iPort, m_pShare->m_sSocket, 0 ) ) SPH_RET ( HandleMysqlError ( pConn, ER_CONNECT_TO_FOREIGN_DATA_SOURCE ) ); @@ -2676,12 +2686,16 @@ bool ha_sphinx::UnpackStats ( CSphSEStats * pStats ) /// condition pushdown implementation, to properly intercept WHERE clauses on my columns +#if MYSQL_VERSION_ID<50610 const COND * ha_sphinx::cond_push ( const COND * cond ) +#else +const Item * ha_sphinx::cond_push ( const Item *cond ) +#endif { // catch the simplest case: query_column="some text" for ( ;; ) { - if ( cond->type()!=COND::FUNC_ITEM ) + if ( cond->type()!=Item::FUNC_ITEM ) break; Item_func * condf = (Item_func *)cond; @@ -2697,7 +2711,7 @@ const COND * ha_sphinx::cond_push ( const COND * cond ) if ( !m_pShare->m_bSphinxQL ) { // on non-QL tables, intercept query=value condition for SELECT - if (!( args[0]->type()==COND::FIELD_ITEM && args[1]->type()==COND::STRING_ITEM )) + if (!( args[0]->type()==Item::FIELD_ITEM && args[1]->type()==Item::STRING_ITEM )) break; Item_field * pField = (Item_field *) args[0]; @@ -2713,7 +2727,7 @@ const COND * ha_sphinx::cond_push ( const COND * cond ) } else { - if (!( args[0]->type()==COND::FIELD_ITEM && args[1]->type()==COND::INT_ITEM )) + if (!( args[0]->type()==Item::FIELD_ITEM && args[1]->type()==Item::INT_ITEM )) break; // on QL tables, intercept id=value condition for DELETE @@ -3302,6 +3316,9 @@ ha_rows ha_sphinx::records_in_range ( uint, key_range *, key_range * ) SPH_RET(3); // low number to force index usage } +#if MYSQL_VERSION_ID < 50610 +#define user_defined_key_parts key_parts +#endif // create() is called to create a database. The variable name will have the name // of the table. When create() is called you do not need to worry about opening @@ -3370,7 +3387,7 @@ int ha_sphinx::create ( const char * name, TABLE * table, HA_CREATE_INFO * ) // check index if ( table->s->keys!=1 || - table->key_info[0].user_defined_key_parts != 1 || + table->key_info[0].user_defined_key_parts!=1 || strcasecmp ( table->key_info[0].key_part[0].field->field_name, table->field[2]->field_name ) ) { my_snprintf ( sError, sizeof(sError), "%s: there must be an index on '%s' column", @@ -3571,11 +3588,13 @@ int sphinx_showfunc_words ( THD * thd, SHOW_VAR * out, char * sBuffer ) int sphinx_showfunc_error ( THD * thd, SHOW_VAR * out, char * ) { CSphSEStats * pStats = sphinx_get_stats ( thd, out ); + out->type = SHOW_CHAR; if ( pStats && pStats->m_bLastError ) { - out->type = SHOW_CHAR; out->value = pStats->m_sLastMessage; } + else + out->value = (char*)""; return 0; } @@ -3618,5 +3637,5 @@ maria_declare_plugin_end; #endif // >50100 // -// $Id: ha_sphinx.cc 3133 2012-03-01 13:47:52Z shodan $ +// $Id: ha_sphinx.cc 4507 2014-01-22 15:24:34Z deogar $ // diff --git a/storage/sphinx/ha_sphinx.h b/storage/sphinx/ha_sphinx.h index f650e1641da..86fadad5660 100644 --- a/storage/sphinx/ha_sphinx.h +++ b/storage/sphinx/ha_sphinx.h @@ -1,5 +1,5 @@ // -// $Id: ha_sphinx.h 2921 2011-08-21 21:35:02Z tomat $ +// $Id: ha_sphinx.h 3866 2013-05-22 11:54:20Z kevg $ // #ifdef USE_PRAGMA_INTERFACE @@ -128,7 +128,11 @@ public: THR_LOCK_DATA ** store_lock ( THD * thd, THR_LOCK_DATA ** to, enum thr_lock_type lock_type ); public: +#if MYSQL_VERSION_ID<50610 virtual const COND * cond_push ( const COND *cond ); +#else + virtual const Item * cond_push ( const Item *cond ); +#endif virtual void cond_pop (); private: @@ -167,5 +171,5 @@ int sphinx_showfunc_word_count ( THD *, SHOW_VAR *, char * ); int sphinx_showfunc_words ( THD *, SHOW_VAR *, char * ); // -// $Id: ha_sphinx.h 2921 2011-08-21 21:35:02Z tomat $ +// $Id: ha_sphinx.h 3866 2013-05-22 11:54:20Z kevg $ // diff --git a/storage/sphinx/make-patch.sh b/storage/sphinx/make-patch.sh index 6fca5838ded..6fca5838ded 100644..100755 --- a/storage/sphinx/make-patch.sh +++ b/storage/sphinx/make-patch.sh diff --git a/storage/sphinx/mysql-test/sphinx/suite.pm b/storage/sphinx/mysql-test/sphinx/suite.pm index e652b38338f..e4c3c1b9f74 100644 --- a/storage/sphinx/mysql-test/sphinx/suite.pm +++ b/storage/sphinx/mysql-test/sphinx/suite.pm @@ -60,6 +60,7 @@ sub searchd_start { my ($sphinx, $test) = @_; # My::Config::Group, My::Test return unless $exe_sphinx_indexer and $exe_sphinx_searchd; + return if $sphinx->{proc}; # Already started # First we must run the indexer to create the data. my $sphinx_data_dir= "$::opt_vardir/" . $sphinx->name(); diff --git a/storage/sphinx/mysql-test/sphinx/union-5539.result b/storage/sphinx/mysql-test/sphinx/union-5539.result new file mode 100644 index 00000000000..414bcce30e9 --- /dev/null +++ b/storage/sphinx/mysql-test/sphinx/union-5539.result @@ -0,0 +1,10 @@ +create table ts (id bigint unsigned not null, w int not null, query varchar(255) not null, index(query)) engine=sphinx connection="sphinx://127.0.0.1:PORT/*"; +SELECT a.* FROM (SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500') AS a UNION SELECT b.* FROM (SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500') AS b; +id w query +SELECT a.* FROM (SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500') AS a UNION SELECT b.* FROM (SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500') AS b; +id w query +1 1 ;mode=extended2;limit=1000000;maxmatches=500 +2 1 ;mode=extended2;limit=1000000;maxmatches=500 +3 1 ;mode=extended2;limit=1000000;maxmatches=500 +4 1 ;mode=extended2;limit=1000000;maxmatches=500 +drop table ts; diff --git a/storage/sphinx/mysql-test/sphinx/union-5539.test b/storage/sphinx/mysql-test/sphinx/union-5539.test new file mode 100644 index 00000000000..ec73be1ab3e --- /dev/null +++ b/storage/sphinx/mysql-test/sphinx/union-5539.test @@ -0,0 +1,16 @@ +# +# MDEV-5539 Empty results in UNION with Sphinx engine +# +--replace_result $SPHINXSEARCH_PORT PORT +eval create table ts (id bigint unsigned not null, w int not null, query varchar(255) not null, index(query)) engine=sphinx connection="sphinx://127.0.0.1:$SPHINXSEARCH_PORT/*"; +let $q1=SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500'; +let $q2=SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500'; +######################## +# BUG BUG BUG !!! +# Note, the result below is incorrect! It should be updated when +# MDEV-5539 is fixed upstream!!! +######################## +eval SELECT a.* FROM ($q1) AS a UNION SELECT b.* FROM ($q2) AS b; +eval SELECT a.* FROM ($q2) AS a UNION SELECT b.* FROM ($q1) AS b; +drop table ts; + diff --git a/storage/sphinx/snippets_udf.cc b/storage/sphinx/snippets_udf.cc index 75bac6423fc..bfb9beae7b5 100644 --- a/storage/sphinx/snippets_udf.cc +++ b/storage/sphinx/snippets_udf.cc @@ -1,10 +1,10 @@ // -// $Id: snippets_udf.cc 3508 2012-11-05 11:48:48Z kevg $ +// $Id: snippets_udf.cc 4505 2014-01-22 15:16:21Z deogar $ // // -// Copyright (c) 2001-2012, Andrew Aksyonoff -// Copyright (c) 2008-2012, Sphinx Technologies Inc +// Copyright (c) 2001-2014, Andrew Aksyonoff +// Copyright (c) 2008-2014, Sphinx Technologies Inc // All rights reserved // // This program is free software; you can redistribute it and/or modify @@ -180,7 +180,7 @@ enum #define SPHINXSE_DEFAULT_SCHEME "sphinx" #define SPHINXSE_DEFAULT_HOST "127.0.0.1" #define SPHINXSE_DEFAULT_PORT 9312 -#define SPHINXSE_DEFAULT_INDEX (char*) "*" +#define SPHINXSE_DEFAULT_INDEX "*" class CSphBuffer { @@ -244,9 +244,9 @@ struct CSphUrl char * m_sBuffer; char * m_sFormatted; - const char * m_sScheme; + char * m_sScheme; char * m_sHost; - char * m_sIndex; + char * m_sIndex; int m_iPort; @@ -254,7 +254,7 @@ struct CSphUrl : m_sBuffer ( NULL ) , m_sFormatted ( NULL ) , m_sScheme ( SPHINXSE_DEFAULT_SCHEME ) - , m_sHost ( (char*) SPHINXSE_DEFAULT_HOST ) + , m_sHost ( SPHINXSE_DEFAULT_HOST ) , m_sIndex ( SPHINXSE_DEFAULT_INDEX ) , m_iPort ( SPHINXSE_DEFAULT_PORT ) {} @@ -311,12 +311,12 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen ) // unix-domain socket m_iPort = 0; if (!( m_sIndex = strrchr ( m_sHost, ':' ) )) - m_sIndex = const_cast<char *>(SPHINXSE_DEFAULT_INDEX); + m_sIndex = SPHINXSE_DEFAULT_INDEX; else { *m_sIndex++ = '\0'; if ( !*m_sIndex ) - m_sIndex = const_cast<char *>(SPHINXSE_DEFAULT_INDEX); + m_sIndex = SPHINXSE_DEFAULT_INDEX; } bOk = true; break; @@ -336,7 +336,7 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen ) if ( m_sIndex ) *m_sIndex++ = '\0'; else - m_sIndex = const_cast<char *>(SPHINXSE_DEFAULT_INDEX); + m_sIndex = SPHINXSE_DEFAULT_INDEX; m_iPort = atoi(sPort); if ( !m_iPort ) @@ -348,7 +348,7 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen ) if ( m_sIndex ) *m_sIndex++ = '\0'; else - m_sIndex = const_cast<char *>(SPHINXSE_DEFAULT_INDEX); + m_sIndex = SPHINXSE_DEFAULT_INDEX; } bOk = true; @@ -446,7 +446,7 @@ int CSphUrl::Connect() uint uServerVersion; uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO ); int iSocket = -1; - const char * pError = NULL; + char * pError = NULL; do { iSocket = socket ( iDomain, SOCK_STREAM, 0 ); @@ -567,6 +567,7 @@ CSphResponse::Read ( int iSocket, int iClientVersion ) #else #define DLLEXPORT #endif + extern "C" { DLLEXPORT my_bool sphinx_snippets_init ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sMessage ); @@ -640,7 +641,7 @@ struct CSphSnippets } #define STRING CHECK_TYPE(STRING_RESULT) -#define INT CHECK_TYPE(INT_RESULT); int iValue =(int) *(long long *)pArgs->args[i] +#define INT CHECK_TYPE(INT_RESULT); int iValue = *(long long *)pArgs->args[i] my_bool sphinx_snippets_init ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sMessage ) { @@ -820,5 +821,5 @@ void sphinx_snippets_deinit ( UDF_INIT * pUDF ) } // -// $Id: snippets_udf.cc 3508 2012-11-05 11:48:48Z kevg $ +// $Id: snippets_udf.cc 4505 2014-01-22 15:16:21Z deogar $ // diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index 134ae372c8a..9b871f59a38 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -4393,12 +4393,12 @@ int ha_spider::read_multi_range_first_internal( #ifdef HA_MRR_USE_DEFAULT_IMPL (error_num = spider_db_append_key_where( &mrr_cur_range.start_key, - test(mrr_cur_range.range_flag & EQ_RANGE) ? + MY_TEST(mrr_cur_range.range_flag & EQ_RANGE) ? NULL : &mrr_cur_range.end_key, this)) #else (error_num = spider_db_append_key_where( &multi_range_curr->start_key, - test(multi_range_curr->range_flag & EQ_RANGE) ? + MY_TEST(multi_range_curr->range_flag & EQ_RANGE) ? NULL : &multi_range_curr->end_key, this)) #endif ) @@ -4834,9 +4834,9 @@ int ha_spider::read_multi_range_first_internal( !(sql_kinds & SPIDER_SQL_KIND_HS) && #endif #ifdef HA_MRR_USE_DEFAULT_IMPL - test(mrr_cur_range.range_flag & EQ_RANGE) + MY_TEST(mrr_cur_range.range_flag & EQ_RANGE) #else - test(multi_range_curr->range_flag & EQ_RANGE) + MY_TEST(multi_range_curr->range_flag & EQ_RANGE) #endif ) { if ( @@ -4951,11 +4951,11 @@ int ha_spider::read_multi_range_first_internal( { if ( #ifdef HA_MRR_USE_DEFAULT_IMPL - !test(mrr_cur_range.range_flag & EQ_RANGE) || + !MY_TEST(mrr_cur_range.range_flag & EQ_RANGE) || result_list.tmp_table_join_key_part_map != mrr_cur_range.start_key.keypart_map #else - !test(multi_range_curr->range_flag & EQ_RANGE) || + !MY_TEST(multi_range_curr->range_flag & EQ_RANGE) || result_list.tmp_table_join_key_part_map != multi_range_curr->start_key.keypart_map #endif @@ -5119,12 +5119,12 @@ int ha_spider::read_multi_range_first_internal( #ifdef HA_MRR_USE_DEFAULT_IMPL (error_num = spider_db_append_key_where( &mrr_cur_range.start_key, - test(mrr_cur_range.range_flag & EQ_RANGE) ? + MY_TEST(mrr_cur_range.range_flag & EQ_RANGE) ? NULL : &mrr_cur_range.end_key, this)) #else (error_num = spider_db_append_key_where( &multi_range_curr->start_key, - test(multi_range_curr->range_flag & EQ_RANGE) ? + MY_TEST(multi_range_curr->range_flag & EQ_RANGE) ? NULL : &multi_range_curr->end_key, this)) #endif ) @@ -5739,12 +5739,12 @@ int ha_spider::read_multi_range_next( #ifdef HA_MRR_USE_DEFAULT_IMPL (error_num = spider_db_append_key_where( &mrr_cur_range.start_key, - test(mrr_cur_range.range_flag & EQ_RANGE) ? + MY_TEST(mrr_cur_range.range_flag & EQ_RANGE) ? NULL : &mrr_cur_range.end_key, this)) #else (error_num = spider_db_append_key_where( &multi_range_curr->start_key, - test(multi_range_curr->range_flag & EQ_RANGE) ? + MY_TEST(multi_range_curr->range_flag & EQ_RANGE) ? NULL : &multi_range_curr->end_key, this)) #endif ) @@ -6193,9 +6193,9 @@ int ha_spider::read_multi_range_next( !(sql_kinds & SPIDER_SQL_KIND_HS) && #endif #ifdef HA_MRR_USE_DEFAULT_IMPL - test(mrr_cur_range.range_flag & EQ_RANGE) + MY_TEST(mrr_cur_range.range_flag & EQ_RANGE) #else - test(multi_range_curr->range_flag & EQ_RANGE) + MY_TEST(multi_range_curr->range_flag & EQ_RANGE) #endif ) { if ( @@ -6311,11 +6311,11 @@ int ha_spider::read_multi_range_next( { if ( #ifdef HA_MRR_USE_DEFAULT_IMPL - !test(mrr_cur_range.range_flag & EQ_RANGE) || + !MY_TEST(mrr_cur_range.range_flag & EQ_RANGE) || result_list.tmp_table_join_key_part_map != mrr_cur_range.start_key.keypart_map #else - !test(multi_range_curr->range_flag & EQ_RANGE) || + !MY_TEST(multi_range_curr->range_flag & EQ_RANGE) || result_list.tmp_table_join_key_part_map != multi_range_curr->start_key.keypart_map #endif @@ -6478,12 +6478,12 @@ int ha_spider::read_multi_range_next( #ifdef HA_MRR_USE_DEFAULT_IMPL (error_num = spider_db_append_key_where( &mrr_cur_range.start_key, - test(mrr_cur_range.range_flag & EQ_RANGE) ? + MY_TEST(mrr_cur_range.range_flag & EQ_RANGE) ? NULL : &mrr_cur_range.end_key, this)) #else (error_num = spider_db_append_key_where( &multi_range_curr->start_key, - test(multi_range_curr->range_flag & EQ_RANGE) ? + MY_TEST(multi_range_curr->range_flag & EQ_RANGE) ? NULL : &multi_range_curr->end_key, this)) #endif ) diff --git a/storage/spider/hs_client/socket.cpp b/storage/spider/hs_client/socket.cpp index 6515987124c..769bd0b497c 100644 --- a/storage/spider/hs_client/socket.cpp +++ b/storage/spider/hs_client/socket.cpp @@ -8,6 +8,7 @@ */ #ifndef __WIN__ +#include <sys/types.h> #include <sys/un.h> #endif diff --git a/storage/spider/mysql-test/spider/bg/my.cnf b/storage/spider/mysql-test/spider/bg/my.cnf index 7f9d7c44c05..246099c623e 100644 --- a/storage/spider/mysql-test/spider/bg/my.cnf +++ b/storage/spider/mysql-test/spider/bg/my.cnf @@ -146,31 +146,31 @@ CHILD3_3_CHARSET= DEFAULT CHARSET=utf8 STR_SEMICOLON= ; -#The followings are setted in include/init_xxx.inc files -#MASTER_1_COMMENT_2_1 -#MASTER_1_COMMENT2_2_1 -#MASTER_1_COMMENT3_2_1 -#MASTER_1_COMMENT4_2_1 -#MASTER_1_COMMENT5_2_1 -#MASTER_1_COMMENT_P_2_1 -#CHILD2_1_DROP_TABLES -#CHILD2_1_CREATE_TABLES -#CHILD2_1_SELECT_TABLES -#CHILD2_1_DROP_TABLES2 -#CHILD2_1_CREATE_TABLES2 -#CHILD2_1_SELECT_TABLES2 -#CHILD2_1_DROP_TABLES3 -#CHILD2_1_CREATE_TABLES3 -#CHILD2_1_SELECT_TABLES3 -#CHILD2_1_DROP_TABLES4 -#CHILD2_1_CREATE_TABLES4 -#CHILD2_1_SELECT_TABLES4 -#CHILD2_1_DROP_TABLES5 -#CHILD2_1_CREATE_TABLES5 -#CHILD2_1_SELECT_TABLES5 -#CHILD2_1_DROP_TABLES6 -#CHILD2_1_CREATE_TABLES6 -#CHILD2_1_SELECT_TABLES6 -#CHILD2_2_DROP_TABLES -#CHILD2_2_CREATE_TABLES -#CHILD2_2_SELECT_TABLES +#The followings are set in include/init_xxx.inc files +# MASTER_1_COMMENT_2_1 +# MASTER_1_COMMENT2_2_1 +# MASTER_1_COMMENT3_2_1 +# MASTER_1_COMMENT4_2_1 +# MASTER_1_COMMENT5_2_1 +# MASTER_1_COMMENT_P_2_1 +# CHILD2_1_DROP_TABLES +# CHILD2_1_CREATE_TABLES +# CHILD2_1_SELECT_TABLES +# CHILD2_1_DROP_TABLES2 +# CHILD2_1_CREATE_TABLES2 +# CHILD2_1_SELECT_TABLES2 +# CHILD2_1_DROP_TABLES3 +# CHILD2_1_CREATE_TABLES3 +# CHILD2_1_SELECT_TABLES3 +# CHILD2_1_DROP_TABLES4 +# CHILD2_1_CREATE_TABLES4 +# CHILD2_1_SELECT_TABLES4 +# CHILD2_1_DROP_TABLES5 +# CHILD2_1_CREATE_TABLES5 +# CHILD2_1_SELECT_TABLES5 +# CHILD2_1_DROP_TABLES6 +# CHILD2_1_CREATE_TABLES6 +# CHILD2_1_SELECT_TABLES6 +# CHILD2_2_DROP_TABLES +# CHILD2_2_CREATE_TABLES +# CHILD2_2_SELECT_TABLES diff --git a/storage/spider/mysql-test/spider/bg/suite.opt b/storage/spider/mysql-test/spider/bg/suite.opt index 48457b17309..077a81334be 100644 --- a/storage/spider/mysql-test/spider/bg/suite.opt +++ b/storage/spider/mysql-test/spider/bg/suite.opt @@ -1 +1 @@ ---loose-innodb +--loose-innodb --skip-performance-schema diff --git a/storage/spider/mysql-test/spider/handler/my.cnf b/storage/spider/mysql-test/spider/handler/my.cnf index 6b79d0a8f87..89b91e6a5bd 100644 --- a/storage/spider/mysql-test/spider/handler/my.cnf +++ b/storage/spider/mysql-test/spider/handler/my.cnf @@ -146,31 +146,31 @@ CHILD3_3_CHARSET= DEFAULT CHARSET=utf8 STR_SEMICOLON= ; -#The followings are setted in include/init_xxx.inc files -#MASTER_1_COMMENT_2_1 -#MASTER_1_COMMENT2_2_1 -#MASTER_1_COMMENT3_2_1 -#MASTER_1_COMMENT4_2_1 -#MASTER_1_COMMENT5_2_1 -#MASTER_1_COMMENT_P_2_1 -#CHILD2_1_DROP_TABLES -#CHILD2_1_CREATE_TABLES -#CHILD2_1_SELECT_TABLES -#CHILD2_1_DROP_TABLES2 -#CHILD2_1_CREATE_TABLES2 -#CHILD2_1_SELECT_TABLES2 -#CHILD2_1_DROP_TABLES3 -#CHILD2_1_CREATE_TABLES3 -#CHILD2_1_SELECT_TABLES3 -#CHILD2_1_DROP_TABLES4 -#CHILD2_1_CREATE_TABLES4 -#CHILD2_1_SELECT_TABLES4 -#CHILD2_1_DROP_TABLES5 -#CHILD2_1_CREATE_TABLES5 -#CHILD2_1_SELECT_TABLES5 -#CHILD2_1_DROP_TABLES6 -#CHILD2_1_CREATE_TABLES6 -#CHILD2_1_SELECT_TABLES6 -#CHILD2_2_DROP_TABLES -#CHILD2_2_CREATE_TABLES -#CHILD2_2_SELECT_TABLES +#The followings are set in include/init_xxx.inc files +# MASTER_1_COMMENT_2_1 +# MASTER_1_COMMENT2_2_1 +# MASTER_1_COMMENT3_2_1 +# MASTER_1_COMMENT4_2_1 +# MASTER_1_COMMENT5_2_1 +# MASTER_1_COMMENT_P_2_1 +# CHILD2_1_DROP_TABLES +# CHILD2_1_CREATE_TABLES +# CHILD2_1_SELECT_TABLES +# CHILD2_1_DROP_TABLES2 +# CHILD2_1_CREATE_TABLES2 +# CHILD2_1_SELECT_TABLES2 +# CHILD2_1_DROP_TABLES3 +# CHILD2_1_CREATE_TABLES3 +# CHILD2_1_SELECT_TABLES3 +# CHILD2_1_DROP_TABLES4 +# CHILD2_1_CREATE_TABLES4 +# CHILD2_1_SELECT_TABLES4 +# CHILD2_1_DROP_TABLES5 +# CHILD2_1_CREATE_TABLES5 +# CHILD2_1_SELECT_TABLES5 +# CHILD2_1_DROP_TABLES6 +# CHILD2_1_CREATE_TABLES6 +# CHILD2_1_SELECT_TABLES6 +# CHILD2_2_DROP_TABLES +# CHILD2_2_CREATE_TABLES +# CHILD2_2_SELECT_TABLES diff --git a/storage/spider/mysql-test/spider/my.cnf b/storage/spider/mysql-test/spider/my.cnf index deca681c3a3..db4f7656fbc 100644 --- a/storage/spider/mysql-test/spider/my.cnf +++ b/storage/spider/mysql-test/spider/my.cnf @@ -147,31 +147,31 @@ CHILD3_3_CHARSET= DEFAULT CHARSET=utf8 STR_SEMICOLON= ; -#The followings are setted in include/init_xxx.inc files -#MASTER_1_COMMENT_2_1 -#MASTER_1_COMMENT2_2_1 -#MASTER_1_COMMENT3_2_1 -#MASTER_1_COMMENT4_2_1 -#MASTER_1_COMMENT5_2_1 -#MASTER_1_COMMENT_P_2_1 -#CHILD2_1_DROP_TABLES -#CHILD2_1_CREATE_TABLES -#CHILD2_1_SELECT_TABLES -#CHILD2_1_DROP_TABLES2 -#CHILD2_1_CREATE_TABLES2 -#CHILD2_1_SELECT_TABLES2 -#CHILD2_1_DROP_TABLES3 -#CHILD2_1_CREATE_TABLES3 -#CHILD2_1_SELECT_TABLES3 -#CHILD2_1_DROP_TABLES4 -#CHILD2_1_CREATE_TABLES4 -#CHILD2_1_SELECT_TABLES4 -#CHILD2_1_DROP_TABLES5 -#CHILD2_1_CREATE_TABLES5 -#CHILD2_1_SELECT_TABLES5 -#CHILD2_1_DROP_TABLES6 -#CHILD2_1_CREATE_TABLES6 -#CHILD2_1_SELECT_TABLES6 -#CHILD2_2_DROP_TABLES -#CHILD2_2_CREATE_TABLES -#CHILD2_2_SELECT_TABLES +#The followings are set in include/init_xxx.inc files +# MASTER_1_COMMENT_2_1 +# MASTER_1_COMMENT2_2_1 +# MASTER_1_COMMENT3_2_1 +# MASTER_1_COMMENT4_2_1 +# MASTER_1_COMMENT5_2_1 +# MASTER_1_COMMENT_P_2_1 +# CHILD2_1_DROP_TABLES +# CHILD2_1_CREATE_TABLES +# CHILD2_1_SELECT_TABLES +# CHILD2_1_DROP_TABLES2 +# CHILD2_1_CREATE_TABLES2 +# CHILD2_1_SELECT_TABLES2 +# CHILD2_1_DROP_TABLES3 +# CHILD2_1_CREATE_TABLES3 +# CHILD2_1_SELECT_TABLES3 +# CHILD2_1_DROP_TABLES4 +# CHILD2_1_CREATE_TABLES4 +# CHILD2_1_SELECT_TABLES4 +# CHILD2_1_DROP_TABLES5 +# CHILD2_1_CREATE_TABLES5 +# CHILD2_1_SELECT_TABLES5 +# CHILD2_1_DROP_TABLES6 +# CHILD2_1_CREATE_TABLES6 +# CHILD2_1_SELECT_TABLES6 +# CHILD2_2_DROP_TABLES +# CHILD2_2_CREATE_TABLES +# CHILD2_2_SELECT_TABLES diff --git a/storage/spider/mysql-test/spider/oracle/my.cnf b/storage/spider/mysql-test/spider/oracle/my.cnf index e24985bb8d4..efa05c8e8b0 100644 --- a/storage/spider/mysql-test/spider/oracle/my.cnf +++ b/storage/spider/mysql-test/spider/oracle/my.cnf @@ -116,31 +116,31 @@ ORACLE_DATABASE= SYSTEM STR_SEMICOLON= ; -#The followings are setted in include/init_xxx.inc files -#MASTER_1_COMMENT_2_1 -#MASTER_1_COMMENT2_2_1 -#MASTER_1_COMMENT3_2_1 -#MASTER_1_COMMENT4_2_1 -#MASTER_1_COMMENT5_2_1 -#MASTER_1_COMMENT_P_2_1 -#CHILD2_1_DROP_TABLES -#CHILD2_1_CREATE_TABLES -#CHILD2_1_SELECT_TABLES -#CHILD2_1_DROP_TABLES2 -#CHILD2_1_CREATE_TABLES2 -#CHILD2_1_SELECT_TABLES2 -#CHILD2_1_DROP_TABLES3 -#CHILD2_1_CREATE_TABLES3 -#CHILD2_1_SELECT_TABLES3 -#CHILD2_1_DROP_TABLES4 -#CHILD2_1_CREATE_TABLES4 -#CHILD2_1_SELECT_TABLES4 -#CHILD2_1_DROP_TABLES5 -#CHILD2_1_CREATE_TABLES5 -#CHILD2_1_SELECT_TABLES5 -#CHILD2_1_DROP_TABLES6 -#CHILD2_1_CREATE_TABLES6 -#CHILD2_1_SELECT_TABLES6 -#CHILD2_2_DROP_TABLES -#CHILD2_2_CREATE_TABLES -#CHILD2_2_SELECT_TABLES +#The followings are set in include/init_xxx.inc files +# MASTER_1_COMMENT_2_1 +# MASTER_1_COMMENT2_2_1 +# MASTER_1_COMMENT3_2_1 +# MASTER_1_COMMENT4_2_1 +# MASTER_1_COMMENT5_2_1 +# MASTER_1_COMMENT_P_2_1 +# CHILD2_1_DROP_TABLES +# CHILD2_1_CREATE_TABLES +# CHILD2_1_SELECT_TABLES +# CHILD2_1_DROP_TABLES2 +# CHILD2_1_CREATE_TABLES2 +# CHILD2_1_SELECT_TABLES2 +# CHILD2_1_DROP_TABLES3 +# CHILD2_1_CREATE_TABLES3 +# CHILD2_1_SELECT_TABLES3 +# CHILD2_1_DROP_TABLES4 +# CHILD2_1_CREATE_TABLES4 +# CHILD2_1_SELECT_TABLES4 +# CHILD2_1_DROP_TABLES5 +# CHILD2_1_CREATE_TABLES5 +# CHILD2_1_SELECT_TABLES5 +# CHILD2_1_DROP_TABLES6 +# CHILD2_1_CREATE_TABLES6 +# CHILD2_1_SELECT_TABLES6 +# CHILD2_2_DROP_TABLES +# CHILD2_2_CREATE_TABLES +# CHILD2_2_SELECT_TABLES diff --git a/storage/spider/mysql-test/spider/oracle2/my.cnf b/storage/spider/mysql-test/spider/oracle2/my.cnf index e24985bb8d4..efa05c8e8b0 100644 --- a/storage/spider/mysql-test/spider/oracle2/my.cnf +++ b/storage/spider/mysql-test/spider/oracle2/my.cnf @@ -116,31 +116,31 @@ ORACLE_DATABASE= SYSTEM STR_SEMICOLON= ; -#The followings are setted in include/init_xxx.inc files -#MASTER_1_COMMENT_2_1 -#MASTER_1_COMMENT2_2_1 -#MASTER_1_COMMENT3_2_1 -#MASTER_1_COMMENT4_2_1 -#MASTER_1_COMMENT5_2_1 -#MASTER_1_COMMENT_P_2_1 -#CHILD2_1_DROP_TABLES -#CHILD2_1_CREATE_TABLES -#CHILD2_1_SELECT_TABLES -#CHILD2_1_DROP_TABLES2 -#CHILD2_1_CREATE_TABLES2 -#CHILD2_1_SELECT_TABLES2 -#CHILD2_1_DROP_TABLES3 -#CHILD2_1_CREATE_TABLES3 -#CHILD2_1_SELECT_TABLES3 -#CHILD2_1_DROP_TABLES4 -#CHILD2_1_CREATE_TABLES4 -#CHILD2_1_SELECT_TABLES4 -#CHILD2_1_DROP_TABLES5 -#CHILD2_1_CREATE_TABLES5 -#CHILD2_1_SELECT_TABLES5 -#CHILD2_1_DROP_TABLES6 -#CHILD2_1_CREATE_TABLES6 -#CHILD2_1_SELECT_TABLES6 -#CHILD2_2_DROP_TABLES -#CHILD2_2_CREATE_TABLES -#CHILD2_2_SELECT_TABLES +#The followings are set in include/init_xxx.inc files +# MASTER_1_COMMENT_2_1 +# MASTER_1_COMMENT2_2_1 +# MASTER_1_COMMENT3_2_1 +# MASTER_1_COMMENT4_2_1 +# MASTER_1_COMMENT5_2_1 +# MASTER_1_COMMENT_P_2_1 +# CHILD2_1_DROP_TABLES +# CHILD2_1_CREATE_TABLES +# CHILD2_1_SELECT_TABLES +# CHILD2_1_DROP_TABLES2 +# CHILD2_1_CREATE_TABLES2 +# CHILD2_1_SELECT_TABLES2 +# CHILD2_1_DROP_TABLES3 +# CHILD2_1_CREATE_TABLES3 +# CHILD2_1_SELECT_TABLES3 +# CHILD2_1_DROP_TABLES4 +# CHILD2_1_CREATE_TABLES4 +# CHILD2_1_SELECT_TABLES4 +# CHILD2_1_DROP_TABLES5 +# CHILD2_1_CREATE_TABLES5 +# CHILD2_1_SELECT_TABLES5 +# CHILD2_1_DROP_TABLES6 +# CHILD2_1_CREATE_TABLES6 +# CHILD2_1_SELECT_TABLES6 +# CHILD2_2_DROP_TABLES +# CHILD2_2_CREATE_TABLES +# CHILD2_2_SELECT_TABLES diff --git a/storage/spider/mysql-test/spider/suite.opt b/storage/spider/mysql-test/spider/suite.opt index 48457b17309..077a81334be 100644 --- a/storage/spider/mysql-test/spider/suite.opt +++ b/storage/spider/mysql-test/spider/suite.opt @@ -1 +1 @@ ---loose-innodb +--loose-innodb --skip-performance-schema diff --git a/storage/spider/scripts/install_spider.sql b/storage/spider/scripts/install_spider.sql index cda3b17c098..328541a550b 100644 --- a/storage/spider/scripts/install_spider.sql +++ b/storage/spider/scripts/install_spider.sql @@ -34,16 +34,16 @@ create table if not exists mysql.spider_xa_member( scheme char(64) not null default '', host char(64) not null default '', port char(5) not null default '', - socket text not null default '', + socket text not null, username char(64) not null default '', password char(64) not null default '', - ssl_ca text default null, - ssl_capath text default null, - ssl_cert text default null, + ssl_ca text, + ssl_capath text, + ssl_cert text, ssl_cipher char(64) default null, - ssl_key text default null, + ssl_key text, ssl_verify_server_cert tinyint not null default 0, - default_file text default null, + default_file text, default_group char(64) default null, key idx1 (data, format_id, gtrid_length, host) ) engine=MyISAM default charset=utf8 collate=utf8_bin; @@ -55,16 +55,16 @@ create table if not exists mysql.spider_xa_failed_log( scheme char(64) not null default '', host char(64) not null default '', port char(5) not null default '', - socket text not null default '', + socket text not null, username char(64) not null default '', password char(64) not null default '', - ssl_ca text default null, - ssl_capath text default null, - ssl_cert text default null, + ssl_ca text, + ssl_capath text, + ssl_cert text, ssl_cipher char(64) default null, - ssl_key text default null, + ssl_key text, ssl_verify_server_cert tinyint not null default 0, - default_file text default null, + default_file text, default_group char(64) default null, thread_id int default null, status char(8) not null default '', @@ -80,16 +80,16 @@ create table if not exists mysql.spider_tables( scheme char(64) default null, host char(64) default null, port char(5) default null, - socket text default null, + socket text, username char(64) default null, password char(64) default null, - ssl_ca text default null, - ssl_capath text default null, - ssl_cert text default null, + ssl_ca text, + ssl_capath text, + ssl_cert text, ssl_cipher char(64) default null, - ssl_key text default null, + ssl_key text, ssl_verify_server_cert tinyint not null default 0, - default_file text default null, + default_file text, default_group char(64) default null, tgt_db_name char(64) default null, tgt_table_name char(64) default null, @@ -106,16 +106,16 @@ create table if not exists mysql.spider_link_mon_servers( scheme char(64) default null, host char(64) default null, port char(5) default null, - socket text default null, + socket text, username char(64) default null, password char(64) default null, - ssl_ca text default null, - ssl_capath text default null, - ssl_cert text default null, + ssl_ca text, + ssl_capath text, + ssl_cert text, ssl_cipher char(64) default null, - ssl_key text default null, + ssl_key text, ssl_verify_server_cert tinyint not null default 0, - default_file text default null, + default_file text, default_group char(64) default null, primary key (db_name, table_name, link_id, sid) ) engine=MyISAM default charset=utf8 collate=utf8_bin; @@ -250,12 +250,12 @@ begin alter table mysql.spider_xa_member drop primary key, add index idx1 (data, format_id, gtrid_length, host), - modify socket text not null default '', - modify ssl_ca text default null, - modify ssl_capath text default null, - modify ssl_cert text default null, - modify ssl_key text default null, - modify default_file text default null; + modify socket text not null, + modify ssl_ca text, + modify ssl_capath text, + modify ssl_cert text, + modify ssl_key text, + modify default_file text; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' @@ -263,12 +263,12 @@ begin AND COLUMN_NAME = 'socket'; if @col_type = 'char(64)' then alter table mysql.spider_tables - modify socket text default null, - modify ssl_ca text default null, - modify ssl_capath text default null, - modify ssl_cert text default null, - modify ssl_key text default null, - modify default_file text default null; + modify socket text, + modify ssl_ca text, + modify ssl_capath text, + modify ssl_cert text, + modify ssl_key text, + modify default_file text; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' @@ -276,12 +276,12 @@ begin AND COLUMN_NAME = 'socket'; if @col_type = 'char(64)' then alter table mysql.spider_link_mon_servers - modify socket text default null, - modify ssl_ca text default null, - modify ssl_capath text default null, - modify ssl_cert text default null, - modify ssl_key text default null, - modify default_file text default null; + modify socket text, + modify ssl_ca text, + modify ssl_capath text, + modify ssl_cert text, + modify ssl_key text, + modify default_file text; end if; end;// delimiter ; diff --git a/storage/test_sql_discovery/mysql-test/archive/discover.rdiff b/storage/test_sql_discovery/mysql-test/archive/discover.rdiff deleted file mode 100644 index c8be9fde63e..00000000000 --- a/storage/test_sql_discovery/mysql-test/archive/discover.rdiff +++ /dev/null @@ -1,35 +0,0 @@ ---- suite/archive/discover.result 2013-04-08 00:06:37.000000000 +0200 -+++ /usr/home/serg/Abk/mysql/10.0-serg/storage/test_sql_discovery/mysql-test/archive/discover.reject 2013-04-08 00:07:02.000000000 +0200 -@@ -42,6 +42,7 @@ - t1 BASE TABLE - t2 BASE TABLE - t1.ARZ -+t1.frm - t2.ARZ - t2.frm - # -@@ -60,6 +61,7 @@ - flush tables; - rename table t2 to t0; - t0.ARZ -+t0.frm - t1.ARZ - t1.frm - # -@@ -77,6 +79,7 @@ - flush tables; - drop table t1; - t0.ARZ -+t0.frm - # - # discover of table non-existance on drop - # -@@ -86,7 +89,7 @@ - drop table t0; - show status like 'Handler_discover'; - Variable_name Value --Handler_discover 6 -+Handler_discover 7 - # - # Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE - # diff --git a/storage/test_sql_discovery/mysql-test/main/r/plugin.rdiff b/storage/test_sql_discovery/mysql-test/main/r/plugin.rdiff deleted file mode 100644 index b9288d70f4b..00000000000 --- a/storage/test_sql_discovery/mysql-test/main/r/plugin.rdiff +++ /dev/null @@ -1,11 +0,0 @@ ---- r/plugin.result 2013-02-21 19:46:59.000000000 +0100 -+++ r/plugin.reject 2013-02-27 11:13:22.000000000 +0100 -@@ -71,6 +71,8 @@ - SELECT * FROM t2; - ERROR 42000: Unknown storage engine 'EXAMPLE' - DROP TABLE t2; -+Warnings: -+Error 1286 Unknown storage engine 'EXAMPLE' - UNINSTALL PLUGIN EXAMPLE; - ERROR 42000: PLUGIN EXAMPLE does not exist - UNINSTALL PLUGIN non_exist; diff --git a/storage/test_sql_discovery/mysql-test/sql_discovery/suite.pm b/storage/test_sql_discovery/mysql-test/sql_discovery/suite.pm index b60e189f2b0..22f22514b3a 100644 --- a/storage/test_sql_discovery/mysql-test/sql_discovery/suite.pm +++ b/storage/test_sql_discovery/mysql-test/sql_discovery/suite.pm @@ -1,5 +1,4 @@ package My::Suite::SQL_Discovery; - @ISA = qw(My::Suite); sub is_default { 1 } diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index bbd61c80948..d41e3a4dd22 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -1,7 +1,6 @@ # ft-index only supports x86-64 and cmake-2.8.9+ IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND - NOT CMAKE_VERSION VERSION_LESS "2.8.9" AND - NOT WITHOUT_TOKUDB AND NOT WITHOUT_TOKUDB_STORAGE_ENGINE) + NOT CMAKE_VERSION VERSION_LESS "2.8.9") CHECK_CXX_SOURCE_COMPILES( " struct a {int b; int c; }; @@ -10,7 +9,7 @@ int main() { return 0; } " TOKUDB_OK) ENDIF() -IF(NOT TOKUDB_OK) +IF(NOT TOKUDB_OK OR WITHOUT_TOKUDB OR WITHOUT_TOKUDB_STORAGE_ENGINE) RETURN() ENDIF() diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index cbcab362e8e..3cb00036098 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -1629,7 +1629,7 @@ static int initialize_key_and_col_info(TABLE_SHARE* table_share, TABLE* table, K } - for (uint i = 0; i < table_share->keys + test(hidden_primary_key); i++) { + for (uint i = 0; i < table_share->keys + MY_TEST(hidden_primary_key); i++) { // // do the cluster/primary key filtering calculations // @@ -1672,7 +1672,7 @@ exit: } bool ha_tokudb::can_replace_into_be_fast(TABLE_SHARE* table_share, KEY_AND_COL_INFO* kc_info, uint pk) { - uint curr_num_DBs = table_share->keys + test(hidden_primary_key); + uint curr_num_DBs = table_share->keys + MY_TEST(hidden_primary_key); bool ret_val; if (curr_num_DBs == 1) { ret_val = true; @@ -1860,7 +1860,7 @@ int ha_tokudb::initialize_share( share->try_table_lock = false; } - share->num_DBs = table_share->keys + test(hidden_primary_key); + share->num_DBs = table_share->keys + MY_TEST(hidden_primary_key); error = 0; exit: @@ -2935,7 +2935,7 @@ DBT *ha_tokudb::pack_key( { TOKUDB_DBUG_ENTER("ha_tokudb::pack_key"); #if TOKU_INCLUDE_EXTENDED_KEYS - if (keynr != primary_key && !test(hidden_primary_key)) { + if (keynr != primary_key && !MY_TEST(hidden_primary_key)) { DBUG_RETURN(pack_ext_key(key, keynr, buff, key_ptr, key_length, inf_byte)); } #endif @@ -3360,7 +3360,7 @@ void ha_tokudb::start_bulk_insert(ha_rows rows, uint flags) { abort_loader = false; rw_rdlock(&share->num_DBs_lock); - uint curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); num_DBs_locked_in_bulk = true; lock_count = 0; @@ -3875,7 +3875,7 @@ void ha_tokudb::set_main_dict_put_flags( ) { uint32_t old_prelock_flags = 0; - uint curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); bool in_hot_index = share->num_DBs > curr_num_DBs; bool using_ignore_flag_opt = do_ignore_flag_optimization( thd, table, share->replace_into_fast); @@ -3919,7 +3919,7 @@ int ha_tokudb::insert_row_to_main_dictionary(uchar* record, DBT* pk_key, DBT* pk int error = 0; uint32_t put_flags = mult_put_flags[primary_key]; THD *thd = ha_thd(); - uint curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); assert(curr_num_DBs == 1); @@ -4129,7 +4129,7 @@ int ha_tokudb::write_row(uchar * record) { // for #4633 // if we have a duplicate key error, let's check the primary key to see // if there is a duplicate there. If so, set last_dup_key to the pk - if (error == DB_KEYEXIST && !test(hidden_primary_key) && last_dup_key != primary_key) { + if (error == DB_KEYEXIST && !MY_TEST(hidden_primary_key) && last_dup_key != primary_key) { int r = share->file->getf_set( share->file, txn, @@ -5954,7 +5954,7 @@ int ha_tokudb::info(uint flag) { TOKUDB_DBUG_ENTER("ha_tokudb::info %p %d %lld", this, flag, (long long) share->rows); int error; DB_TXN* txn = NULL; - uint curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); DB_BTREE_STAT64 dict_stats; for (uint i=0; i < table->s->keys; i++) @@ -6461,7 +6461,7 @@ THR_LOCK_DATA **ha_tokudb::store_lock(THD * thd, THR_LOCK_DATA ** to, enum thr_l // if creating a hot index if (thd_sql_command(thd)== SQLCOM_CREATE_INDEX && get_create_index_online(thd)) { rw_rdlock(&share->num_DBs_lock); - if (share->num_DBs == (table->s->keys + test(hidden_primary_key))) { + if (share->num_DBs == (table->s->keys + MY_TEST(hidden_primary_key))) { lock_type = TL_WRITE_ALLOW_WRITE; } lock.type = lock_type; @@ -7690,7 +7690,7 @@ int ha_tokudb::tokudb_add_index( // // number of DB files we have open currently, before add_index is executed // - uint curr_num_DBs = table_arg->s->keys + test(hidden_primary_key); + uint curr_num_DBs = table_arg->s->keys + MY_TEST(hidden_primary_key); // // get the row type to use for the indexes we're adding @@ -8030,7 +8030,7 @@ To add indexes, make sure no transactions touch the table.", share->table_name); // Closes added indexes in case of error in error path of add_index and alter_table_phase2 // void ha_tokudb::restore_add_index(TABLE* table_arg, uint num_of_keys, bool incremented_numDBs, bool modified_DBs) { - uint curr_num_DBs = table_arg->s->keys + test(hidden_primary_key); + uint curr_num_DBs = table_arg->s->keys + MY_TEST(hidden_primary_key); uint curr_index = 0; // @@ -8251,7 +8251,7 @@ int ha_tokudb::delete_all_rows_internal() { error = txn_begin(db_env, 0, &txn, 0, ha_thd()); if (error) { goto cleanup; } - curr_num_DBs = table->s->keys + test(hidden_primary_key); + curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); for (uint i = 0; i < curr_num_DBs; i++) { error = share->key_file[i]->pre_acquire_fileops_lock( share->key_file[i], diff --git a/storage/tokudb/ha_tokudb_admin.cc b/storage/tokudb/ha_tokudb_admin.cc index 4b6aaed551d..5139bb713ce 100644 --- a/storage/tokudb/ha_tokudb_admin.cc +++ b/storage/tokudb/ha_tokudb_admin.cc @@ -200,7 +200,7 @@ int ha_tokudb::optimize(THD * thd, HA_CHECK_OPT * check_opt) { while (ha_tokudb_optimize_wait) sleep(1); // debug int error; - uint curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); #ifdef HA_TOKUDB_HAS_THD_PROGRESS // each DB is its own stage. as HOT goes through each db, we'll @@ -289,7 +289,7 @@ int ha_tokudb::check(THD *thd, HA_CHECK_OPT *check_opt) { if (r != 0) result = HA_ADMIN_INTERNAL_ERROR; if (result == HA_ADMIN_OK) { - uint32_t num_DBs = table_share->keys + test(hidden_primary_key); + uint32_t num_DBs = table_share->keys + MY_TEST(hidden_primary_key); snprintf(write_status_msg, sizeof write_status_msg, "%s primary=%d num=%d", share->table_name, primary_key, num_DBs); if (tokudb_debug & TOKUDB_DEBUG_CHECK) { ha_tokudb_check_info(thd, table, write_status_msg); diff --git a/storage/tokudb/ha_tokudb_alter_56.cc b/storage/tokudb/ha_tokudb_alter_56.cc index a337b9be93a..77b05f1412d 100644 --- a/storage/tokudb/ha_tokudb_alter_56.cc +++ b/storage/tokudb/ha_tokudb_alter_56.cc @@ -471,7 +471,7 @@ bool ha_tokudb::inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha // Set the new compression enum toku_compression_method method = row_type_to_compression_method((srv_row_format_t)create_info->option_struct->row_format); - uint32_t curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint32_t curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); for (uint32_t i = 0; i < curr_num_DBs; i++) { db = share->key_file[i]; error = db->change_compression_method(db, method); @@ -594,7 +594,7 @@ int ha_tokudb::alter_table_add_or_drop_column(TABLE *altered_table, Alter_inplac uint32_t max_column_extra_size; uint32_t num_column_extra; uint32_t num_columns = 0; - uint32_t curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint32_t curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); uint32_t columns[table->s->fields + altered_table->s->fields]; // set size such that we know it is big enough for both cases memset(columns, 0, sizeof(columns)); @@ -721,7 +721,7 @@ bool ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_i restore_drop_indexes(table, index_drop_offsets, ha_alter_info->index_drop_count); } if (ctx->compression_changed) { - uint32_t curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint32_t curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); for (uint32_t i = 0; i < curr_num_DBs; i++) { DB *db = share->key_file[i]; int error = db->change_compression_method(db, ctx->orig_compression_method); @@ -746,7 +746,7 @@ int ha_tokudb::alter_table_expand_varchar_offsets(TABLE *altered_table, Alter_in int error = 0; tokudb_alter_ctx *ctx = static_cast<tokudb_alter_ctx *>(ha_alter_info->handler_ctx); - uint32_t curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint32_t curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); for (uint32_t i = 0; i < curr_num_DBs; i++) { // change to a new descriptor DBT row_descriptor; memset(&row_descriptor, 0, sizeof row_descriptor); @@ -928,7 +928,7 @@ int ha_tokudb::alter_table_expand_one_column(TABLE *altered_table, Alter_inplace assert(0); } - uint32_t curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint32_t curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); for (uint32_t i = 0; i < curr_num_DBs; i++) { // change to a new descriptor DBT row_descriptor; memset(&row_descriptor, 0, sizeof row_descriptor); @@ -1007,7 +1007,7 @@ int ha_tokudb::alter_table_expand_blobs(TABLE *altered_table, Alter_inplace_info int error = 0; tokudb_alter_ctx *ctx = static_cast<tokudb_alter_ctx *>(ha_alter_info->handler_ctx); - uint32_t curr_num_DBs = table->s->keys + test(hidden_primary_key); + uint32_t curr_num_DBs = table->s->keys + MY_TEST(hidden_primary_key); for (uint32_t i = 0; i < curr_num_DBs; i++) { // change to a new descriptor DBT row_descriptor; memset(&row_descriptor, 0, sizeof row_descriptor); diff --git a/storage/tokudb/ha_tokudb_update.cc b/storage/tokudb/ha_tokudb_update.cc index 94d687da67c..1316c7a105d 100644 --- a/storage/tokudb/ha_tokudb_update.cc +++ b/storage/tokudb/ha_tokudb_update.cc @@ -549,7 +549,7 @@ static bool is_strict_mode(THD *thd) { #if 50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699 return thd->is_strict_mode(); #else - return test(thd->variables.sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)); + return MY_TEST(thd->variables.sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)); #endif } @@ -837,7 +837,7 @@ int ha_tokudb::send_update_message(List<Item> &update_fields, List<Item> &update rw_rdlock(&share->num_DBs_lock); - if (share->num_DBs > table->s->keys + test(hidden_primary_key)) { // hot index in progress + if (share->num_DBs > table->s->keys + MY_TEST(hidden_primary_key)) { // hot index in progress error = ENOTSUP; // run on the slow path } else { // send the update message @@ -990,7 +990,7 @@ int ha_tokudb::send_upsert_message(THD *thd, List<Item> &update_fields, List<Ite rw_rdlock(&share->num_DBs_lock); - if (share->num_DBs > table->s->keys + test(hidden_primary_key)) { // hot index in progress + if (share->num_DBs > table->s->keys + MY_TEST(hidden_primary_key)) { // hot index in progress error = ENOTSUP; // run on the slow path } else { // send the upsert message diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-1.result b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-1.result index c23f71f28f0..9337718ce35 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-1.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-1.result @@ -1070,7 +1070,7 @@ t CREATE TABLE `t` ( explain select straight_join * from s,t where s.b = t.b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE s index b,b_2 b_2 5 NULL 1000 Using where; Using index -1 SIMPLE t ref b,b_2 b_2 5 test.s.b 11 Using index +1 SIMPLE t ref b,b_2 b_2 5 test.s.b 1 Using index alter table s drop key b; alter table t drop key b; show create table s; @@ -1120,5 +1120,5 @@ t CREATE TABLE `t` ( explain select straight_join * from s,t where s.b = t.b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE s index b_2,b b_2 5 NULL 1000 Using where; Using index -1 SIMPLE t ref b_2,b b_2 5 test.s.b 11 Using index +1 SIMPLE t ref b_2,b b 5 test.s.b 1 drop table s,t; diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result index 026be76fec2..710509b2acf 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result @@ -1096,7 +1096,7 @@ t CREATE TABLE `t` ( explain select straight_join s.a,t.a from s,t where s.b = t.b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE s index b,b_2,b_3 b_2 10 NULL 1000 Using where; Using index -1 SIMPLE t ref b,b_2,b_3 b_2 5 test.s.b 11 Using index +1 SIMPLE t ref b,b_2,b_3 b_3 5 test.s.b 1 Using index alter table s drop key b_2; alter table t drop key b_2; show create table s; @@ -1120,5 +1120,5 @@ t CREATE TABLE `t` ( explain select straight_join s.a,t.a from s,t where s.b = t.b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE s index b,b_3 b_3 5 NULL 1000 Using where; Using index -1 SIMPLE t ref b,b_3 b_3 5 test.s.b 11 Using index +1 SIMPLE t ref b,b_3 b_3 5 test.s.b 1 Using index drop table s,t; diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-3.result b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-3.result index 666fdf875a0..660d63c54c8 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-3.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-3.result @@ -1103,6 +1103,6 @@ u CREATE TABLE `u` ( explain select straight_join * from s,t,u where s.b = t.b and s.c = u.c; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE s ALL b,b_2 NULL NULL NULL 1000 Using where -1 SIMPLE t ref b,b_2 b_2 5 test.s.b 11 Using index -1 SIMPLE u ref c,c_2 c_2 5 test.s.c 11 Using index +1 SIMPLE t ref b,b_2 b_2 5 test.s.b 1 Using index +1 SIMPLE u ref c,c_2 c_2 5 test.s.c 1 Using index drop table s,t,u; diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar_and_int_hidden.result b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar_and_int_hidden.result index cf70de29376..f67c5bccd6b 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar_and_int_hidden.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar_and_int_hidden.result @@ -182,14 +182,14 @@ a b c d e f 3 30 200 2000 20000 200000 explain select * from t1 where b > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index_or_range b b NULL NULL NULL; Using where; Using index_or_range select * from t1 where b > 0; a b c d e f 2 20 100 1000 10000 100000 3 30 200 2000 20000 200000 explain select * from t1 where d > "0"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index_or_range d d NULL NULL NULL; Using where; Using index_or_range select * from t1 where d > "0"; a b c d e f 2 20 100 1000 10000 100000 diff --git a/storage/tokudb/mysql-test/tokudb/r/hotindex-del-0.result b/storage/tokudb/mysql-test/tokudb/r/hotindex-del-0.result index 6e6874f6d8b..398e50ea7a7 100644 --- a/storage/tokudb/mysql-test/tokudb/r/hotindex-del-0.result +++ b/storage/tokudb/mysql-test/tokudb/r/hotindex-del-0.result @@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; # Establish connection conn1 (user = root) drop table if exists s; create table s (a int, b int); +begin; insert into s values (10000,0),(10000,1),(10000,2),(10000,3),(10000,4),(10000,5),(10000,6),(10000,7),(10000,8),(10000,9); insert into s values (9999,0),(9999,1),(9999,2),(9999,3),(9999,4),(9999,5),(9999,6),(9999,7),(9999,8),(9999,9); insert into s values (9998,0),(9998,1),(9998,2),(9998,3),(9998,4),(9998,5),(9998,6),(9998,7),(9998,8),(9998,9); @@ -10002,6 +10003,7 @@ insert into s values (4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(4,9) insert into s values (3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(3,9); insert into s values (2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(2,9); insert into s values (1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9); +commit; set tokudb_create_index_online=1; create index i_a on s(a); delete from s where a=10000; diff --git a/storage/tokudb/mysql-test/tokudb/r/hotindex-del-1.result b/storage/tokudb/mysql-test/tokudb/r/hotindex-del-1.result index da086d2b7da..a45809b719a 100644 --- a/storage/tokudb/mysql-test/tokudb/r/hotindex-del-1.result +++ b/storage/tokudb/mysql-test/tokudb/r/hotindex-del-1.result @@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; # Establish connection conn1 (user = root) drop table if exists s; create table s (a int, b int); +begin; insert into s values (10000,0),(10000,1),(10000,2),(10000,3),(10000,4),(10000,5),(10000,6),(10000,7),(10000,8),(10000,9); insert into s values (9999,0),(9999,1),(9999,2),(9999,3),(9999,4),(9999,5),(9999,6),(9999,7),(9999,8),(9999,9); insert into s values (9998,0),(9998,1),(9998,2),(9998,3),(9998,4),(9998,5),(9998,6),(9998,7),(9998,8),(9998,9); @@ -10002,6 +10003,7 @@ insert into s values (4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(4,9) insert into s values (3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(3,9); insert into s values (2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(2,9); insert into s values (1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9); +commit; set tokudb_create_index_online=1; create index i_a on s(a) clustering=yes; delete from s where a=10000; diff --git a/storage/tokudb/mysql-test/tokudb/r/hotindex-del-fast.result b/storage/tokudb/mysql-test/tokudb/r/hotindex-del-fast.result index ecb2d225181..a7be06f34ee 100644 --- a/storage/tokudb/mysql-test/tokudb/r/hotindex-del-fast.result +++ b/storage/tokudb/mysql-test/tokudb/r/hotindex-del-fast.result @@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; # Establish connection conn1 (user = root) drop table if exists s; create table s (a int, b int); +begin; insert into s values (10000,0),(10000,1),(10000,2),(10000,3),(10000,4),(10000,5),(10000,6),(10000,7),(10000,8),(10000,9); insert into s values (9999,0),(9999,1),(9999,2),(9999,3),(9999,4),(9999,5),(9999,6),(9999,7),(9999,8),(9999,9); insert into s values (9998,0),(9998,1),(9998,2),(9998,3),(9998,4),(9998,5),(9998,6),(9998,7),(9998,8),(9998,9); @@ -10002,6 +10003,7 @@ insert into s values (4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(4,9) insert into s values (3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(3,9); insert into s values (2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(2,9); insert into s values (1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9); +commit; create index i_a on s(a); delete from s where a=10000; show create table s; diff --git a/storage/tokudb/mysql-test/tokudb/r/hotindex-del-slow.result b/storage/tokudb/mysql-test/tokudb/r/hotindex-del-slow.result index e1e298eb29f..a2c90f0ce6b 100644 --- a/storage/tokudb/mysql-test/tokudb/r/hotindex-del-slow.result +++ b/storage/tokudb/mysql-test/tokudb/r/hotindex-del-slow.result @@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; # Establish connection conn1 (user = root) drop table if exists s; create table s (a int, b int); +begin; insert into s values (10000,0),(10000,1),(10000,2),(10000,3),(10000,4),(10000,5),(10000,6),(10000,7),(10000,8),(10000,9); insert into s values (9999,0),(9999,1),(9999,2),(9999,3),(9999,4),(9999,5),(9999,6),(9999,7),(9999,8),(9999,9); insert into s values (9998,0),(9998,1),(9998,2),(9998,3),(9998,4),(9998,5),(9998,6),(9998,7),(9998,8),(9998,9); @@ -10002,6 +10003,7 @@ insert into s values (4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(4,9) insert into s values (3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(3,9); insert into s values (2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(2,9); insert into s values (1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9); +commit; set tokudb_create_index_online=1; create index i_a on s(a); delete from s where a=10000; diff --git a/storage/tokudb/mysql-test/tokudb/r/hotindex-insert-0.result b/storage/tokudb/mysql-test/tokudb/r/hotindex-insert-0.result index 78515053ff6..d6734e0df73 100644 --- a/storage/tokudb/mysql-test/tokudb/r/hotindex-insert-0.result +++ b/storage/tokudb/mysql-test/tokudb/r/hotindex-insert-0.result @@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; # Establish connection conn1 (user = root) drop table if exists s; create table s (a int, b int); +begin; insert into s values (10000,0),(10000,1),(10000,2),(10000,3),(10000,4),(10000,5),(10000,6),(10000,7),(10000,8),(10000,9); insert into s values (9999,0),(9999,1),(9999,2),(9999,3),(9999,4),(9999,5),(9999,6),(9999,7),(9999,8),(9999,9); insert into s values (9998,0),(9998,1),(9998,2),(9998,3),(9998,4),(9998,5),(9998,6),(9998,7),(9998,8),(9998,9); @@ -10002,6 +10003,7 @@ insert into s values (4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(4,9) insert into s values (3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(3,9); insert into s values (2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(2,9); insert into s values (1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9); +commit; set tokudb_create_index_online=1; create index i_a on s(a); insert into s values (1000000000,10000); diff --git a/storage/tokudb/mysql-test/tokudb/r/hotindex-insert-1.result b/storage/tokudb/mysql-test/tokudb/r/hotindex-insert-1.result index 3306f55147c..4d2e5ed6b76 100644 --- a/storage/tokudb/mysql-test/tokudb/r/hotindex-insert-1.result +++ b/storage/tokudb/mysql-test/tokudb/r/hotindex-insert-1.result @@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; # Establish connection conn1 (user = root) drop table if exists s; create table s (a int, b int); +begin; insert into s values (10000,0),(10000,1),(10000,2),(10000,3),(10000,4),(10000,5),(10000,6),(10000,7),(10000,8),(10000,9); insert into s values (9999,0),(9999,1),(9999,2),(9999,3),(9999,4),(9999,5),(9999,6),(9999,7),(9999,8),(9999,9); insert into s values (9998,0),(9998,1),(9998,2),(9998,3),(9998,4),(9998,5),(9998,6),(9998,7),(9998,8),(9998,9); @@ -10002,6 +10003,7 @@ insert into s values (4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(4,9) insert into s values (3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(3,9); insert into s values (2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(2,9); insert into s values (1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9); +commit; set tokudb_create_index_online=1; create index i_a on s(a) clustering=yes; insert into s values (1000000000,10000); diff --git a/storage/tokudb/mysql-test/tokudb/r/hotindex-update-0.result b/storage/tokudb/mysql-test/tokudb/r/hotindex-update-0.result index 8ec9af009bb..85838eefb5d 100644 --- a/storage/tokudb/mysql-test/tokudb/r/hotindex-update-0.result +++ b/storage/tokudb/mysql-test/tokudb/r/hotindex-update-0.result @@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; # Establish connection conn1 (user = root) drop table if exists s; create table s (a int, b int); +begin; insert into s values (10000,0),(10000,1),(10000,2),(10000,3),(10000,4),(10000,5),(10000,6),(10000,7),(10000,8),(10000,9); insert into s values (9999,0),(9999,1),(9999,2),(9999,3),(9999,4),(9999,5),(9999,6),(9999,7),(9999,8),(9999,9); insert into s values (9998,0),(9998,1),(9998,2),(9998,3),(9998,4),(9998,5),(9998,6),(9998,7),(9998,8),(9998,9); @@ -10002,6 +10003,7 @@ insert into s values (4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(4,9) insert into s values (3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(3,9); insert into s values (2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(2,9); insert into s values (1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9); +commit; set tokudb_create_index_online=1; create index i_a on s(a); update s set a=20000+10000 where a=10000; diff --git a/storage/tokudb/mysql-test/tokudb/r/hotindex-update-1.result b/storage/tokudb/mysql-test/tokudb/r/hotindex-update-1.result index e94bba339ef..7561c61f10b 100644 --- a/storage/tokudb/mysql-test/tokudb/r/hotindex-update-1.result +++ b/storage/tokudb/mysql-test/tokudb/r/hotindex-update-1.result @@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; # Establish connection conn1 (user = root) drop table if exists s; create table s (a int, b int); +begin; insert into s values (10000,0),(10000,1),(10000,2),(10000,3),(10000,4),(10000,5),(10000,6),(10000,7),(10000,8),(10000,9); insert into s values (9999,0),(9999,1),(9999,2),(9999,3),(9999,4),(9999,5),(9999,6),(9999,7),(9999,8),(9999,9); insert into s values (9998,0),(9998,1),(9998,2),(9998,3),(9998,4),(9998,5),(9998,6),(9998,7),(9998,8),(9998,9); @@ -10002,6 +10003,7 @@ insert into s values (4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(4,9) insert into s values (3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(3,9); insert into s values (2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(2,9); insert into s values (1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9); +commit; set tokudb_create_index_online=1; create index i_a on s(a) clustering=yes; update s set a=20000+10000 where a=10000; diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_bin.test b/storage/tokudb/mysql-test/tokudb/t/change_column_bin.test index 6d502a08567..443a378270c 100644 --- a/storage/tokudb/mysql-test/tokudb/t/change_column_bin.test +++ b/storage/tokudb/mysql-test/tokudb/t/change_column_bin.test @@ -1,3 +1,4 @@ +--source include/big_test.inc # this test is generated by change_bin.py # test binary expansion is hot --disable_warnings diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_char.test b/storage/tokudb/mysql-test/tokudb/t/change_column_char.test index eff3d8428ba..6705dd73aa1 100644 --- a/storage/tokudb/mysql-test/tokudb/t/change_column_char.test +++ b/storage/tokudb/mysql-test/tokudb/t/change_column_char.test @@ -1,3 +1,4 @@ +--source include/big_test.inc # this test is generated by change_char.py # test char expansion --disable_warnings diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar_and_int_hidden.test b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar_and_int_hidden.test index c90994f325a..f5b600e501a 100644 --- a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar_and_int_hidden.test +++ b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar_and_int_hidden.test @@ -83,10 +83,12 @@ explain select * from t1; select * from t1; --replace_column 7 NULL 9 NULL; +--replace_result index index_or_range range index_or_range explain select * from t1 where b > 0; select * from t1 where b > 0; --replace_column 7 NULL 9 NULL; +--replace_result index index_or_range range index_or_range explain select * from t1 where d > "0"; select * from t1 where d > "0"; diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-del-0.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-0.test index 1af79715daa..baa770931eb 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-del-0.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-0.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on SET DEFAULT_STORAGE_ENGINE='tokudb'; @@ -14,11 +16,13 @@ drop table if exists s; create table s (a int, b int); # populate table s +begin; let $a = 10000; while ($a) { eval insert into s values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9); dec $a; } +commit; set tokudb_create_index_online=1; send create index i_a on s(a); diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-del-1.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-1.test index fc8107d2bc0..36afbb30ba6 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-del-1.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-1.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on SET DEFAULT_STORAGE_ENGINE='tokudb'; @@ -14,11 +16,13 @@ drop table if exists s; create table s (a int, b int); # populate table s +begin; let $a = 10000; while ($a) { eval insert into s values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9); dec $a; } +commit; set tokudb_create_index_online=1; send create index i_a on s(a) clustering=yes; diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-del-fast.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-fast.test index 50256802328..78b179f9e5a 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-del-fast.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-fast.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on SET DEFAULT_STORAGE_ENGINE='tokudb'; @@ -14,11 +16,13 @@ drop table if exists s; create table s (a int, b int); # populate table s +begin; let $a = 10000; while ($a) { eval insert into s values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9); dec $a; } +commit; # set tokudb_create_index_online=1; send create index i_a on s(a); diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-del-slow.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-slow.test index 2b267932907..0f83f456b0b 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-del-slow.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-slow.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on SET DEFAULT_STORAGE_ENGINE='tokudb'; @@ -14,11 +16,13 @@ drop table if exists s; create table s (a int, b int); # populate table s +begin; let $a = 10000; while ($a) { eval insert into s values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9); dec $a; } +commit; set tokudb_create_index_online=1; send create index i_a on s(a); diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-0.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-0.test index 30eeedcff9c..43fd188dcf5 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-0.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-0.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on SET DEFAULT_STORAGE_ENGINE='tokudb'; @@ -14,11 +16,13 @@ drop table if exists s; create table s (a int, b int); # populate table s +begin; let $a = 10000; while ($a) { eval insert into s values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9); dec $a; } +commit; set tokudb_create_index_online=1; send create index i_a on s(a); diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-1.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-1.test index b697a9977f9..e55b4aca2a9 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-1.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-1.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on SET DEFAULT_STORAGE_ENGINE='tokudb'; @@ -14,11 +16,13 @@ drop table if exists s; create table s (a int, b int); # populate table s +begin; let $a = 10000; while ($a) { eval insert into s values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9); dec $a; } +commit; set tokudb_create_index_online=1; send create index i_a on s(a) clustering=yes; diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-2.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-2.test index 0c05c685660..5b6c3af3a56 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-2.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-2.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on with replace into optimization # test is checking #3406 @@ -16,11 +18,13 @@ create table s (a int auto_increment, b int, c int, primary key (a)); --echo # populate table s --disable_query_log +begin; let $a = 10000; while ($a) { eval insert into s (b,c) values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9); dec $a; } +commit; --enable_query_log --echo # done inserting elements diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-bigchar.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-bigchar.test index 9c9b278f92c..632b1693fd0 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-bigchar.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-insert-bigchar.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on SET DEFAULT_STORAGE_ENGINE='tokudb'; @@ -16,11 +18,13 @@ create table s (a int, b varchar(2000)); --disable_query_log # populate table s +begin; let $a = 10000; while ($a) { eval insert into s values ($a,repeat('a', 2000)),($a,repeat('b', 2000)),($a,repeat('c', 2000)),($a,repeat('d', 2000)),($a,repeat('e', 2000)),($a,repeat('f', 2000)),($a,repeat('g', 2000)),($a,repeat('h', 2000)),($a,repeat('i', 2000)),($a,repeat('j', 2000)); dec $a; } +commit; --enable_query_log set tokudb_create_index_online=1; diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-update-0.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-update-0.test index b32a6f9ffd2..cd84459dcd7 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-update-0.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-update-0.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on SET DEFAULT_STORAGE_ENGINE='tokudb'; @@ -14,11 +16,13 @@ drop table if exists s; create table s (a int, b int); # populate table s +begin; let $a = 10000; while ($a) { eval insert into s values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9); dec $a; } +commit; set tokudb_create_index_online=1; send create index i_a on s(a); diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-update-1.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-update-1.test index 686f6931bb8..1038a633b52 100644 --- a/storage/tokudb/mysql-test/tokudb/t/hotindex-update-1.test +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-update-1.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc # test that deletes work when hot indexing is on SET DEFAULT_STORAGE_ENGINE='tokudb'; @@ -14,11 +16,13 @@ drop table if exists s; create table s (a int, b int); # populate table s +begin; let $a = 10000; while ($a) { eval insert into s values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9); dec $a; } +commit; set tokudb_create_index_online=1; send create index i_a on s(a) clustering=yes; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_add.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_add.result index 878792f47d9..9d5174808ac 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_add.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_add.result @@ -4,6 +4,7 @@ set session tokudb_disable_slow_alter=ON; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -69,6 +70,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL; alter table bar add column added_1 bigint default NULL; @@ -78,6 +80,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -143,6 +146,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1; alter table bar add column added_2 bigint default -1; @@ -152,6 +156,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -217,6 +222,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1; alter table bar add column added_3 bigint NOT NULL default -1; @@ -226,6 +232,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -291,6 +298,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL; @@ -300,6 +308,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -366,6 +375,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NUL insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; include/diff_tables.inc [test.foo, test.bar] +commit; alter table foo add column added_5 varchar(10) default "qwerty"; alter table bar add column added_5 varchar(10) default "qwerty"; include/diff_tables.inc [test.foo, test.bar] @@ -374,6 +384,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -439,6 +450,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt"; @@ -448,6 +460,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -513,6 +526,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL; alter table bar add column added_7 text default NULL; @@ -522,6 +536,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -587,6 +602,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL; @@ -596,6 +612,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -661,6 +678,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first; alter table bar add column added_1 bigint default NULL first; @@ -670,6 +688,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -735,6 +754,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first; alter table bar add column added_2 bigint default -1 first; @@ -744,6 +764,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -809,6 +830,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first; alter table bar add column added_3 bigint NOT NULL default -1 first; @@ -818,6 +840,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -883,6 +906,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first; alter table bar add column added_4 varchar(10) default NULL first; @@ -892,6 +916,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -957,6 +982,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first; alter table bar add column added_5 varchar(10) default "qwerty" first; @@ -966,6 +992,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1031,6 +1058,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first; @@ -1040,6 +1068,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1105,6 +1134,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first; alter table bar add column added_7 text default NULL first; @@ -1114,6 +1144,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1179,6 +1210,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first; alter table bar add column added_8 mediumtext default NULL first; @@ -1188,6 +1220,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1253,6 +1286,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b; alter table bar add column added_1 bigint default NULL after b; @@ -1262,6 +1296,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1327,6 +1362,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b; alter table bar add column added_2 bigint default -1 after b; @@ -1336,6 +1372,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1401,6 +1438,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b; @@ -1410,6 +1448,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1475,6 +1514,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b; @@ -1484,6 +1524,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1549,6 +1590,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b; @@ -1558,6 +1600,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1623,6 +1666,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b; @@ -1632,6 +1676,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1697,6 +1742,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b; alter table bar add column added_7 text default NULL after b; @@ -1706,6 +1752,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1771,6 +1818,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b; alter table bar add column added_8 mediumtext default NULL after b; @@ -1780,6 +1828,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1845,6 +1894,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL; @@ -1854,6 +1904,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1919,6 +1970,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234; @@ -1928,6 +1980,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1993,6 +2046,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; @@ -2002,6 +2056,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2067,6 +2122,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; @@ -2076,6 +2132,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2141,6 +2198,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2150,6 +2208,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2215,6 +2274,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2224,6 +2284,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2289,6 +2350,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL; @@ -2298,6 +2360,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2363,6 +2426,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; @@ -2372,6 +2436,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2437,6 +2502,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL; @@ -2446,6 +2512,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2511,6 +2578,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234; @@ -2520,6 +2588,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2585,6 +2654,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; @@ -2594,6 +2664,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2659,6 +2730,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; @@ -2668,6 +2740,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2733,6 +2806,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; @@ -2742,6 +2816,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2807,6 +2882,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2816,6 +2892,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2881,6 +2958,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1, add column added_71 text default NULL; @@ -2890,6 +2968,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2955,6 +3034,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL; @@ -2964,6 +3044,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3029,6 +3110,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; @@ -3038,6 +3120,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3103,6 +3186,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; @@ -3112,6 +3196,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3177,6 +3262,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; @@ -3186,6 +3272,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3251,6 +3338,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; @@ -3260,6 +3348,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3325,6 +3414,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; @@ -3334,6 +3424,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3399,6 +3490,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3408,6 +3500,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3473,6 +3566,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; @@ -3482,6 +3576,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3547,6 +3642,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; @@ -3556,6 +3652,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3621,6 +3718,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; @@ -3630,6 +3728,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3695,6 +3794,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; @@ -3704,6 +3804,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3769,6 +3870,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; @@ -3778,6 +3880,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3843,6 +3946,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; @@ -3852,6 +3956,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3917,6 +4022,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; @@ -3926,6 +4032,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3991,6 +4098,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -4000,6 +4108,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4065,6 +4174,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL; @@ -4074,6 +4184,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4139,6 +4250,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; @@ -4148,6 +4260,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4213,6 +4326,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; @@ -4222,6 +4336,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4287,6 +4402,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; @@ -4296,6 +4412,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4361,6 +4478,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; @@ -4370,6 +4488,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4435,6 +4554,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; @@ -4444,6 +4564,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4509,6 +4630,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; @@ -4518,6 +4640,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4583,6 +4706,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -4592,6 +4716,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4657,6 +4782,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; @@ -4666,6 +4792,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4731,6 +4858,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; @@ -4740,6 +4868,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4805,6 +4934,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; @@ -4814,6 +4944,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4879,6 +5010,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; @@ -4888,6 +5020,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4953,6 +5086,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; @@ -4962,6 +5096,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5027,6 +5162,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; @@ -5036,6 +5172,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5101,6 +5238,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; @@ -5110,6 +5248,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5175,6 +5314,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -5184,6 +5324,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5249,6 +5390,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; @@ -5258,6 +5400,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5323,6 +5466,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; @@ -5332,6 +5476,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5397,6 +5542,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL; @@ -5406,6 +5552,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5471,6 +5618,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234; @@ -5480,6 +5628,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5545,6 +5694,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; @@ -5554,6 +5704,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5619,6 +5770,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL; @@ -5628,6 +5780,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5693,6 +5846,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; @@ -5702,6 +5856,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5767,6 +5922,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -5776,6 +5932,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5841,6 +5998,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_71 text default NULL; alter table bar add column added_7 text default NULL, add column added_71 text default NULL; @@ -5850,6 +6008,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5915,6 +6074,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL; @@ -5924,6 +6084,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5989,6 +6150,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; @@ -5998,6 +6160,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6063,6 +6226,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; @@ -6072,6 +6236,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6137,6 +6302,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; @@ -6146,6 +6312,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6211,6 +6378,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; @@ -6220,6 +6388,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6285,6 +6454,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; @@ -6294,6 +6464,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6359,6 +6530,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -6368,6 +6540,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6433,6 +6606,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL; @@ -6442,6 +6616,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6507,6 +6682,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; @@ -6516,6 +6692,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6581,6 +6758,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL; @@ -6590,6 +6768,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6655,6 +6834,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234; @@ -6664,6 +6844,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6729,6 +6910,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; @@ -6738,6 +6920,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6803,6 +6986,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; @@ -6812,6 +6996,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6877,6 +7062,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -6886,6 +7072,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6951,6 +7138,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -6960,6 +7148,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7025,6 +7214,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL; @@ -7034,6 +7224,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7099,6 +7290,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; @@ -7108,6 +7300,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7173,6 +7366,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL; @@ -7182,6 +7376,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7247,6 +7442,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234; @@ -7256,6 +7452,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7321,6 +7518,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; @@ -7330,6 +7528,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7395,6 +7594,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; @@ -7404,6 +7604,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7469,6 +7670,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -7478,6 +7680,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7543,6 +7746,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -7552,6 +7756,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7617,6 +7822,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL; @@ -7626,6 +7832,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7691,6 +7898,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; @@ -7700,6 +7908,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7765,6 +7974,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; @@ -7774,6 +7984,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7839,6 +8050,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; @@ -7848,6 +8060,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7913,6 +8126,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; @@ -7922,6 +8136,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7987,6 +8202,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; @@ -7996,6 +8212,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8061,6 +8278,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -8070,6 +8288,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8135,6 +8354,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -8144,6 +8364,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8209,6 +8430,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; @@ -8218,6 +8440,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8283,6 +8506,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; @@ -8292,6 +8516,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8357,6 +8582,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; @@ -8366,6 +8592,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8431,6 +8658,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; @@ -8440,6 +8668,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8505,6 +8734,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; @@ -8514,6 +8744,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8579,6 +8810,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; @@ -8588,6 +8820,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8653,6 +8886,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -8662,6 +8896,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8727,6 +8962,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -8736,6 +8972,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8801,6 +9038,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; @@ -8810,6 +9048,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8875,6 +9114,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; @@ -8884,6 +9124,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8949,6 +9190,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; @@ -8958,6 +9200,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9023,6 +9266,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; @@ -9032,6 +9276,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9097,6 +9342,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; @@ -9106,6 +9352,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9171,6 +9418,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; @@ -9180,6 +9428,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9245,6 +9494,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; @@ -9254,6 +9504,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9319,6 +9570,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -9328,6 +9580,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9393,6 +9646,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; @@ -9402,6 +9656,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9467,6 +9722,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; @@ -9476,6 +9732,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9541,6 +9798,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; @@ -9550,6 +9808,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9615,6 +9874,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; @@ -9624,6 +9884,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9689,6 +9950,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; @@ -9698,6 +9960,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9763,6 +10026,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; @@ -9772,6 +10036,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9837,6 +10102,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; @@ -9846,6 +10112,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9911,6 +10178,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -9920,6 +10188,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9985,6 +10254,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; @@ -9994,6 +10264,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10059,6 +10330,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; @@ -10068,6 +10340,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10133,6 +10406,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL; @@ -10142,6 +10416,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10207,6 +10482,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234; @@ -10216,6 +10492,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10281,6 +10558,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; @@ -10290,6 +10568,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10355,6 +10634,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; @@ -10364,6 +10644,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10429,6 +10710,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -10438,6 +10720,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10503,6 +10786,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -10512,6 +10796,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10577,6 +10862,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_71 text default NULL; alter table bar add column added_7 text default NULL first, add column added_71 text default NULL; @@ -10586,6 +10872,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10651,6 +10938,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL; @@ -10660,6 +10948,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10725,6 +11014,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; @@ -10734,6 +11024,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10799,6 +11090,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; @@ -10808,6 +11100,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10873,6 +11166,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; @@ -10882,6 +11176,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10947,6 +11242,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; @@ -10956,6 +11252,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11021,6 +11318,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -11030,6 +11328,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11095,6 +11394,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -11104,6 +11404,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11169,6 +11470,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL; @@ -11178,6 +11480,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11243,6 +11546,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; @@ -11252,6 +11556,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11317,6 +11622,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b; @@ -11326,6 +11632,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11391,6 +11698,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b; @@ -11400,6 +11708,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11465,6 +11774,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -11474,6 +11784,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11539,6 +11850,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -11548,6 +11860,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11613,6 +11926,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -11622,6 +11936,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11687,6 +12002,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -11696,6 +12012,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11761,6 +12078,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_71 text default NULL after b; @@ -11770,6 +12088,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11835,6 +12154,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b; @@ -11844,6 +12164,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11909,6 +12230,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b; @@ -11918,6 +12240,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11983,6 +12306,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b; alter table bar add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b; @@ -11992,6 +12316,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12057,6 +12382,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b; @@ -12066,6 +12392,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12131,6 +12458,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b; @@ -12140,6 +12468,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12205,6 +12534,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b; @@ -12214,6 +12544,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12279,6 +12610,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -12288,6 +12620,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12353,6 +12686,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_71 text default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_71 text default NULL after b; @@ -12362,6 +12696,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12427,6 +12762,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b; @@ -12436,6 +12772,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12501,6 +12838,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b; @@ -12510,6 +12848,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12575,6 +12914,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b; @@ -12584,6 +12924,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12649,6 +12990,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b; @@ -12658,6 +13000,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12723,6 +13066,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b; @@ -12732,6 +13076,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12797,6 +13142,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b; @@ -12806,6 +13152,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12871,6 +13218,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -12880,6 +13228,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12945,6 +13294,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b; @@ -12954,6 +13304,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13019,6 +13370,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b; @@ -13028,6 +13380,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13093,6 +13446,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b; @@ -13102,6 +13456,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13167,6 +13522,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b; @@ -13176,6 +13532,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13241,6 +13598,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -13250,6 +13608,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13315,6 +13674,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -13324,6 +13684,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13389,6 +13750,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -13398,6 +13760,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13463,6 +13826,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -13472,6 +13836,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13537,6 +13902,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b; @@ -13546,6 +13912,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13611,6 +13978,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b; @@ -13620,6 +13988,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13685,6 +14054,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b; @@ -13694,6 +14064,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13759,6 +14130,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b; @@ -13768,6 +14140,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13833,6 +14206,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b; @@ -13842,6 +14216,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13907,6 +14282,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b; @@ -13916,6 +14292,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13981,6 +14358,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b; @@ -13990,6 +14368,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14055,6 +14434,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -14064,6 +14444,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14129,6 +14510,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b; @@ -14138,6 +14520,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14203,6 +14586,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b; @@ -14212,6 +14596,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14277,6 +14662,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b; @@ -14286,6 +14672,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14351,6 +14738,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b; @@ -14360,6 +14748,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14425,6 +14814,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b; @@ -14434,6 +14824,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14499,6 +14890,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b; @@ -14508,6 +14900,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14573,6 +14966,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b; @@ -14582,6 +14976,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14647,6 +15042,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -14656,6 +15052,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14721,6 +15118,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b; @@ -14730,6 +15128,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14795,6 +15194,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b; @@ -14804,6 +15204,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14869,6 +15270,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_11 bigint default NULL after b; @@ -14878,6 +15280,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14943,6 +15346,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b; @@ -14952,6 +15356,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15017,6 +15422,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -15026,6 +15432,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15091,6 +15498,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -15100,6 +15508,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15165,6 +15574,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -15174,6 +15584,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15239,6 +15650,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -15248,6 +15660,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15313,6 +15726,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_71 text default NULL after b; @@ -15322,6 +15736,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15387,6 +15802,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b; @@ -15396,6 +15812,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15461,6 +15878,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b; @@ -15470,6 +15888,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15535,6 +15954,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b; @@ -15544,6 +15964,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15609,6 +16030,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -15618,6 +16040,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15683,6 +16106,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -15692,6 +16116,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15757,6 +16182,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -15766,6 +16192,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15831,6 +16258,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -15840,6 +16268,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15905,6 +16334,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b; @@ -15914,6 +16344,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15979,6 +16410,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b; @@ -15988,6 +16420,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -16053,6 +16486,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1; alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_add3.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_add3.result index 6d658a1ce98..c4cb63b6799 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_add3.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_add3.result @@ -4,6 +4,7 @@ set session tokudb_disable_slow_alter=ON; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -69,6 +70,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL; alter table bar add column added_1 bigint default NULL; @@ -78,6 +80,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -143,6 +146,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1; alter table bar add column added_2 bigint default -1; @@ -152,6 +156,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -217,6 +222,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1; alter table bar add column added_3 bigint NOT NULL default -1; @@ -226,6 +232,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -291,6 +298,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL; @@ -300,6 +308,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -365,6 +374,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty"; alter table bar add column added_5 varchar(10) default "qwerty"; @@ -374,6 +384,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -439,6 +450,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt"; @@ -448,6 +460,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -513,6 +526,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL; alter table bar add column added_7 text default NULL; @@ -522,6 +536,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -587,6 +602,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL; @@ -596,6 +612,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -661,6 +678,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first; alter table bar add column added_1 bigint default NULL first; @@ -670,6 +688,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -735,6 +754,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first; alter table bar add column added_2 bigint default -1 first; @@ -744,6 +764,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -809,6 +830,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first; alter table bar add column added_3 bigint NOT NULL default -1 first; @@ -818,6 +840,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -883,6 +906,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first; alter table bar add column added_4 varchar(10) default NULL first; @@ -892,6 +916,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -957,6 +982,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first; alter table bar add column added_5 varchar(10) default "qwerty" first; @@ -966,6 +992,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1031,6 +1058,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first; @@ -1040,6 +1068,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1105,6 +1134,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first; alter table bar add column added_7 text default NULL first; @@ -1114,6 +1144,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1179,6 +1210,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first; alter table bar add column added_8 mediumtext default NULL first; @@ -1188,6 +1220,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1253,6 +1286,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb; @@ -1262,6 +1296,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1327,6 +1362,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb; alter table bar add column added_2 bigint default -1 after bbb; @@ -1336,6 +1372,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1401,6 +1438,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb; @@ -1410,6 +1448,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1475,6 +1514,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb; @@ -1484,6 +1524,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1549,6 +1590,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb; @@ -1558,6 +1600,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1623,6 +1666,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb; @@ -1632,6 +1676,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1697,6 +1742,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb; alter table bar add column added_7 text default NULL after bbb; @@ -1706,6 +1752,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1771,6 +1818,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb; @@ -1780,6 +1828,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1845,6 +1894,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL; @@ -1854,6 +1904,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1919,6 +1970,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234; @@ -1928,6 +1980,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1993,6 +2046,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; @@ -2002,6 +2056,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2067,6 +2122,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; @@ -2076,6 +2132,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2141,6 +2198,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2150,6 +2208,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2215,6 +2274,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2224,6 +2284,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2289,6 +2350,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL; @@ -2298,6 +2360,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2363,6 +2426,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; @@ -2372,6 +2436,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2437,6 +2502,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL; @@ -2446,6 +2512,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2511,6 +2578,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234; @@ -2520,6 +2588,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2585,6 +2654,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; @@ -2594,6 +2664,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2659,6 +2730,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; @@ -2668,6 +2740,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2733,6 +2806,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; @@ -2742,6 +2816,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2807,6 +2882,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2816,6 +2892,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2881,6 +2958,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1, add column added_71 text default NULL; @@ -2890,6 +2968,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2955,6 +3034,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL; @@ -2964,6 +3044,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3029,6 +3110,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; @@ -3038,6 +3120,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3103,6 +3186,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; @@ -3112,6 +3196,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3177,6 +3262,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; @@ -3186,6 +3272,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3251,6 +3338,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; @@ -3260,6 +3348,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3325,6 +3414,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; @@ -3334,6 +3424,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3399,6 +3490,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3408,6 +3500,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3473,6 +3566,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; @@ -3482,6 +3576,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3547,6 +3642,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; @@ -3556,6 +3652,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3621,6 +3718,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; @@ -3630,6 +3728,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3695,6 +3794,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; @@ -3704,6 +3804,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3769,6 +3870,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; @@ -3778,6 +3880,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3843,6 +3946,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; @@ -3852,6 +3956,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3917,6 +4022,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; @@ -3926,6 +4032,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3991,6 +4098,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -4000,6 +4108,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4065,6 +4174,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL; @@ -4074,6 +4184,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4139,6 +4250,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; @@ -4148,6 +4260,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4213,6 +4326,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; @@ -4222,6 +4336,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4287,6 +4402,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; @@ -4296,6 +4412,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4361,6 +4478,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; @@ -4370,6 +4488,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4435,6 +4554,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; @@ -4444,6 +4564,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4509,6 +4630,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; @@ -4518,6 +4640,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4583,6 +4706,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -4592,6 +4716,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4657,6 +4782,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; @@ -4666,6 +4792,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4731,6 +4858,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; @@ -4740,6 +4868,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4805,6 +4934,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; @@ -4814,6 +4944,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4879,6 +5010,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; @@ -4888,6 +5020,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4953,6 +5086,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; @@ -4962,6 +5096,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5027,6 +5162,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; @@ -5036,6 +5172,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5101,6 +5238,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; @@ -5110,6 +5248,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5175,6 +5314,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -5184,6 +5324,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5249,6 +5390,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; @@ -5258,6 +5400,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5323,6 +5466,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; @@ -5332,6 +5476,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5397,6 +5542,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL; @@ -5406,6 +5552,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5471,6 +5618,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234; @@ -5480,6 +5628,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5545,6 +5694,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; @@ -5554,6 +5704,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5619,6 +5770,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL; @@ -5628,6 +5780,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5693,6 +5846,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; @@ -5702,6 +5856,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5767,6 +5922,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -5776,6 +5932,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5841,6 +5998,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_71 text default NULL; alter table bar add column added_7 text default NULL, add column added_71 text default NULL; @@ -5850,6 +6008,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5915,6 +6074,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL; @@ -5924,6 +6084,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5989,6 +6150,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; @@ -5998,6 +6160,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6063,6 +6226,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; @@ -6072,6 +6236,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6137,6 +6302,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; @@ -6146,6 +6312,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6211,6 +6378,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; @@ -6220,6 +6388,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6285,6 +6454,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; @@ -6294,6 +6464,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6359,6 +6530,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -6368,6 +6540,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6433,6 +6606,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL; @@ -6442,6 +6616,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6507,6 +6682,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; @@ -6516,6 +6692,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6581,6 +6758,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL; @@ -6590,6 +6768,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6655,6 +6834,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234; @@ -6664,6 +6844,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6729,6 +6910,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; @@ -6738,6 +6920,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6803,6 +6986,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; @@ -6812,6 +6996,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6877,6 +7062,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -6886,6 +7072,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6951,6 +7138,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -6960,6 +7148,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7025,6 +7214,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL; @@ -7034,6 +7224,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7099,6 +7290,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; @@ -7108,6 +7300,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7173,6 +7366,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL; @@ -7182,6 +7376,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7247,6 +7442,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234; @@ -7256,6 +7452,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7321,6 +7518,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; @@ -7330,6 +7528,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7395,6 +7594,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; @@ -7404,6 +7604,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7469,6 +7670,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -7478,6 +7680,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7543,6 +7746,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -7552,6 +7756,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7617,6 +7822,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL; @@ -7626,6 +7832,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7691,6 +7898,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; @@ -7700,6 +7908,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7765,6 +7974,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; @@ -7774,6 +7984,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7839,6 +8050,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; @@ -7848,6 +8060,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7913,6 +8126,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; @@ -7922,6 +8136,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7987,6 +8202,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; @@ -7996,6 +8212,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8061,6 +8278,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -8070,6 +8288,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8135,6 +8354,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -8144,6 +8364,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8209,6 +8430,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; @@ -8218,6 +8440,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8283,6 +8506,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; @@ -8292,6 +8516,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8357,6 +8582,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; @@ -8366,6 +8592,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8431,6 +8658,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; @@ -8440,6 +8668,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8505,6 +8734,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; @@ -8514,6 +8744,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8579,6 +8810,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; @@ -8588,6 +8820,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8653,6 +8886,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -8662,6 +8896,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8727,6 +8962,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -8736,6 +8972,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8801,6 +9038,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; @@ -8810,6 +9048,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8875,6 +9114,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; @@ -8884,6 +9124,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8949,6 +9190,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; @@ -8958,6 +9200,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9023,6 +9266,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; @@ -9032,6 +9276,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9097,6 +9342,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; @@ -9106,6 +9352,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9171,6 +9418,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; @@ -9180,6 +9428,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9245,6 +9494,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; @@ -9254,6 +9504,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9319,6 +9570,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -9328,6 +9580,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9393,6 +9646,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; @@ -9402,6 +9656,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9467,6 +9722,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; @@ -9476,6 +9732,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9541,6 +9798,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; @@ -9550,6 +9808,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9615,6 +9874,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; @@ -9624,6 +9884,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9689,6 +9950,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; @@ -9698,6 +9960,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9763,6 +10026,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; @@ -9772,6 +10036,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9837,6 +10102,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; @@ -9846,6 +10112,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9911,6 +10178,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -9920,6 +10188,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9985,6 +10254,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; @@ -9994,6 +10264,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10059,6 +10330,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; @@ -10068,6 +10340,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10133,6 +10406,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL; @@ -10142,6 +10416,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10207,6 +10482,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234; @@ -10216,6 +10492,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10281,6 +10558,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; @@ -10290,6 +10568,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10355,6 +10634,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; @@ -10364,6 +10644,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10429,6 +10710,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -10438,6 +10720,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10503,6 +10786,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -10512,6 +10796,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10577,6 +10862,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_71 text default NULL; alter table bar add column added_7 text default NULL first, add column added_71 text default NULL; @@ -10586,6 +10872,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10651,6 +10938,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL; @@ -10660,6 +10948,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10725,6 +11014,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; @@ -10734,6 +11024,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10799,6 +11090,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; @@ -10808,6 +11100,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10873,6 +11166,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; @@ -10882,6 +11176,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10947,6 +11242,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; @@ -10956,6 +11252,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11021,6 +11318,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -11030,6 +11328,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11095,6 +11394,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -11104,6 +11404,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11169,6 +11470,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL; @@ -11178,6 +11480,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11243,6 +11546,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; @@ -11252,6 +11556,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11317,6 +11622,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -11326,6 +11632,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11391,6 +11698,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -11400,6 +11708,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11465,6 +11774,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -11474,6 +11784,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11539,6 +11850,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -11548,6 +11860,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11613,6 +11926,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -11622,6 +11936,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11687,6 +12002,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -11696,6 +12012,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11761,6 +12078,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb; @@ -11770,6 +12088,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11835,6 +12154,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -11844,6 +12164,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11909,6 +12230,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb; @@ -11918,6 +12240,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11983,6 +12306,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb; @@ -11992,6 +12316,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12057,6 +12382,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -12066,6 +12392,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12131,6 +12458,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -12140,6 +12468,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12205,6 +12534,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -12214,6 +12544,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12279,6 +12610,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -12288,6 +12620,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12353,6 +12686,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb; @@ -12362,6 +12696,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12427,6 +12762,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb; @@ -12436,6 +12772,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12501,6 +12838,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb; @@ -12510,6 +12848,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12575,6 +12914,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb; @@ -12584,6 +12924,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12649,6 +12990,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -12658,6 +13000,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12723,6 +13066,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -12732,6 +13076,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12797,6 +13142,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -12806,6 +13152,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12871,6 +13218,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -12880,6 +13228,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -12945,6 +13294,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb; @@ -12954,6 +13304,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13019,6 +13370,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb; @@ -13028,6 +13380,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13093,6 +13446,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -13102,6 +13456,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13167,6 +13522,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -13176,6 +13532,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13241,6 +13598,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -13250,6 +13608,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13315,6 +13674,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -13324,6 +13684,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13389,6 +13750,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -13398,6 +13760,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13463,6 +13826,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -13472,6 +13836,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13537,6 +13902,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb; @@ -13546,6 +13912,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13611,6 +13978,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -13620,6 +13988,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13685,6 +14054,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb; @@ -13694,6 +14064,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13759,6 +14130,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb; @@ -13768,6 +14140,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13833,6 +14206,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -13842,6 +14216,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13907,6 +14282,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -13916,6 +14292,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -13981,6 +14358,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -13990,6 +14368,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14055,6 +14434,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -14064,6 +14444,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14129,6 +14510,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb; @@ -14138,6 +14520,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14203,6 +14586,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb; @@ -14212,6 +14596,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14277,6 +14662,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb; @@ -14286,6 +14672,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14351,6 +14738,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb; @@ -14360,6 +14748,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14425,6 +14814,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -14434,6 +14824,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14499,6 +14890,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -14508,6 +14900,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14573,6 +14966,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -14582,6 +14976,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14647,6 +15042,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -14656,6 +15052,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14721,6 +15118,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb; @@ -14730,6 +15128,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14795,6 +15194,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb; @@ -14804,6 +15204,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14869,6 +15270,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -14878,6 +15280,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -14943,6 +15346,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -14952,6 +15356,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15017,6 +15422,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -15026,6 +15432,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15091,6 +15498,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -15100,6 +15508,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15165,6 +15574,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -15174,6 +15584,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15239,6 +15650,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -15248,6 +15660,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15313,6 +15726,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb; @@ -15322,6 +15736,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15387,6 +15802,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -15396,6 +15812,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15461,6 +15878,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -15470,6 +15888,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15535,6 +15954,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -15544,6 +15964,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15609,6 +16030,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -15618,6 +16040,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15683,6 +16106,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -15692,6 +16116,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15757,6 +16182,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -15766,6 +16192,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15831,6 +16258,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -15840,6 +16268,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15905,6 +16334,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb; @@ -15914,6 +16344,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -15979,6 +16410,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -15988,6 +16420,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -16053,6 +16486,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1; alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_blob_add.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_blob_add.result index fe8545a7873..6fb9819438c 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_blob_add.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_blob_add.result @@ -4,11 +4,13 @@ set session tokudb_disable_slow_alter=ON; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL; alter table bar add column added_1 bigint default NULL; @@ -18,11 +20,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1; alter table bar add column added_2 bigint default -1; @@ -32,11 +36,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1; alter table bar add column added_3 bigint NOT NULL default -1; @@ -46,11 +52,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL; @@ -60,11 +68,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty"; alter table bar add column added_5 varchar(10) default "qwerty"; @@ -74,11 +84,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt"; @@ -88,11 +100,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL; alter table bar add column added_7 text default NULL; @@ -102,11 +116,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL; @@ -116,11 +132,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first; alter table bar add column added_1 bigint default NULL first; @@ -130,11 +148,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first; alter table bar add column added_2 bigint default -1 first; @@ -144,11 +164,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first; alter table bar add column added_3 bigint NOT NULL default -1 first; @@ -158,11 +180,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first; alter table bar add column added_4 varchar(10) default NULL first; @@ -172,11 +196,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first; alter table bar add column added_5 varchar(10) default "qwerty" first; @@ -186,11 +212,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first; @@ -200,11 +228,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first; alter table bar add column added_7 text default NULL first; @@ -214,11 +244,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first; alter table bar add column added_8 mediumtext default NULL first; @@ -228,11 +260,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb; alter table bar add column added_1 bigint default NULL after bb; @@ -242,11 +276,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb; alter table bar add column added_2 bigint default -1 after bb; @@ -256,11 +292,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb; @@ -270,11 +308,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb; @@ -284,11 +324,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb; @@ -298,11 +340,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb; @@ -312,11 +356,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb; alter table bar add column added_7 text default NULL after bb; @@ -326,11 +372,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb; @@ -340,11 +388,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL; @@ -354,11 +404,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234; @@ -368,11 +420,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; @@ -382,11 +436,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; @@ -396,11 +452,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; @@ -410,11 +468,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -424,11 +484,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL; @@ -438,11 +500,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; @@ -452,11 +516,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL; @@ -466,11 +532,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234; @@ -480,11 +548,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; @@ -494,11 +564,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; @@ -508,11 +580,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; @@ -522,11 +596,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -536,11 +612,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1, add column added_71 text default NULL; @@ -550,11 +628,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL; @@ -564,11 +644,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; @@ -578,11 +660,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; @@ -592,11 +676,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; @@ -606,11 +692,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; @@ -620,11 +708,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; @@ -634,11 +724,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -648,11 +740,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; @@ -662,11 +756,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; @@ -676,11 +772,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; @@ -690,11 +788,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; @@ -704,11 +804,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; @@ -718,11 +820,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; @@ -732,11 +836,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; @@ -746,11 +852,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -760,11 +868,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL; @@ -774,11 +884,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; @@ -788,11 +900,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; @@ -802,11 +916,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; @@ -816,11 +932,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; @@ -830,11 +948,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; @@ -844,11 +964,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; @@ -858,11 +980,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -872,11 +996,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; @@ -886,11 +1012,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; @@ -900,11 +1028,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; @@ -914,11 +1044,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; @@ -928,11 +1060,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; @@ -942,11 +1076,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; @@ -956,11 +1092,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; @@ -970,11 +1108,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -984,11 +1124,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; @@ -998,11 +1140,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; @@ -1012,11 +1156,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL; @@ -1026,11 +1172,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234; @@ -1040,11 +1188,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; @@ -1054,11 +1204,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL; @@ -1068,11 +1220,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; @@ -1082,11 +1236,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1096,11 +1252,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_71 text default NULL; alter table bar add column added_7 text default NULL, add column added_71 text default NULL; @@ -1110,11 +1268,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL; @@ -1124,11 +1284,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; @@ -1138,11 +1300,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; @@ -1152,11 +1316,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; @@ -1166,11 +1332,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; @@ -1180,11 +1348,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; @@ -1194,11 +1364,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1208,11 +1380,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL; @@ -1222,11 +1396,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; @@ -1236,11 +1412,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL; @@ -1250,11 +1428,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234; @@ -1264,11 +1444,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; @@ -1278,11 +1460,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; @@ -1292,11 +1476,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -1306,11 +1492,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1320,11 +1508,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL; @@ -1334,11 +1524,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; @@ -1348,11 +1540,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL; @@ -1362,11 +1556,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234; @@ -1376,11 +1572,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; @@ -1390,11 +1588,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; @@ -1404,11 +1604,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -1418,11 +1620,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1432,11 +1636,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL; @@ -1446,11 +1652,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; @@ -1460,11 +1668,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; @@ -1474,11 +1684,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; @@ -1488,11 +1700,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; @@ -1502,11 +1716,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; @@ -1516,11 +1732,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -1530,11 +1748,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1544,11 +1764,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; @@ -1558,11 +1780,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; @@ -1572,11 +1796,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; @@ -1586,11 +1812,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; @@ -1600,11 +1828,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; @@ -1614,11 +1844,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; @@ -1628,11 +1860,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -1642,11 +1876,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1656,11 +1892,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; @@ -1670,11 +1908,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; @@ -1684,11 +1924,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; @@ -1698,11 +1940,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; @@ -1712,11 +1956,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; @@ -1726,11 +1972,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; @@ -1740,11 +1988,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; @@ -1754,11 +2004,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1768,11 +2020,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; @@ -1782,11 +2036,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; @@ -1796,11 +2052,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; @@ -1810,11 +2068,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; @@ -1824,11 +2084,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; @@ -1838,11 +2100,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; @@ -1852,11 +2116,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; @@ -1866,11 +2132,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1880,11 +2148,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; @@ -1894,11 +2164,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; @@ -1908,11 +2180,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL; @@ -1922,11 +2196,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234; @@ -1936,11 +2212,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; @@ -1950,11 +2228,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; @@ -1964,11 +2244,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -1978,11 +2260,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1992,11 +2276,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_71 text default NULL; alter table bar add column added_7 text default NULL first, add column added_71 text default NULL; @@ -2006,11 +2292,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL; @@ -2020,11 +2308,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; @@ -2034,11 +2324,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; @@ -2048,11 +2340,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2062,11 +2356,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; @@ -2076,11 +2372,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -2090,11 +2388,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2104,11 +2404,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL; @@ -2118,11 +2420,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; @@ -2132,11 +2436,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_11 bigint default NULL after bb; @@ -2146,11 +2452,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_21 bigint default 1234 after bb; @@ -2160,11 +2468,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -2174,11 +2484,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_41 varchar(10) default NULL after bb; @@ -2188,11 +2500,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -2202,11 +2516,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -2216,11 +2532,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_71 text default NULL after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_71 text default NULL after bb; @@ -2230,11 +2548,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_81 mediumtext default NULL after bb; @@ -2244,11 +2564,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_11 bigint default NULL after bb; @@ -2258,11 +2580,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_21 bigint default 1234 after bb; @@ -2272,11 +2596,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -2286,11 +2612,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_41 varchar(10) default NULL after bb; @@ -2300,11 +2628,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -2314,11 +2644,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -2328,11 +2660,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_71 text default NULL after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_71 text default NULL after bb; @@ -2342,11 +2676,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_81 mediumtext default NULL after bb; @@ -2356,11 +2692,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_11 bigint default NULL after bb; @@ -2370,11 +2708,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_21 bigint default 1234 after bb; @@ -2384,11 +2724,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -2398,11 +2740,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_41 varchar(10) default NULL after bb; @@ -2412,11 +2756,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -2426,11 +2772,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -2440,11 +2788,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_71 text default NULL after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_71 text default NULL after bb; @@ -2454,11 +2804,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_81 mediumtext default NULL after bb; @@ -2468,11 +2820,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_11 bigint default NULL after bb; @@ -2482,11 +2836,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_21 bigint default 1234 after bb; @@ -2496,11 +2852,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -2510,11 +2868,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_41 varchar(10) default NULL after bb; @@ -2524,11 +2884,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -2538,11 +2900,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -2552,11 +2916,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_71 text default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_71 text default NULL after bb; @@ -2566,11 +2932,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_81 mediumtext default NULL after bb; @@ -2580,11 +2948,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_11 bigint default NULL after bb; @@ -2594,11 +2964,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_21 bigint default 1234 after bb; @@ -2608,11 +2980,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -2622,11 +2996,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_41 varchar(10) default NULL after bb; @@ -2636,11 +3012,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -2650,11 +3028,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -2664,11 +3044,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_71 text default NULL after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_71 text default NULL after bb; @@ -2678,11 +3060,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_81 mediumtext default NULL after bb; @@ -2692,11 +3076,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_11 bigint default NULL after bb; @@ -2706,11 +3092,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_21 bigint default 1234 after bb; @@ -2720,11 +3108,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -2734,11 +3124,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_41 varchar(10) default NULL after bb; @@ -2748,11 +3140,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -2762,11 +3156,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -2776,11 +3172,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_71 text default NULL after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_71 text default NULL after bb; @@ -2790,11 +3188,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_81 mediumtext default NULL after bb; @@ -2804,11 +3204,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_7 text default NULL after bb, add column added_11 bigint default NULL after bb; @@ -2818,11 +3220,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_7 text default NULL after bb, add column added_21 bigint default 1234 after bb; @@ -2832,11 +3236,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_7 text default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -2846,11 +3252,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_7 text default NULL after bb, add column added_41 varchar(10) default NULL after bb; @@ -2860,11 +3268,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_7 text default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -2874,11 +3284,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_7 text default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -2888,11 +3300,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_71 text default NULL after bb; alter table bar add column added_7 text default NULL after bb, add column added_71 text default NULL after bb; @@ -2902,11 +3316,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_7 text default NULL after bb, add column added_81 mediumtext default NULL after bb; @@ -2916,11 +3332,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_11 bigint default NULL after bb; @@ -2930,11 +3348,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_21 bigint default 1234 after bb; @@ -2944,11 +3364,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -2958,11 +3380,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_41 varchar(10) default NULL after bb; @@ -2972,11 +3396,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -2986,11 +3412,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -3000,11 +3428,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_71 text default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_71 text default NULL after bb; @@ -3014,11 +3444,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_81 mediumtext default NULL after bb; @@ -3028,11 +3460,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bb, add column added_3 bigint NOT NULL default -1; alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bb, add column added_3 bigint NOT NULL default -1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_blob_drop.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_blob_drop.result index 8408267c12a..66ad044d297 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_blob_drop.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_blob_drop.result @@ -4,11 +4,13 @@ set session tokudb_disable_slow_alter=ON; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa; alter table bar drop column aa; @@ -18,11 +20,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb; alter table bar drop column bb; @@ -32,11 +36,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc; alter table bar drop column cc; @@ -46,11 +52,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd; alter table bar drop column dd; @@ -60,11 +68,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column bb; alter table bar drop column aa, drop column bb; @@ -74,11 +84,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column cc; alter table bar drop column aa, drop column cc; @@ -88,11 +100,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column dd; alter table bar drop column aa, drop column dd; @@ -102,11 +116,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column aa; alter table bar drop column bb, drop column aa; @@ -116,11 +132,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column cc; alter table bar drop column bb, drop column cc; @@ -130,11 +148,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column dd; alter table bar drop column bb, drop column dd; @@ -144,11 +164,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column aa; alter table bar drop column cc, drop column aa; @@ -158,11 +180,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column bb; alter table bar drop column cc, drop column bb; @@ -172,11 +196,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column dd; alter table bar drop column cc, drop column dd; @@ -186,11 +212,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column aa; alter table bar drop column dd, drop column aa; @@ -200,11 +228,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column bb; alter table bar drop column dd, drop column bb; @@ -214,11 +244,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column cc; alter table bar drop column dd, drop column cc; @@ -228,11 +260,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column bb, drop column cc; alter table bar drop column aa, drop column bb, drop column cc; @@ -242,11 +276,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column bb, drop column dd; alter table bar drop column aa, drop column bb, drop column dd; @@ -256,11 +292,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column cc, drop column dd; alter table bar drop column aa, drop column cc, drop column dd; @@ -270,11 +308,13 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values ("adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column cc, drop column dd; alter table bar drop column bb, drop column cc, drop column dd; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_drop.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_drop.result index df48c3ac7c2..8899f5c73cf 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_drop.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_drop.result @@ -4,6 +4,7 @@ set session tokudb_disable_slow_alter=ON; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -69,6 +70,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a; alter table bar drop column a; @@ -78,6 +80,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -143,6 +146,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b; alter table bar drop column b; @@ -152,6 +156,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -217,6 +222,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c; alter table bar drop column c; @@ -226,6 +232,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -291,6 +298,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d; alter table bar drop column d; @@ -300,6 +308,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -365,6 +374,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa; alter table bar drop column aa; @@ -374,6 +384,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -439,6 +450,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb; alter table bar drop column bb; @@ -448,6 +460,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -513,6 +526,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc; alter table bar drop column cc; @@ -522,6 +536,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -587,6 +602,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd; alter table bar drop column dd; @@ -596,6 +612,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -661,6 +678,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa; alter table bar drop column aaa; @@ -670,6 +688,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -735,6 +754,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb; alter table bar drop column bbb; @@ -744,6 +764,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -809,6 +830,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc; alter table bar drop column ccc; @@ -818,6 +840,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -883,6 +906,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd; alter table bar drop column ddd; @@ -892,6 +916,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -957,6 +982,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b; alter table bar drop column a, drop column b; @@ -966,6 +992,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1031,6 +1058,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column c; alter table bar drop column a, drop column c; @@ -1040,6 +1068,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1105,6 +1134,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column d; alter table bar drop column a, drop column d; @@ -1114,6 +1144,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1179,6 +1210,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column aa; alter table bar drop column a, drop column aa; @@ -1188,6 +1220,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1253,6 +1286,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column bb; alter table bar drop column a, drop column bb; @@ -1262,6 +1296,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1327,6 +1362,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column cc; alter table bar drop column a, drop column cc; @@ -1336,6 +1372,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1401,6 +1438,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column dd; alter table bar drop column a, drop column dd; @@ -1410,6 +1448,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1475,6 +1514,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column aaa; alter table bar drop column a, drop column aaa; @@ -1484,6 +1524,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1549,6 +1590,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column bbb; alter table bar drop column a, drop column bbb; @@ -1558,6 +1600,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1623,6 +1666,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column ccc; alter table bar drop column a, drop column ccc; @@ -1632,6 +1676,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1697,6 +1742,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column ddd; alter table bar drop column a, drop column ddd; @@ -1706,6 +1752,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1771,6 +1818,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column a; alter table bar drop column b, drop column a; @@ -1780,6 +1828,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1845,6 +1894,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column c; alter table bar drop column b, drop column c; @@ -1854,6 +1904,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1919,6 +1970,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column d; alter table bar drop column b, drop column d; @@ -1928,6 +1980,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -1993,6 +2046,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column aa; alter table bar drop column b, drop column aa; @@ -2002,6 +2056,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2067,6 +2122,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column bb; alter table bar drop column b, drop column bb; @@ -2076,6 +2132,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2141,6 +2198,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column cc; alter table bar drop column b, drop column cc; @@ -2150,6 +2208,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2215,6 +2274,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column dd; alter table bar drop column b, drop column dd; @@ -2224,6 +2284,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2289,6 +2350,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column aaa; alter table bar drop column b, drop column aaa; @@ -2298,6 +2360,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2363,6 +2426,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column bbb; alter table bar drop column b, drop column bbb; @@ -2372,6 +2436,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2437,6 +2502,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column ccc; alter table bar drop column b, drop column ccc; @@ -2446,6 +2512,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2511,6 +2578,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column ddd; alter table bar drop column b, drop column ddd; @@ -2520,6 +2588,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2585,6 +2654,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column a; alter table bar drop column c, drop column a; @@ -2594,6 +2664,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2659,6 +2730,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column b; alter table bar drop column c, drop column b; @@ -2668,6 +2740,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2733,6 +2806,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column d; alter table bar drop column c, drop column d; @@ -2742,6 +2816,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2807,6 +2882,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column aa; alter table bar drop column c, drop column aa; @@ -2816,6 +2892,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2881,6 +2958,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column bb; alter table bar drop column c, drop column bb; @@ -2890,6 +2968,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -2955,6 +3034,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column cc; alter table bar drop column c, drop column cc; @@ -2964,6 +3044,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3029,6 +3110,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column dd; alter table bar drop column c, drop column dd; @@ -3038,6 +3120,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3103,6 +3186,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column aaa; alter table bar drop column c, drop column aaa; @@ -3112,6 +3196,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3177,6 +3262,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column bbb; alter table bar drop column c, drop column bbb; @@ -3186,6 +3272,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3251,6 +3338,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column ccc; alter table bar drop column c, drop column ccc; @@ -3260,6 +3348,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3325,6 +3414,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column ddd; alter table bar drop column c, drop column ddd; @@ -3334,6 +3424,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3399,6 +3490,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column a; alter table bar drop column d, drop column a; @@ -3408,6 +3500,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3473,6 +3566,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column b; alter table bar drop column d, drop column b; @@ -3482,6 +3576,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3547,6 +3642,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column c; alter table bar drop column d, drop column c; @@ -3556,6 +3652,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3621,6 +3718,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column aa; alter table bar drop column d, drop column aa; @@ -3630,6 +3728,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3695,6 +3794,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column bb; alter table bar drop column d, drop column bb; @@ -3704,6 +3804,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3769,6 +3870,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column cc; alter table bar drop column d, drop column cc; @@ -3778,6 +3880,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3843,6 +3946,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column dd; alter table bar drop column d, drop column dd; @@ -3852,6 +3956,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3917,6 +4022,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column aaa; alter table bar drop column d, drop column aaa; @@ -3926,6 +4032,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -3991,6 +4098,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column bbb; alter table bar drop column d, drop column bbb; @@ -4000,6 +4108,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4065,6 +4174,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column ccc; alter table bar drop column d, drop column ccc; @@ -4074,6 +4184,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4139,6 +4250,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column ddd; alter table bar drop column d, drop column ddd; @@ -4148,6 +4260,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4213,6 +4326,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column a; alter table bar drop column aa, drop column a; @@ -4222,6 +4336,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4287,6 +4402,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column b; alter table bar drop column aa, drop column b; @@ -4296,6 +4412,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4361,6 +4478,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column c; alter table bar drop column aa, drop column c; @@ -4370,6 +4488,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4435,6 +4554,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column d; alter table bar drop column aa, drop column d; @@ -4444,6 +4564,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4509,6 +4630,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column bb; alter table bar drop column aa, drop column bb; @@ -4518,6 +4640,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4583,6 +4706,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column cc; alter table bar drop column aa, drop column cc; @@ -4592,6 +4716,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4657,6 +4782,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column dd; alter table bar drop column aa, drop column dd; @@ -4666,6 +4792,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4731,6 +4858,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column aaa; alter table bar drop column aa, drop column aaa; @@ -4740,6 +4868,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4805,6 +4934,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column bbb; alter table bar drop column aa, drop column bbb; @@ -4814,6 +4944,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4879,6 +5010,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column ccc; alter table bar drop column aa, drop column ccc; @@ -4888,6 +5020,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -4953,6 +5086,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column ddd; alter table bar drop column aa, drop column ddd; @@ -4962,6 +5096,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5027,6 +5162,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column a; alter table bar drop column bb, drop column a; @@ -5036,6 +5172,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5101,6 +5238,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column b; alter table bar drop column bb, drop column b; @@ -5110,6 +5248,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5175,6 +5314,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column c; alter table bar drop column bb, drop column c; @@ -5184,6 +5324,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5249,6 +5390,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column d; alter table bar drop column bb, drop column d; @@ -5258,6 +5400,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5323,6 +5466,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column aa; alter table bar drop column bb, drop column aa; @@ -5332,6 +5476,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5397,6 +5542,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column cc; alter table bar drop column bb, drop column cc; @@ -5406,6 +5552,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5471,6 +5618,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column dd; alter table bar drop column bb, drop column dd; @@ -5480,6 +5628,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5545,6 +5694,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column aaa; alter table bar drop column bb, drop column aaa; @@ -5554,6 +5704,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5619,6 +5770,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column bbb; alter table bar drop column bb, drop column bbb; @@ -5628,6 +5780,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5693,6 +5846,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column ccc; alter table bar drop column bb, drop column ccc; @@ -5702,6 +5856,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5767,6 +5922,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bb, drop column ddd; alter table bar drop column bb, drop column ddd; @@ -5776,6 +5932,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5841,6 +5998,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column a; alter table bar drop column cc, drop column a; @@ -5850,6 +6008,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5915,6 +6074,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column b; alter table bar drop column cc, drop column b; @@ -5924,6 +6084,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -5989,6 +6150,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column c; alter table bar drop column cc, drop column c; @@ -5998,6 +6160,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6063,6 +6226,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column d; alter table bar drop column cc, drop column d; @@ -6072,6 +6236,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6137,6 +6302,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column aa; alter table bar drop column cc, drop column aa; @@ -6146,6 +6312,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6211,6 +6378,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column bb; alter table bar drop column cc, drop column bb; @@ -6220,6 +6388,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6285,6 +6454,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column dd; alter table bar drop column cc, drop column dd; @@ -6294,6 +6464,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6359,6 +6530,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column aaa; alter table bar drop column cc, drop column aaa; @@ -6368,6 +6540,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6433,6 +6606,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column bbb; alter table bar drop column cc, drop column bbb; @@ -6442,6 +6616,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6507,6 +6682,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column ccc; alter table bar drop column cc, drop column ccc; @@ -6516,6 +6692,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6581,6 +6758,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column cc, drop column ddd; alter table bar drop column cc, drop column ddd; @@ -6590,6 +6768,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6655,6 +6834,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column a; alter table bar drop column dd, drop column a; @@ -6664,6 +6844,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6729,6 +6910,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column b; alter table bar drop column dd, drop column b; @@ -6738,6 +6920,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6803,6 +6986,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column c; alter table bar drop column dd, drop column c; @@ -6812,6 +6996,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6877,6 +7062,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column d; alter table bar drop column dd, drop column d; @@ -6886,6 +7072,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -6951,6 +7138,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column aa; alter table bar drop column dd, drop column aa; @@ -6960,6 +7148,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7025,6 +7214,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column bb; alter table bar drop column dd, drop column bb; @@ -7034,6 +7224,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7099,6 +7290,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column cc; alter table bar drop column dd, drop column cc; @@ -7108,6 +7300,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7173,6 +7366,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column aaa; alter table bar drop column dd, drop column aaa; @@ -7182,6 +7376,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7247,6 +7442,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column bbb; alter table bar drop column dd, drop column bbb; @@ -7256,6 +7452,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7321,6 +7518,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column ccc; alter table bar drop column dd, drop column ccc; @@ -7330,6 +7528,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7395,6 +7594,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column dd, drop column ddd; alter table bar drop column dd, drop column ddd; @@ -7404,6 +7604,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7469,6 +7670,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column a; alter table bar drop column aaa, drop column a; @@ -7478,6 +7680,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7543,6 +7746,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column b; alter table bar drop column aaa, drop column b; @@ -7552,6 +7756,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7617,6 +7822,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column c; alter table bar drop column aaa, drop column c; @@ -7626,6 +7832,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7691,6 +7898,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column d; alter table bar drop column aaa, drop column d; @@ -7700,6 +7908,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7765,6 +7974,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column aa; alter table bar drop column aaa, drop column aa; @@ -7774,6 +7984,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7839,6 +8050,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column bb; alter table bar drop column aaa, drop column bb; @@ -7848,6 +8060,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7913,6 +8126,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column cc; alter table bar drop column aaa, drop column cc; @@ -7922,6 +8136,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -7987,6 +8202,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column dd; alter table bar drop column aaa, drop column dd; @@ -7996,6 +8212,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8061,6 +8278,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column bbb; alter table bar drop column aaa, drop column bbb; @@ -8070,6 +8288,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8135,6 +8354,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column ccc; alter table bar drop column aaa, drop column ccc; @@ -8144,6 +8364,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8209,6 +8430,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column ddd; alter table bar drop column aaa, drop column ddd; @@ -8218,6 +8440,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8283,6 +8506,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column a; alter table bar drop column bbb, drop column a; @@ -8292,6 +8516,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8357,6 +8582,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column b; alter table bar drop column bbb, drop column b; @@ -8366,6 +8592,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8431,6 +8658,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column c; alter table bar drop column bbb, drop column c; @@ -8440,6 +8668,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8505,6 +8734,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column d; alter table bar drop column bbb, drop column d; @@ -8514,6 +8744,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8579,6 +8810,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column aa; alter table bar drop column bbb, drop column aa; @@ -8588,6 +8820,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8653,6 +8886,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column bb; alter table bar drop column bbb, drop column bb; @@ -8662,6 +8896,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8727,6 +8962,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column cc; alter table bar drop column bbb, drop column cc; @@ -8736,6 +8972,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8801,6 +9038,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column dd; alter table bar drop column bbb, drop column dd; @@ -8810,6 +9048,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8875,6 +9114,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column aaa; alter table bar drop column bbb, drop column aaa; @@ -8884,6 +9124,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -8949,6 +9190,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column ccc; alter table bar drop column bbb, drop column ccc; @@ -8958,6 +9200,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9023,6 +9266,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column ddd; alter table bar drop column bbb, drop column ddd; @@ -9032,6 +9276,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9097,6 +9342,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column a; alter table bar drop column ccc, drop column a; @@ -9106,6 +9352,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9171,6 +9418,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column b; alter table bar drop column ccc, drop column b; @@ -9180,6 +9428,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9245,6 +9494,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column c; alter table bar drop column ccc, drop column c; @@ -9254,6 +9504,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9319,6 +9570,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column d; alter table bar drop column ccc, drop column d; @@ -9328,6 +9580,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9393,6 +9646,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column aa; alter table bar drop column ccc, drop column aa; @@ -9402,6 +9656,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9467,6 +9722,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column bb; alter table bar drop column ccc, drop column bb; @@ -9476,6 +9732,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9541,6 +9798,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column cc; alter table bar drop column ccc, drop column cc; @@ -9550,6 +9808,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9615,6 +9874,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column dd; alter table bar drop column ccc, drop column dd; @@ -9624,6 +9884,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9689,6 +9950,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column aaa; alter table bar drop column ccc, drop column aaa; @@ -9698,6 +9960,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9763,6 +10026,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column bbb; alter table bar drop column ccc, drop column bbb; @@ -9772,6 +10036,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9837,6 +10102,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column ddd; alter table bar drop column ccc, drop column ddd; @@ -9846,6 +10112,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9911,6 +10178,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column a; alter table bar drop column ddd, drop column a; @@ -9920,6 +10188,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -9985,6 +10254,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column b; alter table bar drop column ddd, drop column b; @@ -9994,6 +10264,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10059,6 +10330,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column c; alter table bar drop column ddd, drop column c; @@ -10068,6 +10340,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10133,6 +10406,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column d; alter table bar drop column ddd, drop column d; @@ -10142,6 +10416,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10207,6 +10482,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column aa; alter table bar drop column ddd, drop column aa; @@ -10216,6 +10492,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10281,6 +10558,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column bb; alter table bar drop column ddd, drop column bb; @@ -10290,6 +10568,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10355,6 +10634,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column cc; alter table bar drop column ddd, drop column cc; @@ -10364,6 +10644,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10429,6 +10710,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column dd; alter table bar drop column ddd, drop column dd; @@ -10438,6 +10720,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10503,6 +10786,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column aaa; alter table bar drop column ddd, drop column aaa; @@ -10512,6 +10796,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10577,6 +10862,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column bbb; alter table bar drop column ddd, drop column bbb; @@ -10586,6 +10872,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10651,6 +10938,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column ccc; alter table bar drop column ddd, drop column ccc; @@ -10660,6 +10948,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10725,6 +11014,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b, drop column c; alter table bar drop column a, drop column b, drop column c; @@ -10734,6 +11024,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10799,6 +11090,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b, drop column d; alter table bar drop column a, drop column b, drop column d; @@ -10808,6 +11100,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10873,6 +11166,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column c, drop column d; alter table bar drop column a, drop column c, drop column d; @@ -10882,6 +11176,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -10947,6 +11242,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column c, drop column d; alter table bar drop column b, drop column c, drop column d; @@ -10956,6 +11252,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11021,6 +11318,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b, drop column c, drop column d; alter table bar drop column a, drop column b, drop column c, drop column d; @@ -11030,6 +11328,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11095,6 +11394,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column bb, drop column cc, drop column dd; alter table bar drop column aa, drop column bb, drop column cc, drop column dd; @@ -11104,6 +11404,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11169,6 +11470,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column bbb, drop column ccc, drop column ddd; alter table bar drop column aaa, drop column bbb, drop column ccc, drop column ddd; @@ -11178,6 +11480,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11243,6 +11546,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b, drop column c, drop column d, drop column aaa, drop column bbb, drop column ccc, drop column ddd; alter table bar drop column a, drop column b, drop column c, drop column d, drop column aaa, drop column bbb, drop column ccc, drop column ddd; @@ -11252,6 +11556,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11317,6 +11622,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aa, drop column bb, drop column cc, drop column dd, drop column aaa, drop column bbb, drop column ccc, drop column ddd; alter table bar drop column aa, drop column bb, drop column cc, drop column dd, drop column aaa, drop column bbb, drop column ccc, drop column ddd; @@ -11326,6 +11632,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds"); @@ -11391,6 +11698,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b, drop column c, drop column d, drop column aa, drop column bb, drop column cc, drop column dd; alter table bar drop column a, drop column b, drop column c, drop column d, drop column aa, drop column bb, drop column cc, drop column dd; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_fixed_add.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_fixed_add.result index 77f9b976f67..45a785127d1 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_fixed_add.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_fixed_add.result @@ -4,11 +4,13 @@ set session tokudb_disable_slow_alter=ON; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL; alter table bar add column added_1 bigint default NULL; @@ -18,11 +20,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1; alter table bar add column added_2 bigint default -1; @@ -32,11 +36,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1; alter table bar add column added_3 bigint NOT NULL default -1; @@ -46,11 +52,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL; @@ -60,11 +68,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty"; alter table bar add column added_5 varchar(10) default "qwerty"; @@ -74,11 +84,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt"; @@ -88,11 +100,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL; alter table bar add column added_7 text default NULL; @@ -102,11 +116,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL; @@ -116,11 +132,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first; alter table bar add column added_1 bigint default NULL first; @@ -130,11 +148,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first; alter table bar add column added_2 bigint default -1 first; @@ -144,11 +164,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first; alter table bar add column added_3 bigint NOT NULL default -1 first; @@ -158,11 +180,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first; alter table bar add column added_4 varchar(10) default NULL first; @@ -172,11 +196,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first; alter table bar add column added_5 varchar(10) default "qwerty" first; @@ -186,11 +212,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first; @@ -200,11 +228,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first; alter table bar add column added_7 text default NULL first; @@ -214,11 +244,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first; alter table bar add column added_8 mediumtext default NULL first; @@ -228,11 +260,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b; alter table bar add column added_1 bigint default NULL after b; @@ -242,11 +276,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b; alter table bar add column added_2 bigint default -1 after b; @@ -256,11 +292,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b; @@ -270,11 +308,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b; @@ -284,11 +324,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b; @@ -298,11 +340,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b; @@ -312,11 +356,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b; alter table bar add column added_7 text default NULL after b; @@ -326,11 +372,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b; alter table bar add column added_8 mediumtext default NULL after b; @@ -340,11 +388,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL; @@ -354,11 +404,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234; @@ -368,11 +420,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; @@ -382,11 +436,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; @@ -396,11 +452,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; @@ -410,11 +468,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -424,11 +484,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL; @@ -438,11 +500,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; @@ -452,11 +516,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL; @@ -466,11 +532,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234; @@ -480,11 +548,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; @@ -494,11 +564,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; @@ -508,11 +580,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; @@ -522,11 +596,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -536,11 +612,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1, add column added_71 text default NULL; @@ -550,11 +628,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL; @@ -564,11 +644,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; @@ -578,11 +660,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; @@ -592,11 +676,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; @@ -606,11 +692,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; @@ -620,11 +708,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; @@ -634,11 +724,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -648,11 +740,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; @@ -662,11 +756,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; @@ -676,11 +772,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; @@ -690,11 +788,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; @@ -704,11 +804,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; @@ -718,11 +820,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; @@ -732,11 +836,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; @@ -746,11 +852,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -760,11 +868,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL; @@ -774,11 +884,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; @@ -788,11 +900,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; @@ -802,11 +916,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; @@ -816,11 +932,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; @@ -830,11 +948,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; @@ -844,11 +964,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; @@ -858,11 +980,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -872,11 +996,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; @@ -886,11 +1012,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; @@ -900,11 +1028,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; @@ -914,11 +1044,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; @@ -928,11 +1060,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; @@ -942,11 +1076,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; @@ -956,11 +1092,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; @@ -970,11 +1108,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -984,11 +1124,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; @@ -998,11 +1140,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; @@ -1012,11 +1156,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL; @@ -1026,11 +1172,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234; @@ -1040,11 +1188,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; @@ -1054,11 +1204,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL; @@ -1068,11 +1220,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; @@ -1082,11 +1236,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1096,11 +1252,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_71 text default NULL; alter table bar add column added_7 text default NULL, add column added_71 text default NULL; @@ -1110,11 +1268,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL; @@ -1124,11 +1284,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; @@ -1138,11 +1300,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; @@ -1152,11 +1316,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; @@ -1166,11 +1332,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; @@ -1180,11 +1348,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; @@ -1194,11 +1364,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1208,11 +1380,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL; @@ -1222,11 +1396,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; @@ -1236,11 +1412,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL; @@ -1250,11 +1428,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234; @@ -1264,11 +1444,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; @@ -1278,11 +1460,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; @@ -1292,11 +1476,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -1306,11 +1492,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1320,11 +1508,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL; @@ -1334,11 +1524,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; @@ -1348,11 +1540,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL; @@ -1362,11 +1556,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234; @@ -1376,11 +1572,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; @@ -1390,11 +1588,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; @@ -1404,11 +1604,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -1418,11 +1620,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1432,11 +1636,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL; @@ -1446,11 +1652,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; @@ -1460,11 +1668,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; @@ -1474,11 +1684,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; @@ -1488,11 +1700,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; @@ -1502,11 +1716,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; @@ -1516,11 +1732,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -1530,11 +1748,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1544,11 +1764,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; @@ -1558,11 +1780,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; @@ -1572,11 +1796,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; @@ -1586,11 +1812,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; @@ -1600,11 +1828,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; @@ -1614,11 +1844,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; @@ -1628,11 +1860,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -1642,11 +1876,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1656,11 +1892,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; @@ -1670,11 +1908,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; @@ -1684,11 +1924,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; @@ -1698,11 +1940,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; @@ -1712,11 +1956,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; @@ -1726,11 +1972,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; @@ -1740,11 +1988,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; @@ -1754,11 +2004,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1768,11 +2020,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; @@ -1782,11 +2036,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; @@ -1796,11 +2052,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; @@ -1810,11 +2068,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; @@ -1824,11 +2084,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; @@ -1838,11 +2100,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; @@ -1852,11 +2116,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; @@ -1866,11 +2132,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1880,11 +2148,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; @@ -1894,11 +2164,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; @@ -1908,11 +2180,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL; @@ -1922,11 +2196,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234; @@ -1936,11 +2212,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; @@ -1950,11 +2228,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; @@ -1964,11 +2244,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -1978,11 +2260,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1992,11 +2276,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_71 text default NULL; alter table bar add column added_7 text default NULL first, add column added_71 text default NULL; @@ -2006,11 +2292,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL; @@ -2020,11 +2308,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; @@ -2034,11 +2324,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; @@ -2048,11 +2340,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2062,11 +2356,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; @@ -2076,11 +2372,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -2090,11 +2388,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2104,11 +2404,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL; @@ -2118,11 +2420,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; @@ -2132,11 +2436,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b; @@ -2146,11 +2452,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b; @@ -2160,11 +2468,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -2174,11 +2484,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -2188,11 +2500,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -2202,11 +2516,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -2216,11 +2532,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_71 text default NULL after b; @@ -2230,11 +2548,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b; @@ -2244,11 +2564,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b; @@ -2258,11 +2580,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b; alter table bar add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b; @@ -2272,11 +2596,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b; @@ -2286,11 +2612,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b; @@ -2300,11 +2628,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b; @@ -2314,11 +2644,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -2328,11 +2660,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_71 text default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_71 text default NULL after b; @@ -2342,11 +2676,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b; @@ -2356,11 +2692,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b; @@ -2370,11 +2708,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b; @@ -2384,11 +2724,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b; @@ -2398,11 +2740,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b; @@ -2412,11 +2756,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b; @@ -2426,11 +2772,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -2440,11 +2788,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b; @@ -2454,11 +2804,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b; @@ -2468,11 +2820,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b; @@ -2482,11 +2836,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b; @@ -2496,11 +2852,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -2510,11 +2868,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -2524,11 +2884,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -2538,11 +2900,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -2552,11 +2916,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b; @@ -2566,11 +2932,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b; @@ -2580,11 +2948,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b; @@ -2594,11 +2964,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b; @@ -2608,11 +2980,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b; @@ -2622,11 +2996,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b; @@ -2636,11 +3012,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b; @@ -2650,11 +3028,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -2664,11 +3044,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b; @@ -2678,11 +3060,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b; @@ -2692,11 +3076,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b; @@ -2706,11 +3092,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b; @@ -2720,11 +3108,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b; @@ -2734,11 +3124,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b; @@ -2748,11 +3140,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b; @@ -2762,11 +3156,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -2776,11 +3172,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b; @@ -2790,11 +3188,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b; @@ -2804,11 +3204,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_11 bigint default NULL after b; @@ -2818,11 +3220,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b; @@ -2832,11 +3236,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -2846,11 +3252,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -2860,11 +3268,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -2874,11 +3284,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -2888,11 +3300,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_71 text default NULL after b; @@ -2902,11 +3316,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b; @@ -2916,11 +3332,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b; @@ -2930,11 +3348,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b; @@ -2944,11 +3364,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -2958,11 +3380,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -2972,11 +3396,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -2986,11 +3412,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -3000,11 +3428,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b; @@ -3014,11 +3444,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b; @@ -3028,11 +3460,13 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1; alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_var_drop.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_var_drop.result index b43374d16f0..782f9cfe6d2 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_var_drop.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_all_var_drop.result @@ -4,11 +4,13 @@ set session tokudb_disable_slow_alter=ON; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa; alter table bar drop column aaa; @@ -18,11 +20,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb; alter table bar drop column bbb; @@ -32,11 +36,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc; alter table bar drop column ccc; @@ -46,11 +52,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd; alter table bar drop column ddd; @@ -60,11 +68,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column bbb; alter table bar drop column aaa, drop column bbb; @@ -74,11 +84,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column ccc; alter table bar drop column aaa, drop column ccc; @@ -88,11 +100,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column ddd; alter table bar drop column aaa, drop column ddd; @@ -102,11 +116,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column aaa; alter table bar drop column bbb, drop column aaa; @@ -116,11 +132,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column ccc; alter table bar drop column bbb, drop column ccc; @@ -130,11 +148,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column ddd; alter table bar drop column bbb, drop column ddd; @@ -144,11 +164,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column aaa; alter table bar drop column ccc, drop column aaa; @@ -158,11 +180,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column bbb; alter table bar drop column ccc, drop column bbb; @@ -172,11 +196,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column ddd; alter table bar drop column ccc, drop column ddd; @@ -186,11 +212,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column aaa; alter table bar drop column ddd, drop column aaa; @@ -200,11 +228,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column bbb; alter table bar drop column ddd, drop column bbb; @@ -214,11 +244,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column ccc; alter table bar drop column ddd, drop column ccc; @@ -228,11 +260,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column bbb, drop column ccc; alter table bar drop column aaa, drop column bbb, drop column ccc; @@ -242,11 +276,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column bbb, drop column ddd; alter table bar drop column aaa, drop column bbb, drop column ddd; @@ -256,11 +292,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column ccc, drop column ddd; alter table bar drop column aaa, drop column ccc, drop column ddd; @@ -270,11 +308,13 @@ drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column ccc, drop column ddd; alter table bar drop column bbb, drop column ccc, drop column ddd; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedblob_add.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedblob_add.result index 9c7deafff6a..6c7d61e4211 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedblob_add.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedblob_add.result @@ -4,6 +4,7 @@ set session tokudb_disable_slow_alter=ON; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -21,6 +22,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL; alter table bar add column added_1 bigint default NULL; @@ -30,6 +32,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -47,6 +50,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1; alter table bar add column added_2 bigint default -1; @@ -56,6 +60,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -73,6 +78,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1; alter table bar add column added_3 bigint NOT NULL default -1; @@ -82,6 +88,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -99,6 +106,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL; @@ -108,6 +116,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -125,6 +134,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty"; alter table bar add column added_5 varchar(10) default "qwerty"; @@ -134,6 +144,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -151,6 +162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt"; @@ -160,6 +172,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -177,6 +190,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL; alter table bar add column added_7 text default NULL; @@ -186,6 +200,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -203,6 +218,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL; @@ -212,6 +228,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -229,6 +246,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first; alter table bar add column added_1 bigint default NULL first; @@ -238,6 +256,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -255,6 +274,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first; alter table bar add column added_2 bigint default -1 first; @@ -264,6 +284,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -281,6 +302,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first; alter table bar add column added_3 bigint NOT NULL default -1 first; @@ -290,6 +312,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -307,6 +330,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first; alter table bar add column added_4 varchar(10) default NULL first; @@ -316,6 +340,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -333,6 +358,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first; alter table bar add column added_5 varchar(10) default "qwerty" first; @@ -342,6 +368,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -359,6 +386,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first; @@ -368,6 +396,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -385,6 +414,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first; alter table bar add column added_7 text default NULL first; @@ -394,6 +424,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -411,6 +442,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first; alter table bar add column added_8 mediumtext default NULL first; @@ -420,6 +452,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -437,6 +470,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b; alter table bar add column added_1 bigint default NULL after b; @@ -446,6 +480,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -463,6 +498,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b; alter table bar add column added_2 bigint default -1 after b; @@ -472,6 +508,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -489,6 +526,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b; @@ -498,6 +536,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -515,6 +554,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b; @@ -524,6 +564,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -541,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b; @@ -550,6 +592,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -567,6 +610,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b; @@ -576,6 +620,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -593,6 +638,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b; alter table bar add column added_7 text default NULL after b; @@ -602,6 +648,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -619,6 +666,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b; alter table bar add column added_8 mediumtext default NULL after b; @@ -628,6 +676,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -645,6 +694,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL; @@ -654,6 +704,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -671,6 +722,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234; @@ -680,6 +732,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -697,6 +750,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; @@ -706,6 +760,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -723,6 +778,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; @@ -732,6 +788,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -749,6 +806,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; @@ -758,6 +816,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -775,6 +834,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -784,6 +844,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -801,6 +862,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL; @@ -810,6 +872,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -827,6 +890,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; @@ -836,6 +900,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -853,6 +918,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL; @@ -862,6 +928,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -879,6 +946,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234; @@ -888,6 +956,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -905,6 +974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; @@ -914,6 +984,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -931,6 +1002,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; @@ -940,6 +1012,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -957,6 +1030,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; @@ -966,6 +1040,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -983,6 +1058,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -992,6 +1068,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1009,6 +1086,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1, add column added_71 text default NULL; @@ -1018,6 +1096,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1035,6 +1114,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL; @@ -1044,6 +1124,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1061,6 +1142,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; @@ -1070,6 +1152,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1087,6 +1170,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; @@ -1096,6 +1180,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1113,6 +1198,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; @@ -1122,6 +1208,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1139,6 +1226,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; @@ -1148,6 +1236,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1165,6 +1254,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; @@ -1174,6 +1264,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1191,6 +1282,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1200,6 +1292,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1217,6 +1310,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; @@ -1226,6 +1320,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1243,6 +1338,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; @@ -1252,6 +1348,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1269,6 +1366,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; @@ -1278,6 +1376,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1295,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; @@ -1304,6 +1404,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1321,6 +1422,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; @@ -1330,6 +1432,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1347,6 +1450,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; @@ -1356,6 +1460,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1373,6 +1478,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; @@ -1382,6 +1488,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1399,6 +1506,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1408,6 +1516,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1425,6 +1534,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL; @@ -1434,6 +1544,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1451,6 +1562,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; @@ -1460,6 +1572,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1477,6 +1590,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; @@ -1486,6 +1600,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1503,6 +1618,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; @@ -1512,6 +1628,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1529,6 +1646,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; @@ -1538,6 +1656,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1555,6 +1674,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; @@ -1564,6 +1684,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1581,6 +1702,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; @@ -1590,6 +1712,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1607,6 +1730,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1616,6 +1740,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1633,6 +1758,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; @@ -1642,6 +1768,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1659,6 +1786,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; @@ -1668,6 +1796,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1685,6 +1814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; @@ -1694,6 +1824,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1711,6 +1842,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; @@ -1720,6 +1852,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1737,6 +1870,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; @@ -1746,6 +1880,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1763,6 +1898,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; @@ -1772,6 +1908,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1789,6 +1926,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; @@ -1798,6 +1936,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1815,6 +1954,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1824,6 +1964,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1841,6 +1982,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; @@ -1850,6 +1992,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1867,6 +2010,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; @@ -1876,6 +2020,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1893,6 +2038,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL; @@ -1902,6 +2048,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1919,6 +2066,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234; @@ -1928,6 +2076,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1945,6 +2094,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; @@ -1954,6 +2104,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1971,6 +2122,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL; @@ -1980,6 +2132,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1997,6 +2150,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2006,6 +2160,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2023,6 +2178,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2032,6 +2188,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2049,6 +2206,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_71 text default NULL; alter table bar add column added_7 text default NULL, add column added_71 text default NULL; @@ -2058,6 +2216,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2075,6 +2234,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL; @@ -2084,6 +2244,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2101,6 +2262,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; @@ -2110,6 +2272,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2127,6 +2290,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; @@ -2136,6 +2300,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2153,6 +2318,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; @@ -2162,6 +2328,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2179,6 +2346,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; @@ -2188,6 +2356,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2205,6 +2374,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2214,6 +2384,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2231,6 +2402,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2240,6 +2412,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2257,6 +2430,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL; @@ -2266,6 +2440,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2283,6 +2458,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; @@ -2292,6 +2468,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2309,6 +2486,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL; @@ -2318,6 +2496,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2335,6 +2514,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234; @@ -2344,6 +2524,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2361,6 +2542,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2370,6 +2552,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2387,6 +2570,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; @@ -2396,6 +2580,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2413,6 +2598,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -2422,6 +2608,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2439,6 +2626,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2448,6 +2636,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2465,6 +2654,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL; @@ -2474,6 +2664,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2491,6 +2682,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; @@ -2500,6 +2692,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2517,6 +2710,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL; @@ -2526,6 +2720,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2543,6 +2738,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234; @@ -2552,6 +2748,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2569,6 +2766,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2578,6 +2776,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2595,6 +2794,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; @@ -2604,6 +2804,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2621,6 +2822,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2630,6 +2832,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2647,6 +2850,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2656,6 +2860,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2673,6 +2878,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL; @@ -2682,6 +2888,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2699,6 +2906,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; @@ -2708,6 +2916,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2725,6 +2934,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; @@ -2734,6 +2944,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2751,6 +2962,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; @@ -2760,6 +2972,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2777,6 +2990,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2786,6 +3000,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2803,6 +3018,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; @@ -2812,6 +3028,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2829,6 +3046,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2838,6 +3056,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2855,6 +3074,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2864,6 +3084,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2881,6 +3102,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; @@ -2890,6 +3112,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2907,6 +3130,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; @@ -2916,6 +3140,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2933,6 +3158,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; @@ -2942,6 +3168,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2959,6 +3186,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; @@ -2968,6 +3196,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2985,6 +3214,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2994,6 +3224,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3011,6 +3242,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; @@ -3020,6 +3252,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3037,6 +3270,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3046,6 +3280,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3063,6 +3298,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3072,6 +3308,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3089,6 +3326,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; @@ -3098,6 +3336,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3115,6 +3354,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; @@ -3124,6 +3364,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3141,6 +3382,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; @@ -3150,6 +3392,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3167,6 +3410,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; @@ -3176,6 +3420,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3193,6 +3438,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; @@ -3202,6 +3448,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3219,6 +3466,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; @@ -3228,6 +3476,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3245,6 +3494,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; @@ -3254,6 +3504,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3271,6 +3522,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3280,6 +3532,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3297,6 +3550,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; @@ -3306,6 +3560,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3323,6 +3578,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; @@ -3332,6 +3588,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3349,6 +3606,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; @@ -3358,6 +3616,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3375,6 +3634,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; @@ -3384,6 +3644,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3401,6 +3662,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; @@ -3410,6 +3672,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3427,6 +3690,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; @@ -3436,6 +3700,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3453,6 +3718,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; @@ -3462,6 +3728,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3479,6 +3746,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3488,6 +3756,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3505,6 +3774,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; @@ -3514,6 +3784,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3531,6 +3802,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; @@ -3540,6 +3812,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3557,6 +3830,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL; @@ -3566,6 +3840,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3583,6 +3858,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234; @@ -3592,6 +3868,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3609,6 +3886,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3618,6 +3896,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3635,6 +3914,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; @@ -3644,6 +3924,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3661,6 +3942,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3670,6 +3952,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3687,6 +3970,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3696,6 +3980,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3713,6 +3998,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_71 text default NULL; alter table bar add column added_7 text default NULL first, add column added_71 text default NULL; @@ -3722,6 +4008,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3739,6 +4026,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL; @@ -3748,6 +4036,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3765,6 +4054,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; @@ -3774,6 +4064,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3791,6 +4082,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; @@ -3800,6 +4092,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3817,6 +4110,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3826,6 +4120,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3843,6 +4138,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; @@ -3852,6 +4148,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3869,6 +4166,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3878,6 +4176,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3895,6 +4194,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3904,6 +4204,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3921,6 +4222,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL; @@ -3930,6 +4232,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3947,6 +4250,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; @@ -3956,6 +4260,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3973,6 +4278,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b; @@ -3982,6 +4288,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3999,6 +4306,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b; @@ -4008,6 +4316,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4025,6 +4334,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4034,6 +4344,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4051,6 +4362,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -4060,6 +4372,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4077,6 +4390,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4086,6 +4400,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4103,6 +4418,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4112,6 +4428,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4129,6 +4446,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_71 text default NULL after b; @@ -4138,6 +4456,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4155,6 +4474,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b; @@ -4164,6 +4484,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4181,6 +4502,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b; @@ -4190,6 +4512,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4207,6 +4530,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b; alter table bar add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b; @@ -4216,6 +4540,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4233,6 +4558,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4242,6 +4568,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4259,6 +4586,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b; @@ -4268,6 +4596,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4285,6 +4614,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4294,6 +4624,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4311,6 +4642,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4320,6 +4652,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4337,6 +4670,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_71 text default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_71 text default NULL after b; @@ -4346,6 +4680,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4363,6 +4698,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b; @@ -4372,6 +4708,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4389,6 +4726,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b; @@ -4398,6 +4736,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4415,6 +4754,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b; @@ -4424,6 +4764,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4441,6 +4782,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4450,6 +4792,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4467,6 +4810,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b; @@ -4476,6 +4820,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4493,6 +4838,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4502,6 +4848,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4519,6 +4866,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4528,6 +4876,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4545,6 +4894,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b; @@ -4554,6 +4904,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4571,6 +4922,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b; @@ -4580,6 +4932,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4597,6 +4950,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b; @@ -4606,6 +4960,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4623,6 +4978,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b; @@ -4632,6 +4988,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4649,6 +5006,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4658,6 +5016,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4675,6 +5034,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -4684,6 +5044,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4701,6 +5062,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4710,6 +5072,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4727,6 +5090,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4736,6 +5100,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4753,6 +5118,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b; @@ -4762,6 +5128,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4779,6 +5146,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b; @@ -4788,6 +5156,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4805,6 +5174,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b; @@ -4814,6 +5184,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4831,6 +5202,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b; @@ -4840,6 +5212,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4857,6 +5230,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4866,6 +5240,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4883,6 +5258,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b; @@ -4892,6 +5268,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4909,6 +5286,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4918,6 +5296,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4935,6 +5314,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4944,6 +5324,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4961,6 +5342,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b; @@ -4970,6 +5352,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4987,6 +5370,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b; @@ -4996,6 +5380,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5013,6 +5398,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b; @@ -5022,6 +5408,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5039,6 +5426,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b; @@ -5048,6 +5436,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5065,6 +5454,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b; @@ -5074,6 +5464,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5091,6 +5482,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b; @@ -5100,6 +5492,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5117,6 +5510,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b; @@ -5126,6 +5520,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5143,6 +5538,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -5152,6 +5548,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5169,6 +5566,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b; @@ -5178,6 +5576,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5195,6 +5594,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b; @@ -5204,6 +5604,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5221,6 +5622,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_11 bigint default NULL after b; @@ -5230,6 +5632,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5247,6 +5650,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b; @@ -5256,6 +5660,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5273,6 +5678,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -5282,6 +5688,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5299,6 +5706,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -5308,6 +5716,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5325,6 +5734,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -5334,6 +5744,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5351,6 +5762,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -5360,6 +5772,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5377,6 +5790,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_71 text default NULL after b; @@ -5386,6 +5800,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5403,6 +5818,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b; @@ -5412,6 +5828,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5429,6 +5846,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b; @@ -5438,6 +5856,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5455,6 +5874,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b; @@ -5464,6 +5884,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5481,6 +5902,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -5490,6 +5912,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5507,6 +5930,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -5516,6 +5940,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5533,6 +5958,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -5542,6 +5968,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5559,6 +5986,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -5568,6 +5996,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5585,6 +6014,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b; @@ -5594,6 +6024,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5611,6 +6042,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b; @@ -5620,6 +6052,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5637,6 +6070,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1; alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedblob_add2.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedblob_add2.result index a1988af2a19..c4300841813 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedblob_add2.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedblob_add2.result @@ -4,6 +4,7 @@ set session tokudb_disable_slow_alter=ON; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -21,6 +22,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL; alter table bar add column added_1 bigint default NULL; @@ -30,6 +32,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -47,6 +50,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1; alter table bar add column added_2 bigint default -1; @@ -56,6 +60,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -73,6 +78,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1; alter table bar add column added_3 bigint NOT NULL default -1; @@ -82,6 +88,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -99,6 +106,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL; @@ -108,6 +116,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -125,6 +134,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty"; alter table bar add column added_5 varchar(10) default "qwerty"; @@ -134,6 +144,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -151,6 +162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt"; @@ -160,6 +172,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -177,6 +190,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL; alter table bar add column added_7 text default NULL; @@ -186,6 +200,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -203,6 +218,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL; @@ -212,6 +228,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -229,6 +246,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first; alter table bar add column added_1 bigint default NULL first; @@ -238,6 +256,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -255,6 +274,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first; alter table bar add column added_2 bigint default -1 first; @@ -264,6 +284,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -281,6 +302,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first; alter table bar add column added_3 bigint NOT NULL default -1 first; @@ -290,6 +312,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -307,6 +330,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first; alter table bar add column added_4 varchar(10) default NULL first; @@ -316,6 +340,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -333,6 +358,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first; alter table bar add column added_5 varchar(10) default "qwerty" first; @@ -342,6 +368,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -359,6 +386,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first; @@ -368,6 +396,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -385,6 +414,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first; alter table bar add column added_7 text default NULL first; @@ -394,6 +424,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -411,6 +442,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first; alter table bar add column added_8 mediumtext default NULL first; @@ -420,6 +452,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -437,6 +470,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb; alter table bar add column added_1 bigint default NULL after bb; @@ -446,6 +480,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -463,6 +498,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb; alter table bar add column added_2 bigint default -1 after bb; @@ -472,6 +508,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -489,6 +526,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb; @@ -498,6 +536,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -515,6 +554,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb; @@ -524,6 +564,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -541,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb; @@ -550,6 +592,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -567,6 +610,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb; @@ -576,6 +620,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -593,6 +638,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb; alter table bar add column added_7 text default NULL after bb; @@ -602,6 +648,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -619,6 +666,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb; @@ -628,6 +676,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -645,6 +694,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL; @@ -654,6 +704,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -671,6 +722,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234; @@ -680,6 +732,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -697,6 +750,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; @@ -706,6 +760,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -723,6 +778,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; @@ -732,6 +788,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -749,6 +806,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; @@ -758,6 +816,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -775,6 +834,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -784,6 +844,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -801,6 +862,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL; @@ -810,6 +872,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -827,6 +890,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; @@ -836,6 +900,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -853,6 +918,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL; @@ -862,6 +928,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -879,6 +946,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234; @@ -888,6 +956,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -905,6 +974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; @@ -914,6 +984,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -931,6 +1002,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; @@ -940,6 +1012,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -957,6 +1030,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; @@ -966,6 +1040,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -983,6 +1058,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -992,6 +1068,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1009,6 +1086,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1, add column added_71 text default NULL; @@ -1018,6 +1096,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1035,6 +1114,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL; @@ -1044,6 +1124,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1061,6 +1142,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; @@ -1070,6 +1152,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1087,6 +1170,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; @@ -1096,6 +1180,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1113,6 +1198,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; @@ -1122,6 +1208,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1139,6 +1226,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; @@ -1148,6 +1236,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1165,6 +1254,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; @@ -1174,6 +1264,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1191,6 +1282,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1200,6 +1292,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1217,6 +1310,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; @@ -1226,6 +1320,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1243,6 +1338,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; @@ -1252,6 +1348,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1269,6 +1366,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; @@ -1278,6 +1376,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1295,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; @@ -1304,6 +1404,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1321,6 +1422,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; @@ -1330,6 +1432,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1347,6 +1450,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; @@ -1356,6 +1460,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1373,6 +1478,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; @@ -1382,6 +1488,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1399,6 +1506,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1408,6 +1516,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1425,6 +1534,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL; @@ -1434,6 +1544,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1451,6 +1562,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; @@ -1460,6 +1572,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1477,6 +1590,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; @@ -1486,6 +1600,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1503,6 +1618,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; @@ -1512,6 +1628,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1529,6 +1646,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; @@ -1538,6 +1656,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1555,6 +1674,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; @@ -1564,6 +1684,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1581,6 +1702,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; @@ -1590,6 +1712,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1607,6 +1730,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1616,6 +1740,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1633,6 +1758,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; @@ -1642,6 +1768,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1659,6 +1786,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; @@ -1668,6 +1796,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1685,6 +1814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; @@ -1694,6 +1824,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1711,6 +1842,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; @@ -1720,6 +1852,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1737,6 +1870,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; @@ -1746,6 +1880,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1763,6 +1898,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; @@ -1772,6 +1908,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1789,6 +1926,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; @@ -1798,6 +1936,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1815,6 +1954,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1824,6 +1964,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1841,6 +1982,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; @@ -1850,6 +1992,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1867,6 +2010,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; @@ -1876,6 +2020,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1893,6 +2038,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL; @@ -1902,6 +2048,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1919,6 +2066,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234; @@ -1928,6 +2076,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1945,6 +2094,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; @@ -1954,6 +2104,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1971,6 +2122,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL; @@ -1980,6 +2132,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1997,6 +2150,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2006,6 +2160,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2023,6 +2178,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2032,6 +2188,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2049,6 +2206,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_71 text default NULL; alter table bar add column added_7 text default NULL, add column added_71 text default NULL; @@ -2058,6 +2216,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2075,6 +2234,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL; @@ -2084,6 +2244,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2101,6 +2262,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; @@ -2110,6 +2272,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2127,6 +2290,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; @@ -2136,6 +2300,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2153,6 +2318,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; @@ -2162,6 +2328,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2179,6 +2346,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; @@ -2188,6 +2356,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2205,6 +2374,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2214,6 +2384,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2231,6 +2402,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2240,6 +2412,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2257,6 +2430,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL; @@ -2266,6 +2440,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2283,6 +2458,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; @@ -2292,6 +2468,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2309,6 +2486,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL; @@ -2318,6 +2496,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2335,6 +2514,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234; @@ -2344,6 +2524,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2361,6 +2542,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2370,6 +2552,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2387,6 +2570,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; @@ -2396,6 +2580,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2413,6 +2598,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -2422,6 +2608,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2439,6 +2626,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2448,6 +2636,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2465,6 +2654,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL; @@ -2474,6 +2664,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2491,6 +2682,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; @@ -2500,6 +2692,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2517,6 +2710,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL; @@ -2526,6 +2720,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2543,6 +2738,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234; @@ -2552,6 +2748,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2569,6 +2766,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2578,6 +2776,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2595,6 +2794,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; @@ -2604,6 +2804,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2621,6 +2822,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2630,6 +2832,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2647,6 +2850,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2656,6 +2860,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2673,6 +2878,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL; @@ -2682,6 +2888,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2699,6 +2906,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; @@ -2708,6 +2916,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2725,6 +2934,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; @@ -2734,6 +2944,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2751,6 +2962,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; @@ -2760,6 +2972,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2777,6 +2990,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2786,6 +3000,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2803,6 +3018,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; @@ -2812,6 +3028,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2829,6 +3046,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2838,6 +3056,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2855,6 +3074,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2864,6 +3084,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2881,6 +3102,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; @@ -2890,6 +3112,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2907,6 +3130,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; @@ -2916,6 +3140,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2933,6 +3158,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; @@ -2942,6 +3168,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2959,6 +3186,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; @@ -2968,6 +3196,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2985,6 +3214,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2994,6 +3224,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3011,6 +3242,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; @@ -3020,6 +3252,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3037,6 +3270,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3046,6 +3280,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3063,6 +3298,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3072,6 +3308,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3089,6 +3326,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; @@ -3098,6 +3336,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3115,6 +3354,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; @@ -3124,6 +3364,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3141,6 +3382,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; @@ -3150,6 +3392,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3167,6 +3410,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; @@ -3176,6 +3420,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3193,6 +3438,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; @@ -3202,6 +3448,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3219,6 +3466,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; @@ -3228,6 +3476,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3245,6 +3494,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; @@ -3254,6 +3504,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3271,6 +3522,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3280,6 +3532,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3297,6 +3550,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; @@ -3306,6 +3560,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3323,6 +3578,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; @@ -3332,6 +3588,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3349,6 +3606,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; @@ -3358,6 +3616,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3375,6 +3634,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; @@ -3384,6 +3644,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3401,6 +3662,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; @@ -3410,6 +3672,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3427,6 +3690,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; @@ -3436,6 +3700,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3453,6 +3718,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; @@ -3462,6 +3728,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3479,6 +3746,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3488,6 +3756,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3505,6 +3774,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; @@ -3514,6 +3784,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3531,6 +3802,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; @@ -3540,6 +3812,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3557,6 +3830,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL; @@ -3566,6 +3840,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3583,6 +3858,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234; @@ -3592,6 +3868,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3609,6 +3886,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3618,6 +3896,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3635,6 +3914,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; @@ -3644,6 +3924,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3661,6 +3942,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3670,6 +3952,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3687,6 +3970,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3696,6 +3980,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3713,6 +3998,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_71 text default NULL; alter table bar add column added_7 text default NULL first, add column added_71 text default NULL; @@ -3722,6 +4008,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3739,6 +4026,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL; @@ -3748,6 +4036,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3765,6 +4054,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; @@ -3774,6 +4064,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3791,6 +4082,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; @@ -3800,6 +4092,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3817,6 +4110,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3826,6 +4120,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3843,6 +4138,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; @@ -3852,6 +4148,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3869,6 +4166,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3878,6 +4176,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3895,6 +4194,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3904,6 +4204,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3921,6 +4222,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL; @@ -3930,6 +4232,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3947,6 +4250,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; @@ -3956,6 +4260,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3973,6 +4278,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_11 bigint default NULL after bb; @@ -3982,6 +4288,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3999,6 +4306,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_21 bigint default 1234 after bb; @@ -4008,6 +4316,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4025,6 +4334,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -4034,6 +4344,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4051,6 +4362,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_41 varchar(10) default NULL after bb; @@ -4060,6 +4372,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4077,6 +4390,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -4086,6 +4400,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4103,6 +4418,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -4112,6 +4428,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4129,6 +4446,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_71 text default NULL after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_71 text default NULL after bb; @@ -4138,6 +4456,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4155,6 +4474,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_1 bigint default NULL after bb, add column added_81 mediumtext default NULL after bb; @@ -4164,6 +4484,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4181,6 +4502,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_11 bigint default NULL after bb; @@ -4190,6 +4512,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4207,6 +4530,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_21 bigint default 1234 after bb; @@ -4216,6 +4540,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4233,6 +4558,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -4242,6 +4568,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4259,6 +4586,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_41 varchar(10) default NULL after bb; @@ -4268,6 +4596,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4285,6 +4614,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -4294,6 +4624,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4311,6 +4642,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -4320,6 +4652,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4337,6 +4670,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_71 text default NULL after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_71 text default NULL after bb; @@ -4346,6 +4680,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4363,6 +4698,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_2 bigint default -1 after bb, add column added_81 mediumtext default NULL after bb; @@ -4372,6 +4708,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4389,6 +4726,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_11 bigint default NULL after bb; @@ -4398,6 +4736,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4415,6 +4754,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_21 bigint default 1234 after bb; @@ -4424,6 +4764,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4441,6 +4782,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -4450,6 +4792,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4467,6 +4810,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_41 varchar(10) default NULL after bb; @@ -4476,6 +4820,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4493,6 +4838,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -4502,6 +4848,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4519,6 +4866,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -4528,6 +4876,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4545,6 +4894,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_71 text default NULL after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_71 text default NULL after bb; @@ -4554,6 +4904,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4571,6 +4922,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_81 mediumtext default NULL after bb; @@ -4580,6 +4932,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4597,6 +4950,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_11 bigint default NULL after bb; @@ -4606,6 +4960,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4623,6 +4978,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_21 bigint default 1234 after bb; @@ -4632,6 +4988,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4649,6 +5006,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -4658,6 +5016,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4675,6 +5034,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_41 varchar(10) default NULL after bb; @@ -4684,6 +5044,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4701,6 +5062,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -4710,6 +5072,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4727,6 +5090,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -4736,6 +5100,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4753,6 +5118,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_71 text default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_71 text default NULL after bb; @@ -4762,6 +5128,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4779,6 +5146,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_4 varchar(10) default NULL after bb, add column added_81 mediumtext default NULL after bb; @@ -4788,6 +5156,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4805,6 +5174,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_11 bigint default NULL after bb; @@ -4814,6 +5184,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4831,6 +5202,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_21 bigint default 1234 after bb; @@ -4840,6 +5212,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4857,6 +5230,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -4866,6 +5240,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4883,6 +5258,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_41 varchar(10) default NULL after bb; @@ -4892,6 +5268,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4909,6 +5286,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -4918,6 +5296,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4935,6 +5314,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -4944,6 +5324,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4961,6 +5342,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_71 text default NULL after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_71 text default NULL after bb; @@ -4970,6 +5352,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4987,6 +5370,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_81 mediumtext default NULL after bb; @@ -4996,6 +5380,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5013,6 +5398,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_11 bigint default NULL after bb; @@ -5022,6 +5408,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5039,6 +5426,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_21 bigint default 1234 after bb; @@ -5048,6 +5436,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5065,6 +5454,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -5074,6 +5464,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5091,6 +5482,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_41 varchar(10) default NULL after bb; @@ -5100,6 +5492,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5117,6 +5510,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -5126,6 +5520,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5143,6 +5538,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -5152,6 +5548,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5169,6 +5566,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_71 text default NULL after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_71 text default NULL after bb; @@ -5178,6 +5576,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5195,6 +5594,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_81 mediumtext default NULL after bb; @@ -5204,6 +5604,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5221,6 +5622,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_7 text default NULL after bb, add column added_11 bigint default NULL after bb; @@ -5230,6 +5632,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5247,6 +5650,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_7 text default NULL after bb, add column added_21 bigint default 1234 after bb; @@ -5256,6 +5660,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5273,6 +5678,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_7 text default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -5282,6 +5688,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5299,6 +5706,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_7 text default NULL after bb, add column added_41 varchar(10) default NULL after bb; @@ -5308,6 +5716,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5325,6 +5734,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_7 text default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -5334,6 +5744,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5351,6 +5762,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_7 text default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -5360,6 +5772,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5377,6 +5790,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_71 text default NULL after bb; alter table bar add column added_7 text default NULL after bb, add column added_71 text default NULL after bb; @@ -5386,6 +5800,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5403,6 +5818,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_7 text default NULL after bb, add column added_81 mediumtext default NULL after bb; @@ -5412,6 +5828,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5429,6 +5846,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_11 bigint default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_11 bigint default NULL after bb; @@ -5438,6 +5856,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5455,6 +5874,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_21 bigint default 1234 after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_21 bigint default 1234 after bb; @@ -5464,6 +5884,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5481,6 +5902,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb; @@ -5490,6 +5912,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5507,6 +5930,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_41 varchar(10) default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_41 varchar(10) default NULL after bb; @@ -5516,6 +5940,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5533,6 +5958,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb; @@ -5542,6 +5968,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5559,6 +5986,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb; @@ -5568,6 +5996,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5585,6 +6014,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_71 text default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_71 text default NULL after bb; @@ -5594,6 +6024,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5611,6 +6042,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bb, add column added_81 mediumtext default NULL after bb; alter table bar add column added_8 mediumtext default NULL after bb, add column added_81 mediumtext default NULL after bb; @@ -5620,6 +6052,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5637,6 +6070,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bb, add column added_3 bigint NOT NULL default -1; alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bb, add column added_3 bigint NOT NULL default -1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_add.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_add.result index 73689474e2b..040a2026d5d 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_add.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_add.result @@ -4,6 +4,7 @@ set session tokudb_disable_slow_alter=ON; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -21,6 +22,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL; alter table bar add column added_1 bigint default NULL; @@ -30,6 +32,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -47,6 +50,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1; alter table bar add column added_2 bigint default -1; @@ -56,6 +60,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -73,6 +78,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1; alter table bar add column added_3 bigint NOT NULL default -1; @@ -82,6 +88,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -99,6 +106,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL; @@ -108,6 +116,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -125,6 +134,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty"; alter table bar add column added_5 varchar(10) default "qwerty"; @@ -134,6 +144,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -151,6 +162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt"; @@ -160,6 +172,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -177,6 +190,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL; alter table bar add column added_7 text default NULL; @@ -186,6 +200,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -203,6 +218,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL; @@ -212,6 +228,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -229,6 +246,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first; alter table bar add column added_1 bigint default NULL first; @@ -238,6 +256,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -255,6 +274,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first; alter table bar add column added_2 bigint default -1 first; @@ -264,6 +284,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -281,6 +302,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first; alter table bar add column added_3 bigint NOT NULL default -1 first; @@ -290,6 +312,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -307,6 +330,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first; alter table bar add column added_4 varchar(10) default NULL first; @@ -316,6 +340,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -333,6 +358,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first; alter table bar add column added_5 varchar(10) default "qwerty" first; @@ -342,6 +368,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -359,6 +386,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first; @@ -368,6 +396,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -385,6 +414,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first; alter table bar add column added_7 text default NULL first; @@ -394,6 +424,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -411,6 +442,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first; alter table bar add column added_8 mediumtext default NULL first; @@ -420,6 +452,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -437,6 +470,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b; alter table bar add column added_1 bigint default NULL after b; @@ -446,6 +480,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -463,6 +498,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b; alter table bar add column added_2 bigint default -1 after b; @@ -472,6 +508,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -489,6 +526,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b; @@ -498,6 +536,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -515,6 +554,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b; @@ -524,6 +564,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -541,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b; @@ -550,6 +592,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -567,6 +610,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b; @@ -576,6 +620,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -593,6 +638,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b; alter table bar add column added_7 text default NULL after b; @@ -602,6 +648,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -619,6 +666,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b; alter table bar add column added_8 mediumtext default NULL after b; @@ -628,6 +676,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -645,6 +694,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL; @@ -654,6 +704,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -671,6 +722,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234; @@ -680,6 +732,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -697,6 +750,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; @@ -706,6 +760,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -723,6 +778,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; @@ -732,6 +788,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -749,6 +806,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; @@ -758,6 +816,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -775,6 +834,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -784,6 +844,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -801,6 +862,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL; @@ -810,6 +872,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -827,6 +890,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; @@ -836,6 +900,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -853,6 +918,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL; @@ -862,6 +928,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -879,6 +946,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234; @@ -888,6 +956,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -905,6 +974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; @@ -914,6 +984,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -931,6 +1002,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; @@ -940,6 +1012,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -957,6 +1030,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; @@ -966,6 +1040,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -983,6 +1058,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -992,6 +1068,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1009,6 +1086,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1, add column added_71 text default NULL; @@ -1018,6 +1096,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1035,6 +1114,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL; @@ -1044,6 +1124,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1061,6 +1142,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; @@ -1070,6 +1152,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1087,6 +1170,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; @@ -1096,6 +1180,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1113,6 +1198,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; @@ -1122,6 +1208,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1139,6 +1226,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; @@ -1148,6 +1236,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1165,6 +1254,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; @@ -1174,6 +1264,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1191,6 +1282,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1200,6 +1292,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1217,6 +1310,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; @@ -1226,6 +1320,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1243,6 +1338,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; @@ -1252,6 +1348,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1269,6 +1366,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; @@ -1278,6 +1376,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1295,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; @@ -1304,6 +1404,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1321,6 +1422,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; @@ -1330,6 +1432,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1347,6 +1450,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; @@ -1356,6 +1460,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1373,6 +1478,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; @@ -1382,6 +1488,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1399,6 +1506,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1408,6 +1516,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1425,6 +1534,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL; @@ -1434,6 +1544,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1451,6 +1562,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; @@ -1460,6 +1572,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1477,6 +1590,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; @@ -1486,6 +1600,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1503,6 +1618,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; @@ -1512,6 +1628,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1529,6 +1646,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; @@ -1538,6 +1656,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1555,6 +1674,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; @@ -1564,6 +1684,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1581,6 +1702,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; @@ -1590,6 +1712,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1607,6 +1730,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1616,6 +1740,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1633,6 +1758,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; @@ -1642,6 +1768,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1659,6 +1786,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; @@ -1668,6 +1796,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1685,6 +1814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; @@ -1694,6 +1824,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1711,6 +1842,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; @@ -1720,6 +1852,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1737,6 +1870,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; @@ -1746,6 +1880,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1763,6 +1898,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; @@ -1772,6 +1908,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1789,6 +1926,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; @@ -1798,6 +1936,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1815,6 +1954,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1824,6 +1964,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1841,6 +1982,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; @@ -1850,6 +1992,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1867,6 +2010,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; @@ -1876,6 +2020,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1893,6 +2038,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL; @@ -1902,6 +2048,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1919,6 +2066,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234; @@ -1928,6 +2076,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1945,6 +2094,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; @@ -1954,6 +2104,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1971,6 +2122,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL; @@ -1980,6 +2132,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1997,6 +2150,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2006,6 +2160,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2023,6 +2178,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2032,6 +2188,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2049,6 +2206,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_71 text default NULL; alter table bar add column added_7 text default NULL, add column added_71 text default NULL; @@ -2058,6 +2216,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2075,6 +2234,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL; @@ -2084,6 +2244,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2101,6 +2262,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; @@ -2110,6 +2272,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2127,6 +2290,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; @@ -2136,6 +2300,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2153,6 +2318,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; @@ -2162,6 +2328,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2179,6 +2346,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; @@ -2188,6 +2356,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2205,6 +2374,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2214,6 +2384,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2231,6 +2402,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2240,6 +2412,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2257,6 +2430,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL; @@ -2266,6 +2440,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2283,6 +2458,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; @@ -2292,6 +2468,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2309,6 +2486,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL; @@ -2318,6 +2496,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2335,6 +2514,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234; @@ -2344,6 +2524,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2361,6 +2542,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2370,6 +2552,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2387,6 +2570,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; @@ -2396,6 +2580,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2413,6 +2598,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -2422,6 +2608,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2439,6 +2626,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2448,6 +2636,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2465,6 +2654,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL; @@ -2474,6 +2664,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2491,6 +2682,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; @@ -2500,6 +2692,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2517,6 +2710,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL; @@ -2526,6 +2720,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2543,6 +2738,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234; @@ -2552,6 +2748,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2569,6 +2766,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2578,6 +2776,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2595,6 +2794,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; @@ -2604,6 +2804,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2621,6 +2822,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2630,6 +2832,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2647,6 +2850,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2656,6 +2860,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2673,6 +2878,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL; @@ -2682,6 +2888,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2699,6 +2906,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; @@ -2708,6 +2916,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2725,6 +2934,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; @@ -2734,6 +2944,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2751,6 +2962,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; @@ -2760,6 +2972,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2777,6 +2990,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2786,6 +3000,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2803,6 +3018,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; @@ -2812,6 +3028,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2829,6 +3046,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2838,6 +3056,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2855,6 +3074,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2864,6 +3084,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2881,6 +3102,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; @@ -2890,6 +3112,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2907,6 +3130,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; @@ -2916,6 +3140,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2933,6 +3158,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; @@ -2942,6 +3168,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2959,6 +3186,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; @@ -2968,6 +3196,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2985,6 +3214,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2994,6 +3224,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3011,6 +3242,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; @@ -3020,6 +3252,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3037,6 +3270,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3046,6 +3280,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3063,6 +3298,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3072,6 +3308,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3089,6 +3326,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; @@ -3098,6 +3336,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3115,6 +3354,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; @@ -3124,6 +3364,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3141,6 +3382,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; @@ -3150,6 +3392,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3167,6 +3410,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; @@ -3176,6 +3420,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3193,6 +3438,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; @@ -3202,6 +3448,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3219,6 +3466,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; @@ -3228,6 +3476,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3245,6 +3494,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; @@ -3254,6 +3504,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3271,6 +3522,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3280,6 +3532,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3297,6 +3550,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; @@ -3306,6 +3560,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3323,6 +3578,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; @@ -3332,6 +3588,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3349,6 +3606,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; @@ -3358,6 +3616,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3375,6 +3634,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; @@ -3384,6 +3644,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3401,6 +3662,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; @@ -3410,6 +3672,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3427,6 +3690,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; @@ -3436,6 +3700,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3453,6 +3718,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; @@ -3462,6 +3728,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3479,6 +3746,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3488,6 +3756,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3505,6 +3774,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; @@ -3514,6 +3784,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3531,6 +3802,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; @@ -3540,6 +3812,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3557,6 +3830,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL; @@ -3566,6 +3840,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3583,6 +3858,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234; @@ -3592,6 +3868,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3609,6 +3886,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3618,6 +3896,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3635,6 +3914,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; @@ -3644,6 +3924,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3661,6 +3942,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3670,6 +3952,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3687,6 +3970,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3696,6 +3980,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3713,6 +3998,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_71 text default NULL; alter table bar add column added_7 text default NULL first, add column added_71 text default NULL; @@ -3722,6 +4008,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3739,6 +4026,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL; @@ -3748,6 +4036,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3765,6 +4054,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; @@ -3774,6 +4064,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3791,6 +4082,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; @@ -3800,6 +4092,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3817,6 +4110,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3826,6 +4120,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3843,6 +4138,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; @@ -3852,6 +4148,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3869,6 +4166,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3878,6 +4176,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3895,6 +4194,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3904,6 +4204,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3921,6 +4222,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL; @@ -3930,6 +4232,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3947,6 +4250,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; @@ -3956,6 +4260,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3973,6 +4278,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b; @@ -3982,6 +4288,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3999,6 +4306,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b; @@ -4008,6 +4316,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4025,6 +4334,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4034,6 +4344,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4051,6 +4362,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -4060,6 +4372,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4077,6 +4390,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4086,6 +4400,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4103,6 +4418,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4112,6 +4428,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4129,6 +4446,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_71 text default NULL after b; @@ -4138,6 +4456,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4155,6 +4474,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b; @@ -4164,6 +4484,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4181,6 +4502,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b; @@ -4190,6 +4512,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4207,6 +4530,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b; alter table bar add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b; @@ -4216,6 +4540,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4233,6 +4558,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4242,6 +4568,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4259,6 +4586,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b; @@ -4268,6 +4596,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4285,6 +4614,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4294,6 +4624,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4311,6 +4642,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4320,6 +4652,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4337,6 +4670,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_71 text default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_71 text default NULL after b; @@ -4346,6 +4680,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4363,6 +4698,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b; @@ -4372,6 +4708,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4389,6 +4726,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b; @@ -4398,6 +4736,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4415,6 +4754,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b; @@ -4424,6 +4764,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4441,6 +4782,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4450,6 +4792,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4467,6 +4810,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b; @@ -4476,6 +4820,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4493,6 +4838,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4502,6 +4848,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4519,6 +4866,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4528,6 +4876,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4545,6 +4894,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b; @@ -4554,6 +4904,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4571,6 +4922,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b; @@ -4580,6 +4932,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4597,6 +4950,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b; @@ -4606,6 +4960,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4623,6 +4978,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b; @@ -4632,6 +4988,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4649,6 +5006,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4658,6 +5016,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4675,6 +5034,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -4684,6 +5044,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4701,6 +5062,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4710,6 +5072,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4727,6 +5090,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4736,6 +5100,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4753,6 +5118,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b; @@ -4762,6 +5128,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4779,6 +5146,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b; @@ -4788,6 +5156,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4805,6 +5174,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b; @@ -4814,6 +5184,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4831,6 +5202,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b; @@ -4840,6 +5212,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4857,6 +5230,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b; @@ -4866,6 +5240,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4883,6 +5258,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b; @@ -4892,6 +5268,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4909,6 +5286,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b; @@ -4918,6 +5296,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4935,6 +5314,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -4944,6 +5324,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4961,6 +5342,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b; @@ -4970,6 +5352,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4987,6 +5370,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b; @@ -4996,6 +5380,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5013,6 +5398,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b; @@ -5022,6 +5408,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5039,6 +5426,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b; @@ -5048,6 +5436,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5065,6 +5454,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b; @@ -5074,6 +5464,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5091,6 +5482,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b; @@ -5100,6 +5492,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5117,6 +5510,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b; @@ -5126,6 +5520,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5143,6 +5538,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -5152,6 +5548,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5169,6 +5566,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b; @@ -5178,6 +5576,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5195,6 +5594,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b; @@ -5204,6 +5604,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5221,6 +5622,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_11 bigint default NULL after b; @@ -5230,6 +5632,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5247,6 +5650,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b; @@ -5256,6 +5660,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5273,6 +5678,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -5282,6 +5688,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5299,6 +5706,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -5308,6 +5716,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5325,6 +5734,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -5334,6 +5744,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5351,6 +5762,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -5360,6 +5772,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5377,6 +5790,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_71 text default NULL after b; @@ -5386,6 +5800,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5403,6 +5818,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b; @@ -5412,6 +5828,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5429,6 +5846,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b; @@ -5438,6 +5856,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5455,6 +5874,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b; @@ -5464,6 +5884,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5481,6 +5902,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b; @@ -5490,6 +5912,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5507,6 +5930,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b; @@ -5516,6 +5940,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5533,6 +5958,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b; @@ -5542,6 +5968,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5559,6 +5986,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b; @@ -5568,6 +5996,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5585,6 +6014,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b; @@ -5594,6 +6024,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5611,6 +6042,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b; alter table bar add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b; @@ -5620,6 +6052,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5637,6 +6070,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1; alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_add2.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_add2.result index bb2a433dfe1..16ba8bd3f1b 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_add2.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_add2.result @@ -4,6 +4,7 @@ set session tokudb_disable_slow_alter=ON; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -21,6 +22,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL; alter table bar add column added_1 bigint default NULL; @@ -30,6 +32,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -47,6 +50,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1; alter table bar add column added_2 bigint default -1; @@ -56,6 +60,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -73,6 +78,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1; alter table bar add column added_3 bigint NOT NULL default -1; @@ -82,6 +88,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -99,6 +106,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL; @@ -108,6 +116,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -125,6 +134,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty"; alter table bar add column added_5 varchar(10) default "qwerty"; @@ -134,6 +144,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -151,6 +162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt"; @@ -160,6 +172,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -177,6 +190,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL; alter table bar add column added_7 text default NULL; @@ -186,6 +200,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -203,6 +218,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL; @@ -212,6 +228,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -229,6 +246,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first; alter table bar add column added_1 bigint default NULL first; @@ -238,6 +256,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -255,6 +274,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first; alter table bar add column added_2 bigint default -1 first; @@ -264,6 +284,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -281,6 +302,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first; alter table bar add column added_3 bigint NOT NULL default -1 first; @@ -290,6 +312,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -307,6 +330,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first; alter table bar add column added_4 varchar(10) default NULL first; @@ -316,6 +340,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -333,6 +358,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first; alter table bar add column added_5 varchar(10) default "qwerty" first; @@ -342,6 +368,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -359,6 +386,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first; @@ -368,6 +396,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -385,6 +414,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first; alter table bar add column added_7 text default NULL first; @@ -394,6 +424,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -411,6 +442,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first; alter table bar add column added_8 mediumtext default NULL first; @@ -420,6 +452,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -437,6 +470,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb; @@ -446,6 +480,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -463,6 +498,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb; alter table bar add column added_2 bigint default -1 after bbb; @@ -472,6 +508,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -489,6 +526,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb; @@ -498,6 +536,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -515,6 +554,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb; @@ -524,6 +564,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -541,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb; @@ -550,6 +592,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -567,6 +610,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb; @@ -576,6 +620,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -593,6 +638,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb; alter table bar add column added_7 text default NULL after bbb; @@ -602,6 +648,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -619,6 +666,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb; @@ -628,6 +676,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -645,6 +694,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL; @@ -654,6 +704,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -671,6 +722,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234; @@ -680,6 +732,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -697,6 +750,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; @@ -706,6 +760,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -723,6 +778,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; @@ -732,6 +788,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -749,6 +806,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; @@ -758,6 +816,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -775,6 +834,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -784,6 +844,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -801,6 +862,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL; @@ -810,6 +872,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -827,6 +890,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; @@ -836,6 +900,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -853,6 +918,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL; @@ -862,6 +928,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -879,6 +946,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234; @@ -888,6 +956,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -905,6 +974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; @@ -914,6 +984,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -931,6 +1002,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; @@ -940,6 +1012,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -957,6 +1030,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; @@ -966,6 +1040,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -983,6 +1058,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -992,6 +1068,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1009,6 +1086,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1, add column added_71 text default NULL; @@ -1018,6 +1096,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1035,6 +1114,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL; @@ -1044,6 +1124,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1061,6 +1142,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; @@ -1070,6 +1152,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1087,6 +1170,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; @@ -1096,6 +1180,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1113,6 +1198,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; @@ -1122,6 +1208,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1139,6 +1226,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; @@ -1148,6 +1236,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1165,6 +1254,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; @@ -1174,6 +1264,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1191,6 +1282,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1200,6 +1292,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1217,6 +1310,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; @@ -1226,6 +1320,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1243,6 +1338,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; @@ -1252,6 +1348,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1269,6 +1366,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; @@ -1278,6 +1376,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1295,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; @@ -1304,6 +1404,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1321,6 +1422,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; @@ -1330,6 +1432,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1347,6 +1450,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; @@ -1356,6 +1460,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1373,6 +1478,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; @@ -1382,6 +1488,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1399,6 +1506,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1408,6 +1516,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1425,6 +1534,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL; @@ -1434,6 +1544,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1451,6 +1562,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; @@ -1460,6 +1572,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1477,6 +1590,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; @@ -1486,6 +1600,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1503,6 +1618,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; @@ -1512,6 +1628,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1529,6 +1646,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; @@ -1538,6 +1656,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1555,6 +1674,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; @@ -1564,6 +1684,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1581,6 +1702,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; @@ -1590,6 +1712,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1607,6 +1730,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1616,6 +1740,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1633,6 +1758,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; @@ -1642,6 +1768,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1659,6 +1786,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; @@ -1668,6 +1796,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1685,6 +1814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; @@ -1694,6 +1824,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1711,6 +1842,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; @@ -1720,6 +1852,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1737,6 +1870,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; @@ -1746,6 +1880,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1763,6 +1898,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; @@ -1772,6 +1908,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1789,6 +1926,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; @@ -1798,6 +1936,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1815,6 +1954,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1824,6 +1964,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1841,6 +1982,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; @@ -1850,6 +1992,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1867,6 +2010,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; @@ -1876,6 +2020,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1893,6 +2038,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL; @@ -1902,6 +2048,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1919,6 +2066,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234; @@ -1928,6 +2076,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1945,6 +2094,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; @@ -1954,6 +2104,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1971,6 +2122,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL; @@ -1980,6 +2132,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1997,6 +2150,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2006,6 +2160,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2023,6 +2178,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2032,6 +2188,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2049,6 +2206,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_71 text default NULL; alter table bar add column added_7 text default NULL, add column added_71 text default NULL; @@ -2058,6 +2216,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2075,6 +2234,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL; @@ -2084,6 +2244,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2101,6 +2262,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; @@ -2110,6 +2272,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2127,6 +2290,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; @@ -2136,6 +2300,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2153,6 +2318,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; @@ -2162,6 +2328,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2179,6 +2346,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; @@ -2188,6 +2356,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2205,6 +2374,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2214,6 +2384,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2231,6 +2402,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2240,6 +2412,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2257,6 +2430,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL; @@ -2266,6 +2440,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2283,6 +2458,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; @@ -2292,6 +2468,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2309,6 +2486,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL; @@ -2318,6 +2496,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2335,6 +2514,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234; @@ -2344,6 +2524,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2361,6 +2542,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2370,6 +2552,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2387,6 +2570,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; @@ -2396,6 +2580,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2413,6 +2598,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -2422,6 +2608,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2439,6 +2626,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2448,6 +2636,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2465,6 +2654,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL; @@ -2474,6 +2664,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2491,6 +2682,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; @@ -2500,6 +2692,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2517,6 +2710,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL; @@ -2526,6 +2720,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2543,6 +2738,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234; @@ -2552,6 +2748,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2569,6 +2766,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2578,6 +2776,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2595,6 +2794,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; @@ -2604,6 +2804,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2621,6 +2822,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2630,6 +2832,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2647,6 +2850,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2656,6 +2860,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2673,6 +2878,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL; @@ -2682,6 +2888,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2699,6 +2906,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; @@ -2708,6 +2916,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2725,6 +2934,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; @@ -2734,6 +2944,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2751,6 +2962,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; @@ -2760,6 +2972,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2777,6 +2990,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2786,6 +3000,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2803,6 +3018,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; @@ -2812,6 +3028,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2829,6 +3046,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2838,6 +3056,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2855,6 +3074,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2864,6 +3084,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2881,6 +3102,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; @@ -2890,6 +3112,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2907,6 +3130,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; @@ -2916,6 +3140,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2933,6 +3158,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; @@ -2942,6 +3168,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2959,6 +3186,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; @@ -2968,6 +3196,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2985,6 +3214,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2994,6 +3224,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3011,6 +3242,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; @@ -3020,6 +3252,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3037,6 +3270,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3046,6 +3280,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3063,6 +3298,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3072,6 +3308,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3089,6 +3326,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; @@ -3098,6 +3336,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3115,6 +3354,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; @@ -3124,6 +3364,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3141,6 +3382,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; @@ -3150,6 +3392,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3167,6 +3410,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; @@ -3176,6 +3420,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3193,6 +3438,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; @@ -3202,6 +3448,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3219,6 +3466,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; @@ -3228,6 +3476,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3245,6 +3494,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; @@ -3254,6 +3504,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3271,6 +3522,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3280,6 +3532,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3297,6 +3550,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; @@ -3306,6 +3560,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3323,6 +3578,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; @@ -3332,6 +3588,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3349,6 +3606,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; @@ -3358,6 +3616,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3375,6 +3634,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; @@ -3384,6 +3644,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3401,6 +3662,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; @@ -3410,6 +3672,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3427,6 +3690,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; @@ -3436,6 +3700,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3453,6 +3718,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; @@ -3462,6 +3728,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3479,6 +3746,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3488,6 +3756,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3505,6 +3774,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; @@ -3514,6 +3784,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3531,6 +3802,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; @@ -3540,6 +3812,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3557,6 +3830,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL; @@ -3566,6 +3840,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3583,6 +3858,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234; @@ -3592,6 +3868,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3609,6 +3886,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3618,6 +3896,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3635,6 +3914,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; @@ -3644,6 +3924,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3661,6 +3942,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3670,6 +3952,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3687,6 +3970,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3696,6 +3980,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3713,6 +3998,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_71 text default NULL; alter table bar add column added_7 text default NULL first, add column added_71 text default NULL; @@ -3722,6 +4008,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3739,6 +4026,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL; @@ -3748,6 +4036,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3765,6 +4054,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; @@ -3774,6 +4064,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3791,6 +4082,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; @@ -3800,6 +4092,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3817,6 +4110,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3826,6 +4120,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3843,6 +4138,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; @@ -3852,6 +4148,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3869,6 +4166,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3878,6 +4176,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3895,6 +4194,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3904,6 +4204,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3921,6 +4222,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL; @@ -3930,6 +4232,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3947,6 +4250,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; @@ -3956,6 +4260,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3973,6 +4278,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -3982,6 +4288,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3999,6 +4306,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -4008,6 +4316,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4025,6 +4334,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4034,6 +4344,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4051,6 +4362,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4060,6 +4372,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4077,6 +4390,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4086,6 +4400,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4103,6 +4418,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4112,6 +4428,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4129,6 +4446,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb; @@ -4138,6 +4456,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4155,6 +4474,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4164,6 +4484,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4181,6 +4502,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb; @@ -4190,6 +4512,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4207,6 +4530,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb; @@ -4216,6 +4540,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4233,6 +4558,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4242,6 +4568,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4259,6 +4586,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4268,6 +4596,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4285,6 +4614,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4294,6 +4624,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4311,6 +4642,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4320,6 +4652,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4337,6 +4670,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb; @@ -4346,6 +4680,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4363,6 +4698,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4372,6 +4708,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4389,6 +4726,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb; @@ -4398,6 +4736,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4415,6 +4754,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb; @@ -4424,6 +4764,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4441,6 +4782,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4450,6 +4792,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4467,6 +4810,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4476,6 +4820,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4493,6 +4838,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4502,6 +4848,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4519,6 +4866,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4528,6 +4876,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4545,6 +4894,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb; @@ -4554,6 +4904,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4571,6 +4922,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4580,6 +4932,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4597,6 +4950,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -4606,6 +4960,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4623,6 +4978,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -4632,6 +4988,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4649,6 +5006,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4658,6 +5016,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4675,6 +5034,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4684,6 +5044,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4701,6 +5062,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4710,6 +5072,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4727,6 +5090,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4736,6 +5100,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4753,6 +5118,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb; @@ -4762,6 +5128,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4779,6 +5146,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4788,6 +5156,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4805,6 +5174,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb; @@ -4814,6 +5184,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4831,6 +5202,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb; @@ -4840,6 +5212,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4857,6 +5230,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4866,6 +5240,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4883,6 +5258,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4892,6 +5268,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4909,6 +5286,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4918,6 +5296,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4935,6 +5314,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4944,6 +5324,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4961,6 +5342,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb; @@ -4970,6 +5352,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4987,6 +5370,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4996,6 +5380,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5013,6 +5398,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb; @@ -5022,6 +5408,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5039,6 +5426,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb; @@ -5048,6 +5436,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5065,6 +5454,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -5074,6 +5464,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5091,6 +5482,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -5100,6 +5492,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5117,6 +5510,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -5126,6 +5520,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5143,6 +5538,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -5152,6 +5548,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5169,6 +5566,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb; @@ -5178,6 +5576,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5195,6 +5594,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb; @@ -5204,6 +5604,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5221,6 +5622,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -5230,6 +5632,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5247,6 +5650,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -5256,6 +5660,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5273,6 +5678,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -5282,6 +5688,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5299,6 +5706,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -5308,6 +5716,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5325,6 +5734,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -5334,6 +5744,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5351,6 +5762,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -5360,6 +5772,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5377,6 +5790,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb; @@ -5386,6 +5800,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5403,6 +5818,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -5412,6 +5828,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5429,6 +5846,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -5438,6 +5856,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5455,6 +5874,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -5464,6 +5884,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5481,6 +5902,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -5490,6 +5912,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5507,6 +5930,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -5516,6 +5940,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5533,6 +5958,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -5542,6 +5968,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5559,6 +5986,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -5568,6 +5996,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5585,6 +6014,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb; @@ -5594,6 +6024,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5611,6 +6042,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -5620,6 +6052,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5637,6 +6070,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1; alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_drop.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_drop.result index 62a80ff2f57..fb922437819 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_drop.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_fixedvar_drop.result @@ -4,6 +4,7 @@ set session tokudb_disable_slow_alter=ON; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -21,6 +22,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a; alter table bar drop column a; @@ -30,6 +32,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -47,6 +50,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b; alter table bar drop column b; @@ -56,6 +60,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -73,6 +78,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c; alter table bar drop column c; @@ -82,6 +88,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -99,6 +106,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d; alter table bar drop column d; @@ -108,6 +116,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -125,6 +134,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa; alter table bar drop column aaa; @@ -134,6 +144,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -151,6 +162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb; alter table bar drop column bbb; @@ -160,6 +172,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -177,6 +190,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc; alter table bar drop column ccc; @@ -186,6 +200,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -203,6 +218,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd; alter table bar drop column ddd; @@ -212,6 +228,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -229,6 +246,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b; alter table bar drop column a, drop column b; @@ -238,6 +256,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -255,6 +274,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column c; alter table bar drop column a, drop column c; @@ -264,6 +284,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -281,6 +302,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column d; alter table bar drop column a, drop column d; @@ -290,6 +312,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -307,6 +330,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column aaa; alter table bar drop column a, drop column aaa; @@ -316,6 +340,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -333,6 +358,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column bbb; alter table bar drop column a, drop column bbb; @@ -342,6 +368,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -359,6 +386,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column ccc; alter table bar drop column a, drop column ccc; @@ -368,6 +396,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -385,6 +414,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column ddd; alter table bar drop column a, drop column ddd; @@ -394,6 +424,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -411,6 +442,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column a; alter table bar drop column b, drop column a; @@ -420,6 +452,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -437,6 +470,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column c; alter table bar drop column b, drop column c; @@ -446,6 +480,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -463,6 +498,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column d; alter table bar drop column b, drop column d; @@ -472,6 +508,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -489,6 +526,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column aaa; alter table bar drop column b, drop column aaa; @@ -498,6 +536,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -515,6 +554,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column bbb; alter table bar drop column b, drop column bbb; @@ -524,6 +564,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -541,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column ccc; alter table bar drop column b, drop column ccc; @@ -550,6 +592,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -567,6 +610,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column ddd; alter table bar drop column b, drop column ddd; @@ -576,6 +620,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -593,6 +638,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column a; alter table bar drop column c, drop column a; @@ -602,6 +648,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -619,6 +666,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column b; alter table bar drop column c, drop column b; @@ -628,6 +676,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -645,6 +694,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column d; alter table bar drop column c, drop column d; @@ -654,6 +704,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -671,6 +722,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column aaa; alter table bar drop column c, drop column aaa; @@ -680,6 +732,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -697,6 +750,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column bbb; alter table bar drop column c, drop column bbb; @@ -706,6 +760,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -723,6 +778,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column ccc; alter table bar drop column c, drop column ccc; @@ -732,6 +788,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -749,6 +806,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column c, drop column ddd; alter table bar drop column c, drop column ddd; @@ -758,6 +816,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -775,6 +834,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column a; alter table bar drop column d, drop column a; @@ -784,6 +844,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -801,6 +862,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column b; alter table bar drop column d, drop column b; @@ -810,6 +872,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -827,6 +890,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column c; alter table bar drop column d, drop column c; @@ -836,6 +900,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -853,6 +918,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column aaa; alter table bar drop column d, drop column aaa; @@ -862,6 +928,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -879,6 +946,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column bbb; alter table bar drop column d, drop column bbb; @@ -888,6 +956,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -905,6 +974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column ccc; alter table bar drop column d, drop column ccc; @@ -914,6 +984,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -931,6 +1002,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column d, drop column ddd; alter table bar drop column d, drop column ddd; @@ -940,6 +1012,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -957,6 +1030,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column a; alter table bar drop column aaa, drop column a; @@ -966,6 +1040,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -983,6 +1058,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column b; alter table bar drop column aaa, drop column b; @@ -992,6 +1068,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1009,6 +1086,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column c; alter table bar drop column aaa, drop column c; @@ -1018,6 +1096,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1035,6 +1114,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column d; alter table bar drop column aaa, drop column d; @@ -1044,6 +1124,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1061,6 +1142,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column bbb; alter table bar drop column aaa, drop column bbb; @@ -1070,6 +1152,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1087,6 +1170,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column ccc; alter table bar drop column aaa, drop column ccc; @@ -1096,6 +1180,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1113,6 +1198,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column ddd; alter table bar drop column aaa, drop column ddd; @@ -1122,6 +1208,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1139,6 +1226,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column a; alter table bar drop column bbb, drop column a; @@ -1148,6 +1236,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1165,6 +1254,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column b; alter table bar drop column bbb, drop column b; @@ -1174,6 +1264,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1191,6 +1282,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column c; alter table bar drop column bbb, drop column c; @@ -1200,6 +1292,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1217,6 +1310,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column d; alter table bar drop column bbb, drop column d; @@ -1226,6 +1320,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1243,6 +1338,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column aaa; alter table bar drop column bbb, drop column aaa; @@ -1252,6 +1348,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1269,6 +1366,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column ccc; alter table bar drop column bbb, drop column ccc; @@ -1278,6 +1376,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1295,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column bbb, drop column ddd; alter table bar drop column bbb, drop column ddd; @@ -1304,6 +1404,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1321,6 +1422,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column a; alter table bar drop column ccc, drop column a; @@ -1330,6 +1432,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1347,6 +1450,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column b; alter table bar drop column ccc, drop column b; @@ -1356,6 +1460,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1373,6 +1478,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column c; alter table bar drop column ccc, drop column c; @@ -1382,6 +1488,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1399,6 +1506,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column d; alter table bar drop column ccc, drop column d; @@ -1408,6 +1516,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1425,6 +1534,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column aaa; alter table bar drop column ccc, drop column aaa; @@ -1434,6 +1544,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1451,6 +1562,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column bbb; alter table bar drop column ccc, drop column bbb; @@ -1460,6 +1572,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1477,6 +1590,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ccc, drop column ddd; alter table bar drop column ccc, drop column ddd; @@ -1486,6 +1600,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1503,6 +1618,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column a; alter table bar drop column ddd, drop column a; @@ -1512,6 +1628,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1529,6 +1646,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column b; alter table bar drop column ddd, drop column b; @@ -1538,6 +1656,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1555,6 +1674,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column c; alter table bar drop column ddd, drop column c; @@ -1564,6 +1684,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1581,6 +1702,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column d; alter table bar drop column ddd, drop column d; @@ -1590,6 +1712,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1607,6 +1730,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column aaa; alter table bar drop column ddd, drop column aaa; @@ -1616,6 +1740,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1633,6 +1758,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column bbb; alter table bar drop column ddd, drop column bbb; @@ -1642,6 +1768,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1659,6 +1786,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column ddd, drop column ccc; alter table bar drop column ddd, drop column ccc; @@ -1668,6 +1796,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1685,6 +1814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b, drop column c; alter table bar drop column a, drop column b, drop column c; @@ -1694,6 +1824,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1711,6 +1842,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b, drop column d; alter table bar drop column a, drop column b, drop column d; @@ -1720,6 +1852,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1737,6 +1870,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column c, drop column d; alter table bar drop column a, drop column c, drop column d; @@ -1746,6 +1880,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1763,6 +1898,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column b, drop column c, drop column d; alter table bar drop column b, drop column c, drop column d; @@ -1772,6 +1908,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1789,6 +1926,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column a, drop column b, drop column c, drop column d; alter table bar drop column a, drop column b, drop column c, drop column d; @@ -1798,6 +1936,7 @@ drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1815,6 +1954,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds"); insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo drop column aaa, drop column bbb, drop column ccc, drop column ddd; alter table bar drop column aaa, drop column bbb, drop column ccc, drop column ddd; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_varblob_add.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_varblob_add.result index 50f2bb4d6d6..ad9542eb7dd 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_varblob_add.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_varblob_add.result @@ -4,6 +4,7 @@ set session tokudb_disable_slow_alter=ON; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -21,6 +22,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL; alter table bar add column added_1 bigint default NULL; @@ -30,6 +32,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -47,6 +50,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1; alter table bar add column added_2 bigint default -1; @@ -56,6 +60,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -73,6 +78,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1; alter table bar add column added_3 bigint NOT NULL default -1; @@ -82,6 +88,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -99,6 +106,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL; @@ -108,6 +116,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -125,6 +134,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty"; alter table bar add column added_5 varchar(10) default "qwerty"; @@ -134,6 +144,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -151,6 +162,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt"; @@ -160,6 +172,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -177,6 +190,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL; alter table bar add column added_7 text default NULL; @@ -186,6 +200,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -203,6 +218,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL; @@ -212,6 +228,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -229,6 +246,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first; alter table bar add column added_1 bigint default NULL first; @@ -238,6 +256,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -255,6 +274,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first; alter table bar add column added_2 bigint default -1 first; @@ -264,6 +284,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -281,6 +302,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first; alter table bar add column added_3 bigint NOT NULL default -1 first; @@ -290,6 +312,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -307,6 +330,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first; alter table bar add column added_4 varchar(10) default NULL first; @@ -316,6 +340,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -333,6 +358,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first; alter table bar add column added_5 varchar(10) default "qwerty" first; @@ -342,6 +368,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -359,6 +386,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first; @@ -368,6 +396,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -385,6 +414,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first; alter table bar add column added_7 text default NULL first; @@ -394,6 +424,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -411,6 +442,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first; alter table bar add column added_8 mediumtext default NULL first; @@ -420,6 +452,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -437,6 +470,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb; @@ -446,6 +480,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -463,6 +498,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb; alter table bar add column added_2 bigint default -1 after bbb; @@ -472,6 +508,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -489,6 +526,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb; @@ -498,6 +536,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -515,6 +554,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb; @@ -524,6 +564,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -541,6 +582,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb; @@ -550,6 +592,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -567,6 +610,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb; @@ -576,6 +620,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -593,6 +638,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb; alter table bar add column added_7 text default NULL after bbb; @@ -602,6 +648,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -619,6 +666,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb; @@ -628,6 +676,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -645,6 +694,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL; @@ -654,6 +704,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -671,6 +722,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234; @@ -680,6 +732,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -697,6 +750,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54; @@ -706,6 +760,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -723,6 +778,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL; @@ -732,6 +788,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -749,6 +806,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab"; @@ -758,6 +816,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -775,6 +834,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -784,6 +844,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -801,6 +862,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL; @@ -810,6 +872,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -827,6 +890,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL; @@ -836,6 +900,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -853,6 +918,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL; @@ -862,6 +928,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -879,6 +946,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234; @@ -888,6 +956,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -905,6 +974,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54; @@ -914,6 +984,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -931,6 +1002,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL; @@ -940,6 +1012,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -957,6 +1030,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab"; @@ -966,6 +1040,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -983,6 +1058,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -992,6 +1068,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1009,6 +1086,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1, add column added_71 text default NULL; @@ -1018,6 +1096,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1035,6 +1114,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL; @@ -1044,6 +1124,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1061,6 +1142,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL; @@ -1070,6 +1152,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1087,6 +1170,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234; @@ -1096,6 +1180,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1113,6 +1198,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54; @@ -1122,6 +1208,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1139,6 +1226,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL; @@ -1148,6 +1236,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1165,6 +1254,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab"; @@ -1174,6 +1264,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1191,6 +1282,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1200,6 +1292,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1217,6 +1310,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL; @@ -1226,6 +1320,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1243,6 +1338,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL; @@ -1252,6 +1348,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1269,6 +1366,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL; @@ -1278,6 +1376,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1295,6 +1394,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234; @@ -1304,6 +1404,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1321,6 +1422,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54; @@ -1330,6 +1432,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1347,6 +1450,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL; @@ -1356,6 +1460,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1373,6 +1478,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab"; @@ -1382,6 +1488,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1399,6 +1506,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1408,6 +1516,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1425,6 +1534,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL; @@ -1434,6 +1544,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1451,6 +1562,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL; @@ -1460,6 +1572,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1477,6 +1590,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL; @@ -1486,6 +1600,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1503,6 +1618,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234; @@ -1512,6 +1628,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1529,6 +1646,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54; @@ -1538,6 +1656,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1555,6 +1674,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL; @@ -1564,6 +1684,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1581,6 +1702,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab"; @@ -1590,6 +1712,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1607,6 +1730,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1616,6 +1740,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1633,6 +1758,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL; @@ -1642,6 +1768,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1659,6 +1786,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL; @@ -1668,6 +1796,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1685,6 +1814,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL; @@ -1694,6 +1824,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1711,6 +1842,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234; @@ -1720,6 +1852,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1737,6 +1870,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54; @@ -1746,6 +1880,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1763,6 +1898,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL; @@ -1772,6 +1908,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1789,6 +1926,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab"; @@ -1798,6 +1936,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1815,6 +1954,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -1824,6 +1964,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1841,6 +1982,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL; @@ -1850,6 +1992,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1867,6 +2010,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL; @@ -1876,6 +2020,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1893,6 +2038,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL; @@ -1902,6 +2048,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1919,6 +2066,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234; @@ -1928,6 +2076,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1945,6 +2094,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54; @@ -1954,6 +2104,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1971,6 +2122,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL; @@ -1980,6 +2132,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -1997,6 +2150,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2006,6 +2160,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2023,6 +2178,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2032,6 +2188,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2049,6 +2206,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_71 text default NULL; alter table bar add column added_7 text default NULL, add column added_71 text default NULL; @@ -2058,6 +2216,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2075,6 +2234,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL; @@ -2084,6 +2244,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2101,6 +2262,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL; @@ -2110,6 +2272,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2127,6 +2290,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234; @@ -2136,6 +2300,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2153,6 +2318,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54; @@ -2162,6 +2328,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2179,6 +2346,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL; @@ -2188,6 +2356,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2205,6 +2374,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab"; @@ -2214,6 +2384,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2231,6 +2402,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2240,6 +2412,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2257,6 +2430,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL; @@ -2266,6 +2440,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2283,6 +2458,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL; @@ -2292,6 +2468,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2309,6 +2486,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL; alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL; @@ -2318,6 +2496,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2335,6 +2514,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234; alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234; @@ -2344,6 +2524,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2361,6 +2542,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2370,6 +2552,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2387,6 +2570,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL; @@ -2396,6 +2580,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2413,6 +2598,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -2422,6 +2608,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2439,6 +2626,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2448,6 +2636,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2465,6 +2654,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL; alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL; @@ -2474,6 +2664,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2491,6 +2682,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL; @@ -2500,6 +2692,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2517,6 +2710,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL; alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL; @@ -2526,6 +2720,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2543,6 +2738,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234; alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234; @@ -2552,6 +2748,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2569,6 +2766,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2578,6 +2776,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2595,6 +2794,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL; @@ -2604,6 +2804,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2621,6 +2822,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2630,6 +2832,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2647,6 +2850,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2656,6 +2860,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2673,6 +2878,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL; alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL; @@ -2682,6 +2888,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2699,6 +2906,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL; @@ -2708,6 +2916,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2725,6 +2934,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL; @@ -2734,6 +2944,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2751,6 +2962,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234; @@ -2760,6 +2972,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2777,6 +2990,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54; @@ -2786,6 +3000,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2803,6 +3018,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL; @@ -2812,6 +3028,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2829,6 +3046,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab"; @@ -2838,6 +3056,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2855,6 +3074,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -2864,6 +3084,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2881,6 +3102,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL; @@ -2890,6 +3112,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2907,6 +3130,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL; @@ -2916,6 +3140,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2933,6 +3158,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL; @@ -2942,6 +3168,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2959,6 +3186,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234; @@ -2968,6 +3196,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -2985,6 +3214,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54; @@ -2994,6 +3224,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3011,6 +3242,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL; @@ -3020,6 +3252,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3037,6 +3270,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3046,6 +3280,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3063,6 +3298,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3072,6 +3308,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3089,6 +3326,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL; @@ -3098,6 +3336,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3115,6 +3354,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL; @@ -3124,6 +3364,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3141,6 +3382,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL; @@ -3150,6 +3392,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3167,6 +3410,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234; @@ -3176,6 +3420,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3193,6 +3438,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54; @@ -3202,6 +3448,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3219,6 +3466,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL; @@ -3228,6 +3476,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3245,6 +3494,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab"; @@ -3254,6 +3504,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3271,6 +3522,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3280,6 +3532,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3297,6 +3550,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL; @@ -3306,6 +3560,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3323,6 +3578,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL; @@ -3332,6 +3588,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3349,6 +3606,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL; @@ -3358,6 +3616,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3375,6 +3634,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234; @@ -3384,6 +3644,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3401,6 +3662,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54; @@ -3410,6 +3672,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3427,6 +3690,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL; @@ -3436,6 +3700,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3453,6 +3718,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab"; @@ -3462,6 +3728,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3479,6 +3746,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3488,6 +3756,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3505,6 +3774,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL; @@ -3514,6 +3784,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3531,6 +3802,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL; @@ -3540,6 +3812,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3557,6 +3830,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL; alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL; @@ -3566,6 +3840,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3583,6 +3858,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234; alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234; @@ -3592,6 +3868,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3609,6 +3886,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3618,6 +3896,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3635,6 +3914,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL; @@ -3644,6 +3924,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3661,6 +3942,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3670,6 +3952,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3687,6 +3970,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3696,6 +3980,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3713,6 +3998,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_71 text default NULL; alter table bar add column added_7 text default NULL first, add column added_71 text default NULL; @@ -3722,6 +4008,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3739,6 +4026,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL; @@ -3748,6 +4036,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3765,6 +4054,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL; @@ -3774,6 +4064,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3791,6 +4082,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234; @@ -3800,6 +4092,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3817,6 +4110,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54; @@ -3826,6 +4120,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3843,6 +4138,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL; @@ -3852,6 +4148,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3869,6 +4166,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab"; @@ -3878,6 +4176,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3895,6 +4194,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab"; @@ -3904,6 +4204,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3921,6 +4222,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL; @@ -3930,6 +4232,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3947,6 +4250,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL; @@ -3956,6 +4260,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3973,6 +4278,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -3982,6 +4288,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -3999,6 +4306,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -4008,6 +4316,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4025,6 +4334,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4034,6 +4344,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4051,6 +4362,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4060,6 +4372,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4077,6 +4390,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4086,6 +4400,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4103,6 +4418,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4112,6 +4428,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4129,6 +4446,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb; @@ -4138,6 +4456,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4155,6 +4474,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4164,6 +4484,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4181,6 +4502,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb; @@ -4190,6 +4512,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4207,6 +4530,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb; @@ -4216,6 +4540,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4233,6 +4558,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4242,6 +4568,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4259,6 +4586,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4268,6 +4596,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4285,6 +4614,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4294,6 +4624,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4311,6 +4642,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4320,6 +4652,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4337,6 +4670,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb; @@ -4346,6 +4680,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4363,6 +4698,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4372,6 +4708,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4389,6 +4726,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb; @@ -4398,6 +4736,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4415,6 +4754,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb; @@ -4424,6 +4764,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4441,6 +4782,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4450,6 +4792,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4467,6 +4810,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4476,6 +4820,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4493,6 +4838,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4502,6 +4848,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4519,6 +4866,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4528,6 +4876,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4545,6 +4894,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb; @@ -4554,6 +4904,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4571,6 +4922,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4580,6 +4932,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4597,6 +4950,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -4606,6 +4960,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4623,6 +4978,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -4632,6 +4988,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4649,6 +5006,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4658,6 +5016,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4675,6 +5034,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4684,6 +5044,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4701,6 +5062,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4710,6 +5072,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4727,6 +5090,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4736,6 +5100,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4753,6 +5118,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb; @@ -4762,6 +5128,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4779,6 +5146,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4788,6 +5156,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4805,6 +5174,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb; @@ -4814,6 +5184,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4831,6 +5202,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb; @@ -4840,6 +5212,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4857,6 +5230,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -4866,6 +5240,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4883,6 +5258,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -4892,6 +5268,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4909,6 +5286,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -4918,6 +5296,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4935,6 +5314,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -4944,6 +5324,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4961,6 +5342,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb; @@ -4970,6 +5352,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -4987,6 +5370,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb; @@ -4996,6 +5380,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5013,6 +5398,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb; @@ -5022,6 +5408,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5039,6 +5426,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb; @@ -5048,6 +5436,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5065,6 +5454,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -5074,6 +5464,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5091,6 +5482,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -5100,6 +5492,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5117,6 +5510,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -5126,6 +5520,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5143,6 +5538,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -5152,6 +5548,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5169,6 +5566,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb; @@ -5178,6 +5576,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5195,6 +5594,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb; @@ -5204,6 +5604,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5221,6 +5622,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -5230,6 +5632,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5247,6 +5650,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -5256,6 +5660,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5273,6 +5678,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -5282,6 +5688,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5299,6 +5706,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -5308,6 +5716,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5325,6 +5734,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -5334,6 +5744,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5351,6 +5762,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -5360,6 +5772,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5377,6 +5790,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb; @@ -5386,6 +5800,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5403,6 +5818,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -5412,6 +5828,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5429,6 +5846,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb; @@ -5438,6 +5856,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5455,6 +5874,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb; @@ -5464,6 +5884,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5481,6 +5902,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb; @@ -5490,6 +5912,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5507,6 +5930,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb; @@ -5516,6 +5940,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5533,6 +5958,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb; @@ -5542,6 +5968,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5559,6 +5986,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb; @@ -5568,6 +5996,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5585,6 +6014,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb; @@ -5594,6 +6024,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5611,6 +6042,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb; alter table bar add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb; @@ -5620,6 +6052,7 @@ drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; +begin; insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL); insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds"); @@ -5637,6 +6070,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds"); insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew"); insert into bar select * from foo; +commit; include/diff_tables.inc [test.foo, test.bar] alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1; alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add.test index 1946f3abe00..74df7611346 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
@@ -13,6 +15,7 @@ let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -78,6 +81,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL;
alter table bar add column added_1 bigint default NULL;
@@ -88,6 +92,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -153,6 +158,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1;
alter table bar add column added_2 bigint default -1;
@@ -163,6 +169,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -228,6 +235,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1;
alter table bar add column added_3 bigint NOT NULL default -1;
@@ -238,6 +246,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -303,6 +312,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL;
@@ -313,6 +323,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -379,6 +390,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NUL insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
source include/diff_tables.inc;
+commit;
alter table foo add column added_5 varchar(10) default "qwerty";
alter table bar add column added_5 varchar(10) default "qwerty";
source include/diff_tables.inc;
@@ -388,6 +400,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -453,6 +466,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt";
@@ -463,6 +477,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -528,6 +543,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL;
alter table bar add column added_7 text default NULL;
@@ -538,6 +554,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -603,6 +620,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL;
@@ -613,6 +631,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -678,6 +697,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first;
alter table bar add column added_1 bigint default NULL first;
@@ -688,6 +708,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -753,6 +774,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first;
alter table bar add column added_2 bigint default -1 first;
@@ -763,6 +785,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -828,6 +851,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first;
alter table bar add column added_3 bigint NOT NULL default -1 first;
@@ -838,6 +862,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -903,6 +928,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first;
alter table bar add column added_4 varchar(10) default NULL first;
@@ -913,6 +939,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -978,6 +1005,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first;
alter table bar add column added_5 varchar(10) default "qwerty" first;
@@ -988,6 +1016,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1053,6 +1082,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
@@ -1063,6 +1093,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1128,6 +1159,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first;
alter table bar add column added_7 text default NULL first;
@@ -1138,6 +1170,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1203,6 +1236,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first;
alter table bar add column added_8 mediumtext default NULL first;
@@ -1213,6 +1247,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1278,6 +1313,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b;
alter table bar add column added_1 bigint default NULL after b;
@@ -1288,6 +1324,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1353,6 +1390,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b;
alter table bar add column added_2 bigint default -1 after b;
@@ -1363,6 +1401,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1428,6 +1467,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b;
@@ -1438,6 +1478,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1503,6 +1544,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b;
@@ -1513,6 +1555,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1578,6 +1621,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b;
@@ -1588,6 +1632,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1653,6 +1698,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b;
@@ -1663,6 +1709,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1728,6 +1775,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b;
alter table bar add column added_7 text default NULL after b;
@@ -1738,6 +1786,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1803,6 +1852,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b;
@@ -1813,6 +1863,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1878,6 +1929,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL;
@@ -1888,6 +1940,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1953,6 +2006,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234;
@@ -1963,6 +2017,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2028,6 +2083,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2038,6 +2094,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2103,6 +2160,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
@@ -2113,6 +2171,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2178,6 +2237,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2188,6 +2248,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2253,6 +2314,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2263,6 +2325,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2328,6 +2391,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL;
@@ -2338,6 +2402,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2403,6 +2468,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
@@ -2413,6 +2479,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2478,6 +2545,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL;
@@ -2488,6 +2556,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2553,6 +2622,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234;
@@ -2563,6 +2633,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2628,6 +2699,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
@@ -2638,6 +2710,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2703,6 +2776,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
@@ -2713,6 +2787,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2778,6 +2853,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
@@ -2788,6 +2864,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2853,6 +2930,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2863,6 +2941,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2928,6 +3007,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1, add column added_71 text default NULL;
@@ -2938,6 +3018,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3003,6 +3084,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
@@ -3013,6 +3095,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3078,6 +3161,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
@@ -3088,6 +3172,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3153,6 +3238,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
@@ -3163,6 +3249,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3228,6 +3315,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
@@ -3238,6 +3326,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3303,6 +3392,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
@@ -3313,6 +3403,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3378,6 +3469,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
@@ -3388,6 +3480,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3453,6 +3546,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3463,6 +3557,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3528,6 +3623,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
@@ -3538,6 +3634,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3603,6 +3700,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
@@ -3613,6 +3711,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3678,6 +3777,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
@@ -3688,6 +3788,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3753,6 +3854,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
@@ -3763,6 +3865,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3828,6 +3931,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
@@ -3838,6 +3942,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3903,6 +4008,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
@@ -3913,6 +4019,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3978,6 +4085,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
@@ -3988,6 +4096,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4053,6 +4162,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -4063,6 +4173,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4128,6 +4239,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
@@ -4138,6 +4250,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4203,6 +4316,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
@@ -4213,6 +4327,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4278,6 +4393,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
@@ -4288,6 +4404,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4353,6 +4470,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
@@ -4363,6 +4481,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4428,6 +4547,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
@@ -4438,6 +4558,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4503,6 +4624,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
@@ -4513,6 +4635,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4578,6 +4701,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
@@ -4588,6 +4712,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4653,6 +4778,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -4663,6 +4789,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4728,6 +4855,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
@@ -4738,6 +4866,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4803,6 +4932,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
@@ -4813,6 +4943,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4878,6 +5009,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
@@ -4888,6 +5020,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4953,6 +5086,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
@@ -4963,6 +5097,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5028,6 +5163,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
@@ -5038,6 +5174,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5103,6 +5240,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
@@ -5113,6 +5251,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5178,6 +5317,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
@@ -5188,6 +5328,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5253,6 +5394,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -5263,6 +5405,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5328,6 +5471,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
@@ -5338,6 +5482,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5403,6 +5548,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
@@ -5413,6 +5559,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5478,6 +5625,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL;
@@ -5488,6 +5636,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5553,6 +5702,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234;
@@ -5563,6 +5713,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5628,6 +5779,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
@@ -5638,6 +5790,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5703,6 +5856,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
@@ -5713,6 +5867,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5778,6 +5933,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
@@ -5788,6 +5944,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5853,6 +6010,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -5863,6 +6021,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5928,6 +6087,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL, add column added_71 text default NULL;
@@ -5938,6 +6098,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6003,6 +6164,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL;
@@ -6013,6 +6175,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6078,6 +6241,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
@@ -6088,6 +6252,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6153,6 +6318,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
@@ -6163,6 +6329,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6228,6 +6395,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
@@ -6238,6 +6406,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6303,6 +6472,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
@@ -6313,6 +6483,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6378,6 +6549,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
@@ -6388,6 +6560,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6453,6 +6626,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -6463,6 +6637,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6528,6 +6703,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL;
@@ -6538,6 +6714,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6603,6 +6780,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
@@ -6613,6 +6791,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6678,6 +6857,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
@@ -6688,6 +6868,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6753,6 +6934,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
@@ -6763,6 +6945,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6828,6 +7011,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -6838,6 +7022,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6903,6 +7088,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
@@ -6913,6 +7099,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6978,6 +7165,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -6988,6 +7176,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7053,6 +7242,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -7063,6 +7253,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7128,6 +7319,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL;
@@ -7138,6 +7330,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7203,6 +7396,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
@@ -7213,6 +7407,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7278,6 +7473,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
@@ -7288,6 +7484,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7353,6 +7550,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
@@ -7363,6 +7561,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7428,6 +7627,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -7438,6 +7638,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7503,6 +7704,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
@@ -7513,6 +7715,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7578,6 +7781,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -7588,6 +7792,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7653,6 +7858,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -7663,6 +7869,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7728,6 +7935,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL;
@@ -7738,6 +7946,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7803,6 +8012,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
@@ -7813,6 +8023,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7878,6 +8089,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
@@ -7888,6 +8100,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7953,6 +8166,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
@@ -7963,6 +8177,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8028,6 +8243,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -8038,6 +8254,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8103,6 +8320,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
@@ -8113,6 +8331,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8178,6 +8397,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -8188,6 +8408,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8253,6 +8474,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -8263,6 +8485,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8328,6 +8551,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
@@ -8338,6 +8562,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8403,6 +8628,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
@@ -8413,6 +8639,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8478,6 +8705,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
@@ -8488,6 +8716,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8553,6 +8782,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
@@ -8563,6 +8793,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8628,6 +8859,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -8638,6 +8870,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8703,6 +8936,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
@@ -8713,6 +8947,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8778,6 +9013,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -8788,6 +9024,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8853,6 +9090,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -8863,6 +9101,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8928,6 +9167,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
@@ -8938,6 +9178,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9003,6 +9244,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
@@ -9013,6 +9255,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9078,6 +9321,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
@@ -9088,6 +9332,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9153,6 +9398,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
@@ -9163,6 +9409,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9228,6 +9475,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
@@ -9238,6 +9486,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9303,6 +9552,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
@@ -9313,6 +9563,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9378,6 +9629,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
@@ -9388,6 +9640,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9453,6 +9706,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -9463,6 +9717,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9528,6 +9783,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
@@ -9538,6 +9794,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9603,6 +9860,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
@@ -9613,6 +9871,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9678,6 +9937,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
@@ -9688,6 +9948,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9753,6 +10014,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
@@ -9763,6 +10025,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9828,6 +10091,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
@@ -9838,6 +10102,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9903,6 +10168,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
@@ -9913,6 +10179,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9978,6 +10245,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
@@ -9988,6 +10256,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10053,6 +10322,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -10063,6 +10333,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10128,6 +10399,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
@@ -10138,6 +10410,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10203,6 +10476,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
@@ -10213,6 +10487,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10278,6 +10553,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL;
@@ -10288,6 +10564,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10353,6 +10630,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234;
@@ -10363,6 +10641,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10428,6 +10707,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -10438,6 +10718,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10503,6 +10784,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
@@ -10513,6 +10795,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10578,6 +10861,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -10588,6 +10872,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10653,6 +10938,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -10663,6 +10949,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10728,6 +11015,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL first, add column added_71 text default NULL;
@@ -10738,6 +11026,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10803,6 +11092,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
@@ -10813,6 +11103,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10878,6 +11169,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
@@ -10888,6 +11180,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10953,6 +11246,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
@@ -10963,6 +11257,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11028,6 +11323,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -11038,6 +11334,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11103,6 +11400,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
@@ -11113,6 +11411,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11178,6 +11477,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -11188,6 +11488,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11253,6 +11554,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -11263,6 +11565,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11328,6 +11631,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
@@ -11338,6 +11642,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11403,6 +11708,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
@@ -11413,6 +11719,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11478,6 +11785,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b;
@@ -11488,6 +11796,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11553,6 +11862,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b;
@@ -11563,6 +11873,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11628,6 +11939,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -11638,6 +11950,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11703,6 +12016,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -11713,6 +12027,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11778,6 +12093,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -11788,6 +12104,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11853,6 +12170,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -11863,6 +12181,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11928,6 +12247,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_71 text default NULL after b;
@@ -11938,6 +12258,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12003,6 +12324,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -12013,6 +12335,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12078,6 +12401,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b;
@@ -12088,6 +12412,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12153,6 +12478,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b;
@@ -12163,6 +12489,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12228,6 +12555,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -12238,6 +12566,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12303,6 +12632,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b;
@@ -12313,6 +12643,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12378,6 +12709,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -12388,6 +12720,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12453,6 +12786,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -12463,6 +12797,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12528,6 +12863,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_71 text default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_71 text default NULL after b;
@@ -12538,6 +12874,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12603,6 +12940,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b;
@@ -12613,6 +12951,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12678,6 +13017,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b;
@@ -12688,6 +13028,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12753,6 +13094,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b;
@@ -12763,6 +13105,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12828,6 +13171,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -12838,6 +13182,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12903,6 +13248,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b;
@@ -12913,6 +13259,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12978,6 +13325,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -12988,6 +13336,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13053,6 +13402,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -13063,6 +13413,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13128,6 +13479,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b;
@@ -13138,6 +13490,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13203,6 +13556,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b;
@@ -13213,6 +13567,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13278,6 +13633,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b;
@@ -13288,6 +13644,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13353,6 +13710,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b;
@@ -13363,6 +13721,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13428,6 +13787,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -13438,6 +13798,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13503,6 +13864,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -13513,6 +13875,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13578,6 +13941,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -13588,6 +13952,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13653,6 +14018,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -13663,6 +14029,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13728,6 +14095,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b;
@@ -13738,6 +14106,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13803,6 +14172,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -13813,6 +14183,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13878,6 +14249,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b;
@@ -13888,6 +14260,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13953,6 +14326,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b;
@@ -13963,6 +14337,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14028,6 +14403,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -14038,6 +14414,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14103,6 +14480,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b;
@@ -14113,6 +14491,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14178,6 +14557,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -14188,6 +14568,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14253,6 +14634,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -14263,6 +14645,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14328,6 +14711,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b;
@@ -14338,6 +14722,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14403,6 +14788,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b;
@@ -14413,6 +14799,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14478,6 +14865,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b;
@@ -14488,6 +14876,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14553,6 +14942,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b;
@@ -14563,6 +14953,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14628,6 +15019,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -14638,6 +15030,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14703,6 +15096,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b;
@@ -14713,6 +15107,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14778,6 +15173,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -14788,6 +15184,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14853,6 +15250,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -14863,6 +15261,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14928,6 +15327,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b;
@@ -14938,6 +15338,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15003,6 +15404,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b;
@@ -15013,6 +15415,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15078,6 +15481,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_11 bigint default NULL after b;
@@ -15088,6 +15492,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15153,6 +15558,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b;
@@ -15163,6 +15569,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15228,6 +15635,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -15238,6 +15646,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15303,6 +15712,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -15313,6 +15723,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15378,6 +15789,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -15388,6 +15800,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15453,6 +15866,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -15463,6 +15877,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15528,6 +15943,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_71 text default NULL after b;
@@ -15538,6 +15954,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15603,6 +16020,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -15613,6 +16031,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15678,6 +16097,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b;
@@ -15688,6 +16108,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15753,6 +16174,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b;
@@ -15763,6 +16185,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15828,6 +16251,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -15838,6 +16262,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15903,6 +16328,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -15913,6 +16339,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15978,6 +16405,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -15988,6 +16416,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -16053,6 +16482,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -16063,6 +16493,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -16128,6 +16559,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b;
@@ -16138,6 +16570,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -16203,6 +16636,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -16213,6 +16647,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -16278,6 +16713,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1;
alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add2.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add2.test index 9ffb49e242b..b754e0c961a 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add2.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add2.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add3.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add3.test index 430ab06ca22..a741dcfe0eb 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add3.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_add3.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
@@ -13,6 +15,7 @@ let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -78,6 +81,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL;
alter table bar add column added_1 bigint default NULL;
@@ -88,6 +92,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -153,6 +158,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1;
alter table bar add column added_2 bigint default -1;
@@ -163,6 +169,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -228,6 +235,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1;
alter table bar add column added_3 bigint NOT NULL default -1;
@@ -238,6 +246,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -303,6 +312,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL;
@@ -313,6 +323,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -378,6 +389,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty";
alter table bar add column added_5 varchar(10) default "qwerty";
@@ -388,6 +400,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -453,6 +466,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt";
@@ -463,6 +477,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -528,6 +543,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL;
alter table bar add column added_7 text default NULL;
@@ -538,6 +554,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -603,6 +620,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL;
@@ -613,6 +631,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -678,6 +697,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first;
alter table bar add column added_1 bigint default NULL first;
@@ -688,6 +708,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -753,6 +774,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first;
alter table bar add column added_2 bigint default -1 first;
@@ -763,6 +785,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -828,6 +851,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first;
alter table bar add column added_3 bigint NOT NULL default -1 first;
@@ -838,6 +862,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -903,6 +928,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first;
alter table bar add column added_4 varchar(10) default NULL first;
@@ -913,6 +939,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -978,6 +1005,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first;
alter table bar add column added_5 varchar(10) default "qwerty" first;
@@ -988,6 +1016,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1053,6 +1082,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
@@ -1063,6 +1093,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1128,6 +1159,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first;
alter table bar add column added_7 text default NULL first;
@@ -1138,6 +1170,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1203,6 +1236,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first;
alter table bar add column added_8 mediumtext default NULL first;
@@ -1213,6 +1247,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1278,6 +1313,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb;
@@ -1288,6 +1324,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1353,6 +1390,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb;
alter table bar add column added_2 bigint default -1 after bbb;
@@ -1363,6 +1401,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1428,6 +1467,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb;
@@ -1438,6 +1478,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1503,6 +1544,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb;
@@ -1513,6 +1555,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1578,6 +1621,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb;
@@ -1588,6 +1632,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1653,6 +1698,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb;
@@ -1663,6 +1709,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1728,6 +1775,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb;
@@ -1738,6 +1786,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1803,6 +1852,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb;
@@ -1813,6 +1863,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1878,6 +1929,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL;
@@ -1888,6 +1940,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1953,6 +2006,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234;
@@ -1963,6 +2017,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2028,6 +2083,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2038,6 +2094,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2103,6 +2160,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
@@ -2113,6 +2171,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2178,6 +2237,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2188,6 +2248,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2253,6 +2314,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2263,6 +2325,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2328,6 +2391,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL;
@@ -2338,6 +2402,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2403,6 +2468,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
@@ -2413,6 +2479,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2478,6 +2545,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL;
@@ -2488,6 +2556,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2553,6 +2622,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234;
@@ -2563,6 +2633,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2628,6 +2699,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
@@ -2638,6 +2710,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2703,6 +2776,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
@@ -2713,6 +2787,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2778,6 +2853,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
@@ -2788,6 +2864,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2853,6 +2930,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2863,6 +2941,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2928,6 +3007,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1, add column added_71 text default NULL;
@@ -2938,6 +3018,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3003,6 +3084,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
@@ -3013,6 +3095,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3078,6 +3161,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
@@ -3088,6 +3172,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3153,6 +3238,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
@@ -3163,6 +3249,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3228,6 +3315,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
@@ -3238,6 +3326,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3303,6 +3392,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
@@ -3313,6 +3403,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3378,6 +3469,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
@@ -3388,6 +3480,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3453,6 +3546,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3463,6 +3557,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3528,6 +3623,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
@@ -3538,6 +3634,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3603,6 +3700,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
@@ -3613,6 +3711,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3678,6 +3777,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
@@ -3688,6 +3788,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3753,6 +3854,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
@@ -3763,6 +3865,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3828,6 +3931,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
@@ -3838,6 +3942,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3903,6 +4008,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
@@ -3913,6 +4019,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3978,6 +4085,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
@@ -3988,6 +4096,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4053,6 +4162,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -4063,6 +4173,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4128,6 +4239,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
@@ -4138,6 +4250,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4203,6 +4316,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
@@ -4213,6 +4327,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4278,6 +4393,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
@@ -4288,6 +4404,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4353,6 +4470,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
@@ -4363,6 +4481,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4428,6 +4547,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
@@ -4438,6 +4558,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4503,6 +4624,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
@@ -4513,6 +4635,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4578,6 +4701,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
@@ -4588,6 +4712,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4653,6 +4778,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -4663,6 +4789,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4728,6 +4855,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
@@ -4738,6 +4866,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4803,6 +4932,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
@@ -4813,6 +4943,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4878,6 +5009,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
@@ -4888,6 +5020,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4953,6 +5086,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
@@ -4963,6 +5097,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5028,6 +5163,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
@@ -5038,6 +5174,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5103,6 +5240,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
@@ -5113,6 +5251,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5178,6 +5317,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
@@ -5188,6 +5328,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5253,6 +5394,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -5263,6 +5405,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5328,6 +5471,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
@@ -5338,6 +5482,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5403,6 +5548,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
@@ -5413,6 +5559,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5478,6 +5625,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL;
@@ -5488,6 +5636,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5553,6 +5702,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234;
@@ -5563,6 +5713,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5628,6 +5779,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
@@ -5638,6 +5790,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5703,6 +5856,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
@@ -5713,6 +5867,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5778,6 +5933,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
@@ -5788,6 +5944,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5853,6 +6010,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -5863,6 +6021,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5928,6 +6087,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL, add column added_71 text default NULL;
@@ -5938,6 +6098,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6003,6 +6164,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL;
@@ -6013,6 +6175,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6078,6 +6241,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
@@ -6088,6 +6252,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6153,6 +6318,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
@@ -6163,6 +6329,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6228,6 +6395,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
@@ -6238,6 +6406,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6303,6 +6472,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
@@ -6313,6 +6483,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6378,6 +6549,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
@@ -6388,6 +6560,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6453,6 +6626,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -6463,6 +6637,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6528,6 +6703,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL;
@@ -6538,6 +6714,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6603,6 +6780,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
@@ -6613,6 +6791,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6678,6 +6857,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
@@ -6688,6 +6868,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6753,6 +6934,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
@@ -6763,6 +6945,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6828,6 +7011,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -6838,6 +7022,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6903,6 +7088,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
@@ -6913,6 +7099,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6978,6 +7165,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -6988,6 +7176,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7053,6 +7242,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -7063,6 +7253,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7128,6 +7319,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL;
@@ -7138,6 +7330,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7203,6 +7396,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
@@ -7213,6 +7407,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7278,6 +7473,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
@@ -7288,6 +7484,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7353,6 +7550,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
@@ -7363,6 +7561,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7428,6 +7627,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -7438,6 +7638,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7503,6 +7704,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
@@ -7513,6 +7715,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7578,6 +7781,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -7588,6 +7792,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7653,6 +7858,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -7663,6 +7869,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7728,6 +7935,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL;
@@ -7738,6 +7946,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7803,6 +8012,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
@@ -7813,6 +8023,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7878,6 +8089,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
@@ -7888,6 +8100,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7953,6 +8166,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
@@ -7963,6 +8177,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8028,6 +8243,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -8038,6 +8254,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8103,6 +8320,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
@@ -8113,6 +8331,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8178,6 +8397,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -8188,6 +8408,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8253,6 +8474,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -8263,6 +8485,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8328,6 +8551,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
@@ -8338,6 +8562,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8403,6 +8628,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
@@ -8413,6 +8639,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8478,6 +8705,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
@@ -8488,6 +8716,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8553,6 +8782,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
@@ -8563,6 +8793,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8628,6 +8859,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -8638,6 +8870,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8703,6 +8936,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
@@ -8713,6 +8947,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8778,6 +9013,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -8788,6 +9024,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8853,6 +9090,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -8863,6 +9101,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8928,6 +9167,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
@@ -8938,6 +9178,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9003,6 +9244,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
@@ -9013,6 +9255,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9078,6 +9321,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
@@ -9088,6 +9332,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9153,6 +9398,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
@@ -9163,6 +9409,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9228,6 +9475,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
@@ -9238,6 +9486,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9303,6 +9552,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
@@ -9313,6 +9563,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9378,6 +9629,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
@@ -9388,6 +9640,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9453,6 +9706,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -9463,6 +9717,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9528,6 +9783,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
@@ -9538,6 +9794,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9603,6 +9860,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
@@ -9613,6 +9871,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9678,6 +9937,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
@@ -9688,6 +9948,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9753,6 +10014,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
@@ -9763,6 +10025,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9828,6 +10091,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
@@ -9838,6 +10102,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9903,6 +10168,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
@@ -9913,6 +10179,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9978,6 +10245,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
@@ -9988,6 +10256,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10053,6 +10322,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -10063,6 +10333,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10128,6 +10399,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
@@ -10138,6 +10410,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10203,6 +10476,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
@@ -10213,6 +10487,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10278,6 +10553,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL;
@@ -10288,6 +10564,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10353,6 +10630,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234;
@@ -10363,6 +10641,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10428,6 +10707,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -10438,6 +10718,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10503,6 +10784,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
@@ -10513,6 +10795,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10578,6 +10861,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -10588,6 +10872,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10653,6 +10938,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -10663,6 +10949,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10728,6 +11015,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL first, add column added_71 text default NULL;
@@ -10738,6 +11026,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10803,6 +11092,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
@@ -10813,6 +11103,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10878,6 +11169,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
@@ -10888,6 +11180,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10953,6 +11246,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
@@ -10963,6 +11257,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11028,6 +11323,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -11038,6 +11334,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11103,6 +11400,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
@@ -11113,6 +11411,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11178,6 +11477,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -11188,6 +11488,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11253,6 +11554,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -11263,6 +11565,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11328,6 +11631,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
@@ -11338,6 +11642,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11403,6 +11708,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
@@ -11413,6 +11719,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11478,6 +11785,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -11488,6 +11796,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11553,6 +11862,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -11563,6 +11873,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11628,6 +11939,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -11638,6 +11950,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11703,6 +12016,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -11713,6 +12027,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11778,6 +12093,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -11788,6 +12104,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11853,6 +12170,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -11863,6 +12181,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11928,6 +12247,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -11938,6 +12258,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12003,6 +12324,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -12013,6 +12335,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12078,6 +12401,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb;
@@ -12088,6 +12412,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12153,6 +12478,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb;
@@ -12163,6 +12489,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12228,6 +12555,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -12238,6 +12566,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12303,6 +12632,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -12313,6 +12643,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12378,6 +12709,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -12388,6 +12720,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12453,6 +12786,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -12463,6 +12797,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12528,6 +12863,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb;
@@ -12538,6 +12874,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12603,6 +12940,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -12613,6 +12951,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12678,6 +13017,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb;
@@ -12688,6 +13028,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12753,6 +13094,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb;
@@ -12763,6 +13105,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12828,6 +13171,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -12838,6 +13182,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12903,6 +13248,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -12913,6 +13259,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -12978,6 +13325,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -12988,6 +13336,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13053,6 +13402,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -13063,6 +13413,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13128,6 +13479,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb;
@@ -13138,6 +13490,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13203,6 +13556,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -13213,6 +13567,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13278,6 +13633,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -13288,6 +13644,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13353,6 +13710,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -13363,6 +13721,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13428,6 +13787,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -13438,6 +13798,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13503,6 +13864,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -13513,6 +13875,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13578,6 +13941,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -13588,6 +13952,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13653,6 +14018,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -13663,6 +14029,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13728,6 +14095,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -13738,6 +14106,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13803,6 +14172,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -13813,6 +14183,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13878,6 +14249,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb;
@@ -13888,6 +14260,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -13953,6 +14326,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb;
@@ -13963,6 +14337,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14028,6 +14403,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -14038,6 +14414,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14103,6 +14480,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -14113,6 +14491,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14178,6 +14557,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -14188,6 +14568,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14253,6 +14634,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -14263,6 +14645,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14328,6 +14711,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb;
@@ -14338,6 +14722,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14403,6 +14788,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -14413,6 +14799,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14478,6 +14865,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb;
@@ -14488,6 +14876,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14553,6 +14942,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb;
@@ -14563,6 +14953,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14628,6 +15019,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -14638,6 +15030,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14703,6 +15096,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -14713,6 +15107,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14778,6 +15173,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -14788,6 +15184,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14853,6 +15250,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -14863,6 +15261,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -14928,6 +15327,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb;
@@ -14938,6 +15338,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15003,6 +15404,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -15013,6 +15415,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15078,6 +15481,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -15088,6 +15492,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15153,6 +15558,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -15163,6 +15569,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15228,6 +15635,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -15238,6 +15646,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15303,6 +15712,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -15313,6 +15723,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15378,6 +15789,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -15388,6 +15800,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15453,6 +15866,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -15463,6 +15877,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15528,6 +15943,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -15538,6 +15954,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15603,6 +16020,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -15613,6 +16031,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15678,6 +16097,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -15688,6 +16108,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15753,6 +16174,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -15763,6 +16185,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15828,6 +16251,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -15838,6 +16262,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15903,6 +16328,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -15913,6 +16339,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -15978,6 +16405,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -15988,6 +16416,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -16053,6 +16482,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -16063,6 +16493,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -16128,6 +16559,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -16138,6 +16570,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -16203,6 +16636,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -16213,6 +16647,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -16278,6 +16713,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1;
alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_blob_add.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_blob_add.test index 695dc2bc073..d524539a366 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_blob_add.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_blob_add.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
@@ -13,11 +15,13 @@ let $diff_tables= test.foo, test.bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL;
alter table bar add column added_1 bigint default NULL;
@@ -28,11 +32,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1;
alter table bar add column added_2 bigint default -1;
@@ -43,11 +49,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1;
alter table bar add column added_3 bigint NOT NULL default -1;
@@ -58,11 +66,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL;
@@ -73,11 +83,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty";
alter table bar add column added_5 varchar(10) default "qwerty";
@@ -88,11 +100,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt";
@@ -103,11 +117,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL;
alter table bar add column added_7 text default NULL;
@@ -118,11 +134,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL;
@@ -133,11 +151,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first;
alter table bar add column added_1 bigint default NULL first;
@@ -148,11 +168,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first;
alter table bar add column added_2 bigint default -1 first;
@@ -163,11 +185,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first;
alter table bar add column added_3 bigint NOT NULL default -1 first;
@@ -178,11 +202,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first;
alter table bar add column added_4 varchar(10) default NULL first;
@@ -193,11 +219,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first;
alter table bar add column added_5 varchar(10) default "qwerty" first;
@@ -208,11 +236,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
@@ -223,11 +253,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first;
alter table bar add column added_7 text default NULL first;
@@ -238,11 +270,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first;
alter table bar add column added_8 mediumtext default NULL first;
@@ -253,11 +287,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb;
@@ -268,11 +304,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb;
alter table bar add column added_2 bigint default -1 after bb;
@@ -283,11 +321,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb;
@@ -298,11 +338,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb;
@@ -313,11 +355,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb;
@@ -328,11 +372,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb;
@@ -343,11 +389,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb;
alter table bar add column added_7 text default NULL after bb;
@@ -358,11 +406,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb;
@@ -373,11 +423,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL;
@@ -388,11 +440,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234;
@@ -403,11 +457,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
@@ -418,11 +474,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
@@ -433,11 +491,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
@@ -448,11 +508,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -463,11 +525,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL;
@@ -478,11 +542,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
@@ -493,11 +559,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL;
@@ -508,11 +576,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234;
@@ -523,11 +593,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
@@ -538,11 +610,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
@@ -553,11 +627,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
@@ -568,11 +644,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -583,11 +661,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1, add column added_71 text default NULL;
@@ -598,11 +678,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
@@ -613,11 +695,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
@@ -628,11 +712,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
@@ -643,11 +729,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
@@ -658,11 +746,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
@@ -673,11 +763,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
@@ -688,11 +780,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -703,11 +797,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
@@ -718,11 +814,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
@@ -733,11 +831,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
@@ -748,11 +848,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
@@ -763,11 +865,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
@@ -778,11 +882,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
@@ -793,11 +899,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
@@ -808,11 +916,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -823,11 +933,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
@@ -838,11 +950,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
@@ -853,11 +967,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
@@ -868,11 +984,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
@@ -883,11 +1001,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
@@ -898,11 +1018,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
@@ -913,11 +1035,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
@@ -928,11 +1052,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -943,11 +1069,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
@@ -958,11 +1086,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
@@ -973,11 +1103,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
@@ -988,11 +1120,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
@@ -1003,11 +1137,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
@@ -1018,11 +1154,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
@@ -1033,11 +1171,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
@@ -1048,11 +1188,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1063,11 +1205,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
@@ -1078,11 +1222,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
@@ -1093,11 +1239,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL;
@@ -1108,11 +1256,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234;
@@ -1123,11 +1273,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
@@ -1138,11 +1290,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
@@ -1153,11 +1307,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
@@ -1168,11 +1324,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1183,11 +1341,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL, add column added_71 text default NULL;
@@ -1198,11 +1358,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL;
@@ -1213,11 +1375,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
@@ -1228,11 +1392,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
@@ -1243,11 +1409,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
@@ -1258,11 +1426,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
@@ -1273,11 +1443,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
@@ -1288,11 +1460,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1303,11 +1477,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL;
@@ -1318,11 +1494,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
@@ -1333,11 +1511,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
@@ -1348,11 +1528,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
@@ -1363,11 +1545,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -1378,11 +1562,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
@@ -1393,11 +1579,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -1408,11 +1596,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1423,11 +1613,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL;
@@ -1438,11 +1630,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
@@ -1453,11 +1647,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
@@ -1468,11 +1664,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
@@ -1483,11 +1681,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -1498,11 +1698,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
@@ -1513,11 +1715,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -1528,11 +1732,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1543,11 +1749,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL;
@@ -1558,11 +1766,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
@@ -1573,11 +1783,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
@@ -1588,11 +1800,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
@@ -1603,11 +1817,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -1618,11 +1834,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
@@ -1633,11 +1851,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -1648,11 +1868,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1663,11 +1885,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
@@ -1678,11 +1902,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
@@ -1693,11 +1919,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
@@ -1708,11 +1936,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
@@ -1723,11 +1953,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -1738,11 +1970,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
@@ -1753,11 +1987,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -1768,11 +2004,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1783,11 +2021,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
@@ -1798,11 +2038,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
@@ -1813,11 +2055,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
@@ -1828,11 +2072,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
@@ -1843,11 +2089,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
@@ -1858,11 +2106,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
@@ -1873,11 +2123,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
@@ -1888,11 +2140,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1903,11 +2157,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
@@ -1918,11 +2174,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
@@ -1933,11 +2191,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
@@ -1948,11 +2208,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
@@ -1963,11 +2225,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
@@ -1978,11 +2242,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
@@ -1993,11 +2259,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
@@ -2008,11 +2276,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2023,11 +2293,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
@@ -2038,11 +2310,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
@@ -2053,11 +2327,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL;
@@ -2068,11 +2344,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234;
@@ -2083,11 +2361,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -2098,11 +2378,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
@@ -2113,11 +2395,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -2128,11 +2412,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2143,11 +2429,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL first, add column added_71 text default NULL;
@@ -2158,11 +2446,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
@@ -2173,11 +2463,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
@@ -2188,11 +2480,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
@@ -2203,11 +2497,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -2218,11 +2514,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
@@ -2233,11 +2531,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -2248,11 +2548,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2263,11 +2565,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
@@ -2278,11 +2582,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
@@ -2293,11 +2599,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_11 bigint default NULL after bb;
@@ -2308,11 +2616,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_21 bigint default 1234 after bb;
@@ -2323,11 +2633,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -2338,11 +2650,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_41 varchar(10) default NULL after bb;
@@ -2353,11 +2667,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -2368,11 +2684,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -2383,11 +2701,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_71 text default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_71 text default NULL after bb;
@@ -2398,11 +2718,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_81 mediumtext default NULL after bb;
@@ -2413,11 +2735,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_11 bigint default NULL after bb;
@@ -2428,11 +2752,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_21 bigint default 1234 after bb;
@@ -2443,11 +2769,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -2458,11 +2786,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_41 varchar(10) default NULL after bb;
@@ -2473,11 +2803,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -2488,11 +2820,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -2503,11 +2837,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_71 text default NULL after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_71 text default NULL after bb;
@@ -2518,11 +2854,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_81 mediumtext default NULL after bb;
@@ -2533,11 +2871,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_11 bigint default NULL after bb;
@@ -2548,11 +2888,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_21 bigint default 1234 after bb;
@@ -2563,11 +2905,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -2578,11 +2922,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_41 varchar(10) default NULL after bb;
@@ -2593,11 +2939,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -2608,11 +2956,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -2623,11 +2973,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_71 text default NULL after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_71 text default NULL after bb;
@@ -2638,11 +2990,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_81 mediumtext default NULL after bb;
@@ -2653,11 +3007,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_11 bigint default NULL after bb;
@@ -2668,11 +3024,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_21 bigint default 1234 after bb;
@@ -2683,11 +3041,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -2698,11 +3058,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_41 varchar(10) default NULL after bb;
@@ -2713,11 +3075,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -2728,11 +3092,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -2743,11 +3109,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_71 text default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_71 text default NULL after bb;
@@ -2758,11 +3126,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_81 mediumtext default NULL after bb;
@@ -2773,11 +3143,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_11 bigint default NULL after bb;
@@ -2788,11 +3160,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_21 bigint default 1234 after bb;
@@ -2803,11 +3177,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -2818,11 +3194,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_41 varchar(10) default NULL after bb;
@@ -2833,11 +3211,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -2848,11 +3228,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -2863,11 +3245,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_71 text default NULL after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_71 text default NULL after bb;
@@ -2878,11 +3262,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_81 mediumtext default NULL after bb;
@@ -2893,11 +3279,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_11 bigint default NULL after bb;
@@ -2908,11 +3296,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_21 bigint default 1234 after bb;
@@ -2923,11 +3313,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -2938,11 +3330,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_41 varchar(10) default NULL after bb;
@@ -2953,11 +3347,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -2968,11 +3364,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -2983,11 +3381,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_71 text default NULL after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_71 text default NULL after bb;
@@ -2998,11 +3398,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_81 mediumtext default NULL after bb;
@@ -3013,11 +3415,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_7 text default NULL after bb, add column added_11 bigint default NULL after bb;
@@ -3028,11 +3432,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_7 text default NULL after bb, add column added_21 bigint default 1234 after bb;
@@ -3043,11 +3449,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_7 text default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -3058,11 +3466,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_7 text default NULL after bb, add column added_41 varchar(10) default NULL after bb;
@@ -3073,11 +3483,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_7 text default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -3088,11 +3500,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_7 text default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -3103,11 +3517,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_71 text default NULL after bb;
alter table bar add column added_7 text default NULL after bb, add column added_71 text default NULL after bb;
@@ -3118,11 +3534,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_7 text default NULL after bb, add column added_81 mediumtext default NULL after bb;
@@ -3133,11 +3551,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_11 bigint default NULL after bb;
@@ -3148,11 +3568,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_21 bigint default 1234 after bb;
@@ -3163,11 +3585,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -3178,11 +3602,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_41 varchar(10) default NULL after bb;
@@ -3193,11 +3619,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -3208,11 +3636,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -3223,11 +3653,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_71 text default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_71 text default NULL after bb;
@@ -3238,11 +3670,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_81 mediumtext default NULL after bb;
@@ -3253,11 +3687,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bb, add column added_3 bigint NOT NULL default -1;
alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bb, add column added_3 bigint NOT NULL default -1;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_blob_drop.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_blob_drop.test index ffa8ec7a160..9b73c8ee7c7 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_blob_drop.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_blob_drop.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
@@ -13,11 +15,13 @@ let $diff_tables= test.foo, test.bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa;
alter table bar drop column aa;
@@ -28,11 +32,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb;
alter table bar drop column bb;
@@ -43,11 +49,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc;
alter table bar drop column cc;
@@ -58,11 +66,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd;
alter table bar drop column dd;
@@ -73,11 +83,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column bb;
alter table bar drop column aa, drop column bb;
@@ -88,11 +100,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column cc;
alter table bar drop column aa, drop column cc;
@@ -103,11 +117,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column dd;
alter table bar drop column aa, drop column dd;
@@ -118,11 +134,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column aa;
alter table bar drop column bb, drop column aa;
@@ -133,11 +151,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column cc;
alter table bar drop column bb, drop column cc;
@@ -148,11 +168,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column dd;
alter table bar drop column bb, drop column dd;
@@ -163,11 +185,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column aa;
alter table bar drop column cc, drop column aa;
@@ -178,11 +202,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column bb;
alter table bar drop column cc, drop column bb;
@@ -193,11 +219,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column dd;
alter table bar drop column cc, drop column dd;
@@ -208,11 +236,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column aa;
alter table bar drop column dd, drop column aa;
@@ -223,11 +253,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column bb;
alter table bar drop column dd, drop column bb;
@@ -238,11 +270,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column cc;
alter table bar drop column dd, drop column cc;
@@ -253,11 +287,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column bb, drop column cc;
alter table bar drop column aa, drop column bb, drop column cc;
@@ -268,11 +304,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column bb, drop column dd;
alter table bar drop column aa, drop column bb, drop column dd;
@@ -283,11 +321,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column cc, drop column dd;
alter table bar drop column aa, drop column cc, drop column dd;
@@ -298,11 +338,13 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values ("adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column cc, drop column dd;
alter table bar drop column bb, drop column cc, drop column dd;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_drop.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_drop.test index c281c6ee0bb..c23afa5b88c 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_drop.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_drop.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
@@ -13,6 +15,7 @@ let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -78,6 +81,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a;
alter table bar drop column a;
@@ -88,6 +92,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -153,6 +158,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b;
alter table bar drop column b;
@@ -163,6 +169,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -228,6 +235,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c;
alter table bar drop column c;
@@ -238,6 +246,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -303,6 +312,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d;
alter table bar drop column d;
@@ -313,6 +323,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -378,6 +389,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa;
alter table bar drop column aa;
@@ -388,6 +400,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -453,6 +466,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb;
alter table bar drop column bb;
@@ -463,6 +477,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -528,6 +543,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc;
alter table bar drop column cc;
@@ -538,6 +554,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -603,6 +620,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd;
alter table bar drop column dd;
@@ -613,6 +631,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -678,6 +697,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa;
alter table bar drop column aaa;
@@ -688,6 +708,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -753,6 +774,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb;
alter table bar drop column bbb;
@@ -763,6 +785,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -828,6 +851,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc;
alter table bar drop column ccc;
@@ -838,6 +862,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -903,6 +928,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd;
alter table bar drop column ddd;
@@ -913,6 +939,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -978,6 +1005,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b;
alter table bar drop column a, drop column b;
@@ -988,6 +1016,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1053,6 +1082,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column c;
alter table bar drop column a, drop column c;
@@ -1063,6 +1093,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1128,6 +1159,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column d;
alter table bar drop column a, drop column d;
@@ -1138,6 +1170,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1203,6 +1236,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column aa;
alter table bar drop column a, drop column aa;
@@ -1213,6 +1247,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1278,6 +1313,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column bb;
alter table bar drop column a, drop column bb;
@@ -1288,6 +1324,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1353,6 +1390,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column cc;
alter table bar drop column a, drop column cc;
@@ -1363,6 +1401,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1428,6 +1467,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column dd;
alter table bar drop column a, drop column dd;
@@ -1438,6 +1478,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1503,6 +1544,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column aaa;
alter table bar drop column a, drop column aaa;
@@ -1513,6 +1555,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1578,6 +1621,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column bbb;
alter table bar drop column a, drop column bbb;
@@ -1588,6 +1632,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1653,6 +1698,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column ccc;
alter table bar drop column a, drop column ccc;
@@ -1663,6 +1709,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1728,6 +1775,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column ddd;
alter table bar drop column a, drop column ddd;
@@ -1738,6 +1786,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1803,6 +1852,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column a;
alter table bar drop column b, drop column a;
@@ -1813,6 +1863,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1878,6 +1929,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column c;
alter table bar drop column b, drop column c;
@@ -1888,6 +1940,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -1953,6 +2006,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column d;
alter table bar drop column b, drop column d;
@@ -1963,6 +2017,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2028,6 +2083,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column aa;
alter table bar drop column b, drop column aa;
@@ -2038,6 +2094,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2103,6 +2160,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column bb;
alter table bar drop column b, drop column bb;
@@ -2113,6 +2171,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2178,6 +2237,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column cc;
alter table bar drop column b, drop column cc;
@@ -2188,6 +2248,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2253,6 +2314,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column dd;
alter table bar drop column b, drop column dd;
@@ -2263,6 +2325,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2328,6 +2391,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column aaa;
alter table bar drop column b, drop column aaa;
@@ -2338,6 +2402,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2403,6 +2468,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column bbb;
alter table bar drop column b, drop column bbb;
@@ -2413,6 +2479,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2478,6 +2545,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column ccc;
alter table bar drop column b, drop column ccc;
@@ -2488,6 +2556,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2553,6 +2622,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column ddd;
alter table bar drop column b, drop column ddd;
@@ -2563,6 +2633,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2628,6 +2699,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column a;
alter table bar drop column c, drop column a;
@@ -2638,6 +2710,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2703,6 +2776,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column b;
alter table bar drop column c, drop column b;
@@ -2713,6 +2787,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2778,6 +2853,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column d;
alter table bar drop column c, drop column d;
@@ -2788,6 +2864,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2853,6 +2930,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column aa;
alter table bar drop column c, drop column aa;
@@ -2863,6 +2941,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -2928,6 +3007,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column bb;
alter table bar drop column c, drop column bb;
@@ -2938,6 +3018,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3003,6 +3084,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column cc;
alter table bar drop column c, drop column cc;
@@ -3013,6 +3095,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3078,6 +3161,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column dd;
alter table bar drop column c, drop column dd;
@@ -3088,6 +3172,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3153,6 +3238,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column aaa;
alter table bar drop column c, drop column aaa;
@@ -3163,6 +3249,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3228,6 +3315,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column bbb;
alter table bar drop column c, drop column bbb;
@@ -3238,6 +3326,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3303,6 +3392,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column ccc;
alter table bar drop column c, drop column ccc;
@@ -3313,6 +3403,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3378,6 +3469,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column ddd;
alter table bar drop column c, drop column ddd;
@@ -3388,6 +3480,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3453,6 +3546,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column a;
alter table bar drop column d, drop column a;
@@ -3463,6 +3557,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3528,6 +3623,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column b;
alter table bar drop column d, drop column b;
@@ -3538,6 +3634,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3603,6 +3700,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column c;
alter table bar drop column d, drop column c;
@@ -3613,6 +3711,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3678,6 +3777,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column aa;
alter table bar drop column d, drop column aa;
@@ -3688,6 +3788,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3753,6 +3854,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column bb;
alter table bar drop column d, drop column bb;
@@ -3763,6 +3865,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3828,6 +3931,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column cc;
alter table bar drop column d, drop column cc;
@@ -3838,6 +3942,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3903,6 +4008,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column dd;
alter table bar drop column d, drop column dd;
@@ -3913,6 +4019,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -3978,6 +4085,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column aaa;
alter table bar drop column d, drop column aaa;
@@ -3988,6 +4096,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4053,6 +4162,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column bbb;
alter table bar drop column d, drop column bbb;
@@ -4063,6 +4173,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4128,6 +4239,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column ccc;
alter table bar drop column d, drop column ccc;
@@ -4138,6 +4250,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4203,6 +4316,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column ddd;
alter table bar drop column d, drop column ddd;
@@ -4213,6 +4327,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4278,6 +4393,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column a;
alter table bar drop column aa, drop column a;
@@ -4288,6 +4404,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4353,6 +4470,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column b;
alter table bar drop column aa, drop column b;
@@ -4363,6 +4481,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4428,6 +4547,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column c;
alter table bar drop column aa, drop column c;
@@ -4438,6 +4558,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4503,6 +4624,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column d;
alter table bar drop column aa, drop column d;
@@ -4513,6 +4635,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4578,6 +4701,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column bb;
alter table bar drop column aa, drop column bb;
@@ -4588,6 +4712,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4653,6 +4778,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column cc;
alter table bar drop column aa, drop column cc;
@@ -4663,6 +4789,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4728,6 +4855,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column dd;
alter table bar drop column aa, drop column dd;
@@ -4738,6 +4866,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4803,6 +4932,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column aaa;
alter table bar drop column aa, drop column aaa;
@@ -4813,6 +4943,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4878,6 +5009,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column bbb;
alter table bar drop column aa, drop column bbb;
@@ -4888,6 +5020,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -4953,6 +5086,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column ccc;
alter table bar drop column aa, drop column ccc;
@@ -4963,6 +5097,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5028,6 +5163,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column ddd;
alter table bar drop column aa, drop column ddd;
@@ -5038,6 +5174,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5103,6 +5240,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column a;
alter table bar drop column bb, drop column a;
@@ -5113,6 +5251,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5178,6 +5317,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column b;
alter table bar drop column bb, drop column b;
@@ -5188,6 +5328,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5253,6 +5394,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column c;
alter table bar drop column bb, drop column c;
@@ -5263,6 +5405,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5328,6 +5471,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column d;
alter table bar drop column bb, drop column d;
@@ -5338,6 +5482,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5403,6 +5548,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column aa;
alter table bar drop column bb, drop column aa;
@@ -5413,6 +5559,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5478,6 +5625,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column cc;
alter table bar drop column bb, drop column cc;
@@ -5488,6 +5636,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5553,6 +5702,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column dd;
alter table bar drop column bb, drop column dd;
@@ -5563,6 +5713,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5628,6 +5779,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column aaa;
alter table bar drop column bb, drop column aaa;
@@ -5638,6 +5790,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5703,6 +5856,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column bbb;
alter table bar drop column bb, drop column bbb;
@@ -5713,6 +5867,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5778,6 +5933,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column ccc;
alter table bar drop column bb, drop column ccc;
@@ -5788,6 +5944,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5853,6 +6010,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bb, drop column ddd;
alter table bar drop column bb, drop column ddd;
@@ -5863,6 +6021,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -5928,6 +6087,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column a;
alter table bar drop column cc, drop column a;
@@ -5938,6 +6098,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6003,6 +6164,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column b;
alter table bar drop column cc, drop column b;
@@ -6013,6 +6175,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6078,6 +6241,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column c;
alter table bar drop column cc, drop column c;
@@ -6088,6 +6252,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6153,6 +6318,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column d;
alter table bar drop column cc, drop column d;
@@ -6163,6 +6329,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6228,6 +6395,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column aa;
alter table bar drop column cc, drop column aa;
@@ -6238,6 +6406,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6303,6 +6472,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column bb;
alter table bar drop column cc, drop column bb;
@@ -6313,6 +6483,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6378,6 +6549,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column dd;
alter table bar drop column cc, drop column dd;
@@ -6388,6 +6560,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6453,6 +6626,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column aaa;
alter table bar drop column cc, drop column aaa;
@@ -6463,6 +6637,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6528,6 +6703,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column bbb;
alter table bar drop column cc, drop column bbb;
@@ -6538,6 +6714,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6603,6 +6780,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column ccc;
alter table bar drop column cc, drop column ccc;
@@ -6613,6 +6791,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6678,6 +6857,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column cc, drop column ddd;
alter table bar drop column cc, drop column ddd;
@@ -6688,6 +6868,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6753,6 +6934,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column a;
alter table bar drop column dd, drop column a;
@@ -6763,6 +6945,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6828,6 +7011,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column b;
alter table bar drop column dd, drop column b;
@@ -6838,6 +7022,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6903,6 +7088,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column c;
alter table bar drop column dd, drop column c;
@@ -6913,6 +7099,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -6978,6 +7165,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column d;
alter table bar drop column dd, drop column d;
@@ -6988,6 +7176,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7053,6 +7242,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column aa;
alter table bar drop column dd, drop column aa;
@@ -7063,6 +7253,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7128,6 +7319,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column bb;
alter table bar drop column dd, drop column bb;
@@ -7138,6 +7330,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7203,6 +7396,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column cc;
alter table bar drop column dd, drop column cc;
@@ -7213,6 +7407,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7278,6 +7473,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column aaa;
alter table bar drop column dd, drop column aaa;
@@ -7288,6 +7484,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7353,6 +7550,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column bbb;
alter table bar drop column dd, drop column bbb;
@@ -7363,6 +7561,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7428,6 +7627,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column ccc;
alter table bar drop column dd, drop column ccc;
@@ -7438,6 +7638,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7503,6 +7704,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column dd, drop column ddd;
alter table bar drop column dd, drop column ddd;
@@ -7513,6 +7715,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7578,6 +7781,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column a;
alter table bar drop column aaa, drop column a;
@@ -7588,6 +7792,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7653,6 +7858,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column b;
alter table bar drop column aaa, drop column b;
@@ -7663,6 +7869,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7728,6 +7935,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column c;
alter table bar drop column aaa, drop column c;
@@ -7738,6 +7946,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7803,6 +8012,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column d;
alter table bar drop column aaa, drop column d;
@@ -7813,6 +8023,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7878,6 +8089,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column aa;
alter table bar drop column aaa, drop column aa;
@@ -7888,6 +8100,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -7953,6 +8166,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column bb;
alter table bar drop column aaa, drop column bb;
@@ -7963,6 +8177,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8028,6 +8243,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column cc;
alter table bar drop column aaa, drop column cc;
@@ -8038,6 +8254,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8103,6 +8320,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column dd;
alter table bar drop column aaa, drop column dd;
@@ -8113,6 +8331,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8178,6 +8397,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column bbb;
alter table bar drop column aaa, drop column bbb;
@@ -8188,6 +8408,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8253,6 +8474,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column ccc;
alter table bar drop column aaa, drop column ccc;
@@ -8263,6 +8485,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8328,6 +8551,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column ddd;
alter table bar drop column aaa, drop column ddd;
@@ -8338,6 +8562,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8403,6 +8628,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column a;
alter table bar drop column bbb, drop column a;
@@ -8413,6 +8639,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8478,6 +8705,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column b;
alter table bar drop column bbb, drop column b;
@@ -8488,6 +8716,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8553,6 +8782,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column c;
alter table bar drop column bbb, drop column c;
@@ -8563,6 +8793,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8628,6 +8859,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column d;
alter table bar drop column bbb, drop column d;
@@ -8638,6 +8870,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8703,6 +8936,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column aa;
alter table bar drop column bbb, drop column aa;
@@ -8713,6 +8947,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8778,6 +9013,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column bb;
alter table bar drop column bbb, drop column bb;
@@ -8788,6 +9024,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8853,6 +9090,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column cc;
alter table bar drop column bbb, drop column cc;
@@ -8863,6 +9101,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -8928,6 +9167,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column dd;
alter table bar drop column bbb, drop column dd;
@@ -8938,6 +9178,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9003,6 +9244,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column aaa;
alter table bar drop column bbb, drop column aaa;
@@ -9013,6 +9255,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9078,6 +9321,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column ccc;
alter table bar drop column bbb, drop column ccc;
@@ -9088,6 +9332,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9153,6 +9398,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column ddd;
alter table bar drop column bbb, drop column ddd;
@@ -9163,6 +9409,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9228,6 +9475,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column a;
alter table bar drop column ccc, drop column a;
@@ -9238,6 +9486,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9303,6 +9552,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column b;
alter table bar drop column ccc, drop column b;
@@ -9313,6 +9563,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9378,6 +9629,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column c;
alter table bar drop column ccc, drop column c;
@@ -9388,6 +9640,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9453,6 +9706,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column d;
alter table bar drop column ccc, drop column d;
@@ -9463,6 +9717,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9528,6 +9783,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column aa;
alter table bar drop column ccc, drop column aa;
@@ -9538,6 +9794,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9603,6 +9860,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column bb;
alter table bar drop column ccc, drop column bb;
@@ -9613,6 +9871,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9678,6 +9937,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column cc;
alter table bar drop column ccc, drop column cc;
@@ -9688,6 +9948,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9753,6 +10014,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column dd;
alter table bar drop column ccc, drop column dd;
@@ -9763,6 +10025,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9828,6 +10091,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column aaa;
alter table bar drop column ccc, drop column aaa;
@@ -9838,6 +10102,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9903,6 +10168,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column bbb;
alter table bar drop column ccc, drop column bbb;
@@ -9913,6 +10179,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -9978,6 +10245,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column ddd;
alter table bar drop column ccc, drop column ddd;
@@ -9988,6 +10256,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10053,6 +10322,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column a;
alter table bar drop column ddd, drop column a;
@@ -10063,6 +10333,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10128,6 +10399,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column b;
alter table bar drop column ddd, drop column b;
@@ -10138,6 +10410,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10203,6 +10476,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column c;
alter table bar drop column ddd, drop column c;
@@ -10213,6 +10487,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10278,6 +10553,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column d;
alter table bar drop column ddd, drop column d;
@@ -10288,6 +10564,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10353,6 +10630,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column aa;
alter table bar drop column ddd, drop column aa;
@@ -10363,6 +10641,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10428,6 +10707,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column bb;
alter table bar drop column ddd, drop column bb;
@@ -10438,6 +10718,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10503,6 +10784,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column cc;
alter table bar drop column ddd, drop column cc;
@@ -10513,6 +10795,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10578,6 +10861,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column dd;
alter table bar drop column ddd, drop column dd;
@@ -10588,6 +10872,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10653,6 +10938,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column aaa;
alter table bar drop column ddd, drop column aaa;
@@ -10663,6 +10949,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10728,6 +11015,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column bbb;
alter table bar drop column ddd, drop column bbb;
@@ -10738,6 +11026,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10803,6 +11092,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column ccc;
alter table bar drop column ddd, drop column ccc;
@@ -10813,6 +11103,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10878,6 +11169,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b, drop column c;
alter table bar drop column a, drop column b, drop column c;
@@ -10888,6 +11180,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -10953,6 +11246,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b, drop column d;
alter table bar drop column a, drop column b, drop column d;
@@ -10963,6 +11257,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11028,6 +11323,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column c, drop column d;
alter table bar drop column a, drop column c, drop column d;
@@ -11038,6 +11334,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11103,6 +11400,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column c, drop column d;
alter table bar drop column b, drop column c, drop column d;
@@ -11113,6 +11411,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11178,6 +11477,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b, drop column c, drop column d;
alter table bar drop column a, drop column b, drop column c, drop column d;
@@ -11188,6 +11488,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11253,6 +11554,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column bb, drop column cc, drop column dd;
alter table bar drop column aa, drop column bb, drop column cc, drop column dd;
@@ -11263,6 +11565,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11328,6 +11631,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column bbb, drop column ccc, drop column ddd;
alter table bar drop column aaa, drop column bbb, drop column ccc, drop column ddd;
@@ -11338,6 +11642,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11403,6 +11708,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b, drop column c, drop column d, drop column aaa, drop column bbb, drop column ccc, drop column ddd;
alter table bar drop column a, drop column b, drop column c, drop column d, drop column aaa, drop column bbb, drop column ccc, drop column ddd;
@@ -11413,6 +11719,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11478,6 +11785,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aa, drop column bb, drop column cc, drop column dd, drop column aaa, drop column bbb, drop column ccc, drop column ddd;
alter table bar drop column aa, drop column bb, drop column cc, drop column dd, drop column aaa, drop column bbb, drop column ccc, drop column ddd;
@@ -11488,6 +11796,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, "adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,"oifds",NULL,"fdsjfds");
@@ -11553,6 +11862,7 @@ insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "ad insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew", "rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b, drop column c, drop column d, drop column aa, drop column bb, drop column cc, drop column dd;
alter table bar drop column a, drop column b, drop column c, drop column d, drop column aa, drop column bb, drop column cc, drop column dd;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_fixed_add.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_fixed_add.test index 3b29114bfda..aadd54753d3 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_fixed_add.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_fixed_add.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
@@ -13,11 +15,13 @@ let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL;
alter table bar add column added_1 bigint default NULL;
@@ -28,11 +32,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1;
alter table bar add column added_2 bigint default -1;
@@ -43,11 +49,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1;
alter table bar add column added_3 bigint NOT NULL default -1;
@@ -58,11 +66,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL;
@@ -73,11 +83,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty";
alter table bar add column added_5 varchar(10) default "qwerty";
@@ -88,11 +100,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt";
@@ -103,11 +117,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL;
alter table bar add column added_7 text default NULL;
@@ -118,11 +134,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL;
@@ -133,11 +151,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first;
alter table bar add column added_1 bigint default NULL first;
@@ -148,11 +168,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first;
alter table bar add column added_2 bigint default -1 first;
@@ -163,11 +185,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first;
alter table bar add column added_3 bigint NOT NULL default -1 first;
@@ -178,11 +202,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first;
alter table bar add column added_4 varchar(10) default NULL first;
@@ -193,11 +219,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first;
alter table bar add column added_5 varchar(10) default "qwerty" first;
@@ -208,11 +236,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
@@ -223,11 +253,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first;
alter table bar add column added_7 text default NULL first;
@@ -238,11 +270,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first;
alter table bar add column added_8 mediumtext default NULL first;
@@ -253,11 +287,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b;
alter table bar add column added_1 bigint default NULL after b;
@@ -268,11 +304,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b;
alter table bar add column added_2 bigint default -1 after b;
@@ -283,11 +321,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b;
@@ -298,11 +338,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b;
@@ -313,11 +355,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b;
@@ -328,11 +372,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b;
@@ -343,11 +389,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b;
alter table bar add column added_7 text default NULL after b;
@@ -358,11 +406,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b;
@@ -373,11 +423,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL;
@@ -388,11 +440,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234;
@@ -403,11 +457,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
@@ -418,11 +474,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
@@ -433,11 +491,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
@@ -448,11 +508,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -463,11 +525,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL;
@@ -478,11 +542,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
@@ -493,11 +559,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL;
@@ -508,11 +576,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234;
@@ -523,11 +593,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
@@ -538,11 +610,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
@@ -553,11 +627,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
@@ -568,11 +644,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -583,11 +661,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1, add column added_71 text default NULL;
@@ -598,11 +678,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
@@ -613,11 +695,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
@@ -628,11 +712,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
@@ -643,11 +729,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
@@ -658,11 +746,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
@@ -673,11 +763,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
@@ -688,11 +780,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -703,11 +797,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
@@ -718,11 +814,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
@@ -733,11 +831,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
@@ -748,11 +848,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
@@ -763,11 +865,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
@@ -778,11 +882,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
@@ -793,11 +899,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
@@ -808,11 +916,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -823,11 +933,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
@@ -838,11 +950,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
@@ -853,11 +967,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
@@ -868,11 +984,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
@@ -883,11 +1001,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
@@ -898,11 +1018,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
@@ -913,11 +1035,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
@@ -928,11 +1052,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -943,11 +1069,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
@@ -958,11 +1086,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
@@ -973,11 +1103,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
@@ -988,11 +1120,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
@@ -1003,11 +1137,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
@@ -1018,11 +1154,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
@@ -1033,11 +1171,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
@@ -1048,11 +1188,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1063,11 +1205,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
@@ -1078,11 +1222,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
@@ -1093,11 +1239,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL;
@@ -1108,11 +1256,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234;
@@ -1123,11 +1273,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
@@ -1138,11 +1290,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
@@ -1153,11 +1307,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
@@ -1168,11 +1324,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1183,11 +1341,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL, add column added_71 text default NULL;
@@ -1198,11 +1358,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL;
@@ -1213,11 +1375,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
@@ -1228,11 +1392,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
@@ -1243,11 +1409,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
@@ -1258,11 +1426,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
@@ -1273,11 +1443,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
@@ -1288,11 +1460,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1303,11 +1477,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL;
@@ -1318,11 +1494,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
@@ -1333,11 +1511,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
@@ -1348,11 +1528,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
@@ -1363,11 +1545,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -1378,11 +1562,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
@@ -1393,11 +1579,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -1408,11 +1596,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1423,11 +1613,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL;
@@ -1438,11 +1630,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
@@ -1453,11 +1647,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
@@ -1468,11 +1664,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
@@ -1483,11 +1681,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -1498,11 +1698,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
@@ -1513,11 +1715,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -1528,11 +1732,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1543,11 +1749,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL;
@@ -1558,11 +1766,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
@@ -1573,11 +1783,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
@@ -1588,11 +1800,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
@@ -1603,11 +1817,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -1618,11 +1834,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
@@ -1633,11 +1851,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -1648,11 +1868,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1663,11 +1885,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
@@ -1678,11 +1902,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
@@ -1693,11 +1919,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
@@ -1708,11 +1936,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
@@ -1723,11 +1953,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -1738,11 +1970,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
@@ -1753,11 +1987,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -1768,11 +2004,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1783,11 +2021,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
@@ -1798,11 +2038,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
@@ -1813,11 +2055,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
@@ -1828,11 +2072,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
@@ -1843,11 +2089,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
@@ -1858,11 +2106,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
@@ -1873,11 +2123,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
@@ -1888,11 +2140,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1903,11 +2157,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
@@ -1918,11 +2174,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
@@ -1933,11 +2191,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
@@ -1948,11 +2208,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
@@ -1963,11 +2225,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
@@ -1978,11 +2242,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
@@ -1993,11 +2259,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
@@ -2008,11 +2276,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2023,11 +2293,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
@@ -2038,11 +2310,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
@@ -2053,11 +2327,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL;
@@ -2068,11 +2344,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234;
@@ -2083,11 +2361,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -2098,11 +2378,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
@@ -2113,11 +2395,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -2128,11 +2412,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2143,11 +2429,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL first, add column added_71 text default NULL;
@@ -2158,11 +2446,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
@@ -2173,11 +2463,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
@@ -2188,11 +2480,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
@@ -2203,11 +2497,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -2218,11 +2514,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
@@ -2233,11 +2531,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -2248,11 +2548,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2263,11 +2565,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
@@ -2278,11 +2582,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
@@ -2293,11 +2599,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b;
@@ -2308,11 +2616,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b;
@@ -2323,11 +2633,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -2338,11 +2650,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -2353,11 +2667,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -2368,11 +2684,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -2383,11 +2701,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_71 text default NULL after b;
@@ -2398,11 +2718,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -2413,11 +2735,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b;
@@ -2428,11 +2752,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b;
@@ -2443,11 +2769,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -2458,11 +2786,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b;
@@ -2473,11 +2803,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -2488,11 +2820,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -2503,11 +2837,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_71 text default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_71 text default NULL after b;
@@ -2518,11 +2854,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b;
@@ -2533,11 +2871,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b;
@@ -2548,11 +2888,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b;
@@ -2563,11 +2905,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -2578,11 +2922,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b;
@@ -2593,11 +2939,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -2608,11 +2956,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -2623,11 +2973,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b;
@@ -2638,11 +2990,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b;
@@ -2653,11 +3007,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b;
@@ -2668,11 +3024,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b;
@@ -2683,11 +3041,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -2698,11 +3058,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -2713,11 +3075,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -2728,11 +3092,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -2743,11 +3109,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b;
@@ -2758,11 +3126,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -2773,11 +3143,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b;
@@ -2788,11 +3160,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b;
@@ -2803,11 +3177,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -2818,11 +3194,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b;
@@ -2833,11 +3211,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -2848,11 +3228,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -2863,11 +3245,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b;
@@ -2878,11 +3262,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b;
@@ -2893,11 +3279,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b;
@@ -2908,11 +3296,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b;
@@ -2923,11 +3313,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -2938,11 +3330,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b;
@@ -2953,11 +3347,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -2968,11 +3364,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -2983,11 +3381,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b;
@@ -2998,11 +3398,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b;
@@ -3013,11 +3415,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_11 bigint default NULL after b;
@@ -3028,11 +3432,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b;
@@ -3043,11 +3449,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -3058,11 +3466,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -3073,11 +3483,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -3088,11 +3500,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -3103,11 +3517,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_71 text default NULL after b;
@@ -3118,11 +3534,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -3133,11 +3551,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b;
@@ -3148,11 +3568,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b;
@@ -3163,11 +3585,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -3178,11 +3602,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -3193,11 +3619,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -3208,11 +3636,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -3223,11 +3653,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b;
@@ -3238,11 +3670,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -3253,11 +3687,13 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1;
alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_fixed_drop.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_fixed_drop.test index 1076165a225..ae81d4c9ff5 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_fixed_drop.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_fixed_drop.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_var_add.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_var_add.test index c36ccf85c04..957be39a313 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_var_add.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_var_add.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_var_drop.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_var_drop.test index be93a988c7a..c953b35c40f 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_var_drop.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_all_var_drop.test @@ -1,3 +1,5 @@ +# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
@@ -13,11 +15,13 @@ let $diff_tables= test.foo, test.bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa;
alter table bar drop column aaa;
@@ -28,11 +32,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb;
alter table bar drop column bbb;
@@ -43,11 +49,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc;
alter table bar drop column ccc;
@@ -58,11 +66,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd;
alter table bar drop column ddd;
@@ -73,11 +83,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column bbb;
alter table bar drop column aaa, drop column bbb;
@@ -88,11 +100,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column ccc;
alter table bar drop column aaa, drop column ccc;
@@ -103,11 +117,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column ddd;
alter table bar drop column aaa, drop column ddd;
@@ -118,11 +134,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column aaa;
alter table bar drop column bbb, drop column aaa;
@@ -133,11 +151,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column ccc;
alter table bar drop column bbb, drop column ccc;
@@ -148,11 +168,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column ddd;
alter table bar drop column bbb, drop column ddd;
@@ -163,11 +185,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column aaa;
alter table bar drop column ccc, drop column aaa;
@@ -178,11 +202,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column bbb;
alter table bar drop column ccc, drop column bbb;
@@ -193,11 +219,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column ddd;
alter table bar drop column ccc, drop column ddd;
@@ -208,11 +236,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column aaa;
alter table bar drop column ddd, drop column aaa;
@@ -223,11 +253,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column bbb;
alter table bar drop column ddd, drop column bbb;
@@ -238,11 +270,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column ccc;
alter table bar drop column ddd, drop column ccc;
@@ -253,11 +287,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column bbb, drop column ccc;
alter table bar drop column aaa, drop column bbb, drop column ccc;
@@ -268,11 +304,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column bbb, drop column ddd;
alter table bar drop column aaa, drop column bbb, drop column ddd;
@@ -283,11 +321,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column ccc, drop column ddd;
alter table bar drop column aaa, drop column ccc, drop column ddd;
@@ -298,11 +338,13 @@ drop table foo; drop table bar; create table foo (aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL);
insert into foo values (-1,NULL,'2008-1-1',NULL);
insert into foo values (NULL,12345678987,NULL,1);
insert into foo values (2,20,'1999-11-11',0);
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column ccc, drop column ddd;
alter table bar drop column bbb, drop column ccc, drop column ddd;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedblob_add.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedblob_add.test index 607c29dd3dd..b86ac4cab17 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedblob_add.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedblob_add.test @@ -13,6 +13,7 @@ let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -30,6 +31,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL;
alter table bar add column added_1 bigint default NULL;
@@ -40,6 +42,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -57,6 +60,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1;
alter table bar add column added_2 bigint default -1;
@@ -67,6 +71,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -84,6 +89,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1;
alter table bar add column added_3 bigint NOT NULL default -1;
@@ -94,6 +100,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -111,6 +118,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL;
@@ -121,6 +129,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -138,6 +147,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty";
alter table bar add column added_5 varchar(10) default "qwerty";
@@ -148,6 +158,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -165,6 +176,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt";
@@ -175,6 +187,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -192,6 +205,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL;
alter table bar add column added_7 text default NULL;
@@ -202,6 +216,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -219,6 +234,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL;
@@ -229,6 +245,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -246,6 +263,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first;
alter table bar add column added_1 bigint default NULL first;
@@ -256,6 +274,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -273,6 +292,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first;
alter table bar add column added_2 bigint default -1 first;
@@ -283,6 +303,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -300,6 +321,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first;
alter table bar add column added_3 bigint NOT NULL default -1 first;
@@ -310,6 +332,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -327,6 +350,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first;
alter table bar add column added_4 varchar(10) default NULL first;
@@ -337,6 +361,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -354,6 +379,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first;
alter table bar add column added_5 varchar(10) default "qwerty" first;
@@ -364,6 +390,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -381,6 +408,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
@@ -391,6 +419,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -408,6 +437,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first;
alter table bar add column added_7 text default NULL first;
@@ -418,6 +448,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -435,6 +466,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first;
alter table bar add column added_8 mediumtext default NULL first;
@@ -445,6 +477,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -462,6 +495,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b;
alter table bar add column added_1 bigint default NULL after b;
@@ -472,6 +506,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -489,6 +524,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b;
alter table bar add column added_2 bigint default -1 after b;
@@ -499,6 +535,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -516,6 +553,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b;
@@ -526,6 +564,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -543,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b;
@@ -553,6 +593,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -570,6 +611,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b;
@@ -580,6 +622,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -597,6 +640,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b;
@@ -607,6 +651,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -624,6 +669,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b;
alter table bar add column added_7 text default NULL after b;
@@ -634,6 +680,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -651,6 +698,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b;
@@ -661,6 +709,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -678,6 +727,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL;
@@ -688,6 +738,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -705,6 +756,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234;
@@ -715,6 +767,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -732,6 +785,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
@@ -742,6 +796,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -759,6 +814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
@@ -769,6 +825,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -786,6 +843,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
@@ -796,6 +854,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -813,6 +872,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -823,6 +883,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -840,6 +901,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL;
@@ -850,6 +912,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -867,6 +930,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
@@ -877,6 +941,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -894,6 +959,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL;
@@ -904,6 +970,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -921,6 +988,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234;
@@ -931,6 +999,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -948,6 +1017,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
@@ -958,6 +1028,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -975,6 +1046,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
@@ -985,6 +1057,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1002,6 +1075,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
@@ -1012,6 +1086,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1029,6 +1104,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1039,6 +1115,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1056,6 +1133,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1, add column added_71 text default NULL;
@@ -1066,6 +1144,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1083,6 +1162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
@@ -1093,6 +1173,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1110,6 +1191,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
@@ -1120,6 +1202,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1137,6 +1220,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
@@ -1147,6 +1231,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1164,6 +1249,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
@@ -1174,6 +1260,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1191,6 +1278,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
@@ -1201,6 +1289,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1218,6 +1307,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
@@ -1228,6 +1318,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1245,6 +1336,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1255,6 +1347,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1272,6 +1365,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
@@ -1282,6 +1376,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1299,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
@@ -1309,6 +1405,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1326,6 +1423,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
@@ -1336,6 +1434,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1353,6 +1452,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
@@ -1363,6 +1463,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1380,6 +1481,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
@@ -1390,6 +1492,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1407,6 +1510,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
@@ -1417,6 +1521,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1434,6 +1539,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
@@ -1444,6 +1550,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1461,6 +1568,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1471,6 +1579,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1488,6 +1597,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
@@ -1498,6 +1608,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1515,6 +1626,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
@@ -1525,6 +1637,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1542,6 +1655,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
@@ -1552,6 +1666,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1569,6 +1684,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
@@ -1579,6 +1695,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1596,6 +1713,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
@@ -1606,6 +1724,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1623,6 +1742,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
@@ -1633,6 +1753,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1650,6 +1771,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
@@ -1660,6 +1782,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1677,6 +1800,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1687,6 +1811,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1704,6 +1829,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
@@ -1714,6 +1840,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1731,6 +1858,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
@@ -1741,6 +1869,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1758,6 +1887,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
@@ -1768,6 +1898,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1785,6 +1916,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
@@ -1795,6 +1927,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1812,6 +1945,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
@@ -1822,6 +1956,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1839,6 +1974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
@@ -1849,6 +1985,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1866,6 +2003,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
@@ -1876,6 +2014,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1893,6 +2032,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1903,6 +2043,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1920,6 +2061,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
@@ -1930,6 +2072,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1947,6 +2090,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
@@ -1957,6 +2101,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1974,6 +2119,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL;
@@ -1984,6 +2130,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2001,6 +2148,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234;
@@ -2011,6 +2159,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2028,6 +2177,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2038,6 +2188,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2055,6 +2206,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
@@ -2065,6 +2217,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2082,6 +2235,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2092,6 +2246,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2109,6 +2264,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2119,6 +2275,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2136,6 +2293,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL, add column added_71 text default NULL;
@@ -2146,6 +2304,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2163,6 +2322,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL;
@@ -2173,6 +2333,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2190,6 +2351,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
@@ -2200,6 +2362,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2217,6 +2380,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
@@ -2227,6 +2391,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2244,6 +2409,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2254,6 +2420,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2271,6 +2438,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
@@ -2281,6 +2449,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2298,6 +2467,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2308,6 +2478,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2325,6 +2496,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2335,6 +2507,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2352,6 +2525,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL;
@@ -2362,6 +2536,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2379,6 +2554,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
@@ -2389,6 +2565,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2406,6 +2583,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
@@ -2416,6 +2594,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2433,6 +2612,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
@@ -2443,6 +2623,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2460,6 +2641,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -2470,6 +2652,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2487,6 +2670,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
@@ -2497,6 +2681,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2514,6 +2699,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -2524,6 +2710,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2541,6 +2728,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2551,6 +2739,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2568,6 +2757,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL;
@@ -2578,6 +2768,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2595,6 +2786,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
@@ -2605,6 +2797,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2622,6 +2815,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
@@ -2632,6 +2826,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2649,6 +2844,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
@@ -2659,6 +2855,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2676,6 +2873,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2686,6 +2884,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2703,6 +2902,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
@@ -2713,6 +2913,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2730,6 +2931,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2740,6 +2942,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2757,6 +2960,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2767,6 +2971,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2784,6 +2989,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL;
@@ -2794,6 +3000,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2811,6 +3018,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
@@ -2821,6 +3029,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2838,6 +3047,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
@@ -2848,6 +3058,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2865,6 +3076,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
@@ -2875,6 +3087,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2892,6 +3105,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2902,6 +3116,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2919,6 +3134,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
@@ -2929,6 +3145,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2946,6 +3163,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2956,6 +3174,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2973,6 +3192,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2983,6 +3203,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3000,6 +3221,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
@@ -3010,6 +3232,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3027,6 +3250,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
@@ -3037,6 +3261,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3054,6 +3279,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
@@ -3064,6 +3290,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3081,6 +3308,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
@@ -3091,6 +3319,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3108,6 +3337,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3118,6 +3348,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3135,6 +3366,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
@@ -3145,6 +3377,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3162,6 +3395,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3172,6 +3406,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3189,6 +3424,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3199,6 +3435,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3216,6 +3453,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
@@ -3226,6 +3464,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3243,6 +3482,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
@@ -3253,6 +3493,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3270,6 +3511,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
@@ -3280,6 +3522,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3297,6 +3540,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
@@ -3307,6 +3551,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3324,6 +3569,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
@@ -3334,6 +3580,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3351,6 +3598,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
@@ -3361,6 +3609,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3378,6 +3627,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
@@ -3388,6 +3638,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3405,6 +3656,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3415,6 +3667,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3432,6 +3685,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
@@ -3442,6 +3696,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3459,6 +3714,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
@@ -3469,6 +3725,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3486,6 +3743,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
@@ -3496,6 +3754,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3513,6 +3772,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
@@ -3523,6 +3783,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3540,6 +3801,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
@@ -3550,6 +3812,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3567,6 +3830,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
@@ -3577,6 +3841,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3594,6 +3859,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
@@ -3604,6 +3870,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3621,6 +3888,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3631,6 +3899,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3648,6 +3917,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
@@ -3658,6 +3928,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3675,6 +3946,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
@@ -3685,6 +3957,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3702,6 +3975,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL;
@@ -3712,6 +3986,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3729,6 +4004,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234;
@@ -3739,6 +4015,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3756,6 +4033,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3766,6 +4044,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3783,6 +4062,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
@@ -3793,6 +4073,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3810,6 +4091,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3820,6 +4102,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3837,6 +4120,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3847,6 +4131,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3864,6 +4149,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL first, add column added_71 text default NULL;
@@ -3874,6 +4160,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3891,6 +4178,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
@@ -3901,6 +4189,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3918,6 +4207,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
@@ -3928,6 +4218,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3945,6 +4236,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
@@ -3955,6 +4247,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3972,6 +4265,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3982,6 +4276,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3999,6 +4294,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
@@ -4009,6 +4305,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4026,6 +4323,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -4036,6 +4334,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4053,6 +4352,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -4063,6 +4363,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4080,6 +4381,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
@@ -4090,6 +4392,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4107,6 +4410,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
@@ -4117,6 +4421,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4134,6 +4439,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b;
@@ -4144,6 +4450,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4161,6 +4468,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b;
@@ -4171,6 +4479,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4188,6 +4497,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -4198,6 +4508,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4215,6 +4526,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -4225,6 +4537,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4242,6 +4555,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -4252,6 +4566,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4269,6 +4584,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -4279,6 +4595,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4296,6 +4613,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_71 text default NULL after b;
@@ -4306,6 +4624,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4323,6 +4642,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -4333,6 +4653,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4350,6 +4671,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b;
@@ -4360,6 +4682,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4377,6 +4700,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b;
@@ -4387,6 +4711,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4404,6 +4729,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -4414,6 +4740,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4431,6 +4758,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b;
@@ -4441,6 +4769,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4458,6 +4787,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -4468,6 +4798,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4485,6 +4816,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -4495,6 +4827,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4512,6 +4845,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_71 text default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_71 text default NULL after b;
@@ -4522,6 +4856,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4539,6 +4874,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b;
@@ -4549,6 +4885,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4566,6 +4903,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b;
@@ -4576,6 +4914,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4593,6 +4932,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b;
@@ -4603,6 +4943,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4620,6 +4961,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -4630,6 +4972,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4647,6 +4990,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b;
@@ -4657,6 +5001,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4674,6 +5019,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -4684,6 +5030,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4701,6 +5048,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -4711,6 +5059,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4728,6 +5077,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b;
@@ -4738,6 +5088,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4755,6 +5106,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b;
@@ -4765,6 +5117,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4782,6 +5135,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b;
@@ -4792,6 +5146,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4809,6 +5164,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b;
@@ -4819,6 +5175,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4836,6 +5193,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -4846,6 +5204,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4863,6 +5222,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -4873,6 +5233,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4890,6 +5251,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -4900,6 +5262,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4917,6 +5280,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -4927,6 +5291,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4944,6 +5309,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b;
@@ -4954,6 +5320,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4971,6 +5338,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -4981,6 +5349,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4998,6 +5367,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b;
@@ -5008,6 +5378,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5025,6 +5396,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b;
@@ -5035,6 +5407,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5052,6 +5425,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -5062,6 +5436,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5079,6 +5454,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b;
@@ -5089,6 +5465,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5106,6 +5483,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -5116,6 +5494,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5133,6 +5512,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -5143,6 +5523,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5160,6 +5541,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b;
@@ -5170,6 +5552,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5187,6 +5570,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b;
@@ -5197,6 +5581,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5214,6 +5599,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b;
@@ -5224,6 +5610,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5241,6 +5628,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b;
@@ -5251,6 +5639,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5268,6 +5657,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -5278,6 +5668,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5295,6 +5686,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b;
@@ -5305,6 +5697,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5322,6 +5715,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -5332,6 +5726,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5349,6 +5744,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -5359,6 +5755,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5376,6 +5773,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b;
@@ -5386,6 +5784,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5403,6 +5802,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b;
@@ -5413,6 +5813,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5430,6 +5831,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_11 bigint default NULL after b;
@@ -5440,6 +5842,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5457,6 +5860,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b;
@@ -5467,6 +5871,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5484,6 +5889,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -5494,6 +5900,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5511,6 +5918,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -5521,6 +5929,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5538,6 +5947,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -5548,6 +5958,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5565,6 +5976,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -5575,6 +5987,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5592,6 +6005,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_71 text default NULL after b;
@@ -5602,6 +6016,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5619,6 +6034,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -5629,6 +6045,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5646,6 +6063,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b;
@@ -5656,6 +6074,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5673,6 +6092,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b;
@@ -5683,6 +6103,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5700,6 +6121,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -5710,6 +6132,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5727,6 +6150,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -5737,6 +6161,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5754,6 +6179,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -5764,6 +6190,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5781,6 +6208,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -5791,6 +6219,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5808,6 +6237,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b;
@@ -5818,6 +6248,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5835,6 +6266,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -5845,6 +6277,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5862,6 +6295,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1;
alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedblob_add2.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedblob_add2.test index aa91da1d0fb..e22d2985df0 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedblob_add2.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedblob_add2.test @@ -13,6 +13,7 @@ let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -30,6 +31,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL;
alter table bar add column added_1 bigint default NULL;
@@ -40,6 +42,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -57,6 +60,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1;
alter table bar add column added_2 bigint default -1;
@@ -67,6 +71,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -84,6 +89,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1;
alter table bar add column added_3 bigint NOT NULL default -1;
@@ -94,6 +100,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -111,6 +118,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL;
@@ -121,6 +129,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -138,6 +147,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty";
alter table bar add column added_5 varchar(10) default "qwerty";
@@ -148,6 +158,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -165,6 +176,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt";
@@ -175,6 +187,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -192,6 +205,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL;
alter table bar add column added_7 text default NULL;
@@ -202,6 +216,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -219,6 +234,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL;
@@ -229,6 +245,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -246,6 +263,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first;
alter table bar add column added_1 bigint default NULL first;
@@ -256,6 +274,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -273,6 +292,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first;
alter table bar add column added_2 bigint default -1 first;
@@ -283,6 +303,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -300,6 +321,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first;
alter table bar add column added_3 bigint NOT NULL default -1 first;
@@ -310,6 +332,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -327,6 +350,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first;
alter table bar add column added_4 varchar(10) default NULL first;
@@ -337,6 +361,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -354,6 +379,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first;
alter table bar add column added_5 varchar(10) default "qwerty" first;
@@ -364,6 +390,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -381,6 +408,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
@@ -391,6 +419,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -408,6 +437,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first;
alter table bar add column added_7 text default NULL first;
@@ -418,6 +448,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -435,6 +466,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first;
alter table bar add column added_8 mediumtext default NULL first;
@@ -445,6 +477,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -462,6 +495,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb;
@@ -472,6 +506,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -489,6 +524,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb;
alter table bar add column added_2 bigint default -1 after bb;
@@ -499,6 +535,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -516,6 +553,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb;
@@ -526,6 +564,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -543,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb;
@@ -553,6 +593,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -570,6 +611,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb;
@@ -580,6 +622,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -597,6 +640,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb;
@@ -607,6 +651,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -624,6 +669,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb;
alter table bar add column added_7 text default NULL after bb;
@@ -634,6 +680,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -651,6 +698,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb;
@@ -661,6 +709,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -678,6 +727,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL;
@@ -688,6 +738,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -705,6 +756,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234;
@@ -715,6 +767,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -732,6 +785,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
@@ -742,6 +796,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -759,6 +814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
@@ -769,6 +825,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -786,6 +843,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
@@ -796,6 +854,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -813,6 +872,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -823,6 +883,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -840,6 +901,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL;
@@ -850,6 +912,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -867,6 +930,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
@@ -877,6 +941,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -894,6 +959,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL;
@@ -904,6 +970,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -921,6 +988,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234;
@@ -931,6 +999,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -948,6 +1017,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
@@ -958,6 +1028,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -975,6 +1046,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
@@ -985,6 +1057,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1002,6 +1075,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
@@ -1012,6 +1086,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1029,6 +1104,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1039,6 +1115,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1056,6 +1133,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1, add column added_71 text default NULL;
@@ -1066,6 +1144,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1083,6 +1162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
@@ -1093,6 +1173,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1110,6 +1191,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
@@ -1120,6 +1202,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1137,6 +1220,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
@@ -1147,6 +1231,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1164,6 +1249,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
@@ -1174,6 +1260,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1191,6 +1278,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
@@ -1201,6 +1289,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1218,6 +1307,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
@@ -1228,6 +1318,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1245,6 +1336,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1255,6 +1347,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1272,6 +1365,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
@@ -1282,6 +1376,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1299,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
@@ -1309,6 +1405,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1326,6 +1423,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
@@ -1336,6 +1434,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1353,6 +1452,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
@@ -1363,6 +1463,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1380,6 +1481,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
@@ -1390,6 +1492,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1407,6 +1510,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
@@ -1417,6 +1521,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1434,6 +1539,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
@@ -1444,6 +1550,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1461,6 +1568,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1471,6 +1579,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1488,6 +1597,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
@@ -1498,6 +1608,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1515,6 +1626,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
@@ -1525,6 +1637,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1542,6 +1655,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
@@ -1552,6 +1666,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1569,6 +1684,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
@@ -1579,6 +1695,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1596,6 +1713,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
@@ -1606,6 +1724,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1623,6 +1742,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
@@ -1633,6 +1753,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1650,6 +1771,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
@@ -1660,6 +1782,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1677,6 +1800,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1687,6 +1811,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1704,6 +1829,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
@@ -1714,6 +1840,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1731,6 +1858,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
@@ -1741,6 +1869,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1758,6 +1887,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
@@ -1768,6 +1898,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1785,6 +1916,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
@@ -1795,6 +1927,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1812,6 +1945,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
@@ -1822,6 +1956,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1839,6 +1974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
@@ -1849,6 +1985,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1866,6 +2003,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
@@ -1876,6 +2014,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1893,6 +2032,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1903,6 +2043,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1920,6 +2061,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
@@ -1930,6 +2072,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1947,6 +2090,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
@@ -1957,6 +2101,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1974,6 +2119,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL;
@@ -1984,6 +2130,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2001,6 +2148,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234;
@@ -2011,6 +2159,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2028,6 +2177,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2038,6 +2188,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2055,6 +2206,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
@@ -2065,6 +2217,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2082,6 +2235,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2092,6 +2246,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2109,6 +2264,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2119,6 +2275,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2136,6 +2293,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL, add column added_71 text default NULL;
@@ -2146,6 +2304,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2163,6 +2322,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL;
@@ -2173,6 +2333,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2190,6 +2351,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
@@ -2200,6 +2362,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2217,6 +2380,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
@@ -2227,6 +2391,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2244,6 +2409,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2254,6 +2420,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2271,6 +2438,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
@@ -2281,6 +2449,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2298,6 +2467,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2308,6 +2478,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2325,6 +2496,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2335,6 +2507,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2352,6 +2525,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL;
@@ -2362,6 +2536,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2379,6 +2554,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
@@ -2389,6 +2565,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2406,6 +2583,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
@@ -2416,6 +2594,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2433,6 +2612,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
@@ -2443,6 +2623,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2460,6 +2641,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -2470,6 +2652,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2487,6 +2670,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
@@ -2497,6 +2681,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2514,6 +2699,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -2524,6 +2710,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2541,6 +2728,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2551,6 +2739,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2568,6 +2757,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL;
@@ -2578,6 +2768,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2595,6 +2786,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
@@ -2605,6 +2797,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2622,6 +2815,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
@@ -2632,6 +2826,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2649,6 +2844,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
@@ -2659,6 +2855,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2676,6 +2873,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2686,6 +2884,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2703,6 +2902,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
@@ -2713,6 +2913,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2730,6 +2931,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2740,6 +2942,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2757,6 +2960,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2767,6 +2971,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2784,6 +2989,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL;
@@ -2794,6 +3000,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2811,6 +3018,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
@@ -2821,6 +3029,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2838,6 +3047,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
@@ -2848,6 +3058,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2865,6 +3076,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
@@ -2875,6 +3087,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2892,6 +3105,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2902,6 +3116,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2919,6 +3134,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
@@ -2929,6 +3145,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2946,6 +3163,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2956,6 +3174,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2973,6 +3192,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2983,6 +3203,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3000,6 +3221,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
@@ -3010,6 +3232,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3027,6 +3250,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
@@ -3037,6 +3261,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3054,6 +3279,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
@@ -3064,6 +3290,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3081,6 +3308,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
@@ -3091,6 +3319,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3108,6 +3337,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3118,6 +3348,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3135,6 +3366,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
@@ -3145,6 +3377,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3162,6 +3395,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3172,6 +3406,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3189,6 +3424,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3199,6 +3435,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3216,6 +3453,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
@@ -3226,6 +3464,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3243,6 +3482,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
@@ -3253,6 +3493,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3270,6 +3511,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
@@ -3280,6 +3522,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3297,6 +3540,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
@@ -3307,6 +3551,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3324,6 +3569,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
@@ -3334,6 +3580,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3351,6 +3598,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
@@ -3361,6 +3609,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3378,6 +3627,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
@@ -3388,6 +3638,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3405,6 +3656,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3415,6 +3667,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3432,6 +3685,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
@@ -3442,6 +3696,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3459,6 +3714,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
@@ -3469,6 +3725,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3486,6 +3743,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
@@ -3496,6 +3754,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3513,6 +3772,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
@@ -3523,6 +3783,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3540,6 +3801,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
@@ -3550,6 +3812,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3567,6 +3830,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
@@ -3577,6 +3841,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3594,6 +3859,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
@@ -3604,6 +3870,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3621,6 +3888,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3631,6 +3899,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3648,6 +3917,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
@@ -3658,6 +3928,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3675,6 +3946,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
@@ -3685,6 +3957,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3702,6 +3975,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL;
@@ -3712,6 +3986,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3729,6 +4004,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234;
@@ -3739,6 +4015,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3756,6 +4033,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3766,6 +4044,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3783,6 +4062,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
@@ -3793,6 +4073,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3810,6 +4091,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3820,6 +4102,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3837,6 +4120,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3847,6 +4131,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3864,6 +4149,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL first, add column added_71 text default NULL;
@@ -3874,6 +4160,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3891,6 +4178,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
@@ -3901,6 +4189,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3918,6 +4207,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
@@ -3928,6 +4218,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3945,6 +4236,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
@@ -3955,6 +4247,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3972,6 +4265,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3982,6 +4276,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3999,6 +4294,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
@@ -4009,6 +4305,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4026,6 +4323,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -4036,6 +4334,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4053,6 +4352,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -4063,6 +4363,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4080,6 +4381,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
@@ -4090,6 +4392,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4107,6 +4410,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
@@ -4117,6 +4421,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4134,6 +4439,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_11 bigint default NULL after bb;
@@ -4144,6 +4450,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4161,6 +4468,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_21 bigint default 1234 after bb;
@@ -4171,6 +4479,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4188,6 +4497,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -4198,6 +4508,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4215,6 +4526,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_41 varchar(10) default NULL after bb;
@@ -4225,6 +4537,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4242,6 +4555,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -4252,6 +4566,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4269,6 +4584,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -4279,6 +4595,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4296,6 +4613,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_71 text default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_71 text default NULL after bb;
@@ -4306,6 +4624,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4323,6 +4642,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_1 bigint default NULL after bb, add column added_81 mediumtext default NULL after bb;
@@ -4333,6 +4653,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4350,6 +4671,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_11 bigint default NULL after bb;
@@ -4360,6 +4682,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4377,6 +4700,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_21 bigint default 1234 after bb;
@@ -4387,6 +4711,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4404,6 +4729,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -4414,6 +4740,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4431,6 +4758,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_41 varchar(10) default NULL after bb;
@@ -4441,6 +4769,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4458,6 +4787,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -4468,6 +4798,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4485,6 +4816,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -4495,6 +4827,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4512,6 +4845,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_71 text default NULL after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_71 text default NULL after bb;
@@ -4522,6 +4856,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4539,6 +4874,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_2 bigint default -1 after bb, add column added_81 mediumtext default NULL after bb;
@@ -4549,6 +4885,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4566,6 +4903,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_11 bigint default NULL after bb;
@@ -4576,6 +4914,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4593,6 +4932,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_21 bigint default 1234 after bb;
@@ -4603,6 +4943,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4620,6 +4961,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -4630,6 +4972,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4647,6 +4990,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_41 varchar(10) default NULL after bb;
@@ -4657,6 +5001,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4674,6 +5019,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -4684,6 +5030,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4701,6 +5048,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -4711,6 +5059,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4728,6 +5077,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_71 text default NULL after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_71 text default NULL after bb;
@@ -4738,6 +5088,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4755,6 +5106,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_3 bigint NOT NULL default -1 after bb, add column added_81 mediumtext default NULL after bb;
@@ -4765,6 +5117,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4782,6 +5135,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_11 bigint default NULL after bb;
@@ -4792,6 +5146,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4809,6 +5164,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_21 bigint default 1234 after bb;
@@ -4819,6 +5175,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4836,6 +5193,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -4846,6 +5204,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4863,6 +5222,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_41 varchar(10) default NULL after bb;
@@ -4873,6 +5233,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4890,6 +5251,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -4900,6 +5262,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4917,6 +5280,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -4927,6 +5291,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4944,6 +5309,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_71 text default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_71 text default NULL after bb;
@@ -4954,6 +5320,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4971,6 +5338,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_4 varchar(10) default NULL after bb, add column added_81 mediumtext default NULL after bb;
@@ -4981,6 +5349,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4998,6 +5367,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_11 bigint default NULL after bb;
@@ -5008,6 +5378,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5025,6 +5396,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_21 bigint default 1234 after bb;
@@ -5035,6 +5407,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5052,6 +5425,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -5062,6 +5436,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5079,6 +5454,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_41 varchar(10) default NULL after bb;
@@ -5089,6 +5465,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5106,6 +5483,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -5116,6 +5494,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5133,6 +5512,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -5143,6 +5523,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5160,6 +5541,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_71 text default NULL after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_71 text default NULL after bb;
@@ -5170,6 +5552,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5187,6 +5570,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_5 varchar(10) default "qwerty" after bb, add column added_81 mediumtext default NULL after bb;
@@ -5197,6 +5581,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5214,6 +5599,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_11 bigint default NULL after bb;
@@ -5224,6 +5610,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5241,6 +5628,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_21 bigint default 1234 after bb;
@@ -5251,6 +5639,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5268,6 +5657,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -5278,6 +5668,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5295,6 +5686,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_41 varchar(10) default NULL after bb;
@@ -5305,6 +5697,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5322,6 +5715,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -5332,6 +5726,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5349,6 +5744,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -5359,6 +5755,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5376,6 +5773,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_71 text default NULL after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_71 text default NULL after bb;
@@ -5386,6 +5784,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5403,6 +5802,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bb, add column added_81 mediumtext default NULL after bb;
@@ -5413,6 +5813,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5430,6 +5831,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_7 text default NULL after bb, add column added_11 bigint default NULL after bb;
@@ -5440,6 +5842,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5457,6 +5860,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_7 text default NULL after bb, add column added_21 bigint default 1234 after bb;
@@ -5467,6 +5871,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5484,6 +5889,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_7 text default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -5494,6 +5900,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5511,6 +5918,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_7 text default NULL after bb, add column added_41 varchar(10) default NULL after bb;
@@ -5521,6 +5929,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5538,6 +5947,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_7 text default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -5548,6 +5958,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5565,6 +5976,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_7 text default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -5575,6 +5987,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5592,6 +6005,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_71 text default NULL after bb;
alter table bar add column added_7 text default NULL after bb, add column added_71 text default NULL after bb;
@@ -5602,6 +6016,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5619,6 +6034,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_7 text default NULL after bb, add column added_81 mediumtext default NULL after bb;
@@ -5629,6 +6045,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5646,6 +6063,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_11 bigint default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_11 bigint default NULL after bb;
@@ -5656,6 +6074,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5673,6 +6092,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_21 bigint default 1234 after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_21 bigint default 1234 after bb;
@@ -5683,6 +6103,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5700,6 +6121,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_31 bigint NOT NULL default 54 after bb;
@@ -5710,6 +6132,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5727,6 +6150,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_41 varchar(10) default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_41 varchar(10) default NULL after bb;
@@ -5737,6 +6161,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5754,6 +6179,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_51 varchar(10) default "abracadab" after bb;
@@ -5764,6 +6190,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5781,6 +6208,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_61 varchar(10) NOT NULL default "abracadab" after bb;
@@ -5791,6 +6219,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5808,6 +6237,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_71 text default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_71 text default NULL after bb;
@@ -5818,6 +6248,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5835,6 +6266,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bb, add column added_81 mediumtext default NULL after bb;
alter table bar add column added_8 mediumtext default NULL after bb, add column added_81 mediumtext default NULL after bb;
@@ -5845,6 +6277,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aa blob, bb longblob, cc tinyblob, dd mediumblob) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5862,6 +6295,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bb, add column added_3 bigint NOT NULL default -1;
alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bb, add column added_3 bigint NOT NULL default -1;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_add.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_add.test index 20ecc14b733..d2dc63184ae 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_add.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_add.test @@ -13,6 +13,7 @@ let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -30,6 +31,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL;
alter table bar add column added_1 bigint default NULL;
@@ -40,6 +42,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -57,6 +60,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1;
alter table bar add column added_2 bigint default -1;
@@ -67,6 +71,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -84,6 +89,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1;
alter table bar add column added_3 bigint NOT NULL default -1;
@@ -94,6 +100,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -111,6 +118,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL;
@@ -121,6 +129,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -138,6 +147,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty";
alter table bar add column added_5 varchar(10) default "qwerty";
@@ -148,6 +158,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -165,6 +176,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt";
@@ -175,6 +187,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -192,6 +205,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL;
alter table bar add column added_7 text default NULL;
@@ -202,6 +216,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -219,6 +234,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL;
@@ -229,6 +245,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -246,6 +263,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first;
alter table bar add column added_1 bigint default NULL first;
@@ -256,6 +274,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -273,6 +292,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first;
alter table bar add column added_2 bigint default -1 first;
@@ -283,6 +303,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -300,6 +321,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first;
alter table bar add column added_3 bigint NOT NULL default -1 first;
@@ -310,6 +332,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -327,6 +350,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first;
alter table bar add column added_4 varchar(10) default NULL first;
@@ -337,6 +361,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -354,6 +379,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first;
alter table bar add column added_5 varchar(10) default "qwerty" first;
@@ -364,6 +390,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -381,6 +408,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
@@ -391,6 +419,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -408,6 +437,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first;
alter table bar add column added_7 text default NULL first;
@@ -418,6 +448,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -435,6 +466,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first;
alter table bar add column added_8 mediumtext default NULL first;
@@ -445,6 +477,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -462,6 +495,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b;
alter table bar add column added_1 bigint default NULL after b;
@@ -472,6 +506,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -489,6 +524,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b;
alter table bar add column added_2 bigint default -1 after b;
@@ -499,6 +535,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -516,6 +553,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b;
@@ -526,6 +564,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -543,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b;
@@ -553,6 +593,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -570,6 +611,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b;
@@ -580,6 +622,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -597,6 +640,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b;
@@ -607,6 +651,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -624,6 +669,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b;
alter table bar add column added_7 text default NULL after b;
@@ -634,6 +680,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -651,6 +698,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b;
@@ -661,6 +709,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -678,6 +727,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL;
@@ -688,6 +738,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -705,6 +756,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234;
@@ -715,6 +767,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -732,6 +785,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
@@ -742,6 +796,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -759,6 +814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
@@ -769,6 +825,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -786,6 +843,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
@@ -796,6 +854,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -813,6 +872,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -823,6 +883,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -840,6 +901,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL;
@@ -850,6 +912,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -867,6 +930,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
@@ -877,6 +941,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -894,6 +959,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL;
@@ -904,6 +970,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -921,6 +988,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234;
@@ -931,6 +999,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -948,6 +1017,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
@@ -958,6 +1028,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -975,6 +1046,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
@@ -985,6 +1057,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1002,6 +1075,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
@@ -1012,6 +1086,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1029,6 +1104,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1039,6 +1115,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1056,6 +1133,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1, add column added_71 text default NULL;
@@ -1066,6 +1144,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1083,6 +1162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
@@ -1093,6 +1173,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1110,6 +1191,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
@@ -1120,6 +1202,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1137,6 +1220,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
@@ -1147,6 +1231,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1164,6 +1249,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
@@ -1174,6 +1260,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1191,6 +1278,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
@@ -1201,6 +1289,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1218,6 +1307,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
@@ -1228,6 +1318,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1245,6 +1336,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1255,6 +1347,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1272,6 +1365,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
@@ -1282,6 +1376,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1299,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
@@ -1309,6 +1405,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1326,6 +1423,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
@@ -1336,6 +1434,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1353,6 +1452,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
@@ -1363,6 +1463,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1380,6 +1481,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
@@ -1390,6 +1492,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1407,6 +1510,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
@@ -1417,6 +1521,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1434,6 +1539,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
@@ -1444,6 +1550,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1461,6 +1568,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1471,6 +1579,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1488,6 +1597,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
@@ -1498,6 +1608,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1515,6 +1626,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
@@ -1525,6 +1637,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1542,6 +1655,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
@@ -1552,6 +1666,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1569,6 +1684,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
@@ -1579,6 +1695,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1596,6 +1713,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
@@ -1606,6 +1724,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1623,6 +1742,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
@@ -1633,6 +1753,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1650,6 +1771,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
@@ -1660,6 +1782,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1677,6 +1800,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1687,6 +1811,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1704,6 +1829,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
@@ -1714,6 +1840,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1731,6 +1858,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
@@ -1741,6 +1869,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1758,6 +1887,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
@@ -1768,6 +1898,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1785,6 +1916,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
@@ -1795,6 +1927,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1812,6 +1945,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
@@ -1822,6 +1956,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1839,6 +1974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
@@ -1849,6 +1985,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1866,6 +2003,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
@@ -1876,6 +2014,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1893,6 +2032,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1903,6 +2043,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1920,6 +2061,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
@@ -1930,6 +2072,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1947,6 +2090,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
@@ -1957,6 +2101,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1974,6 +2119,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL;
@@ -1984,6 +2130,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2001,6 +2148,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234;
@@ -2011,6 +2159,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2028,6 +2177,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2038,6 +2188,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2055,6 +2206,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
@@ -2065,6 +2217,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2082,6 +2235,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2092,6 +2246,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2109,6 +2264,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2119,6 +2275,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2136,6 +2293,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL, add column added_71 text default NULL;
@@ -2146,6 +2304,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2163,6 +2322,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL;
@@ -2173,6 +2333,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2190,6 +2351,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
@@ -2200,6 +2362,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2217,6 +2380,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
@@ -2227,6 +2391,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2244,6 +2409,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2254,6 +2420,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2271,6 +2438,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
@@ -2281,6 +2449,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2298,6 +2467,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2308,6 +2478,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2325,6 +2496,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2335,6 +2507,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2352,6 +2525,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL;
@@ -2362,6 +2536,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2379,6 +2554,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
@@ -2389,6 +2565,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2406,6 +2583,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
@@ -2416,6 +2594,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2433,6 +2612,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
@@ -2443,6 +2623,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2460,6 +2641,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -2470,6 +2652,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2487,6 +2670,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
@@ -2497,6 +2681,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2514,6 +2699,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -2524,6 +2710,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2541,6 +2728,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2551,6 +2739,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2568,6 +2757,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL;
@@ -2578,6 +2768,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2595,6 +2786,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
@@ -2605,6 +2797,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2622,6 +2815,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
@@ -2632,6 +2826,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2649,6 +2844,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
@@ -2659,6 +2855,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2676,6 +2873,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2686,6 +2884,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2703,6 +2902,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
@@ -2713,6 +2913,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2730,6 +2931,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2740,6 +2942,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2757,6 +2960,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2767,6 +2971,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2784,6 +2989,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL;
@@ -2794,6 +3000,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2811,6 +3018,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
@@ -2821,6 +3029,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2838,6 +3047,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
@@ -2848,6 +3058,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2865,6 +3076,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
@@ -2875,6 +3087,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2892,6 +3105,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2902,6 +3116,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2919,6 +3134,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
@@ -2929,6 +3145,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2946,6 +3163,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2956,6 +3174,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2973,6 +3192,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2983,6 +3203,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3000,6 +3221,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
@@ -3010,6 +3232,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3027,6 +3250,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
@@ -3037,6 +3261,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3054,6 +3279,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
@@ -3064,6 +3290,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3081,6 +3308,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
@@ -3091,6 +3319,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3108,6 +3337,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3118,6 +3348,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3135,6 +3366,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
@@ -3145,6 +3377,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3162,6 +3395,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3172,6 +3406,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3189,6 +3424,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3199,6 +3435,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3216,6 +3453,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
@@ -3226,6 +3464,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3243,6 +3482,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
@@ -3253,6 +3493,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3270,6 +3511,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
@@ -3280,6 +3522,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3297,6 +3540,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
@@ -3307,6 +3551,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3324,6 +3569,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
@@ -3334,6 +3580,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3351,6 +3598,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
@@ -3361,6 +3609,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3378,6 +3627,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
@@ -3388,6 +3638,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3405,6 +3656,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3415,6 +3667,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3432,6 +3685,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
@@ -3442,6 +3696,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3459,6 +3714,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
@@ -3469,6 +3725,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3486,6 +3743,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
@@ -3496,6 +3754,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3513,6 +3772,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
@@ -3523,6 +3783,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3540,6 +3801,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
@@ -3550,6 +3812,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3567,6 +3830,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
@@ -3577,6 +3841,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3594,6 +3859,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
@@ -3604,6 +3870,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3621,6 +3888,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3631,6 +3899,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3648,6 +3917,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
@@ -3658,6 +3928,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3675,6 +3946,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
@@ -3685,6 +3957,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3702,6 +3975,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL;
@@ -3712,6 +3986,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3729,6 +4004,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234;
@@ -3739,6 +4015,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3756,6 +4033,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3766,6 +4044,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3783,6 +4062,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
@@ -3793,6 +4073,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3810,6 +4091,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3820,6 +4102,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3837,6 +4120,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3847,6 +4131,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3864,6 +4149,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL first, add column added_71 text default NULL;
@@ -3874,6 +4160,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3891,6 +4178,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
@@ -3901,6 +4189,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3918,6 +4207,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
@@ -3928,6 +4218,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3945,6 +4236,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
@@ -3955,6 +4247,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3972,6 +4265,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3982,6 +4276,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3999,6 +4294,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
@@ -4009,6 +4305,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4026,6 +4323,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -4036,6 +4334,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4053,6 +4352,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -4063,6 +4363,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4080,6 +4381,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
@@ -4090,6 +4392,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4107,6 +4410,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
@@ -4117,6 +4421,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4134,6 +4439,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_11 bigint default NULL after b;
@@ -4144,6 +4450,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4161,6 +4468,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_1 bigint default NULL after b, add column added_21 bigint default 1234 after b;
@@ -4171,6 +4479,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4188,6 +4497,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_1 bigint default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -4198,6 +4508,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4215,6 +4526,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -4225,6 +4537,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4242,6 +4555,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_1 bigint default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -4252,6 +4566,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4269,6 +4584,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_1 bigint default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -4279,6 +4595,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4296,6 +4613,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_71 text default NULL after b;
@@ -4306,6 +4624,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4323,6 +4642,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_1 bigint default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -4333,6 +4653,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4350,6 +4671,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_11 bigint default NULL after b;
@@ -4360,6 +4682,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4377,6 +4700,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_2 bigint default -1 after b, add column added_21 bigint default 1234 after b;
@@ -4387,6 +4711,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4404,6 +4729,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_2 bigint default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -4414,6 +4740,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4431,6 +4758,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_41 varchar(10) default NULL after b;
@@ -4441,6 +4769,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4458,6 +4787,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_2 bigint default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -4468,6 +4798,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4485,6 +4816,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_2 bigint default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -4495,6 +4827,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4512,6 +4845,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_71 text default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_71 text default NULL after b;
@@ -4522,6 +4856,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4539,6 +4874,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_2 bigint default -1 after b, add column added_81 mediumtext default NULL after b;
@@ -4549,6 +4885,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4566,6 +4903,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_11 bigint default NULL after b;
@@ -4576,6 +4914,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4593,6 +4932,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_21 bigint default 1234 after b;
@@ -4603,6 +4943,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4620,6 +4961,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -4630,6 +4972,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4647,6 +4990,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_41 varchar(10) default NULL after b;
@@ -4657,6 +5001,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4674,6 +5019,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -4684,6 +5030,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4701,6 +5048,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -4711,6 +5059,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4728,6 +5077,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_71 text default NULL after b;
@@ -4738,6 +5088,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4755,6 +5106,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_3 bigint NOT NULL default -1 after b, add column added_81 mediumtext default NULL after b;
@@ -4765,6 +5117,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4782,6 +5135,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_11 bigint default NULL after b;
@@ -4792,6 +5146,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4809,6 +5164,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_21 bigint default 1234 after b;
@@ -4819,6 +5175,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4836,6 +5193,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -4846,6 +5204,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4863,6 +5222,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -4873,6 +5233,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4890,6 +5251,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -4900,6 +5262,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4917,6 +5280,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -4927,6 +5291,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4944,6 +5309,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_71 text default NULL after b;
@@ -4954,6 +5320,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4971,6 +5338,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_4 varchar(10) default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -4981,6 +5349,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4998,6 +5367,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_11 bigint default NULL after b;
@@ -5008,6 +5378,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5025,6 +5396,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_21 bigint default 1234 after b;
@@ -5035,6 +5407,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5052,6 +5425,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -5062,6 +5436,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5079,6 +5454,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_41 varchar(10) default NULL after b;
@@ -5089,6 +5465,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5106,6 +5483,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -5116,6 +5494,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5133,6 +5512,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -5143,6 +5523,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5160,6 +5541,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_71 text default NULL after b;
@@ -5170,6 +5552,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5187,6 +5570,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_5 varchar(10) default "qwerty" after b, add column added_81 mediumtext default NULL after b;
@@ -5197,6 +5581,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5214,6 +5599,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_11 bigint default NULL after b;
@@ -5224,6 +5610,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5241,6 +5628,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_21 bigint default 1234 after b;
@@ -5251,6 +5639,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5268,6 +5657,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -5278,6 +5668,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5295,6 +5686,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_41 varchar(10) default NULL after b;
@@ -5305,6 +5697,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5322,6 +5715,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -5332,6 +5726,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5349,6 +5744,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -5359,6 +5755,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5376,6 +5773,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_71 text default NULL after b;
@@ -5386,6 +5784,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5403,6 +5802,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after b, add column added_81 mediumtext default NULL after b;
@@ -5413,6 +5813,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5430,6 +5831,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_11 bigint default NULL after b;
@@ -5440,6 +5842,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5457,6 +5860,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_7 text default NULL after b, add column added_21 bigint default 1234 after b;
@@ -5467,6 +5871,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5484,6 +5889,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_7 text default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -5494,6 +5900,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5511,6 +5918,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -5521,6 +5929,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5538,6 +5947,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_7 text default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -5548,6 +5958,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5565,6 +5976,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_7 text default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -5575,6 +5987,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5592,6 +6005,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_71 text default NULL after b;
@@ -5602,6 +6016,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5619,6 +6034,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_7 text default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -5629,6 +6045,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5646,6 +6063,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_11 bigint default NULL after b;
@@ -5656,6 +6074,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5673,6 +6092,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_21 bigint default 1234 after b;
@@ -5683,6 +6103,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5700,6 +6121,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_31 bigint NOT NULL default 54 after b;
@@ -5710,6 +6132,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5727,6 +6150,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_41 varchar(10) default NULL after b;
@@ -5737,6 +6161,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5754,6 +6179,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_51 varchar(10) default "abracadab" after b;
@@ -5764,6 +6190,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5781,6 +6208,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_61 varchar(10) NOT NULL default "abracadab" after b;
@@ -5791,6 +6219,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5808,6 +6237,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_71 text default NULL after b;
@@ -5818,6 +6248,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5835,6 +6266,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b;
alter table bar add column added_8 mediumtext default NULL after b, add column added_81 mediumtext default NULL after b;
@@ -5845,6 +6277,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5862,6 +6295,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1;
alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after b, add column added_3 bigint NOT NULL default -1;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_add2.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_add2.test index f32ecc93bf2..ba6ea7be44e 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_add2.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_add2.test @@ -13,6 +13,7 @@ let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -30,6 +31,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL;
alter table bar add column added_1 bigint default NULL;
@@ -40,6 +42,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -57,6 +60,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1;
alter table bar add column added_2 bigint default -1;
@@ -67,6 +71,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -84,6 +89,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1;
alter table bar add column added_3 bigint NOT NULL default -1;
@@ -94,6 +100,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -111,6 +118,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL;
@@ -121,6 +129,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -138,6 +147,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty";
alter table bar add column added_5 varchar(10) default "qwerty";
@@ -148,6 +158,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -165,6 +176,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt";
@@ -175,6 +187,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -192,6 +205,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL;
alter table bar add column added_7 text default NULL;
@@ -202,6 +216,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -219,6 +234,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL;
@@ -229,6 +245,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -246,6 +263,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first;
alter table bar add column added_1 bigint default NULL first;
@@ -256,6 +274,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -273,6 +292,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first;
alter table bar add column added_2 bigint default -1 first;
@@ -283,6 +303,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -300,6 +321,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first;
alter table bar add column added_3 bigint NOT NULL default -1 first;
@@ -310,6 +332,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -327,6 +350,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first;
alter table bar add column added_4 varchar(10) default NULL first;
@@ -337,6 +361,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -354,6 +379,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first;
alter table bar add column added_5 varchar(10) default "qwerty" first;
@@ -364,6 +390,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -381,6 +408,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
@@ -391,6 +419,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -408,6 +437,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first;
alter table bar add column added_7 text default NULL first;
@@ -418,6 +448,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -435,6 +466,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first;
alter table bar add column added_8 mediumtext default NULL first;
@@ -445,6 +477,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -462,6 +495,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb;
@@ -472,6 +506,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -489,6 +524,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb;
alter table bar add column added_2 bigint default -1 after bbb;
@@ -499,6 +535,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -516,6 +553,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb;
@@ -526,6 +564,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -543,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb;
@@ -553,6 +593,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -570,6 +611,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb;
@@ -580,6 +622,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -597,6 +640,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb;
@@ -607,6 +651,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -624,6 +669,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb;
@@ -634,6 +680,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -651,6 +698,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb;
@@ -661,6 +709,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -678,6 +727,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL;
@@ -688,6 +738,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -705,6 +756,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234;
@@ -715,6 +767,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -732,6 +785,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
@@ -742,6 +796,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -759,6 +814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
@@ -769,6 +825,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -786,6 +843,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
@@ -796,6 +854,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -813,6 +872,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -823,6 +883,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -840,6 +901,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL;
@@ -850,6 +912,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -867,6 +930,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
@@ -877,6 +941,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -894,6 +959,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL;
@@ -904,6 +970,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -921,6 +988,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234;
@@ -931,6 +999,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -948,6 +1017,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
@@ -958,6 +1028,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -975,6 +1046,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
@@ -985,6 +1057,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1002,6 +1075,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
@@ -1012,6 +1086,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1029,6 +1104,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1039,6 +1115,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1056,6 +1133,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1, add column added_71 text default NULL;
@@ -1066,6 +1144,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1083,6 +1162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
@@ -1093,6 +1173,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1110,6 +1191,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
@@ -1120,6 +1202,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1137,6 +1220,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
@@ -1147,6 +1231,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1164,6 +1249,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
@@ -1174,6 +1260,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1191,6 +1278,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
@@ -1201,6 +1289,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1218,6 +1307,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
@@ -1228,6 +1318,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1245,6 +1336,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1255,6 +1347,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1272,6 +1365,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
@@ -1282,6 +1376,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1299,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
@@ -1309,6 +1405,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1326,6 +1423,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
@@ -1336,6 +1434,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1353,6 +1452,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
@@ -1363,6 +1463,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1380,6 +1481,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
@@ -1390,6 +1492,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1407,6 +1510,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
@@ -1417,6 +1521,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1434,6 +1539,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
@@ -1444,6 +1550,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1461,6 +1568,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1471,6 +1579,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1488,6 +1597,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
@@ -1498,6 +1608,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1515,6 +1626,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
@@ -1525,6 +1637,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1542,6 +1655,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
@@ -1552,6 +1666,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1569,6 +1684,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
@@ -1579,6 +1695,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1596,6 +1713,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
@@ -1606,6 +1724,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1623,6 +1742,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
@@ -1633,6 +1753,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1650,6 +1771,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
@@ -1660,6 +1782,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1677,6 +1800,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1687,6 +1811,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1704,6 +1829,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
@@ -1714,6 +1840,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1731,6 +1858,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
@@ -1741,6 +1869,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1758,6 +1887,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
@@ -1768,6 +1898,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1785,6 +1916,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
@@ -1795,6 +1927,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1812,6 +1945,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
@@ -1822,6 +1956,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1839,6 +1974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
@@ -1849,6 +1985,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1866,6 +2003,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
@@ -1876,6 +2014,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1893,6 +2032,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1903,6 +2043,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1920,6 +2061,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
@@ -1930,6 +2072,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1947,6 +2090,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
@@ -1957,6 +2101,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1974,6 +2119,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL;
@@ -1984,6 +2130,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2001,6 +2148,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234;
@@ -2011,6 +2159,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2028,6 +2177,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2038,6 +2188,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2055,6 +2206,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
@@ -2065,6 +2217,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2082,6 +2235,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2092,6 +2246,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2109,6 +2264,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2119,6 +2275,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2136,6 +2293,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL, add column added_71 text default NULL;
@@ -2146,6 +2304,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2163,6 +2322,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL;
@@ -2173,6 +2333,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2190,6 +2351,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
@@ -2200,6 +2362,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2217,6 +2380,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
@@ -2227,6 +2391,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2244,6 +2409,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2254,6 +2420,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2271,6 +2438,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
@@ -2281,6 +2449,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2298,6 +2467,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2308,6 +2478,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2325,6 +2496,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2335,6 +2507,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2352,6 +2525,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL;
@@ -2362,6 +2536,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2379,6 +2554,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
@@ -2389,6 +2565,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2406,6 +2583,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
@@ -2416,6 +2594,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2433,6 +2612,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
@@ -2443,6 +2623,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2460,6 +2641,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -2470,6 +2652,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2487,6 +2670,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
@@ -2497,6 +2681,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2514,6 +2699,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -2524,6 +2710,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2541,6 +2728,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2551,6 +2739,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2568,6 +2757,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL;
@@ -2578,6 +2768,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2595,6 +2786,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
@@ -2605,6 +2797,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2622,6 +2815,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
@@ -2632,6 +2826,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2649,6 +2844,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
@@ -2659,6 +2855,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2676,6 +2873,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2686,6 +2884,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2703,6 +2902,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
@@ -2713,6 +2913,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2730,6 +2931,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2740,6 +2942,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2757,6 +2960,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2767,6 +2971,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2784,6 +2989,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL;
@@ -2794,6 +3000,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2811,6 +3018,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
@@ -2821,6 +3029,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2838,6 +3047,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
@@ -2848,6 +3058,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2865,6 +3076,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
@@ -2875,6 +3087,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2892,6 +3105,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2902,6 +3116,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2919,6 +3134,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
@@ -2929,6 +3145,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2946,6 +3163,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2956,6 +3174,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2973,6 +3192,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2983,6 +3203,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3000,6 +3221,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
@@ -3010,6 +3232,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3027,6 +3250,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
@@ -3037,6 +3261,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3054,6 +3279,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
@@ -3064,6 +3290,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3081,6 +3308,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
@@ -3091,6 +3319,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3108,6 +3337,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3118,6 +3348,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3135,6 +3366,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
@@ -3145,6 +3377,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3162,6 +3395,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3172,6 +3406,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3189,6 +3424,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3199,6 +3435,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3216,6 +3453,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
@@ -3226,6 +3464,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3243,6 +3482,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
@@ -3253,6 +3493,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3270,6 +3511,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
@@ -3280,6 +3522,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3297,6 +3540,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
@@ -3307,6 +3551,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3324,6 +3569,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
@@ -3334,6 +3580,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3351,6 +3598,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
@@ -3361,6 +3609,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3378,6 +3627,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
@@ -3388,6 +3638,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3405,6 +3656,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3415,6 +3667,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3432,6 +3685,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
@@ -3442,6 +3696,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3459,6 +3714,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
@@ -3469,6 +3725,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3486,6 +3743,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
@@ -3496,6 +3754,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3513,6 +3772,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
@@ -3523,6 +3783,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3540,6 +3801,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
@@ -3550,6 +3812,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3567,6 +3830,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
@@ -3577,6 +3841,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3594,6 +3859,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
@@ -3604,6 +3870,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3621,6 +3888,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3631,6 +3899,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3648,6 +3917,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
@@ -3658,6 +3928,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3675,6 +3946,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
@@ -3685,6 +3957,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3702,6 +3975,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL;
@@ -3712,6 +3986,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3729,6 +4004,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234;
@@ -3739,6 +4015,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3756,6 +4033,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3766,6 +4044,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3783,6 +4062,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
@@ -3793,6 +4073,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3810,6 +4091,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3820,6 +4102,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3837,6 +4120,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3847,6 +4131,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3864,6 +4149,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL first, add column added_71 text default NULL;
@@ -3874,6 +4160,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3891,6 +4178,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
@@ -3901,6 +4189,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3918,6 +4207,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
@@ -3928,6 +4218,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3945,6 +4236,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
@@ -3955,6 +4247,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3972,6 +4265,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3982,6 +4276,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3999,6 +4294,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
@@ -4009,6 +4305,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4026,6 +4323,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -4036,6 +4334,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4053,6 +4352,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -4063,6 +4363,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4080,6 +4381,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
@@ -4090,6 +4392,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4107,6 +4410,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
@@ -4117,6 +4421,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4134,6 +4439,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -4144,6 +4450,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4161,6 +4468,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -4171,6 +4479,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4188,6 +4497,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -4198,6 +4508,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4215,6 +4526,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -4225,6 +4537,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4242,6 +4555,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -4252,6 +4566,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4269,6 +4584,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -4279,6 +4595,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4296,6 +4613,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -4306,6 +4624,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4323,6 +4642,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -4333,6 +4653,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4350,6 +4671,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb;
@@ -4360,6 +4682,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4377,6 +4700,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb;
@@ -4387,6 +4711,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4404,6 +4729,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -4414,6 +4740,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4431,6 +4758,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -4441,6 +4769,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4458,6 +4787,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -4468,6 +4798,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4485,6 +4816,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -4495,6 +4827,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4512,6 +4845,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb;
@@ -4522,6 +4856,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4539,6 +4874,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -4549,6 +4885,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4566,6 +4903,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb;
@@ -4576,6 +4914,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4593,6 +4932,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb;
@@ -4603,6 +4943,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4620,6 +4961,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -4630,6 +4972,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4647,6 +4990,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -4657,6 +5001,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4674,6 +5019,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -4684,6 +5030,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4701,6 +5048,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -4711,6 +5059,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4728,6 +5077,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb;
@@ -4738,6 +5088,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4755,6 +5106,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -4765,6 +5117,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4782,6 +5135,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -4792,6 +5146,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4809,6 +5164,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -4819,6 +5175,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4836,6 +5193,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -4846,6 +5204,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4863,6 +5222,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -4873,6 +5233,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4890,6 +5251,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -4900,6 +5262,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4917,6 +5280,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -4927,6 +5291,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4944,6 +5309,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -4954,6 +5320,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4971,6 +5338,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -4981,6 +5349,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4998,6 +5367,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb;
@@ -5008,6 +5378,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5025,6 +5396,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb;
@@ -5035,6 +5407,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5052,6 +5425,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -5062,6 +5436,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5079,6 +5454,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -5089,6 +5465,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5106,6 +5483,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -5116,6 +5494,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5133,6 +5512,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -5143,6 +5523,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5160,6 +5541,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb;
@@ -5170,6 +5552,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5187,6 +5570,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -5197,6 +5581,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5214,6 +5599,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb;
@@ -5224,6 +5610,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5241,6 +5628,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb;
@@ -5251,6 +5639,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5268,6 +5657,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -5278,6 +5668,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5295,6 +5686,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -5305,6 +5697,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5322,6 +5715,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -5332,6 +5726,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5349,6 +5744,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -5359,6 +5755,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5376,6 +5773,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb;
@@ -5386,6 +5784,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5403,6 +5802,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -5413,6 +5813,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5430,6 +5831,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -5440,6 +5842,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5457,6 +5860,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -5467,6 +5871,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5484,6 +5889,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -5494,6 +5900,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5511,6 +5918,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -5521,6 +5929,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5538,6 +5947,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -5548,6 +5958,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5565,6 +5976,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -5575,6 +5987,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5592,6 +6005,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -5602,6 +6016,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5619,6 +6034,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -5629,6 +6045,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5646,6 +6063,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -5656,6 +6074,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5673,6 +6092,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -5683,6 +6103,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5700,6 +6121,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -5710,6 +6132,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5727,6 +6150,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -5737,6 +6161,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5754,6 +6179,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -5764,6 +6190,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5781,6 +6208,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -5791,6 +6219,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5808,6 +6237,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -5818,6 +6248,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5835,6 +6266,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -5845,6 +6277,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5862,6 +6295,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1;
alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_drop.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_drop.test index 885dd5cf362..29717885ae7 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_drop.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_fixedvar_drop.test @@ -13,6 +13,7 @@ let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -30,6 +31,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a;
alter table bar drop column a;
@@ -40,6 +42,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -57,6 +60,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b;
alter table bar drop column b;
@@ -67,6 +71,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -84,6 +89,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c;
alter table bar drop column c;
@@ -94,6 +100,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -111,6 +118,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d;
alter table bar drop column d;
@@ -121,6 +129,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -138,6 +147,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa;
alter table bar drop column aaa;
@@ -148,6 +158,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -165,6 +176,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb;
alter table bar drop column bbb;
@@ -175,6 +187,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -192,6 +205,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc;
alter table bar drop column ccc;
@@ -202,6 +216,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -219,6 +234,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd;
alter table bar drop column ddd;
@@ -229,6 +245,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -246,6 +263,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b;
alter table bar drop column a, drop column b;
@@ -256,6 +274,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -273,6 +292,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column c;
alter table bar drop column a, drop column c;
@@ -283,6 +303,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -300,6 +321,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column d;
alter table bar drop column a, drop column d;
@@ -310,6 +332,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -327,6 +350,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column aaa;
alter table bar drop column a, drop column aaa;
@@ -337,6 +361,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -354,6 +379,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column bbb;
alter table bar drop column a, drop column bbb;
@@ -364,6 +390,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -381,6 +408,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column ccc;
alter table bar drop column a, drop column ccc;
@@ -391,6 +419,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -408,6 +437,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column ddd;
alter table bar drop column a, drop column ddd;
@@ -418,6 +448,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -435,6 +466,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column a;
alter table bar drop column b, drop column a;
@@ -445,6 +477,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -462,6 +495,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column c;
alter table bar drop column b, drop column c;
@@ -472,6 +506,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -489,6 +524,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column d;
alter table bar drop column b, drop column d;
@@ -499,6 +535,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -516,6 +553,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column aaa;
alter table bar drop column b, drop column aaa;
@@ -526,6 +564,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -543,6 +582,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column bbb;
alter table bar drop column b, drop column bbb;
@@ -553,6 +593,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -570,6 +611,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column ccc;
alter table bar drop column b, drop column ccc;
@@ -580,6 +622,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -597,6 +640,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column ddd;
alter table bar drop column b, drop column ddd;
@@ -607,6 +651,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -624,6 +669,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column a;
alter table bar drop column c, drop column a;
@@ -634,6 +680,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -651,6 +698,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column b;
alter table bar drop column c, drop column b;
@@ -661,6 +709,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -678,6 +727,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column d;
alter table bar drop column c, drop column d;
@@ -688,6 +738,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -705,6 +756,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column aaa;
alter table bar drop column c, drop column aaa;
@@ -715,6 +767,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -732,6 +785,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column bbb;
alter table bar drop column c, drop column bbb;
@@ -742,6 +796,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -759,6 +814,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column ccc;
alter table bar drop column c, drop column ccc;
@@ -769,6 +825,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -786,6 +843,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column c, drop column ddd;
alter table bar drop column c, drop column ddd;
@@ -796,6 +854,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -813,6 +872,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column a;
alter table bar drop column d, drop column a;
@@ -823,6 +883,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -840,6 +901,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column b;
alter table bar drop column d, drop column b;
@@ -850,6 +912,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -867,6 +930,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column c;
alter table bar drop column d, drop column c;
@@ -877,6 +941,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -894,6 +959,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column aaa;
alter table bar drop column d, drop column aaa;
@@ -904,6 +970,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -921,6 +988,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column bbb;
alter table bar drop column d, drop column bbb;
@@ -931,6 +999,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -948,6 +1017,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column ccc;
alter table bar drop column d, drop column ccc;
@@ -958,6 +1028,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -975,6 +1046,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column d, drop column ddd;
alter table bar drop column d, drop column ddd;
@@ -985,6 +1057,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1002,6 +1075,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column a;
alter table bar drop column aaa, drop column a;
@@ -1012,6 +1086,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1029,6 +1104,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column b;
alter table bar drop column aaa, drop column b;
@@ -1039,6 +1115,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1056,6 +1133,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column c;
alter table bar drop column aaa, drop column c;
@@ -1066,6 +1144,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1083,6 +1162,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column d;
alter table bar drop column aaa, drop column d;
@@ -1093,6 +1173,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1110,6 +1191,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column bbb;
alter table bar drop column aaa, drop column bbb;
@@ -1120,6 +1202,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1137,6 +1220,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column ccc;
alter table bar drop column aaa, drop column ccc;
@@ -1147,6 +1231,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1164,6 +1249,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column ddd;
alter table bar drop column aaa, drop column ddd;
@@ -1174,6 +1260,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1191,6 +1278,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column a;
alter table bar drop column bbb, drop column a;
@@ -1201,6 +1289,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1218,6 +1307,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column b;
alter table bar drop column bbb, drop column b;
@@ -1228,6 +1318,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1245,6 +1336,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column c;
alter table bar drop column bbb, drop column c;
@@ -1255,6 +1347,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1272,6 +1365,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column d;
alter table bar drop column bbb, drop column d;
@@ -1282,6 +1376,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1299,6 +1394,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column aaa;
alter table bar drop column bbb, drop column aaa;
@@ -1309,6 +1405,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1326,6 +1423,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column ccc;
alter table bar drop column bbb, drop column ccc;
@@ -1336,6 +1434,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1353,6 +1452,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column bbb, drop column ddd;
alter table bar drop column bbb, drop column ddd;
@@ -1363,6 +1463,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1380,6 +1481,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column a;
alter table bar drop column ccc, drop column a;
@@ -1390,6 +1492,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1407,6 +1510,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column b;
alter table bar drop column ccc, drop column b;
@@ -1417,6 +1521,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1434,6 +1539,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column c;
alter table bar drop column ccc, drop column c;
@@ -1444,6 +1550,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1461,6 +1568,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column d;
alter table bar drop column ccc, drop column d;
@@ -1471,6 +1579,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1488,6 +1597,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column aaa;
alter table bar drop column ccc, drop column aaa;
@@ -1498,6 +1608,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1515,6 +1626,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column bbb;
alter table bar drop column ccc, drop column bbb;
@@ -1525,6 +1637,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1542,6 +1655,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ccc, drop column ddd;
alter table bar drop column ccc, drop column ddd;
@@ -1552,6 +1666,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1569,6 +1684,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column a;
alter table bar drop column ddd, drop column a;
@@ -1579,6 +1695,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1596,6 +1713,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column b;
alter table bar drop column ddd, drop column b;
@@ -1606,6 +1724,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1623,6 +1742,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column c;
alter table bar drop column ddd, drop column c;
@@ -1633,6 +1753,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1650,6 +1771,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column d;
alter table bar drop column ddd, drop column d;
@@ -1660,6 +1782,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1677,6 +1800,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column aaa;
alter table bar drop column ddd, drop column aaa;
@@ -1687,6 +1811,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1704,6 +1829,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column bbb;
alter table bar drop column ddd, drop column bbb;
@@ -1714,6 +1840,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1731,6 +1858,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column ddd, drop column ccc;
alter table bar drop column ddd, drop column ccc;
@@ -1741,6 +1869,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1758,6 +1887,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b, drop column c;
alter table bar drop column a, drop column b, drop column c;
@@ -1768,6 +1898,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1785,6 +1916,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b, drop column d;
alter table bar drop column a, drop column b, drop column d;
@@ -1795,6 +1927,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1812,6 +1945,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column c, drop column d;
alter table bar drop column a, drop column c, drop column d;
@@ -1822,6 +1956,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1839,6 +1974,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column b, drop column c, drop column d;
alter table bar drop column b, drop column c, drop column d;
@@ -1849,6 +1985,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1866,6 +2003,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column a, drop column b, drop column c, drop column d;
alter table bar drop column a, drop column b, drop column c, drop column d;
@@ -1876,6 +2014,7 @@ drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1893,6 +2032,7 @@ insert into foo values (2,20,'1999-11-11',0,"adsf",NULL,"hjfdshj",NULL); insert into foo values (2,20,'1999-11-11',0,NULL,"oifds",NULL,"fdsjfds");
insert into foo values (2,20,'1999-11-11',0,"rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo drop column aaa, drop column bbb, drop column ccc, drop column ddd;
alter table bar drop column aaa, drop column bbb, drop column ccc, drop column ddd;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_varblob_add.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_varblob_add.test index cf96aedf4f7..c6b3d194c9c 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_varblob_add.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_varblob_add.test @@ -13,6 +13,7 @@ let $diff_tables= test.foo, test.bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -30,6 +31,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL;
alter table bar add column added_1 bigint default NULL;
@@ -40,6 +42,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -57,6 +60,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1;
alter table bar add column added_2 bigint default -1;
@@ -67,6 +71,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -84,6 +89,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1;
alter table bar add column added_3 bigint NOT NULL default -1;
@@ -94,6 +100,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -111,6 +118,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL;
@@ -121,6 +129,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -138,6 +147,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty";
alter table bar add column added_5 varchar(10) default "qwerty";
@@ -148,6 +158,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -165,6 +176,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt";
@@ -175,6 +187,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -192,6 +205,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL;
alter table bar add column added_7 text default NULL;
@@ -202,6 +216,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -219,6 +234,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL;
@@ -229,6 +245,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -246,6 +263,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first;
alter table bar add column added_1 bigint default NULL first;
@@ -256,6 +274,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -273,6 +292,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first;
alter table bar add column added_2 bigint default -1 first;
@@ -283,6 +303,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -300,6 +321,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first;
alter table bar add column added_3 bigint NOT NULL default -1 first;
@@ -310,6 +332,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -327,6 +350,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first;
alter table bar add column added_4 varchar(10) default NULL first;
@@ -337,6 +361,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -354,6 +379,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first;
alter table bar add column added_5 varchar(10) default "qwerty" first;
@@ -364,6 +390,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -381,6 +408,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first;
@@ -391,6 +419,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -408,6 +437,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first;
alter table bar add column added_7 text default NULL first;
@@ -418,6 +448,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -435,6 +466,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first;
alter table bar add column added_8 mediumtext default NULL first;
@@ -445,6 +477,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -462,6 +495,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb;
@@ -472,6 +506,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -489,6 +524,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb;
alter table bar add column added_2 bigint default -1 after bbb;
@@ -499,6 +535,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -516,6 +553,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb;
@@ -526,6 +564,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -543,6 +582,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb;
@@ -553,6 +593,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -570,6 +611,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb;
@@ -580,6 +622,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -597,6 +640,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb;
@@ -607,6 +651,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -624,6 +669,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb;
@@ -634,6 +680,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -651,6 +698,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb;
@@ -661,6 +709,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -678,6 +727,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL, add column added_11 bigint default NULL;
@@ -688,6 +738,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -705,6 +756,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL, add column added_21 bigint default 1234;
@@ -715,6 +767,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -732,6 +785,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL, add column added_31 bigint NOT NULL default 54;
@@ -742,6 +796,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -759,6 +814,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL, add column added_41 varchar(10) default NULL;
@@ -769,6 +825,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -786,6 +843,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_51 varchar(10) default "abracadab";
@@ -796,6 +854,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -813,6 +872,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -823,6 +883,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -840,6 +901,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL, add column added_71 text default NULL;
@@ -850,6 +912,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -867,6 +930,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL, add column added_81 mediumtext default NULL;
@@ -877,6 +941,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -894,6 +959,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1, add column added_11 bigint default NULL;
@@ -904,6 +970,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -921,6 +988,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1, add column added_21 bigint default 1234;
@@ -931,6 +999,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -948,6 +1017,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1, add column added_31 bigint NOT NULL default 54;
@@ -958,6 +1028,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -975,6 +1046,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1, add column added_41 varchar(10) default NULL;
@@ -985,6 +1057,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1002,6 +1075,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_51 varchar(10) default "abracadab";
@@ -1012,6 +1086,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1029,6 +1104,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1039,6 +1115,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1056,6 +1133,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1, add column added_71 text default NULL;
@@ -1066,6 +1144,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1083,6 +1162,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1, add column added_81 mediumtext default NULL;
@@ -1093,6 +1173,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1110,6 +1191,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_11 bigint default NULL;
@@ -1120,6 +1202,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1137,6 +1220,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_21 bigint default 1234;
@@ -1147,6 +1231,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1164,6 +1249,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_31 bigint NOT NULL default 54;
@@ -1174,6 +1260,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1191,6 +1278,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_41 varchar(10) default NULL;
@@ -1201,6 +1289,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1218,6 +1307,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_51 varchar(10) default "abracadab";
@@ -1228,6 +1318,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1245,6 +1336,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1255,6 +1347,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1272,6 +1365,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_71 text default NULL;
@@ -1282,6 +1376,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1299,6 +1394,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1, add column added_81 mediumtext default NULL;
@@ -1309,6 +1405,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1326,6 +1423,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_11 bigint default NULL;
@@ -1336,6 +1434,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1353,6 +1452,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL, add column added_21 bigint default 1234;
@@ -1363,6 +1463,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1380,6 +1481,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL, add column added_31 bigint NOT NULL default 54;
@@ -1390,6 +1492,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1407,6 +1510,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_41 varchar(10) default NULL;
@@ -1417,6 +1521,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1434,6 +1539,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_51 varchar(10) default "abracadab";
@@ -1444,6 +1550,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1461,6 +1568,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1471,6 +1579,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1488,6 +1597,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_71 text default NULL;
@@ -1498,6 +1608,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1515,6 +1626,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL, add column added_81 mediumtext default NULL;
@@ -1525,6 +1637,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1542,6 +1655,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_11 bigint default NULL;
@@ -1552,6 +1666,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1569,6 +1684,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_21 bigint default 1234;
@@ -1579,6 +1695,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1596,6 +1713,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_31 bigint NOT NULL default 54;
@@ -1606,6 +1724,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1623,6 +1742,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_41 varchar(10) default NULL;
@@ -1633,6 +1753,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1650,6 +1771,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_51 varchar(10) default "abracadab";
@@ -1660,6 +1782,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1677,6 +1800,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1687,6 +1811,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1704,6 +1829,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_71 text default NULL;
@@ -1714,6 +1840,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1731,6 +1858,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty", add column added_81 mediumtext default NULL;
@@ -1741,6 +1869,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1758,6 +1887,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_11 bigint default NULL;
@@ -1768,6 +1898,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1785,6 +1916,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_21 bigint default 1234;
@@ -1795,6 +1927,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1812,6 +1945,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_31 bigint NOT NULL default 54;
@@ -1822,6 +1956,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1839,6 +1974,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_41 varchar(10) default NULL;
@@ -1849,6 +1985,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1866,6 +2003,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_51 varchar(10) default "abracadab";
@@ -1876,6 +2014,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1893,6 +2032,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -1903,6 +2043,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1920,6 +2061,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_71 text default NULL;
@@ -1930,6 +2072,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1947,6 +2090,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt", add column added_81 mediumtext default NULL;
@@ -1957,6 +2101,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -1974,6 +2119,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL, add column added_11 bigint default NULL;
@@ -1984,6 +2130,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2001,6 +2148,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL, add column added_21 bigint default 1234;
@@ -2011,6 +2159,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2028,6 +2177,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2038,6 +2188,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2055,6 +2206,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL, add column added_41 varchar(10) default NULL;
@@ -2065,6 +2217,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2082,6 +2235,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2092,6 +2246,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2109,6 +2264,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2119,6 +2275,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2136,6 +2293,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL, add column added_71 text default NULL;
@@ -2146,6 +2304,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2163,6 +2322,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL, add column added_81 mediumtext default NULL;
@@ -2173,6 +2333,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2190,6 +2351,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_11 bigint default NULL;
@@ -2200,6 +2362,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2217,6 +2380,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL, add column added_21 bigint default 1234;
@@ -2227,6 +2391,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2244,6 +2409,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL, add column added_31 bigint NOT NULL default 54;
@@ -2254,6 +2420,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2271,6 +2438,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_41 varchar(10) default NULL;
@@ -2281,6 +2449,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2298,6 +2467,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_51 varchar(10) default "abracadab";
@@ -2308,6 +2478,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2325,6 +2496,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2335,6 +2507,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2352,6 +2525,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_71 text default NULL;
@@ -2362,6 +2536,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2379,6 +2554,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL, add column added_81 mediumtext default NULL;
@@ -2389,6 +2565,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2406,6 +2583,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_11 bigint default NULL;
@@ -2416,6 +2594,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2433,6 +2612,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_1 bigint default NULL first, add column added_21 bigint default 1234;
@@ -2443,6 +2623,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2460,6 +2641,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_1 bigint default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -2470,6 +2652,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2487,6 +2670,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_41 varchar(10) default NULL;
@@ -2497,6 +2681,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2514,6 +2699,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -2524,6 +2710,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2541,6 +2728,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_1 bigint default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2551,6 +2739,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2568,6 +2757,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_71 text default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_71 text default NULL;
@@ -2578,6 +2768,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2595,6 +2786,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_1 bigint default NULL first, add column added_81 mediumtext default NULL;
@@ -2605,6 +2797,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2622,6 +2815,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_11 bigint default NULL;
@@ -2632,6 +2826,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2649,6 +2844,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_2 bigint default -1 first, add column added_21 bigint default 1234;
@@ -2659,6 +2855,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2676,6 +2873,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_2 bigint default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2686,6 +2884,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2703,6 +2902,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_41 varchar(10) default NULL;
@@ -2713,6 +2913,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2730,6 +2931,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2740,6 +2942,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2757,6 +2960,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_2 bigint default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2767,6 +2971,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2784,6 +2989,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_71 text default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_71 text default NULL;
@@ -2794,6 +3000,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2811,6 +3018,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_2 bigint default -1 first, add column added_81 mediumtext default NULL;
@@ -2821,6 +3029,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2838,6 +3047,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_11 bigint default NULL;
@@ -2848,6 +3058,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2865,6 +3076,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_21 bigint default 1234;
@@ -2875,6 +3087,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2892,6 +3105,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_31 bigint NOT NULL default 54;
@@ -2902,6 +3116,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2919,6 +3134,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_41 varchar(10) default NULL;
@@ -2929,6 +3145,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2946,6 +3163,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_51 varchar(10) default "abracadab";
@@ -2956,6 +3174,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -2973,6 +3192,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -2983,6 +3203,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3000,6 +3221,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_71 text default NULL;
@@ -3010,6 +3232,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3027,6 +3250,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
alter table bar add column added_3 bigint NOT NULL default -1 first, add column added_81 mediumtext default NULL;
@@ -3037,6 +3261,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3054,6 +3279,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_11 bigint default NULL;
@@ -3064,6 +3290,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3081,6 +3308,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_4 varchar(10) default NULL first, add column added_21 bigint default 1234;
@@ -3091,6 +3319,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3108,6 +3337,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_4 varchar(10) default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3118,6 +3348,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3135,6 +3366,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_41 varchar(10) default NULL;
@@ -3145,6 +3377,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3162,6 +3395,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3172,6 +3406,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3189,6 +3424,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_4 varchar(10) default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3199,6 +3435,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3216,6 +3453,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_71 text default NULL;
@@ -3226,6 +3464,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3243,6 +3482,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_4 varchar(10) default NULL first, add column added_81 mediumtext default NULL;
@@ -3253,6 +3493,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3270,6 +3511,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_11 bigint default NULL;
@@ -3280,6 +3522,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3297,6 +3540,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_21 bigint default 1234;
@@ -3307,6 +3551,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3324,6 +3569,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_31 bigint NOT NULL default 54;
@@ -3334,6 +3580,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3351,6 +3598,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_41 varchar(10) default NULL;
@@ -3361,6 +3609,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3378,6 +3627,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_51 varchar(10) default "abracadab";
@@ -3388,6 +3638,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3405,6 +3656,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3415,6 +3667,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3432,6 +3685,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_71 text default NULL;
@@ -3442,6 +3696,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3459,6 +3714,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
alter table bar add column added_5 varchar(10) default "qwerty" first, add column added_81 mediumtext default NULL;
@@ -3469,6 +3725,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3486,6 +3743,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_11 bigint default NULL;
@@ -3496,6 +3754,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3513,6 +3772,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_21 bigint default 1234;
@@ -3523,6 +3783,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3540,6 +3801,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_31 bigint NOT NULL default 54;
@@ -3550,6 +3812,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3567,6 +3830,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_41 varchar(10) default NULL;
@@ -3577,6 +3841,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3594,6 +3859,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_51 varchar(10) default "abracadab";
@@ -3604,6 +3870,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3621,6 +3888,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3631,6 +3899,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3648,6 +3917,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_71 text default NULL;
@@ -3658,6 +3928,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3675,6 +3946,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" first, add column added_81 mediumtext default NULL;
@@ -3685,6 +3957,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3702,6 +3975,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_7 text default NULL first, add column added_11 bigint default NULL;
@@ -3712,6 +3986,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3729,6 +4004,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_7 text default NULL first, add column added_21 bigint default 1234;
@@ -3739,6 +4015,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3756,6 +4033,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_7 text default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3766,6 +4044,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3783,6 +4062,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_7 text default NULL first, add column added_41 varchar(10) default NULL;
@@ -3793,6 +4073,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3810,6 +4091,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -3820,6 +4102,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3837,6 +4120,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_7 text default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -3847,6 +4131,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3864,6 +4149,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_71 text default NULL;
alter table bar add column added_7 text default NULL first, add column added_71 text default NULL;
@@ -3874,6 +4160,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3891,6 +4178,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_7 text default NULL first, add column added_81 mediumtext default NULL;
@@ -3901,6 +4189,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3918,6 +4207,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_11 bigint default NULL;
@@ -3928,6 +4218,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3945,6 +4236,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
alter table bar add column added_8 mediumtext default NULL first, add column added_21 bigint default 1234;
@@ -3955,6 +4247,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3972,6 +4265,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
alter table bar add column added_8 mediumtext default NULL first, add column added_31 bigint NOT NULL default 54;
@@ -3982,6 +4276,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -3999,6 +4294,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_41 varchar(10) default NULL;
@@ -4009,6 +4305,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4026,6 +4323,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_51 varchar(10) default "abracadab";
@@ -4036,6 +4334,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4053,6 +4352,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
alter table bar add column added_8 mediumtext default NULL first, add column added_61 varchar(10) NOT NULL default "abracadab";
@@ -4063,6 +4363,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4080,6 +4381,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_71 text default NULL;
@@ -4090,6 +4392,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4107,6 +4410,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
alter table bar add column added_8 mediumtext default NULL first, add column added_81 mediumtext default NULL;
@@ -4117,6 +4421,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4134,6 +4439,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -4144,6 +4450,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4161,6 +4468,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -4171,6 +4479,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4188,6 +4497,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -4198,6 +4508,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4215,6 +4526,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -4225,6 +4537,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4242,6 +4555,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -4252,6 +4566,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4269,6 +4584,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -4279,6 +4595,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4296,6 +4613,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -4306,6 +4624,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4323,6 +4642,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_1 bigint default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -4333,6 +4653,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4350,6 +4671,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_11 bigint default NULL after bbb;
@@ -4360,6 +4682,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4377,6 +4700,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_21 bigint default 1234 after bbb;
@@ -4387,6 +4711,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4404,6 +4729,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -4414,6 +4740,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4431,6 +4758,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -4441,6 +4769,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4458,6 +4787,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -4468,6 +4798,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4485,6 +4816,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -4495,6 +4827,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4512,6 +4845,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_71 text default NULL after bbb;
@@ -4522,6 +4856,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4539,6 +4874,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_2 bigint default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -4549,6 +4885,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4566,6 +4903,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_11 bigint default NULL after bbb;
@@ -4576,6 +4914,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4593,6 +4932,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_21 bigint default 1234 after bbb;
@@ -4603,6 +4943,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4620,6 +4961,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -4630,6 +4972,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4647,6 +4990,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -4657,6 +5001,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4674,6 +5019,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -4684,6 +5030,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4701,6 +5048,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -4711,6 +5059,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4728,6 +5077,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_71 text default NULL after bbb;
@@ -4738,6 +5088,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4755,6 +5106,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_3 bigint NOT NULL default -1 after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -4765,6 +5117,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4782,6 +5135,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -4792,6 +5146,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4809,6 +5164,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -4819,6 +5175,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4836,6 +5193,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -4846,6 +5204,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4863,6 +5222,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -4873,6 +5233,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4890,6 +5251,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -4900,6 +5262,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4917,6 +5280,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -4927,6 +5291,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4944,6 +5309,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -4954,6 +5320,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4971,6 +5338,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_4 varchar(10) default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -4981,6 +5349,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -4998,6 +5367,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_11 bigint default NULL after bbb;
@@ -5008,6 +5378,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5025,6 +5396,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_21 bigint default 1234 after bbb;
@@ -5035,6 +5407,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5052,6 +5425,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -5062,6 +5436,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5079,6 +5454,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -5089,6 +5465,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5106,6 +5483,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -5116,6 +5494,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5133,6 +5512,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -5143,6 +5523,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5160,6 +5541,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_71 text default NULL after bbb;
@@ -5170,6 +5552,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5187,6 +5570,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_5 varchar(10) default "qwerty" after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -5197,6 +5581,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5214,6 +5599,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_11 bigint default NULL after bbb;
@@ -5224,6 +5610,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5241,6 +5628,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_21 bigint default 1234 after bbb;
@@ -5251,6 +5639,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5268,6 +5657,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -5278,6 +5668,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5295,6 +5686,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -5305,6 +5697,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5322,6 +5715,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -5332,6 +5726,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5349,6 +5744,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -5359,6 +5755,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5376,6 +5773,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_71 text default NULL after bbb;
@@ -5386,6 +5784,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5403,6 +5802,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_6 varchar(10) NOT NULL default "ruyrtt" after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -5413,6 +5813,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5430,6 +5831,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -5440,6 +5842,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5457,6 +5860,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -5467,6 +5871,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5484,6 +5889,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -5494,6 +5900,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5511,6 +5918,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -5521,6 +5929,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5538,6 +5947,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -5548,6 +5958,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5565,6 +5976,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -5575,6 +5987,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5592,6 +6005,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -5602,6 +6016,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5619,6 +6034,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_7 text default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -5629,6 +6045,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5646,6 +6063,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_11 bigint default NULL after bbb;
@@ -5656,6 +6074,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5673,6 +6092,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_21 bigint default 1234 after bbb;
@@ -5683,6 +6103,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5700,6 +6121,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_31 bigint NOT NULL default 54 after bbb;
@@ -5710,6 +6132,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5727,6 +6150,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_41 varchar(10) default NULL after bbb;
@@ -5737,6 +6161,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5754,6 +6179,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_51 varchar(10) default "abracadab" after bbb;
@@ -5764,6 +6190,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5781,6 +6208,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_61 varchar(10) NOT NULL default "abracadab" after bbb;
@@ -5791,6 +6219,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5808,6 +6237,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_71 text default NULL after bbb;
@@ -5818,6 +6248,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5835,6 +6266,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
alter table bar add column added_8 mediumtext default NULL after bbb, add column added_81 mediumtext default NULL after bbb;
@@ -5845,6 +6277,7 @@ drop table foo; drop table bar; create table foo (aa blob, bb longblob, cc tinyblob, dd mediumblob, aaa varchar(12), bbb varbinary(20), ccc varchar(50), ddd varchar(3000)) engine=TokuDB;
create table bar like foo;
alter table bar engine=MyISAM;
+begin;
insert into foo values (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into foo values (NULL,NULL,NULL,NULL,"adsf",NULL,"hjfdshj",NULL);
insert into foo values (NULL,NULL,NULL,NULL,NULL,"oifds",NULL,"fdsjfds");
@@ -5862,6 +6295,7 @@ insert into foo values ("rewoiu","fds","fr","oiufdsrew","adsf",NULL,"hjfdshj",NU insert into foo values ("rewoiu","fds","fr","oiufdsrew",NULL,"oifds",NULL,"fdsjfds");
insert into foo values ("rewoiu","fds","fr","oiufdsrew","rewoiu","fds","fr","oiufdsrew");
insert into bar select * from foo;
+commit;
source include/diff_tables.inc;
alter table foo add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1;
alter table bar add column added_1 bigint default NULL, add column added_2 bigint default -1 after bbb, add column added_3 bigint NOT NULL default -1;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result b/storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result index 10cdb4767f6..c850de928b9 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result +++ b/storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result @@ -1,6 +1,7 @@ drop table if exists t; set default_storage_engine='innodb'; create table t (id bigint primary key, x bigint not null); +begin; insert into t values (0,0); insert into t values (1,0); insert into t values (2,0); @@ -10001,6 +10002,7 @@ insert into t values (9996,0); insert into t values (9997,0); insert into t values (9998,0); insert into t values (9999,0); +commit; explain select id from t where id>0 limit 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where; Using index diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result b/storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result index b642c8d6963..07e8b37c263 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result @@ -1,6 +1,7 @@ drop table if exists t; set default_storage_engine='tokudb'; create table t (id bigint primary key, x bigint not null); +begin; insert into t values (0,0); insert into t values (1,0); insert into t values (2,0); @@ -10001,9 +10002,10 @@ insert into t values (9996,0); insert into t values (9997,0); insert into t values (9998,0); insert into t values (9999,0); +commit; explain select id from t where id>0 limit 10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where; Using index +1 SIMPLE t index_or_range PRIMARY PRIMARY 8 NULL # Using where; Using index_or_range explain select * from t where id>0 limit 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/xa-6.result b/storage/tokudb/mysql-test/tokudb_bugs/r/xa-6.result index 955d7a6212a..904a25f6424 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/r/xa-6.result +++ b/storage/tokudb/mysql-test/tokudb_bugs/r/xa-6.result @@ -1,4 +1,5 @@ drop table if exists t1; +FLUSH TABLES; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=tokudb; xa begin 'a','ab'; insert into t1 values (1); diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/5733_innodb.test b/storage/tokudb/mysql-test/tokudb_bugs/t/5733_innodb.test index dec1f39eb97..d629c2cfe1c 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/5733_innodb.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/5733_innodb.test @@ -11,12 +11,14 @@ set default_storage_engine='innodb'; create table t (id bigint primary key, x bigint not null); +begin; let $i=0; let $n=10000; while ($i < $n) { eval insert into t values ($i,0); inc $i; } +commit; replace_column 9 #; explain select id from t where id>0 limit 10; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/5733_tokudb.test b/storage/tokudb/mysql-test/tokudb_bugs/t/5733_tokudb.test index e0e0fc886fd..2e30c839905 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/5733_tokudb.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/5733_tokudb.test @@ -11,14 +11,18 @@ set default_storage_engine='tokudb'; create table t (id bigint primary key, x bigint not null); +begin; let $i=0; let $n=10000; while ($i < $n) { eval insert into t values ($i,0); inc $i; } +commit; +# TokuDB may do index or range scan on this. Both are ok replace_column 9 #; +--replace_result index index_or_range range index_or_range explain select id from t where id>0 limit 10; replace_column 9 #; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/xa-6.test b/storage/tokudb/mysql-test/tokudb_bugs/t/xa-6.test index ce3ad5e326b..cb16357ff11 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/xa-6.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/xa-6.test @@ -5,6 +5,9 @@ drop table if exists t1; --enable_warnings +# Ensure that all tables are properly closed before we start simulating +# crashes +FLUSH TABLES; # test that simple xa commands work with TokuDB CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=tokudb; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/commit_5396.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/commit_5396.result new file mode 100644 index 00000000000..b226abc81d1 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/commit_5396.result @@ -0,0 +1,16 @@ +CREATE TABLE t1 (a VARCHAR(8), INDEX(a)) ENGINE=TokuDB; +INSERT INTO t1 VALUES ('foo'),('bar'); +CREATE TABLE t2 AS SELECT 'qux' IN (SELECT a FROM t1) AS f1; +DROP TABLE t1, t2; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (3),(4); +CREATE TABLE t3 (c VARCHAR(3), INDEX(c)) ENGINE=TokuDB; +INSERT INTO t3 VALUES ('foo'),('bar'); +EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT b FROM t2) OR 'qux' IN (SELECT c FROM t3); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +3 SUBQUERY t3 index_subquery c c 6 const 0 Using index; Using where +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 +DROP TABLE t1, t2, t3; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/compression.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/compression.result index f465fe5df65..ea8a0b521b9 100644 --- a/storage/tokudb/mysql-test/tokudb_mariadb/r/compression.result +++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/compression.result @@ -1,3 +1,4 @@ +drop table if exists t1,t2,t3,t4,t5,t6; create table t1 (a text) engine=tokudb compression=tokudb_uncompressed; create table t2 (a text) engine=tokudb compression=tokudb_zlib; create table t3 (a text) engine=tokudb compression=tokudb_quicklz; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/mdev5426.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/mdev5426.result new file mode 100644 index 00000000000..086c4f4cc18 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/mdev5426.result @@ -0,0 +1,6 @@ +CREATE TABLE t1 (i INT) ENGINE=TokuDB; +EXPLAIN INSERT INTO t1 SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1 Using temporary +INSERT INTO t1 SELECT * FROM t1; +DROP TABLE t1; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/optimize.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/optimize.result index 3fafa68f907..5151f2bc895 100644 --- a/storage/tokudb/mysql-test/tokudb_mariadb/r/optimize.result +++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/optimize.result @@ -11,3 +11,4 @@ set debug_sync='now SIGNAL go'; Table Op Msg_type Msg_text test.t1 optimize status OK drop table t1; +set debug_sync='reset'; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/t/commit_5396.test b/storage/tokudb/mysql-test/tokudb_mariadb/t/commit_5396.test new file mode 100644 index 00000000000..6df7fb6ac09 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_mariadb/t/commit_5396.test @@ -0,0 +1,18 @@ +# +# MDEV-5396 Assertion `Handlerton: r==0 ' failed (errno=0) on EXPLAIN with TokuDB tables +# + +CREATE TABLE t1 (a VARCHAR(8), INDEX(a)) ENGINE=TokuDB; +INSERT INTO t1 VALUES ('foo'),('bar'); +CREATE TABLE t2 AS SELECT 'qux' IN (SELECT a FROM t1) AS f1; +DROP TABLE t1, t2; + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (3),(4); +CREATE TABLE t3 (c VARCHAR(3), INDEX(c)) ENGINE=TokuDB; +INSERT INTO t3 VALUES ('foo'),('bar'); +EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT b FROM t2) OR 'qux' IN (SELECT c FROM t3); +DROP TABLE t1, t2, t3; + diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/t/compression.test b/storage/tokudb/mysql-test/tokudb_mariadb/t/compression.test index 1bac772437d..00478aed1c7 100644 --- a/storage/tokudb/mysql-test/tokudb_mariadb/t/compression.test +++ b/storage/tokudb/mysql-test/tokudb_mariadb/t/compression.test @@ -1,3 +1,10 @@ +# +# Initial cleanup from previous tests +# +--disable_warnings +drop table if exists t1,t2,t3,t4,t5,t6; +--enable_warnings + create table t1 (a text) engine=tokudb compression=tokudb_uncompressed; create table t2 (a text) engine=tokudb compression=tokudb_zlib; create table t3 (a text) engine=tokudb compression=tokudb_quicklz; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/t/mdev5426.test b/storage/tokudb/mysql-test/tokudb_mariadb/t/mdev5426.test new file mode 100644 index 00000000000..b16e81353ff --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_mariadb/t/mdev5426.test @@ -0,0 +1,10 @@ + +CREATE TABLE t1 (i INT) ENGINE=TokuDB; +EXPLAIN INSERT INTO t1 SELECT * FROM t1; + +--connect con1,localhost,root,,test +INSERT INTO t1 SELECT * FROM t1; + +--connection default +--disconnect con1 +DROP TABLE t1; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/t/optimize.test b/storage/tokudb/mysql-test/tokudb_mariadb/t/optimize.test index 20a6daf43fc..0eae53e77f9 100644 --- a/storage/tokudb/mysql-test/tokudb_mariadb/t/optimize.test +++ b/storage/tokudb/mysql-test/tokudb_mariadb/t/optimize.test @@ -14,4 +14,5 @@ connection default; reap; drop table t1; +set debug_sync='reset'; diff --git a/storage/xtradb/CMakeLists.txt b/storage/xtradb/CMakeLists.txt index 1a1bb63f227..aab9baa58d4 100644 --- a/storage/xtradb/CMakeLists.txt +++ b/storage/xtradb/CMakeLists.txt @@ -65,6 +65,12 @@ CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU) IF(NOT MSVC) # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not IF(NOT CMAKE_CROSSCOMPILING) + # workaround for gcc 4.1.2 RHEL5/x86, gcc atomic ops only work under -march=i686 + IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND + CMAKE_C_COMPILER_VERSION VERSION_LESS "4.1.3") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686") + ENDIF() CHECK_C_SOURCE_RUNS( " int main() @@ -237,7 +243,7 @@ ENDIF() IF(MSVC) ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS) - #SET(XTRADB_OK 1) + SET(XTRADB_OK 1) # Avoid "unreferenced label" warning in generated file GET_FILENAME_COMPONENT(_SRC_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) @@ -419,10 +425,22 @@ IF(WITH_INNODB) SET(WITH_INNOBASE_STORAGE_ENGINE TRUE) ENDIF() +# On solaris, reduce symbol visibility, so loader does not mix +# the same symbols from builtin innodb and from shared one. +# Only required for old GCC (3.4.3) that does not support hidden visibility +IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCC + AND NOT HAVE_VISIBILITY_HIDDEN) + SET(LINKER_SCRIPT "-Wl,-M${CMAKE_CURRENT_SOURCE_DIR}/plugin_exports") +ELSE() + SET(LINKER_SCRIPT) +ENDIF() + IF(XTRADB_OK) MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE - MODULE_ONLY RECOMPILE_FOR_EMBEDDED - LINK_LIBRARIES ${ZLIB_LIBRARY}) + DEFAULT + RECOMPILE_FOR_EMBEDDED + LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT}) ELSE() - MESSAGE("Percona XtraDB is not supported on this platform") + MESSAGE(FATAL_ERROR "Percona XtraDB is not supported on this platform") ENDIF() + diff --git a/storage/xtradb/api/api0api.cc b/storage/xtradb/api/api0api.cc index 647ebcde6f0..d2f1a468f25 100644 --- a/storage/xtradb/api/api0api.cc +++ b/storage/xtradb/api/api0api.cc @@ -355,7 +355,9 @@ ib_read_tuple( /*==========*/ const rec_t* rec, /*!< in: Record to read */ ib_bool_t page_format, /*!< in: IB_TRUE if compressed format */ - ib_tuple_t* tuple) /*!< in: tuple to read into */ + ib_tuple_t* tuple, /*!< in: tuple to read into */ + void** rec_buf, /*!< in/out: row buffer */ + ulint* len) /*!< in/out: buffer len */ { ulint i; void* ptr; @@ -366,6 +368,7 @@ ib_read_tuple( ulint* offsets = offsets_; dtuple_t* dtuple = tuple->ptr; const dict_index_t* index = tuple->index; + ulint offset_size; rec_offs_init(offsets_); @@ -375,8 +378,20 @@ ib_read_tuple( rec_meta_data = rec_get_info_bits(rec, page_format); dtuple_set_info_bits(dtuple, rec_meta_data); - /* Make a copy of the rec. */ - ptr = mem_heap_alloc(tuple->heap, rec_offs_size(offsets)); + offset_size = rec_offs_size(offsets); + + if (rec_buf && *rec_buf) { + if (*len < offset_size) { + free(*rec_buf); + *rec_buf = malloc(offset_size); + *len = offset_size; + } + ptr = *rec_buf; + } else { + /* Make a copy of the rec. */ + ptr = mem_heap_alloc(tuple->heap, offset_size); + } + copy = rec_copy(ptr, rec, offsets); n_index_fields = ut_min( @@ -557,6 +572,10 @@ ib_trx_start( /*=========*/ ib_trx_t ib_trx, /*!< in: transaction to restart */ ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ + ib_bool_t read_write, /*!< in: true if read write + transaction */ + ib_bool_t auto_commit, /*!< in: auto commit after each + single DML */ void* thd) /*!< in: THD */ { ib_err_t err = DB_SUCCESS; @@ -564,6 +583,10 @@ ib_trx_start( ut_a(ib_trx_level <= IB_TRX_SERIALIZABLE); + trx->api_trx = true; + trx->api_auto_commit = auto_commit; + trx->read_write = read_write; + trx_start_if_not_started(trx); trx->isolation_level = ib_trx_level; @@ -583,16 +606,22 @@ UNIV_INTERN ib_trx_t ib_trx_begin( /*=========*/ - ib_trx_level_t ib_trx_level) /*!< in: trx isolation level */ + ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ + ib_bool_t read_write, /*!< in: true if read write + transaction */ + ib_bool_t auto_commit) /*!< in: auto commit after each + single DML */ { trx_t* trx; ib_bool_t started; trx = trx_allocate_for_mysql(); - started = ib_trx_start((ib_trx_t) trx, ib_trx_level, NULL); + + started = ib_trx_start(static_cast<ib_trx_t>(trx), ib_trx_level, + read_write, auto_commit, NULL); ut_a(started); - return((ib_trx_t) trx); + return(static_cast<ib_trx_t>(trx)); } /*****************************************************************//** @@ -652,15 +681,11 @@ ib_trx_commit( trx_t* trx = (trx_t*) ib_trx; if (trx->state == TRX_STATE_NOT_STARTED) { - err = ib_trx_release(ib_trx); return(err); } trx_commit(trx); - err = ib_trx_release(ib_trx); - ut_a(err == DB_SUCCESS); - return(DB_SUCCESS); } @@ -682,9 +707,6 @@ ib_trx_rollback( /* It should always succeed */ ut_a(err == DB_SUCCESS); - err = ib_trx_release(ib_trx); - ut_a(err == DB_SUCCESS); - ib_wake_master_thread(); return(err); @@ -1371,11 +1393,12 @@ ib_cursor_commit_trx( { ib_err_t err = DB_SUCCESS; ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; +#ifdef UNIV_DEBUG row_prebuilt_t* prebuilt = cursor->prebuilt; ut_ad(prebuilt->trx == (trx_t*) ib_trx); - err = ib_trx_commit(ib_trx); - prebuilt->trx = NULL; +#endif /* UNIV_DEBUG */ + ib_trx_commit(ib_trx); cursor->valid_trx = FALSE; return(err); } @@ -1955,7 +1978,7 @@ ib_delete_row( upd = ib_update_vector_create(cursor); page_format = dict_table_is_comp(index->table); - ib_read_tuple(rec, page_format, tuple); + ib_read_tuple(rec, page_format, tuple, NULL, NULL); upd->n_fields = ib_tuple_get_n_cols(ib_tpl); @@ -2056,7 +2079,9 @@ ib_err_t ib_cursor_read_row( /*===============*/ ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_tpl_t ib_tpl) /*!< out: read cols into this tuple */ + ib_tpl_t ib_tpl, /*!< out: read cols into this tuple */ + void** row_buf, /*!< in/out: row buffer */ + ib_ulint_t* row_len) /*!< in/out: row buffer len */ { ib_err_t err; ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; @@ -2100,7 +2125,8 @@ ib_cursor_read_row( } if (!rec_get_deleted_flag(rec, page_format)) { - ib_read_tuple(rec, page_format, tuple); + ib_read_tuple(rec, page_format, tuple, + row_buf, (ulint*) row_len); err = DB_SUCCESS; } else{ err = DB_RECORD_NOT_FOUND; @@ -3845,7 +3871,7 @@ ib_table_truncate( ib_trx_t ib_trx = NULL; ib_crsr_t ib_crsr = NULL; - ib_trx = ib_trx_begin(IB_TRX_SERIALIZABLE); + ib_trx = ib_trx_begin(IB_TRX_SERIALIZABLE, true, false); dict_mutex_enter_for_mysql(); diff --git a/storage/xtradb/btr/btr0btr.cc b/storage/xtradb/btr/btr0btr.cc index 569dcea072a..cce91bdab6e 100644 --- a/storage/xtradb/btr/btr0btr.cc +++ b/storage/xtradb/btr/btr0btr.cc @@ -805,7 +805,7 @@ btr_height_get( /* S latches the page */ root_block = btr_root_block_get(index, RW_S_LATCH, mtr); - height = btr_page_get_level(buf_block_get_frame(root_block), mtr); + height = btr_page_get_level(buf_block_get_frame_fast(root_block), mtr); /* Release the S latch on the root page. */ mtr_memo_release(mtr, root_block, MTR_MEMO_PAGE_S_FIX); @@ -1844,6 +1844,8 @@ btr_page_reorganize_low( #endif /* !UNIV_HOTBACKUP */ temp_page = temp_block->frame; + MONITOR_INC(MONITOR_INDEX_REORG_ATTEMPTS); + /* Copy the old page to temporary space */ buf_frame_copy(temp_page, page); @@ -1992,6 +1994,8 @@ func_exit: mach_write_to_1(log_ptr, z_level); mlog_close(mtr, log_ptr + 1); } + + MONITOR_INC(MONITOR_INDEX_REORG_SUCCESSFUL); } #endif /* !UNIV_HOTBACKUP */ @@ -2746,7 +2750,7 @@ btr_attach_half_pages( } /* Get the level of the split pages */ - level = btr_page_get_level(buf_block_get_frame(block), mtr); + level = btr_page_get_level(buf_block_get_frame_fast(block), mtr); ut_ad(level == btr_page_get_level(buf_block_get_frame(new_block), mtr)); @@ -3615,6 +3619,8 @@ btr_compress( space = dict_index_get_space(index); zip_size = dict_table_zip_size(index->table); + MONITOR_INC(MONITOR_INDEX_MERGE_ATTEMPTS); + left_page_no = btr_page_get_prev(page, mtr); right_page_no = btr_page_get_next(page, mtr); @@ -3848,6 +3854,9 @@ func_exit: page_rec_get_nth(merge_block->frame, nth_rec), merge_block, cursor); } + + MONITOR_INC(MONITOR_INDEX_MERGE_SUCCESSFUL); + DBUG_RETURN(TRUE); err_exit: @@ -3968,10 +3977,12 @@ btr_discard_page( space = dict_index_get_space(index); zip_size = dict_table_zip_size(index->table); + MONITOR_INC(MONITOR_INDEX_DISCARD); + /* Decide the page which will inherit the locks */ - left_page_no = btr_page_get_prev(buf_block_get_frame(block), mtr); - right_page_no = btr_page_get_next(buf_block_get_frame(block), mtr); + left_page_no = btr_page_get_prev(buf_block_get_frame_fast(block), mtr); + right_page_no = btr_page_get_next(buf_block_get_frame_fast(block), mtr); if (left_page_no != FIL_NULL) { merge_block = btr_block_get(space, zip_size, left_page_no, diff --git a/storage/xtradb/btr/btr0cur.cc b/storage/xtradb/btr/btr0cur.cc index bd2dd1e6095..a180649fa1e 100644 --- a/storage/xtradb/btr/btr0cur.cc +++ b/storage/xtradb/btr/btr0cur.cc @@ -1828,7 +1828,7 @@ btr_cur_upd_lock_and_undo( /***********************************************************//** Writes a redo log record of updating a record in-place. */ -UNIV_INLINE __attribute__((nonnull)) +UNIV_INTERN void btr_cur_update_in_place_log( /*========================*/ @@ -1856,18 +1856,29 @@ btr_cur_update_in_place_log( return; } - /* The code below assumes index is a clustered index: change index to - the clustered index if we are updating a secondary index record (or we - could as well skip writing the sys col values to the log in this case - because they are not needed for a secondary index record update) */ - - index = dict_table_get_first_index(index->table); - + /* For secondary indexes, we could skip writing the dummy system fields + to the redo log but we have to change redo log parsing of + MLOG_REC_UPDATE_IN_PLACE/MLOG_COMP_REC_UPDATE_IN_PLACE or we have to add + new redo log record. For now, just write dummy sys fields to the redo + log if we are updating a secondary index record. + */ mach_write_to_1(log_ptr, flags); log_ptr++; - log_ptr = row_upd_write_sys_vals_to_log( - index, trx_id, roll_ptr, log_ptr, mtr); + if (dict_index_is_clust(index)) { + log_ptr = row_upd_write_sys_vals_to_log( + index, trx_id, roll_ptr, log_ptr, mtr); + } else { + /* Dummy system fields for a secondary index */ + /* TRX_ID Position */ + log_ptr += mach_write_compressed(log_ptr, 0); + /* ROLL_PTR */ + trx_write_roll_ptr(log_ptr, 0); + log_ptr += DATA_ROLL_PTR_LEN; + /* TRX_ID */ + log_ptr += mach_ull_write_compressed(log_ptr, 0); + } + mach_write_to_2(log_ptr, page_offset(rec)); log_ptr += 2; diff --git a/storage/xtradb/btr/btr0pcur.cc b/storage/xtradb/btr/btr0pcur.cc index 49002ca9ab6..28a60de6ba2 100644 --- a/storage/xtradb/btr/btr0pcur.cc +++ b/storage/xtradb/btr/btr0pcur.cc @@ -111,7 +111,7 @@ btr_pcur_store_position( page_t* page; ulint offs; - ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); block = btr_pcur_get_block(cursor); @@ -128,7 +128,6 @@ btr_pcur_store_position( ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_S_FIX) || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); - ut_a(cursor->latch_mode != BTR_NO_LATCHES); if (page_is_empty(page)) { /* It must be an empty index tree; NOTE that in this case @@ -240,21 +239,12 @@ btr_pcur_restore_position_func( ut_ad(mtr); ut_ad(mtr->state == MTR_ACTIVE); + ut_ad(cursor->old_stored == BTR_PCUR_OLD_STORED); + ut_ad(cursor->pos_state == BTR_PCUR_WAS_POSITIONED + || cursor->pos_state == BTR_PCUR_IS_POSITIONED); index = btr_cur_get_index(btr_pcur_get_btr_cur(cursor)); - if (UNIV_UNLIKELY(cursor->old_stored != BTR_PCUR_OLD_STORED) - || UNIV_UNLIKELY(cursor->pos_state != BTR_PCUR_WAS_POSITIONED - && cursor->pos_state != BTR_PCUR_IS_POSITIONED)) { - ut_print_buf(stderr, cursor, sizeof(btr_pcur_t)); - putc('\n', stderr); - if (cursor->trx_if_known) { - trx_print(stderr, cursor->trx_if_known, 0); - } - - ut_error; - } - if (UNIV_UNLIKELY (cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE || cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE)) { @@ -279,14 +269,14 @@ btr_pcur_restore_position_func( if (UNIV_LIKELY(latch_mode == BTR_SEARCH_LEAF) || UNIV_LIKELY(latch_mode == BTR_MODIFY_LEAF)) { - /* Try optimistic restoration */ + /* Try optimistic restoration. */ - if (UNIV_LIKELY(buf_page_optimistic_get( - latch_mode, - cursor->block_when_stored, - cursor->modify_clock, - file, line, mtr))) { + if (buf_page_optimistic_get(latch_mode, + cursor->block_when_stored, + cursor->modify_clock, + file, line, mtr)) { cursor->pos_state = BTR_PCUR_IS_POSITIONED; + cursor->latch_mode = latch_mode; buf_block_dbg_add_level( btr_pcur_get_block(cursor), @@ -298,9 +288,6 @@ btr_pcur_restore_position_func( const rec_t* rec; const ulint* offsets1; const ulint* offsets2; -#endif /* UNIV_DEBUG */ - cursor->latch_mode = latch_mode; -#ifdef UNIV_DEBUG rec = btr_pcur_get_rec(cursor); heap = mem_heap_create(256); @@ -318,7 +305,13 @@ btr_pcur_restore_position_func( #endif /* UNIV_DEBUG */ return(TRUE); } - + /* This is the same record as stored, + may need to be adjusted for BTR_PCUR_BEFORE/AFTER, + depending on search mode and direction. */ + if (btr_pcur_is_on_user_rec(cursor)) { + cursor->pos_state + = BTR_PCUR_IS_POSITIONED_OPTIMISTIC; + } return(FALSE); } } @@ -420,7 +413,7 @@ btr_pcur_move_to_next_page( buf_block_t* next_block; page_t* next_page; - ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); ut_ad(btr_pcur_is_after_last_on_page(cursor)); @@ -486,7 +479,6 @@ btr_pcur_move_backward_from_page( ulint latch_mode; ulint latch_mode2; - ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); ut_ad(btr_pcur_is_before_first_on_page(cursor)); ut_ad(!btr_pcur_is_before_first_in_tree(cursor, mtr)); diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc index d4b170028d9..2ec25491f4c 100644 --- a/storage/xtradb/buf/buf0buf.cc +++ b/storage/xtradb/buf/buf0buf.cc @@ -2752,7 +2752,6 @@ wait_until_unfixed: buf_LRU_block_free_non_file_page(block); mutex_exit(&buf_pool->LRU_list_mutex); - mutex_exit(&buf_pool->zip_mutex); rw_lock_x_unlock(hash_lock); mutex_exit(&block->mutex); diff --git a/storage/xtradb/dict/dict0crea.cc b/storage/xtradb/dict/dict0crea.cc index c7cb3aa21bb..eba5417dc76 100644 --- a/storage/xtradb/dict/dict0crea.cc +++ b/storage/xtradb/dict/dict0crea.cc @@ -803,6 +803,7 @@ dict_truncate_index_tree( const byte* ptr; ulint len; dict_index_t* index; + bool has_been_dropped = false; ut_ad(mutex_own(&(dict_sys->mutex))); ut_a(!dict_table_is_comp(dict_sys->sys_indexes)); @@ -815,11 +816,7 @@ dict_truncate_index_tree( root_page_no = mtr_read_ulint(ptr, MLOG_4BYTES, mtr); if (drop && root_page_no == FIL_NULL) { - /* The tree has been freed. */ - - ut_print_timestamp(stderr); - fprintf(stderr, " InnoDB: Trying to TRUNCATE" - " a missing index of table %s!\n", table->name); + has_been_dropped = true; drop = FALSE; } @@ -896,6 +893,13 @@ create: if (index->type & DICT_FTS) { return(FIL_NULL); } else { + if (has_been_dropped) { + fprintf(stderr, " InnoDB: Trying to" + " TRUNCATE a missing index of" + " table %s!\n", + index->table->name); + } + root_page_no = btr_create(type, space, zip_size, index_id, index, mtr); index->page = (unsigned int) root_page_no; diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc index 7592a7608df..218f980df21 100644 --- a/storage/xtradb/dict/dict0dict.cc +++ b/storage/xtradb/dict/dict0dict.cc @@ -4264,18 +4264,45 @@ loop: goto loop; } + if (my_isspace(cs, *ptr)) { + ptr1 = dict_accept(cs, ptr, "IF", &success); + + if (success) { + if (!my_isspace(cs, *ptr1)) { + goto loop; + } + ptr1 = dict_accept(cs, ptr1, "NOT", &success); + if (!success) { + goto loop; + } + ptr1 = dict_accept(cs, ptr1, "EXISTS", &success); + if (!success) { + goto loop; + } + ptr = ptr1; + } + } + ptr = dict_accept(cs, ptr, "(", &success); if (!success) { - /* MySQL allows also an index id before the '('; we - skip it */ - ptr = dict_skip_word(cs, ptr, &success); - - if (!success) { - dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + if (constraint_name) { + /* MySQL allows also an index id before the '('; we + skip it */ + ptr = dict_skip_word(cs, ptr, &success); + if (!success) { + dict_foreign_report_syntax_err( + name, start_of_latest_foreign, ptr); + return(DB_CANNOT_ADD_CONSTRAINT); + } + } + else { + while (my_isspace(cs, *ptr)) { + ptr++; + } - return(DB_CANNOT_ADD_CONSTRAINT); + ptr = dict_scan_id(cs, ptr, heap, + &constraint_name, FALSE, FALSE); } ptr = dict_accept(cs, ptr, "(", &success); @@ -4749,6 +4776,7 @@ dict_foreign_parse_drop_constraints( char* str; size_t len; const char* ptr; + const char* ptr1; const char* id; struct charset_info_st* cs; @@ -4799,6 +4827,16 @@ loop: goto syntax_error; } + ptr1 = dict_accept(cs, ptr, "IF", &success); + + if (success && my_isspace(cs, *ptr1)) { + ptr1 = dict_accept(cs, ptr1, "EXISTS", &success); + if (success) { + + ptr = ptr1; + } + } + ptr = dict_scan_id(cs, ptr, heap, &id, FALSE, TRUE); if (id == NULL) { diff --git a/storage/xtradb/dict/dict0load.cc b/storage/xtradb/dict/dict0load.cc index d731aeca55f..5c97b5aba7c 100644 --- a/storage/xtradb/dict/dict0load.cc +++ b/storage/xtradb/dict/dict0load.cc @@ -1358,7 +1358,7 @@ dict_load_columns( BTR_SEARCH_LEAF, &pcur, &mtr); for (i = 0; i + DATA_N_SYS_COLS < (ulint) table->n_cols; i++) { const char* err_msg; - const char* name; + const char* name = NULL; rec = btr_pcur_get_rec(&pcur); diff --git a/storage/xtradb/dict/dict0mem.cc b/storage/xtradb/dict/dict0mem.cc index 9214a6e6e5a..f69e6cc47ae 100644 --- a/storage/xtradb/dict/dict0mem.cc +++ b/storage/xtradb/dict/dict0mem.cc @@ -142,10 +142,12 @@ dict_mem_table_free( || DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID) || DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_ADD_DOC_ID)) { if (table->fts) { + if (table->cached) { + fts_optimize_remove_table(table); + } + fts_free(table); } - - fts_optimize_remove_table(table); } #ifndef UNIV_HOTBACKUP mutex_free(&(table->autoinc_mutex)); diff --git a/storage/xtradb/dict/dict0stats.cc b/storage/xtradb/dict/dict0stats.cc index bfd0542b8e2..8bf02f9785c 100644 --- a/storage/xtradb/dict/dict0stats.cc +++ b/storage/xtradb/dict/dict0stats.cc @@ -780,10 +780,21 @@ dict_stats_update_transient_for_index( /*==================================*/ dict_index_t* index) /*!< in/out: index */ { - if (UNIV_LIKELY - (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE - || (srv_force_recovery < SRV_FORCE_NO_LOG_REDO - && dict_index_is_clust(index)))) { + if (srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO + && (srv_force_recovery >= SRV_FORCE_NO_LOG_REDO + || !dict_index_is_clust(index))) { + /* If we have set a high innodb_force_recovery + level, do not calculate statistics, as a badly + corrupted index can cause a crash in it. + Initialize some bogus index cardinality + statistics, so that the data can be queried in + various means, also via secondary indexes. */ + dict_stats_empty_index(index); +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + } else if (ibuf_debug && !dict_index_is_clust(index)) { + dict_stats_empty_index(index); +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + } else { mtr_t mtr; ulint size; mtr_start(&mtr); @@ -812,14 +823,6 @@ dict_stats_update_transient_for_index( index->stat_n_leaf_pages = size; btr_estimate_number_of_different_key_vals(index); - } else { - /* If we have set a high innodb_force_recovery - level, do not calculate statistics, as a badly - corrupted index can cause a crash in it. - Initialize some bogus index cardinality - statistics, so that the data can be queried in - various means, also via secondary indexes. */ - dict_stats_empty_index(index); } } diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc index 9861f85b814..2d81dd8db48 100644 --- a/storage/xtradb/fil/fil0fil.cc +++ b/storage/xtradb/fil/fil0fil.cc @@ -4949,6 +4949,7 @@ retry: os_has_said_disk_full = FALSE; } node->being_extended = FALSE; + fil_node_complete_io(node, fil_system, OS_FILE_READ); goto complete_io; } #endif diff --git a/storage/xtradb/fts/fts0config.cc b/storage/xtradb/fts/fts0config.cc index 29d6771f9e7..c5cf38ca7f9 100644 --- a/storage/xtradb/fts/fts0config.cc +++ b/storage/xtradb/fts/fts0config.cc @@ -105,7 +105,7 @@ fts_config_get_value( fts_table, info, "DECLARE FUNCTION my_func;\n" - "DECLARE CURSOR c IS SELECT value FROM %s" + "DECLARE CURSOR c IS SELECT value FROM \"%s\"" " WHERE key = :name;\n" "BEGIN\n" "" @@ -481,7 +481,7 @@ fts_config_increment_value( graph = fts_parse_sql( fts_table, info, "DECLARE FUNCTION my_func;\n" - "DECLARE CURSOR c IS SELECT value FROM %s" + "DECLARE CURSOR c IS SELECT value FROM \"%s\"" " WHERE key = :name FOR UPDATE;\n" "BEGIN\n" "" diff --git a/storage/xtradb/fts/fts0fts.cc b/storage/xtradb/fts/fts0fts.cc index 83c6d1f5e80..1b114adea1f 100644 --- a/storage/xtradb/fts/fts0fts.cc +++ b/storage/xtradb/fts/fts0fts.cc @@ -92,6 +92,7 @@ UNIV_INTERN mysql_pfs_key_t fts_delete_mutex_key; UNIV_INTERN mysql_pfs_key_t fts_optimize_mutex_key; UNIV_INTERN mysql_pfs_key_t fts_bg_threads_mutex_key; UNIV_INTERN mysql_pfs_key_t fts_doc_id_mutex_key; +UNIV_INTERN mysql_pfs_key_t fts_pll_tokenize_mutex_key; #endif /* UNIV_PFS_MUTEX */ /** variable to record innodb_fts_internal_tbl_name for information @@ -876,7 +877,7 @@ fts_drop_index( current_doc_id = table->fts->cache->next_doc_id; first_doc_id = table->fts->cache->first_doc_id; - fts_cache_clear(table->fts->cache, TRUE); + fts_cache_clear(table->fts->cache); fts_cache_destroy(table->fts->cache); table->fts->cache = fts_cache_create(table); table->fts->cache->next_doc_id = current_doc_id; @@ -1079,16 +1080,12 @@ fts_words_free( } /*********************************************************************//** -Clear cache. If the shutdown flag is TRUE then the cache can contain -data that needs to be freed. For regular clear as part of normal -working we assume the caller has freed all resources. */ +Clear cache. */ UNIV_INTERN void fts_cache_clear( /*============*/ - fts_cache_t* cache, /*!< in: cache */ - ibool free_words) /*!< in: TRUE if free in memory - word cache. */ + fts_cache_t* cache) /*!< in: cache */ { ulint i; @@ -1099,11 +1096,7 @@ fts_cache_clear( index_cache = static_cast<fts_index_cache_t*>( ib_vector_get(cache->indexes, i)); - if (free_words) { - fts_words_free(index_cache->words); - } - - ut_a(rbt_empty(index_cache->words)); + fts_words_free(index_cache->words); rbt_free(index_cache->words); @@ -2322,7 +2315,7 @@ fts_trx_table_clone( ftt->rows = rbt_create(sizeof(fts_trx_row_t), fts_trx_row_doc_id_cmp); /* Copy the rb tree values to the new savepoint. */ - rbt_merge_uniq(ftt_src->rows, ftt->rows); + rbt_merge_uniq(ftt->rows, ftt_src->rows); /* These are only added on commit. At this stage we only have the updated row state. */ @@ -2814,7 +2807,7 @@ fts_update_sync_doc_id( graph = fts_parse_sql( &fts_table, info, "BEGIN " - "UPDATE %s SET value = :doc_id" + "UPDATE \"%s\" SET value = :doc_id" " WHERE key = 'synced_doc_id';"); error = fts_eval_sql(trx, graph); @@ -4221,7 +4214,7 @@ fts_is_word_in_index( "DECLARE FUNCTION my_func;\n" "DECLARE CURSOR c IS" " SELECT doc_count\n" - " FROM %s\n" + " FROM \"%s\"\n" " WHERE word = :word " " ORDER BY first_doc_id;\n" "BEGIN\n" @@ -4363,10 +4356,8 @@ fts_sync_commit( } /* We need to do this within the deleted lock since fts_delete() can - attempt to add a deleted doc id to the cache deleted id array. Set - the shutdown flag to FALSE, signifying that we don't want to release - all resources. */ - fts_cache_clear(cache, FALSE); + attempt to add a deleted doc id to the cache deleted id array. */ + fts_cache_clear(cache); fts_cache_init(cache); rw_lock_x_unlock(&cache->lock); @@ -4438,6 +4429,10 @@ fts_sync( index_cache = static_cast<fts_index_cache_t*>( ib_vector_get(cache->indexes, i)); + if (index_cache->index->to_be_dropped) { + continue; + } + error = fts_sync_index(sync, index_cache); if (error != DB_SUCCESS && !sync->interrupted) { @@ -4447,7 +4442,8 @@ fts_sync( } DBUG_EXECUTE_IF("fts_instrument_sync_interrupted", - sync->interrupted = true; + sync->interrupted = true; + error = DB_INTERRUPTED; ); if (error == DB_SUCCESS && !sync->interrupted) { @@ -4474,16 +4470,20 @@ fts_sync( Run SYNC on the table, i.e., write out data from the cache to the FTS auxiliary INDEX table and clear the cache at the end. */ UNIV_INTERN -void +dberr_t fts_sync_table( /*===========*/ dict_table_t* table) /*!< in: table */ { + dberr_t err = DB_SUCCESS; + ut_ad(table->fts); if (table->fts->cache) { - fts_sync(table->fts->cache->sync); + err = fts_sync(table->fts->cache->sync); } + + return(err); } /******************************************************************** @@ -5367,7 +5367,7 @@ fts_free( ut_ad(!fts->add_wq); if (fts->cache) { - fts_cache_clear(fts->cache, TRUE); + fts_cache_clear(fts->cache); fts_cache_destroy(fts->cache); fts->cache = NULL; } @@ -5546,9 +5546,21 @@ fts_savepoint_release( /* Only if we found and element to release. */ if (i < ib_vector_size(savepoints)) { + fts_savepoint_t* last_savepoint; + fts_savepoint_t* top_savepoint; + ib_rbt_t* tables; ut_a(top_of_stack < ib_vector_size(savepoints)); + /* Exchange tables between last savepoint and top savepoint */ + last_savepoint = static_cast<fts_savepoint_t*>( + ib_vector_last(trx->fts_trx->savepoints)); + top_savepoint = static_cast<fts_savepoint_t*>( + ib_vector_get(savepoints, top_of_stack)); + tables = top_savepoint->tables; + top_savepoint->tables = last_savepoint->tables; + last_savepoint->tables = tables; + /* Skip the implied savepoint. */ for (i = ib_vector_size(savepoints) - 1; i > top_of_stack; @@ -5759,6 +5771,9 @@ fts_savepoint_rollback( /* Make sure we don't delete the implied savepoint. */ ut_a(ib_vector_size(savepoints) > 0); + + /* Restore the savepoint. */ + fts_savepoint_take(trx, name); } } diff --git a/storage/xtradb/fts/fts0opt.cc b/storage/xtradb/fts/fts0opt.cc index 0fd577c5767..7cdad522564 100644 --- a/storage/xtradb/fts/fts0opt.cc +++ b/storage/xtradb/fts/fts0opt.cc @@ -54,6 +54,9 @@ static const ulint FTS_OPTIMIZE_INTERVAL_IN_SECS = 300; /** Server is shutting down, so does we exiting the optimize thread */ static bool fts_opt_start_shutdown = false; +/** Initial size of nodes in fts_word_t. */ +static const ulint FTS_WORD_NODES_INIT_SIZE = 64; + /** Last time we did check whether system need a sync */ static ib_time_t last_check_sync_time; @@ -244,10 +247,10 @@ static ib_time_t fts_optimize_time_limit = 0; static const char* fts_init_delete_sql = "BEGIN\n" "\n" - "INSERT INTO %s_BEING_DELETED\n" + "INSERT INTO \"%s_BEING_DELETED\"\n" "SELECT doc_id FROM \"%s_DELETED\";\n" "\n" - "INSERT INTO %s_BEING_DELETED_CACHE\n" + "INSERT INTO \"%s_BEING_DELETED_CACHE\"\n" "SELECT doc_id FROM \"%s_DELETED_CACHE\";\n"; static const char* fts_delete_doc_ids_sql = @@ -357,7 +360,7 @@ fts_word_init( word->heap_alloc = ib_heap_allocator_create(heap); word->nodes = ib_vector_create( - word->heap_alloc, sizeof(fts_node_t), 64); + word->heap_alloc, sizeof(fts_node_t), FTS_WORD_NODES_INIT_SIZE); return(word); } @@ -435,6 +438,8 @@ fts_optimize_index_fetch_node( dfield_t* dfield = que_node_get_val(exp); void* data = dfield_get_data(dfield); ulint dfield_len = dfield_get_len(dfield); + fts_node_t* node; + bool is_word_init = false; ut_a(dfield_len <= FTS_MAX_WORD_LEN); @@ -442,6 +447,7 @@ fts_optimize_index_fetch_node( word = static_cast<fts_word_t*>(ib_vector_push(words, NULL)); fts_word_init(word, (byte*) data, dfield_len); + is_word_init = true; } word = static_cast<fts_word_t*>(ib_vector_last(words)); @@ -451,9 +457,23 @@ fts_optimize_index_fetch_node( word = static_cast<fts_word_t*>(ib_vector_push(words, NULL)); fts_word_init(word, (byte*) data, dfield_len); + is_word_init = true; } - fts_optimize_read_node(word, que_node_get_next(exp)); + node = fts_optimize_read_node(word, que_node_get_next(exp)); + + fetch->total_memory += node->ilist_size; + if (is_word_init) { + fetch->total_memory += sizeof(fts_word_t) + + sizeof(ib_alloc_t) + sizeof(ib_vector_t) + dfield_len + + sizeof(fts_node_t) * FTS_WORD_NODES_INIT_SIZE; + } else if (ib_vector_size(words) > FTS_WORD_NODES_INIT_SIZE) { + fetch->total_memory += sizeof(fts_node_t); + } + + if (fetch->total_memory >= fts_result_cache_limit) { + return(FALSE); + } return(TRUE); } @@ -1791,9 +1811,11 @@ fts_optimize_words( selected = fts_select_index(charset, word->f_str, word->f_len); /* Read the index records to optimize. */ + fetch.total_memory = 0; error = fts_index_fetch_nodes( trx, &graph, &optim->fts_index_table, word, &fetch); + ut_ad(fetch.total_memory < fts_result_cache_limit); if (error == DB_SUCCESS) { /* There must be some nodes to read. */ diff --git a/storage/xtradb/fts/fts0que.cc b/storage/xtradb/fts/fts0que.cc index c2922d993bf..7da60c0d166 100644 --- a/storage/xtradb/fts/fts0que.cc +++ b/storage/xtradb/fts/fts0que.cc @@ -784,7 +784,7 @@ fts_query_remove_doc_id( && rbt_search(query->doc_ids, &parent, &doc_id) == 0) { ut_free(rbt_remove_node(query->doc_ids, parent.last)); - ut_ad(query->total_size > + ut_ad(query->total_size >= SIZEOF_RBT_NODE_ADD + sizeof(fts_ranking_t)); query->total_size -= SIZEOF_RBT_NODE_ADD + sizeof(fts_ranking_t); @@ -935,7 +935,7 @@ fts_query_free_doc_ids( ut_free(rbt_remove_node(doc_ids, node)); - ut_ad(query->total_size > + ut_ad(query->total_size >= SIZEOF_RBT_NODE_ADD + sizeof(fts_ranking_t)); query->total_size -= SIZEOF_RBT_NODE_ADD + sizeof(fts_ranking_t); @@ -943,7 +943,7 @@ fts_query_free_doc_ids( rbt_free(doc_ids); - ut_ad(query->total_size > SIZEOF_RBT_CREATE); + ut_ad(query->total_size >= SIZEOF_RBT_CREATE); query->total_size -= SIZEOF_RBT_CREATE; } @@ -2056,7 +2056,7 @@ fts_query_find_term( "DECLARE FUNCTION my_func;\n" "DECLARE CURSOR c IS" " SELECT doc_count, ilist\n" - " FROM %s\n" + " FROM \"%s\"\n" " WHERE word LIKE :word AND " " first_doc_id <= :min_doc_id AND " " last_doc_id >= :max_doc_id\n" @@ -2255,7 +2255,7 @@ fts_query_terms_in_document( "DECLARE FUNCTION my_func;\n" "DECLARE CURSOR c IS" " SELECT count\n" - " FROM %s\n" + " FROM \"%s\"\n" " WHERE doc_id = :doc_id " "BEGIN\n" "\n" @@ -3747,9 +3747,10 @@ fts_query_str_preprocess( charset, str_ptr + cur_pos, str_ptr + *result_len, &str, &offset); - if (cur_len == 0) { - break; - } + if (cur_len == 0 || str.f_str == NULL) { + /* No valid word found */ + break; + } /* Check if we are in a phrase, if so, no need to do replacement of '-/+'. */ diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 668b7604569..61287e73acc 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -43,6 +43,7 @@ this program; if not, write to the Free Software Foundation, Inc., #include <mysys_err.h> #include <innodb_priv.h> #include <table_cache.h> +#include <my_check_opt.h> #ifdef _WIN32 #include <io.h> @@ -147,6 +148,13 @@ extern bool wsrep_prepare_key_for_innodb(const uchar *cache_key, extern handlerton * wsrep_hton; extern TC_LOG* tc_log; extern void wsrep_cleanup_transaction(THD *thd); +static int +wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, + my_bool signal); +static void +wsrep_fake_trx_id(handlerton* hton, THD *thd); +static int innobase_wsrep_set_checkpoint(handlerton* hton, const XID* xid); +static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid); #endif /* WITH_WSREP */ /** to protect innobase_open_files */ static mysql_mutex_t innobase_share_mutex; @@ -237,8 +245,6 @@ static char* internal_innobase_data_file_path = NULL; static char* innodb_version_str = (char*) INNODB_VERSION_STR; -static char* fts_server_stopword_table = NULL; - /** Possible values for system variable "innodb_stats_method". The values are defined the same as its corresponding MyISAM system variable "myisam_stats_method"(see "myisam_stats_method_names"), for better usability */ @@ -401,6 +407,7 @@ static PSI_mutex_info all_innodb_mutexes[] = { {&fts_delete_mutex_key, "fts_delete_mutex", 0}, {&fts_optimize_mutex_key, "fts_optimize_mutex", 0}, {&fts_doc_id_mutex_key, "fts_doc_id_mutex", 0}, + {&fts_pll_tokenize_mutex_key, "fts_pll_tokenize_mutex", 0}, {&log_flush_order_mutex_key, "log_flush_order_mutex", 0}, {&hash_table_mutex_key, "hash_table_mutex", 0}, {&ibuf_bitmap_mutex_key, "ibuf_bitmap_mutex", 0}, @@ -586,7 +593,8 @@ ib_cb_t innodb_api_cb[] = { (ib_cb_t) ib_cursor_clear_trx, (ib_cb_t) ib_get_idx_field_name, (ib_cb_t) ib_trx_get_start_time, - (ib_cb_t) ib_cfg_bk_commit_interval + (ib_cb_t) ib_cfg_bk_commit_interval, + (ib_cb_t) ib_cursor_stmt_begin }; /*************************************************************//** @@ -1261,6 +1269,7 @@ normalize_table_name_low( ibool set_lower_case); /* in: TRUE if we want to set name to lower case */ +#ifdef NOT_USED /*************************************************************//** Removes old archived transaction log files. @return true on error */ @@ -1286,6 +1295,7 @@ static bool innobase_purge_archive_logs( } return (err != DB_SUCCESS); } +#endif /*************************************************************//** Check for a valid value of innobase_commit_concurrency. @@ -1427,7 +1437,7 @@ innobase_srv_conc_enter_innodb( trx_t* trx) /*!< in: transaction handle */ { #ifdef WITH_WSREP - if (wsrep_on(trx->mysql_thd) && + if (wsrep_on(trx->mysql_thd) && wsrep_thd_is_brute_force(trx->mysql_thd)) return; #endif /* WITH_WSREP */ if (srv_thread_concurrency) { @@ -1465,7 +1475,7 @@ innobase_srv_conc_exit_innodb( ut_ad(!sync_thread_levels_nonempty_trx(trx->has_search_latch)); #endif /* UNIV_SYNC_DEBUG */ #ifdef WITH_WSREP - if (wsrep_on(trx->mysql_thd) && + if (wsrep_on(trx->mysql_thd) && wsrep_thd_is_brute_force(trx->mysql_thd)) return; #endif /* WITH_WSREP */ @@ -1650,15 +1660,6 @@ innobase_release_temporary_latches( return(0); } -#ifdef WITH_WSREP -static int -wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, - my_bool signal); -static void -wsrep_fake_trx_id(handlerton* hton, THD *thd); -static int innobase_wsrep_set_checkpoint(handlerton* hton, const XID* xid); -static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid); -#endif /********************************************************************//** Increments innobase_active_counter and every INNOBASE_WAKE_INTERVALth time calls srv_active_wake_master_thread. This function should be used @@ -1783,6 +1784,13 @@ convert_error_code_to_mysql( case DB_OUT_OF_FILE_SPACE: return(HA_ERR_RECORD_FILE_FULL); + case DB_TEMP_FILE_WRITE_FAILURE: + my_error(ER_GET_ERRMSG, MYF(0), + DB_TEMP_FILE_WRITE_FAILURE, + ut_strerr(DB_TEMP_FILE_WRITE_FAILURE), + "InnoDB"); + return(HA_ERR_INTERNAL_ERROR); + case DB_TABLE_IN_FK_CHECK: return(HA_ERR_TABLE_IN_FK_CHECK); @@ -2513,6 +2521,62 @@ trx_is_started( return(trx->state != TRX_STATE_NOT_STARTED); } +/****************************************************************//** +Update log_checksum_algorithm_ptr with a pointer to the function corresponding +to a given checksum algorithm. */ +static +void +innodb_log_checksum_func_update( +/*============================*/ + ulint algorithm) /*!< in: algorithm */ +{ + switch (algorithm) { + case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB: + case SRV_CHECKSUM_ALGORITHM_INNODB: + log_checksum_algorithm_ptr=log_block_calc_checksum_innodb; + break; + case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32: + case SRV_CHECKSUM_ALGORITHM_CRC32: + log_checksum_algorithm_ptr=log_block_calc_checksum_crc32; + break; + case SRV_CHECKSUM_ALGORITHM_STRICT_NONE: + case SRV_CHECKSUM_ALGORITHM_NONE: + log_checksum_algorithm_ptr=log_block_calc_checksum_none; + break; + default: + ut_a(0); + } +} + +/****************************************************************//** +On update hook for the innodb_log_checksum_algorithm variable. */ +static +void +innodb_log_checksum_algorithm_update( +/*=================================*/ + THD* thd, /*!< in: thread handle */ + struct st_mysql_sys_var* var, /*!< in: pointer to + system variable */ + void* var_ptr,/*!< out: where the + formal string goes */ + const void* save) /*!< in: immediate result + from check function */ +{ + srv_checksum_algorithm_t algorithm; + + algorithm = (srv_checksum_algorithm_t) + (*static_cast<const ulong*>(save)); + + /* Make sure we are the only log user */ + mutex_enter(&log_sys->mutex); + + innodb_log_checksum_func_update(algorithm); + + srv_log_checksum_algorithm = algorithm; + + mutex_exit(&log_sys->mutex); +} + /*********************************************************************//** Copy table flags from MySQL's HA_CREATE_INFO into an InnoDB table object. Those flags are stored in .frm file and end up in the MySQL table object, @@ -2602,7 +2666,7 @@ ha_innobase::ha_innobase( HA_BINLOG_ROW_CAPABLE | HA_CAN_GEOMETRY | HA_PARTIAL_COLUMN_READ | HA_TABLE_SCAN_ON_INDEX | HA_CAN_FULLTEXT | - HA_CAN_FULLTEXT_EXT), + HA_CAN_FULLTEXT_EXT | HA_CAN_EXPORT), start_of_scan(0), num_write_row(0) {} @@ -3445,12 +3509,6 @@ mem_free_and_error: goto mem_free_and_error; } - /* Remember stopword table name supplied at startup */ - if (innobase_server_stopword_table) { - fts_server_stopword_table = - my_strdup(innobase_server_stopword_table, MYF(0)); - } - if (innobase_change_buffering) { ulint use; @@ -3604,6 +3662,8 @@ innobase_change_buffering_inited_ok: srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_NONE; } + innodb_log_checksum_func_update(srv_log_checksum_algorithm); + #ifdef HAVE_LARGE_PAGES if ((os_use_large_pages = (ibool) my_use_large_pages)) { os_large_page_size = (ulint) opt_large_page_size; @@ -6346,6 +6406,7 @@ innobase_mysql_fts_get_token( ut_a(cs); token->f_n_char = token->f_len = 0; + token->f_str = NULL; for (;;) { @@ -6553,8 +6614,7 @@ wsrep_store_key_val_for_row( { KEY* key_info = table->key_info + keynr; KEY_PART_INFO* key_part = key_info->key_part; - KEY_PART_INFO* end = - key_part + key_info->user_defined_key_parts; + KEY_PART_INFO* end = key_part + key_info->user_defined_key_parts; char* buff_start = buff; enum_field_types mysql_type; Field* field; @@ -6565,13 +6625,12 @@ wsrep_store_key_val_for_row( *key_is_null = TRUE; for (; key_part != end; key_part++) { - uchar sorted[REC_VERSION_56_MAX_INDEX_COL_LEN] = {'\0'}; ibool part_is_null = FALSE; if (key_part->null_bit) { - if (record[key_part->null_offset] - & key_part->null_bit) { + if (record[key_part->null_offset] & + key_part->null_bit) { *buff = 1; part_is_null = TRUE; } else { @@ -6620,7 +6679,8 @@ wsrep_store_key_val_for_row( true_len = (ulint) cs->cset->well_formed_len(cs, (const char *) data, (const char *) data + len, - (uint) (key_len / cs->mbmaxlen), + (uint) (key_len / + cs->mbmaxlen), &error); } @@ -6691,7 +6751,8 @@ wsrep_store_key_val_for_row( (const char *) blob_data, (const char *) blob_data + blob_len, - (uint) (key_len / cs->mbmaxlen), + (uint) (key_len / + cs->mbmaxlen), &error); } @@ -7999,83 +8060,6 @@ func_exit: DBUG_RETURN(error_result); } -static -int -wsrep_calc_row_hash( -/*================*/ - byte* digest, /*!< in/out: md5 sum */ - const uchar* row, /*!< in: row in MySQL format */ - TABLE* table, /*!< in: table in MySQL data - dictionary */ - row_prebuilt_t* prebuilt, /*!< in: InnoDB prebuilt struct */ - THD* thd) /*!< in: user thread */ -{ - Field* field; - enum_field_types field_mysql_type; - uint n_fields; - ulint len; - const byte* ptr; - ulint col_type; - uint i; - - void *ctx = wsrep_md5_init(); - - n_fields = table->s->fields; - - for (i = 0; i < n_fields; i++) { - byte null_byte=0; - byte true_byte=1; - - field = table->field[i]; - - ptr = (const byte*) row + get_field_offset(table, field); - len = field->pack_length(); - - field_mysql_type = field->type(); - - col_type = prebuilt->table->cols[i].mtype; - - switch (col_type) { - - case DATA_BLOB: - ptr = row_mysql_read_blob_ref(&len, ptr, len); - - break; - - case DATA_VARCHAR: - case DATA_BINARY: - case DATA_VARMYSQL: - if (field_mysql_type == MYSQL_TYPE_VARCHAR) { - /* This is a >= 5.0.3 type true VARCHAR where - the real payload data length is stored in - 1 or 2 bytes */ - - ptr = row_mysql_read_true_varchar( - &len, ptr, - (ulint) - (((Field_varstring*)field)->length_bytes)); - - } - - break; - default: - ; - } - - if (field->is_null_in_record(row)) { - wsrep_md5_update(ctx, (char*)&null_byte, 1); - } else { - wsrep_md5_update(ctx, (char*)&true_byte, 1); - wsrep_md5_update(ctx, (char*)ptr, len); - } - } - - wsrep_compute_md5_hash((char*)digest, ctx); - - return(0); -} -#endif /* WITH_WSREP */ - /**********************************************************************//** Checks which fields have changed in a row and stores information of them to an update vector. @@ -8351,6 +8335,87 @@ calc_row_difference( return(DB_SUCCESS); } +#ifdef WITH_WSREP +static +int +wsrep_calc_row_hash( +/*================*/ + byte* digest, /*!< in/out: md5 sum */ + const uchar* row, /*!< in: row in MySQL format */ + TABLE* table, /*!< in: table in MySQL data + dictionary */ + row_prebuilt_t* prebuilt, /*!< in: InnoDB prebuilt struct */ + THD* thd) /*!< in: user thread */ +{ + Field* field; + enum_field_types field_mysql_type; + uint n_fields; + ulint len; + const byte* ptr; + ulint col_type; + uint i; + + void *ctx = wsrep_md5_init(); + + n_fields = table->s->fields; + + for (i = 0; i < n_fields; i++) { + byte null_byte=0; + byte true_byte=1; + + field = table->field[i]; + + ptr = (const byte*) row + get_field_offset(table, field); + len = field->pack_length(); + + field_mysql_type = field->type(); + + col_type = prebuilt->table->cols[i].mtype; + + switch (col_type) { + + case DATA_BLOB: + ptr = row_mysql_read_blob_ref(&len, ptr, len); + + break; + + case DATA_VARCHAR: + case DATA_BINARY: + case DATA_VARMYSQL: + if (field_mysql_type == MYSQL_TYPE_VARCHAR) { + /* This is a >= 5.0.3 type true VARCHAR where + the real payload data length is stored in + 1 or 2 bytes */ + + ptr = row_mysql_read_true_varchar( + &len, ptr, + (ulint) + (((Field_varstring*)field)->length_bytes)); + + } + + break; + default: + ; + } + /* + if (field->null_ptr && + field_in_record_is_null(table, field, (char*) row)) { + */ + + if (field->is_null_in_record(row)) { + wsrep_md5_update(ctx, (char*)&null_byte, 1); + } else { + wsrep_md5_update(ctx, (char*)&true_byte, 1); + wsrep_md5_update(ctx, (char*)ptr, len); + } + } + + wsrep_compute_md5_hash((char*)digest, ctx); + + return(0); +} +#endif /* WITH_WSREP */ /**********************************************************************//** Updates a row given as a parameter to a new value. Note that we are given whole rows, not just the fields which are updated: this incurs some @@ -8505,6 +8570,7 @@ func_exit: DBUG_PRINT("wsrep", ("update row key")); if (wsrep_append_keys(user_thd, false, old_row, new_row)) { + WSREP_DEBUG("WSREP: UPDATE_ROW_KEY FAILED"); DBUG_PRINT("wsrep", ("row key failed")); err = HA_ERR_INTERNAL_ERROR; goto wsrep_error; @@ -9478,7 +9544,7 @@ ha_innobase::ft_init_ext( String* key) /* in: */ { trx_t* trx; - dict_table_t* table; + dict_table_t* ft_table; dberr_t error; byte* query = (byte*) key->ptr(); ulint query_len = key->length(); @@ -9528,17 +9594,24 @@ ha_innobase::ft_init_ext( ++trx->will_lock; } - table = prebuilt->table; + ft_table = prebuilt->table; /* Table does not have an FTS index */ - if (!table->fts || ib_vector_is_empty(table->fts->indexes)) { + if (!ft_table->fts || ib_vector_is_empty(ft_table->fts->indexes)) { my_error(ER_TABLE_HAS_NO_FT, MYF(0)); return(NULL); } + /* If tablespace is discarded, we should return here */ + if (dict_table_is_discarded(ft_table)) { + my_error(ER_NO_SUCH_TABLE, MYF(0), table->s->db.str, + table->s->table_name.str); + return(NULL); + } + if (keynr == NO_SUCH_KEY) { /* FIXME: Investigate the NO_SUCH_KEY usage */ - index = (dict_index_t*) ib_vector_getp(table->fts->indexes, 0); + index = (dict_index_t*) ib_vector_getp(ft_table->fts->indexes, 0); } else { index = innobase_get_index(keynr); } @@ -9548,10 +9621,10 @@ ha_innobase::ft_init_ext( return(NULL); } - if (!(table->fts->fts_status & ADDED_TABLE_SYNCED)) { - fts_init_index(table, FALSE); + if (!(ft_table->fts->fts_status & ADDED_TABLE_SYNCED)) { + fts_init_index(ft_table, FALSE); - table->fts->fts_status |= ADDED_TABLE_SYNCED; + ft_table->fts->fts_status |= ADDED_TABLE_SYNCED; } error = fts_query(trx, index, flags, query, query_len, &result); @@ -9774,6 +9847,7 @@ ha_innobase::ft_end() extern dict_index_t* wsrep_dict_foreign_find_index( dict_table_t* table, + const char** col_names, const char** columns, ulint n_cols, dict_index_t* types_idx, @@ -9791,12 +9865,12 @@ wsrep_append_foreign_key( ibool referenced, /*!<in: is check for referenced table */ ibool shared) /*!<in: is shared access */ { - THD* thd = (THD*)trx->mysql_thd; - int rcode = 0; - char cache_key[513] = {'\0'}; - int cache_key_len; - bool const copy = true; ut_a(trx); + THD* thd = (THD*)trx->mysql_thd; + ulint rcode = DB_SUCCESS; + char cache_key[513] = {'\0'}; + int cache_key_len; + bool const copy = true; if (!wsrep_on(trx->mysql_thd) || wsrep_thd_exec_mode(thd) != LOCAL_STATE) @@ -9889,7 +9963,7 @@ wsrep_append_foreign_key( wsrep_protocol_version > 1); if (rcode != DB_SUCCESS) { WSREP_ERROR( - "FK key set failed: %d (%lu %lu), index: %s %s, %s", + "FK key set failed: %lu (%lu %lu), index: %s %s, %s", rcode, referenced, shared, (index && index->name) ? index->name : "void index", @@ -9905,7 +9979,6 @@ wsrep_append_foreign_key( foreign->foreign_table->name) : foreign->foreign_table->name, sizeof(cache_key) - 1); cache_key_len = strlen(cache_key); -// #define WSREP_DEBUG_PRINT #ifdef WSREP_DEBUG_PRINT ulint j; fprintf(stderr, "FK parent key, table: %s %s len: %lu ", @@ -9931,31 +10004,30 @@ wsrep_append_foreign_key( cache_key_len + 1, (const uchar*)key, len+1, wkey_part, - &wkey.key_parts_num)) { + (size_t*)&wkey.key_parts_num)) { WSREP_WARN("key prepare failed for cascaded FK: %s", (wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void"); return DB_ERROR; } - rcode = wsrep->append_key( + rcode = (int)wsrep->append_key( wsrep, wsrep_ws_handle(thd, trx), &wkey, 1, shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE, - copy); + copy); if (rcode) { - DBUG_PRINT("wsrep", ("row key failed: %d", rcode)); - WSREP_ERROR("Appending cascaded fk row key failed: %s, %d", + DBUG_PRINT("wsrep", ("row key failed: %lu", rcode)); + WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu", (wsrep_thd_query(thd)) ? - wsrep_thd_query(thd) : "void", rcode); + wsrep_thd_query(thd) : "void", rcode); return DB_ERROR; } return DB_SUCCESS; } -#ifdef WITH_WSREP static int wsrep_append_key( /*==================*/ @@ -9981,26 +10053,26 @@ wsrep_append_key( fprintf(stderr, "\n"); #endif wsrep_buf_t wkey_part[3]; - wsrep_key_t wkey = {wkey_part, 3}; + wsrep_key_t wkey = {wkey_part, 3}; if (!wsrep_prepare_key_for_innodb( (const uchar*)table_share->table_cache_key.str, table_share->table_cache_key.length, (const uchar*)key, key_len, wkey_part, - &wkey.key_parts_num)) { + (size_t*)&wkey.key_parts_num)) { WSREP_WARN("key prepare failed for: %s", (wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void"); - DBUG_RETURN(-1); + DBUG_RETURN(HA_ERR_INTERNAL_ERROR); } - int rcode = wsrep->append_key( - wsrep, - wsrep_ws_handle(thd, trx), - &wkey, - 1, - shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE, - copy); + int rcode = (int)wsrep->append_key( + wsrep, + wsrep_ws_handle(thd, trx), + &wkey, + 1, + shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE, + copy); if (rcode) { DBUG_PRINT("wsrep", ("row key failed: %d", rcode)); WSREP_WARN("Appending row key failed: %s, %d", @@ -10911,7 +10983,7 @@ innobase_fts_load_stopword( THD* thd) /*!< in: current thread */ { return(fts_load_stopword(table, trx, - fts_server_stopword_table, + innobase_server_stopword_table, THDVAR(thd, ft_user_stopword_table), THDVAR(thd, ft_enable_stopword), FALSE)); } @@ -12217,6 +12289,10 @@ ha_innobase::records_in_range( /* There exists possibility of not being able to find requested index due to inconsistency between MySQL and InoDB dictionary info. Necessary message should have been printed in innobase_get_index() */ + if (dict_table_is_discarded(prebuilt->table)) { + n_rows = HA_POS_ERROR; + goto func_exit; + } if (UNIV_UNLIKELY(!index)) { n_rows = HA_POS_ERROR; goto func_exit; @@ -13070,13 +13146,12 @@ int ha_innobase::check( /*===============*/ THD* thd, /*!< in: user thread handle */ - HA_CHECK_OPT* check_opt) /*!< in: check options, currently - ignored */ + HA_CHECK_OPT* check_opt) /*!< in: check options */ { dict_index_t* index; ulint n_rows; ulint n_rows_in_table = ULINT_UNDEFINED; - ibool is_ok = TRUE; + bool is_ok = true; ulint old_isolation_level; ibool table_corrupted; @@ -13132,35 +13207,49 @@ ha_innobase::check( do additional check */ prebuilt->table->corrupted = FALSE; - /* Enlarge the fatal lock wait timeout during CHECK TABLE. */ - os_increment_counter_by_amount( - server_mutex, - srv_fatal_semaphore_wait_threshold, - SRV_SEMAPHORE_WAIT_EXTENSION); - for (index = dict_table_get_first_index(prebuilt->table); index != NULL; index = dict_table_get_next_index(index)) { char index_name[MAX_FULL_NAME_LEN + 1]; - /* If this is an index being created or dropped, break */ + /* If this is an index being created or dropped, skip */ if (*index->name == TEMP_INDEX_PREFIX) { - break; - } else if (!btr_validate_index(index, prebuilt->trx)) { - is_ok = FALSE; - - innobase_format_name( - index_name, sizeof index_name, - index->name, TRUE); - - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_NOT_KEYFILE, - "InnoDB: The B-tree of" - " index %s is corrupted.", - index_name); continue; } + if (!(check_opt->flags & T_QUICK)) { + /* Enlarge the fatal lock wait timeout during + CHECK TABLE. */ + os_increment_counter_by_amount( + server_mutex, + srv_fatal_semaphore_wait_threshold, + SRV_SEMAPHORE_WAIT_EXTENSION); + bool valid = btr_validate_index(index, prebuilt->trx); + + /* Restore the fatal lock wait timeout after + CHECK TABLE. */ + os_decrement_counter_by_amount( + server_mutex, + srv_fatal_semaphore_wait_threshold, + SRV_SEMAPHORE_WAIT_EXTENSION); + + if (!valid) { + is_ok = false; + + innobase_format_name( + index_name, sizeof index_name, + index->name, TRUE); + push_warning_printf( + thd, + Sql_condition::WARN_LEVEL_WARN, + ER_NOT_KEYFILE, + "InnoDB: The B-tree of" + " index %s is corrupted.", + index_name); + continue; + } + } + /* Instead of invoking change_active_index(), set up a dummy template for non-locking reads, disabling access to the clustered index. */ @@ -13182,7 +13271,7 @@ ha_innobase::check( "InnoDB: Index %s is marked as" " corrupted", index_name); - is_ok = FALSE; + is_ok = false; } else { push_warning_printf( thd, @@ -13215,7 +13304,7 @@ ha_innobase::check( "InnoDB: The B-tree of" " index %s is corrupted.", index_name); - is_ok = FALSE; + is_ok = false; dict_set_corrupted( index, prebuilt->trx, "CHECK TABLE-check index"); } @@ -13241,7 +13330,7 @@ ha_innobase::check( index->name, (ulong) n_rows, (ulong) n_rows_in_table); - is_ok = FALSE; + is_ok = false; dict_set_corrupted( index, prebuilt->trx, "CHECK TABLE; Wrong count"); @@ -13264,21 +13353,17 @@ ha_innobase::check( /* Restore the original isolation level */ prebuilt->trx->isolation_level = old_isolation_level; - /* We validate also the whole adaptive hash index for all tables - at every CHECK TABLE */ + /* We validate the whole adaptive hash index for all tables + at every CHECK TABLE only when QUICK flag is not present. */ - if (!btr_search_validate()) { +#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG + if (!(check_opt->flags & T_QUICK) && !btr_search_validate()) { push_warning(thd, Sql_condition::WARN_LEVEL_WARN, ER_NOT_KEYFILE, "InnoDB: The adaptive hash index is corrupted."); - is_ok = FALSE; + is_ok = false; } - - /* Restore the fatal lock wait timeout after CHECK TABLE. */ - os_decrement_counter_by_amount( - server_mutex, - srv_fatal_semaphore_wait_threshold, - SRV_SEMAPHORE_WAIT_EXTENSION); +#endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */ prebuilt->trx->op_info = ""; if (thd_kill_level(user_thd)) { @@ -14278,7 +14363,7 @@ innodb_show_status( const long MAX_STATUS_SIZE = 1048576; ulint trx_list_start = ULINT_UNDEFINED; ulint trx_list_end = ULINT_UNDEFINED; - bool res; + bool ret_val; DBUG_ENTER("innodb_show_status"); DBUG_ASSERT(hton == innodb_hton_ptr); @@ -14355,13 +14440,13 @@ innodb_show_status( mutex_exit(&srv_monitor_file_mutex); - res= stat_print(thd, innobase_hton_name, - (uint) strlen(innobase_hton_name), - STRING_WITH_LEN(""), str, flen); + ret_val= stat_print(thd, innobase_hton_name, + (uint) strlen(innobase_hton_name), + STRING_WITH_LEN(""), str, flen); my_free(str); - DBUG_RETURN(res); + DBUG_RETURN(ret_val); } /************************************************************************//** @@ -16109,44 +16194,6 @@ innodb_stopword_table_validate( return(ret); } -/****************************************************************//** -Update global variable fts_server_stopword_table with the "saved" -stopword table name value. This function is registered as a callback -with MySQL. */ -static -void -innodb_stopword_table_update( -/*=========================*/ - THD* thd, /*!< in: thread handle */ - struct st_mysql_sys_var* var, /*!< in: pointer to - system variable */ - void* var_ptr,/*!< out: where the - formal string goes */ - const void* save) /*!< in: immediate result - from check function */ -{ - const char* stopword_table_name; - char* old; - - ut_a(save != NULL); - ut_a(var_ptr != NULL); - - stopword_table_name = *static_cast<const char*const*>(save); - old = *(char**) var_ptr; - - if (stopword_table_name) { - *(char**) var_ptr = my_strdup(stopword_table_name, MYF(0)); - } else { - *(char**) var_ptr = NULL; - } - - if (old) { - my_free(old); - } - - fts_server_stopword_table = *(char**) var_ptr; -} - /*************************************************************//** Check whether valid argument given to "innodb_fts_internal_tbl_name" This function is registered as a callback with MySQL. @@ -17049,51 +17096,6 @@ innodb_reset_all_monitor_update( } /****************************************************************//** -Update log_checksum_algorithm_ptr with a pointer to the function corresponding -to a given checksum algorithm. */ -static -void -innodb_log_checksum_algorithm_update( -/*=================================*/ - THD* thd, /*!< in: thread handle */ - struct st_mysql_sys_var* var, /*!< in: pointer to - system variable */ - void* var_ptr,/*!< out: where the - formal string goes */ - const void* save) /*!< in: immediate result - from check function */ -{ - srv_checksum_algorithm_t algorithm; - - algorithm = (srv_checksum_algorithm_t) - (*static_cast<const ulong*>(save)); - - /* Make sure we are the only log user */ - mutex_enter(&log_sys->mutex); - - switch (algorithm) { - case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB: - case SRV_CHECKSUM_ALGORITHM_INNODB: - log_checksum_algorithm_ptr=log_block_calc_checksum_innodb; - break; - case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32: - case SRV_CHECKSUM_ALGORITHM_CRC32: - log_checksum_algorithm_ptr=log_block_calc_checksum_crc32; - break; - case SRV_CHECKSUM_ALGORITHM_STRICT_NONE: - case SRV_CHECKSUM_ALGORITHM_NONE: - log_checksum_algorithm_ptr=log_block_calc_checksum_none; - break; - default: - ut_a(0); - } - - srv_log_checksum_algorithm = algorithm; - - mutex_exit(&log_sys->mutex); -} - -/****************************************************************//** Parse and enable InnoDB monitor counters during server startup. User can list the monitor counters/groups to be enable by specifying "loose-innodb_monitor_enable=monitor_name1;monitor_name2..." @@ -18224,10 +18226,10 @@ static MYSQL_SYSVAR_STR(file_format_max, innobase_file_format_max, innodb_file_format_max_update, "Antelope"); static MYSQL_SYSVAR_STR(ft_server_stopword_table, innobase_server_stopword_table, - PLUGIN_VAR_OPCMDARG, + PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_MEMALLOC, "The user supplied stopword table name.", innodb_stopword_table_validate, - innodb_stopword_table_update, + NULL, NULL); static MYSQL_SYSVAR_UINT(flush_log_at_timeout, srv_flush_log_at_timeout, @@ -19543,7 +19545,6 @@ ib_senderrf( ib_uint32_t code, /*!< MySQL error code */ ...) /*!< Args */ { - char* str; va_list args; const char* format = innobase_get_err_msg(code); @@ -19557,44 +19558,24 @@ ib_senderrf( va_start(args, code); -#ifdef __WIN__ - int size = _vscprintf(format, args) + 1; - str = static_cast<char*>(malloc(size)); - str[size - 1] = 0x0; - vsnprintf(str, size, format, args); -#elif HAVE_VASPRINTF - (void) vasprintf(&str, format, args); -#else - /* Use a fixed length string. */ - str = static_cast<char*>(malloc(BUFSIZ)); - my_vsnprintf(str, BUFSIZ, format, args); -#endif /* __WIN__ */ - - Sql_condition::enum_warning_level l; - - l = Sql_condition::WARN_LEVEL_NOTE; + myf l; switch(level) { case IB_LOG_LEVEL_INFO: + l = ME_JUST_INFO; break; case IB_LOG_LEVEL_WARN: - l = Sql_condition::WARN_LEVEL_WARN; + l = ME_JUST_WARNING; break; case IB_LOG_LEVEL_ERROR: - /* We can't use push_warning_printf(), it is a hard error. */ - my_printf_error(code, "%s", MYF(0), str); - break; case IB_LOG_LEVEL_FATAL: - l = Sql_condition::WARN_LEVEL_END; + l = 0; break; } - if (level != IB_LOG_LEVEL_ERROR) { - push_warning_printf(thd, l, code, "InnoDB: %s", str); - } + my_printv_error(code, format, MYF(l), args); va_end(args); - free(str); if (level == IB_LOG_LEVEL_FATAL) { ut_error; diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc index d0f332513b4..0f735c35462 100644 --- a/storage/xtradb/handler/handler0alter.cc +++ b/storage/xtradb/handler/handler0alter.cc @@ -130,6 +130,12 @@ my_error_innodb( case DB_OUT_OF_FILE_SPACE: my_error(ER_RECORD_FILE_FULL, MYF(0), table); break; + case DB_TEMP_FILE_WRITE_FAILURE: + my_error(ER_GET_ERRMSG, MYF(0), + DB_TEMP_FILE_WRITE_FAILURE, + ut_strerr(DB_TEMP_FILE_WRITE_FAILURE), + "InnoDB"); + break; case DB_TOO_BIG_INDEX_COL: my_error(ER_INDEX_COLUMN_TOO_LONG, MYF(0), DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(flags)); @@ -3979,7 +3985,8 @@ oom: DEBUG_SYNC_C("inplace_after_index_build"); DBUG_EXECUTE_IF("create_index_fail", - error = DB_DUPLICATE_KEY;); + error = DB_DUPLICATE_KEY; + prebuilt->trx->error_key_num = ULINT_UNDEFINED;); /* After an error, remove all those index definitions from the dictionary which were defined. */ @@ -5741,6 +5748,9 @@ foreign_fail: if (index->type & DICT_FTS) { DBUG_ASSERT(index->type == DICT_FTS); + /* We reset DICT_TF2_FTS here because the bit + is left unset when a drop proceeds the add. */ + DICT_TF2_FLAG_SET(ctx->new_table, DICT_TF2_FTS); fts_add_index(index, ctx->new_table); add_fts = true; } diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc index 98a7887bc07..5603f8cfbe4 100644 --- a/storage/xtradb/handler/i_s.cc +++ b/storage/xtradb/handler/i_s.cc @@ -3223,12 +3223,22 @@ i_s_fts_index_cache_fill_one_index( { TABLE* table = (TABLE*) tables->table; Field** fields; + CHARSET_INFO* index_charset; const ib_rbt_node_t* rbt_node; + fts_string_t conv_str; + uint dummy_errors; + char* word_str; DBUG_ENTER("i_s_fts_index_cache_fill_one_index"); fields = table->field; + index_charset = index_cache->charset; + conv_str.f_len = system_charset_info->mbmaxlen + * FTS_MAX_WORD_LEN_IN_CHAR; + conv_str.f_str = static_cast<byte*>(ut_malloc(conv_str.f_len)); + conv_str.f_n_char = 0; + /* Go through each word in the index cache */ for (rbt_node = rbt_first(index_cache->words); rbt_node; @@ -3239,6 +3249,20 @@ i_s_fts_index_cache_fill_one_index( word = rbt_value(fts_tokenizer_word_t, rbt_node); + /* Convert word from index charset to system_charset_info */ + if (index_charset->cset != system_charset_info->cset) { + conv_str.f_n_char = my_convert( + reinterpret_cast<char*>(conv_str.f_str), + conv_str.f_len, system_charset_info, + reinterpret_cast<char*>(word->text.f_str), + word->text.f_len, index_charset, &dummy_errors); + ut_ad(conv_str.f_n_char <= conv_str.f_len); + conv_str.f_str[conv_str.f_n_char] = 0; + word_str = reinterpret_cast<char*>(conv_str.f_str); + } else { + word_str = reinterpret_cast<char*>(word->text.f_str); + } + /* Decrypt the ilist, and display Dod ID and word position */ for (ulint i = 0; i < ib_vector_size(word->nodes); i++) { fts_node_t* node; @@ -3261,8 +3285,7 @@ i_s_fts_index_cache_fill_one_index( OK(field_store_string( fields[I_S_FTS_WORD], - reinterpret_cast<const char*> - (word->text.f_str))); + word_str)); OK(fields[I_S_FTS_FIRST_DOC_ID]->store( (longlong) node->first_doc_id, @@ -3292,6 +3315,8 @@ i_s_fts_index_cache_fill_one_index( } } + ut_free(conv_str.f_str); + DBUG_RETURN(0); } /*******************************************************************//** @@ -3415,31 +3440,38 @@ Go through a FTS index auxiliary table, fetch its rows and fill FTS word cache structure. @return DB_SUCCESS on success, otherwise error code */ static -ulint +dberr_t i_s_fts_index_table_fill_selected( /*==============================*/ dict_index_t* index, /*!< in: FTS index */ ib_vector_t* words, /*!< in/out: vector to hold fetched words */ - ulint selected) /*!< in: selected FTS index */ + ulint selected, /*!< in: selected FTS index */ + fts_string_t* word) /*!< in: word to select */ { pars_info_t* info; fts_table_t fts_table; trx_t* trx; que_t* graph; - ulint error; + dberr_t error; fts_fetch_t fetch; info = pars_info_create(); fetch.read_arg = words; fetch.read_record = fts_optimize_index_fetch_node; + fetch.total_memory = 0; + + DBUG_EXECUTE_IF("fts_instrument_result_cache_limit", + fts_result_cache_limit = 8192; + ); trx = trx_allocate_for_background(); trx->op_info = "fetching FTS index nodes"; pars_info_bind_function(info, "my_func", fetch.read_record, &fetch); + pars_info_bind_varchar_literal(info, "word", word->f_str, word->f_len); FTS_INIT_INDEX_TABLE(&fts_table, fts_get_suffix(selected), FTS_INDEX_TABLE, index); @@ -3450,7 +3482,7 @@ i_s_fts_index_table_fill_selected( "DECLARE CURSOR c IS" " SELECT word, doc_count, first_doc_id, last_doc_id, " "ilist\n" - " FROM %s;\n" + " FROM %s WHERE word >= :word;\n" "BEGIN\n" "\n" "OPEN c;\n" @@ -3481,7 +3513,7 @@ i_s_fts_index_table_fill_selected( trx->error_state = DB_SUCCESS; } else { - fprintf(stderr, " InnoDB: Error: %lu " + fprintf(stderr, " InnoDB: Error: %d " "while reading FTS index.\n", error); break; } @@ -3494,54 +3526,94 @@ i_s_fts_index_table_fill_selected( trx_free_for_background(trx); + if (fetch.total_memory >= fts_result_cache_limit) { + error = DB_FTS_EXCEED_RESULT_CACHE_LIMIT; + } + return(error); } /*******************************************************************//** -Go through a FTS index and its auxiliary tables, fetch rows in each table -and fill INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE. +Free words. */ +static +void +i_s_fts_index_table_free_one_fetch( +/*===============================*/ + ib_vector_t* words) /*!< in: words fetched */ +{ + for (ulint i = 0; i < ib_vector_size(words); i++) { + fts_word_t* word; + + word = static_cast<fts_word_t*>(ib_vector_get(words, i)); + + for (ulint j = 0; j < ib_vector_size(word->nodes); j++) { + fts_node_t* node; + + node = static_cast<fts_node_t*> (ib_vector_get( + word->nodes, j)); + ut_free(node->ilist); + } + + fts_word_free(word); + } + + ib_vector_reset(words); +} + +/*******************************************************************//** +Go through words, fill INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE. @return 0 on success, 1 on failure */ static int -i_s_fts_index_table_fill_one_index( +i_s_fts_index_table_fill_one_fetch( /*===============================*/ - dict_index_t* index, /*!< in: FTS index */ + CHARSET_INFO* index_charset, /*!< in: FTS index charset */ THD* thd, /*!< in: thread */ - TABLE_LIST* tables) /*!< in/out: tables to fill */ + TABLE_LIST* tables, /*!< in/out: tables to fill */ + ib_vector_t* words, /*!< in: words fetched */ + fts_string_t* conv_str, /*!< in: string for conversion*/ + bool has_more) /*!< in: has more to fetch */ { TABLE* table = (TABLE*) tables->table; Field** fields; - ib_vector_t* words; - mem_heap_t* heap; - ulint num_row_fill; - - DBUG_ENTER("i_s_fts_index_cache_fill_one_index"); - DBUG_ASSERT(!dict_index_is_online_ddl(index)); - - heap = mem_heap_create(1024); + uint dummy_errors; + char* word_str; + ulint words_size; + int ret = 0; - words = ib_vector_create(ib_heap_allocator_create(heap), - sizeof(fts_word_t), 256); + DBUG_ENTER("i_s_fts_index_table_fill_one_fetch"); fields = table->field; - /* Iterate through each auxiliary table as described in - fts_index_selector */ - for (ulint selected = 0; fts_index_selector[selected].value; - selected++) { - i_s_fts_index_table_fill_selected(index, words, selected); + words_size = ib_vector_size(words); + if (has_more) { + /* the last word is not fetched completely. */ + ut_ad(words_size > 1); + words_size -= 1; } - num_row_fill = ut_min(ib_vector_size(words), 500000); - /* Go through each word in the index cache */ - for (ulint i = 0; i < num_row_fill; i++) { + for (ulint i = 0; i < words_size; i++) { fts_word_t* word; - word = (fts_word_t*) ib_vector_get(words, i); + word = static_cast<fts_word_t*>(ib_vector_get(words, i)); word->text.f_str[word->text.f_len] = 0; + /* Convert word from index charset to system_charset_info */ + if (index_charset->cset != system_charset_info->cset) { + conv_str->f_n_char = my_convert( + reinterpret_cast<char*>(conv_str->f_str), + conv_str->f_len, system_charset_info, + reinterpret_cast<char*>(word->text.f_str), + word->text.f_len, index_charset, &dummy_errors); + ut_ad(conv_str->f_n_char <= conv_str->f_len); + conv_str->f_str[conv_str->f_n_char] = 0; + word_str = reinterpret_cast<char*>(conv_str->f_str); + } else { + word_str = reinterpret_cast<char*>(word->text.f_str); + } + /* Decrypt the ilist, and display Dod ID and word position */ for (ulint i = 0; i < ib_vector_size(word->nodes); i++) { fts_node_t* node; @@ -3565,8 +3637,7 @@ i_s_fts_index_table_fill_one_index( OK(field_store_string( fields[I_S_FTS_WORD], - reinterpret_cast<const char*> - (word->text.f_str))); + word_str)); OK(fields[I_S_FTS_FIRST_DOC_ID]->store( (longlong) node->first_doc_id, @@ -3596,9 +3667,95 @@ i_s_fts_index_table_fill_one_index( } } + i_s_fts_index_table_free_one_fetch(words); + + DBUG_RETURN(ret); +} + +/*******************************************************************//** +Go through a FTS index and its auxiliary tables, fetch rows in each table +and fill INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE. +@return 0 on success, 1 on failure */ +static +int +i_s_fts_index_table_fill_one_index( +/*===============================*/ + dict_index_t* index, /*!< in: FTS index */ + THD* thd, /*!< in: thread */ + TABLE_LIST* tables) /*!< in/out: tables to fill */ +{ + ib_vector_t* words; + mem_heap_t* heap; + fts_string_t word; + CHARSET_INFO* index_charset; + fts_string_t conv_str; + dberr_t error; + int ret = 0; + + DBUG_ENTER("i_s_fts_index_table_fill_one_index"); + DBUG_ASSERT(!dict_index_is_online_ddl(index)); + + heap = mem_heap_create(1024); + + words = ib_vector_create(ib_heap_allocator_create(heap), + sizeof(fts_word_t), 256); + + word.f_str = NULL; + word.f_len = 0; + word.f_n_char = 0; + + index_charset = fts_index_get_charset(index); + conv_str.f_len = system_charset_info->mbmaxlen + * FTS_MAX_WORD_LEN_IN_CHAR; + conv_str.f_str = static_cast<byte*>(ut_malloc(conv_str.f_len)); + conv_str.f_n_char = 0; + + /* Iterate through each auxiliary table as described in + fts_index_selector */ + for (ulint selected = 0; fts_index_selector[selected].value; + selected++) { + bool has_more = false; + + do { + /* Fetch from index */ + error = i_s_fts_index_table_fill_selected( + index, words, selected, &word); + + if (error == DB_SUCCESS) { + has_more = false; + } else if (error == DB_FTS_EXCEED_RESULT_CACHE_LIMIT) { + has_more = true; + } else { + i_s_fts_index_table_free_one_fetch(words); + ret = 1; + goto func_exit; + } + + if (has_more) { + fts_word_t* last_word; + + /* Prepare start point for next fetch */ + last_word = static_cast<fts_word_t*>(ib_vector_last(words)); + ut_ad(last_word != NULL); + fts_utf8_string_dup(&word, &last_word->text, heap); + } + + /* Fill into tables */ + ret = i_s_fts_index_table_fill_one_fetch( + index_charset, thd, tables, words, &conv_str, has_more); + + if (ret != 0) { + i_s_fts_index_table_free_one_fetch(words); + goto func_exit; + } + } while (has_more); + } + +func_exit: + ut_free(conv_str.f_str); mem_heap_free(heap); - DBUG_RETURN(0); + DBUG_RETURN(ret); } /*******************************************************************//** Fill the dynamic table INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE diff --git a/storage/xtradb/handler/xtradb_i_s.cc b/storage/xtradb/handler/xtradb_i_s.cc index 77050c0b7f8..7078ab752c2 100644 --- a/storage/xtradb/handler/xtradb_i_s.cc +++ b/storage/xtradb/handler/xtradb_i_s.cc @@ -552,6 +552,8 @@ i_s_xtradb_rseg_fill( for(int i=0; i < TRX_SYS_N_RSEGS; i++) { rseg = trx_sys->rseg_array[i]; + if (!rseg) + continue; table->field[0]->store(rseg->id); table->field[1]->store(rseg->space); diff --git a/storage/xtradb/ibuf/ibuf0ibuf.cc b/storage/xtradb/ibuf/ibuf0ibuf.cc index 876906fc9ce..2964fa99c8a 100644 --- a/storage/xtradb/ibuf/ibuf0ibuf.cc +++ b/storage/xtradb/ibuf/ibuf0ibuf.cc @@ -2792,6 +2792,10 @@ ibuf_merge( if (ibuf->empty && !srv_shutdown_state) { return(0); +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + } else if (ibuf_debug) { + return(0); +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ } else if (table_id == 0) { return(ibuf_merge_pages(n_pages, sync)); } else if ((table = ibuf_get_table(table_id)) == 0) { @@ -4181,6 +4185,22 @@ dump: rec = page_cur_get_rec(&page_cur); row_upd_rec_in_place(rec, index, offsets, update, page_zip); + + /* Log the update in place operation. During recovery + MLOG_COMP_REC_UPDATE_IN_PLACE/MLOG_REC_UPDATE_IN_PLACE + expects trx_id, roll_ptr for secondary indexes. So we + just write dummy trx_id(0), roll_ptr(0) */ + btr_cur_update_in_place_log(BTR_KEEP_SYS_FLAG, rec, + index, update, 0, 0, mtr); + DBUG_EXECUTE_IF( + "crash_after_log_ibuf_upd_inplace", + log_buffer_flush_to_disk(); + ib_logf(IB_LOG_LEVEL_INFO, + "Wrote log record for ibuf update in " + "place operation"); + DBUG_SUICIDE(); + ); + goto updated_in_place; } @@ -4434,14 +4454,6 @@ ibuf_restore_pos( fflush(stderr); ibuf_btr_pcur_commit_specify_mtr(pcur, mtr); - - fputs("InnoDB: Validating insert buffer tree:\n", stderr); - if (!btr_validate_index(ibuf->index, 0)) { - ut_error; - } - - fprintf(stderr, "InnoDB: ibuf tree ok\n"); - fflush(stderr); ut_ad(0); } diff --git a/storage/xtradb/include/api0api.h b/storage/xtradb/include/api0api.h index 1d6aaab60bc..c294e3f34d5 100644 --- a/storage/xtradb/include/api0api.h +++ b/storage/xtradb/include/api0api.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2013, 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 @@ -460,6 +460,10 @@ ib_trx_start( /*=========*/ ib_trx_t ib_trx, /*!< in: transaction to restart */ ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ + ib_bool_t read_write, /*!< in: true if read write + transaction */ + ib_bool_t auto_commit, /*!< in: auto commit after each + single DML */ void* thd); /*!< in: THD */ /*****************************************************************//** @@ -470,7 +474,11 @@ put the transaction in the active state. ib_trx_t ib_trx_begin( /*=========*/ - ib_trx_level_t ib_trx_level); /*!< in: trx isolation level */ + ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ + ib_bool_t read_write, /*!< in: true if read write + transaction */ + ib_bool_t auto_commit); /*!< in: auto commit after each + single DML */ /*****************************************************************//** Query the transaction's state. This function can be used to check for @@ -669,7 +677,9 @@ ib_err_t ib_cursor_read_row( /*===============*/ ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_tpl_t ib_tpl); /*!< out: read cols into this tuple */ + ib_tpl_t ib_tpl, /*!< out: read cols into this tuple */ + void** row_buf, /*!< in/out: row buffer */ + ib_ulint_t* row_len); /*!< in/out: row buffer len */ /*****************************************************************//** Move cursor to the first record in the table. diff --git a/storage/xtradb/include/btr0cur.h b/storage/xtradb/include/btr0cur.h index cf7c1a24139..8a35cb1a3da 100644 --- a/storage/xtradb/include/btr0cur.h +++ b/storage/xtradb/include/btr0cur.h @@ -332,6 +332,20 @@ btr_cur_update_in_place( mtr_commit(mtr) before latching any further pages */ __attribute__((warn_unused_result, nonnull)); +/***********************************************************//** +Writes a redo log record of updating a record in-place. */ +UNIV_INTERN +void +btr_cur_update_in_place_log( +/*========================*/ + ulint flags, /*!< in: flags */ + const rec_t* rec, /*!< in: record */ + dict_index_t* index, /*!< in: index of the record */ + const upd_t* update, /*!< in: update vector */ + trx_id_t trx_id, /*!< in: transaction id */ + roll_ptr_t roll_ptr, /*!< in: roll ptr */ + mtr_t* mtr) /*!< in: mtr */ + __attribute__((nonnull)); /*************************************************************//** Tries to update a record on a page in an index tree. It is assumed that mtr holds an x-latch on the page. The operation does not succeed if there is too diff --git a/storage/xtradb/include/btr0pcur.h b/storage/xtradb/include/btr0pcur.h index 973fae382ab..fc008cdd185 100644 --- a/storage/xtradb/include/btr0pcur.h +++ b/storage/xtradb/include/btr0pcur.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -460,6 +460,27 @@ btr_pcur_move_to_prev_on_page( /*==========================*/ btr_pcur_t* cursor);/*!< in/out: persistent cursor */ +/** Position state of persistent B-tree cursor. */ +enum pcur_pos_t { + /** The persistent cursor is not positioned. */ + BTR_PCUR_NOT_POSITIONED = 0, + /** The persistent cursor was previously positioned. + TODO: currently, the state can be BTR_PCUR_IS_POSITIONED, + though it really should be BTR_PCUR_WAS_POSITIONED, + because we have no obligation to commit the cursor with + mtr; similarly latch_mode may be out of date. This can + lead to problems if btr_pcur is not used the right way; + all current code should be ok. */ + BTR_PCUR_WAS_POSITIONED, + /** The persistent cursor is positioned by optimistic get to the same + record as it was positioned at. Not used for rel_pos == BTR_PCUR_ON. + It may need adjustment depending on previous/current search direction + and rel_pos. */ + BTR_PCUR_IS_POSITIONED_OPTIMISTIC, + /** The persistent cursor is positioned by index search. + Or optimistic get for rel_pos == BTR_PCUR_ON. */ + BTR_PCUR_IS_POSITIONED +}; /* The persistent B-tree cursor structure. This is used mainly for SQL selects, updates, and deletes. */ @@ -493,10 +514,8 @@ struct btr_pcur_t{ ib_uint64_t modify_clock; /*!< the modify clock value of the buffer block when the cursor position was stored */ - ulint pos_state; /*!< see TODO note below! - BTR_PCUR_IS_POSITIONED, - BTR_PCUR_WAS_POSITIONED, - BTR_PCUR_NOT_POSITIONED */ + enum pcur_pos_t pos_state; /*!< btr_pcur_store_position() and + btr_pcur_restore_position() state. */ ulint search_mode; /*!< PAGE_CUR_G, ... */ trx_t* trx_if_known; /*!< the transaction, if we know it; otherwise this field is not defined; @@ -512,21 +531,6 @@ struct btr_pcur_t{ is not NULL */ }; -#define BTR_PCUR_IS_POSITIONED 1997660512 /* TODO: currently, the state - can be BTR_PCUR_IS_POSITIONED, - though it really should be - BTR_PCUR_WAS_POSITIONED, - because we have no obligation - to commit the cursor with - mtr; similarly latch_mode may - be out of date. This can - lead to problems if btr_pcur - is not used the right way; - all current code should be - ok. */ -#define BTR_PCUR_WAS_POSITIONED 1187549791 -#define BTR_PCUR_NOT_POSITIONED 1328997689 - #define BTR_PCUR_OLD_STORED 908467085 #define BTR_PCUR_OLD_NOT_STORED 122766467 diff --git a/storage/xtradb/include/btr0pcur.ic b/storage/xtradb/include/btr0pcur.ic index 79afd7c322e..29f2fc722a2 100644 --- a/storage/xtradb/include/btr0pcur.ic +++ b/storage/xtradb/include/btr0pcur.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -379,7 +379,7 @@ btr_pcur_commit_specify_mtr( btr_pcur_t* pcur, /*!< in: persistent cursor */ mtr_t* mtr) /*!< in: mtr to commit */ { - ut_a(pcur->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(pcur->pos_state == BTR_PCUR_IS_POSITIONED); pcur->latch_mode = BTR_NO_LATCHES; diff --git a/storage/xtradb/include/btr0sea.h b/storage/xtradb/include/btr0sea.h index 9f9c2b04191..d40094461ff 100644 --- a/storage/xtradb/include/btr0sea.h +++ b/storage/xtradb/include/btr0sea.h @@ -190,8 +190,6 @@ UNIV_INTERN ibool btr_search_validate(void); /*======================*/ -#else -# define btr_search_validate() TRUE #endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */ /********************************************************************//** diff --git a/storage/xtradb/include/buf0flu.h b/storage/xtradb/include/buf0flu.h index f4542e7c206..73525a5bb58 100644 --- a/storage/xtradb/include/buf0flu.h +++ b/storage/xtradb/include/buf0flu.h @@ -279,9 +279,9 @@ buf_flush_get_dirty_pages_count( #endif /* !UNIV_HOTBACKUP */ /******************************************************************//** -Check if a flush list flush is in progress for any buffer pool instance for -heuristic purposes. -@return true if flush list flush is in progress */ +Check if a flush list flush is in progress for any buffer pool instance, or if +all the instances are clean, for heuristic purposes. +@return true if flush list flush is in progress or buffer pool is clean */ UNIV_INLINE bool buf_flush_flush_list_in_progress(void) diff --git a/storage/xtradb/include/buf0flu.ic b/storage/xtradb/include/buf0flu.ic index b1e64def462..06fa49754cd 100644 --- a/storage/xtradb/include/buf0flu.ic +++ b/storage/xtradb/include/buf0flu.ic @@ -137,14 +137,16 @@ buf_flush_recv_note_modification( #endif /* !UNIV_HOTBACKUP */ /******************************************************************//** -Check if a flush list flush is in progress for any buffer pool instance for -heuristic purposes. -@return true if flush list flush is in progress */ +Check if a flush list flush is in progress for any buffer pool instance, or if +all the instances are clean, for heuristic purposes. +@return true if flush list flush is in progress or buffer pool is clean */ UNIV_INLINE bool buf_flush_flush_list_in_progress(void) /*==================================*/ { + bool all_clean = true; + for (ulint i = 0; i < srv_buf_pool_instances; i++) { const buf_pool_t* buf_pool = buf_pool_from_array(i); @@ -153,6 +155,13 @@ buf_flush_flush_list_in_progress(void) return(true); } + + if (all_clean) { + + all_clean = (UT_LIST_GET_LEN(buf_pool->flush_list) + == 0); + } + } - return(false); + return(all_clean); } diff --git a/storage/xtradb/include/db0err.h b/storage/xtradb/include/db0err.h index af651c61b66..17fef0dc1f4 100644 --- a/storage/xtradb/include/db0err.h +++ b/storage/xtradb/include/db0err.h @@ -127,6 +127,7 @@ enum dberr_t { DB_IDENTIFIER_TOO_LONG, /*!< Identifier name too long */ DB_FTS_EXCEED_RESULT_CACHE_LIMIT, /*!< FTS query memory exceeds result cache limit */ + DB_TEMP_FILE_WRITE_FAILURE, /*!< Temp file write failure */ /* The following are partial failure codes */ DB_FAIL = 1000, diff --git a/storage/xtradb/include/dict0stats.ic b/storage/xtradb/include/dict0stats.ic index 8fb31678af9..ec9a9065470 100644 --- a/storage/xtradb/include/dict0stats.ic +++ b/storage/xtradb/include/dict0stats.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2013, 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 diff --git a/storage/xtradb/include/dict0types.h b/storage/xtradb/include/dict0types.h index 6acb6a2dcbe..1299445a8ee 100644 --- a/storage/xtradb/include/dict0types.h +++ b/storage/xtradb/include/dict0types.h @@ -82,4 +82,9 @@ enum ib_quiesce_t { #define TEMP_TABLE_PREFIX "#sql" #define TEMP_TABLE_PATH_PREFIX "/" TEMP_TABLE_PREFIX +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG +/** Flag to control insert buffer debugging. */ +extern uint ibuf_debug; +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + #endif diff --git a/storage/xtradb/include/fts0fts.h b/storage/xtradb/include/fts0fts.h index f94112ef4d4..5bea5bc0e97 100644 --- a/storage/xtradb/include/fts0fts.h +++ b/storage/xtradb/include/fts0fts.h @@ -773,16 +773,12 @@ fts_cache_destroy( fts_cache_t* cache); /*!< in: cache*/ /*********************************************************************//** -Clear cache. If the shutdown flag is TRUE then the cache can contain -data that needs to be freed. For regular clear as part of normal -working we assume the caller has freed all resources. */ +Clear cache. */ UNIV_INTERN void fts_cache_clear( /*============*/ - fts_cache_t* cache, /*!< in: cache */ - ibool free_words); /*!< in: TRUE if free - in memory word cache. */ + fts_cache_t* cache); /*!< in: cache */ /*********************************************************************//** Initialize things in cache. */ @@ -833,7 +829,7 @@ fts_drop_index_split_tables( Run SYNC on the table, i.e., write out data from the cache to the FTS auxiliary INDEX table and clear the cache at the end. */ UNIV_INTERN -void +dberr_t fts_sync_table( /*===========*/ dict_table_t* table) /*!< in: table */ diff --git a/storage/xtradb/include/fts0types.h b/storage/xtradb/include/fts0types.h index b714d326487..64677428331 100644 --- a/storage/xtradb/include/fts0types.h +++ b/storage/xtradb/include/fts0types.h @@ -237,6 +237,7 @@ struct fts_fetch_t { fts_sql_callback read_record; /*!< Callback for reading index record */ + ulint total_memory; /*!< Total memory used */ }; /** For horizontally splitting an FTS auxiliary index */ diff --git a/storage/xtradb/include/ibuf0ibuf.h b/storage/xtradb/include/ibuf0ibuf.h index f2e1c80878e..ac16b10e097 100644 --- a/storage/xtradb/include/ibuf0ibuf.h +++ b/storage/xtradb/include/ibuf0ibuf.h @@ -67,11 +67,6 @@ typedef enum { /** Operations that can currently be buffered. */ extern ibuf_use_t ibuf_use; -#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG -/** Flag to control insert buffer debugging. */ -extern uint ibuf_debug; -#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ - /** The insert buffer control structure */ extern ibuf_t* ibuf; diff --git a/storage/xtradb/include/log0log.h b/storage/xtradb/include/log0log.h index bab256e5a65..b9e0c2ef516 100644 --- a/storage/xtradb/include/log0log.h +++ b/storage/xtradb/include/log0log.h @@ -874,6 +874,8 @@ struct log_t{ later; this is advanced when a flush operation is completed to all the log groups */ + volatile bool is_extending; /*!< this is set to true during extend + the log buffer size */ lsn_t written_to_some_lsn; /*!< first log sequence number not yet written to any log group; for this to diff --git a/storage/xtradb/include/mtr0mtr.h b/storage/xtradb/include/mtr0mtr.h index fd0fb66c464..0730e870b3f 100644 --- a/storage/xtradb/include/mtr0mtr.h +++ b/storage/xtradb/include/mtr0mtr.h @@ -315,7 +315,7 @@ mtr_memo_release( Checks if memo contains the given item. @return TRUE if contains */ UNIV_INLINE -ibool +bool mtr_memo_contains( /*==============*/ mtr_t* mtr, /*!< in: mtr */ diff --git a/storage/xtradb/include/mtr0mtr.ic b/storage/xtradb/include/mtr0mtr.ic index 4fe23c460ab..cc021038001 100644 --- a/storage/xtradb/include/mtr0mtr.ic +++ b/storage/xtradb/include/mtr0mtr.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -158,37 +158,38 @@ mtr_release_s_latch_at_savepoint( Checks if memo contains the given item. @return TRUE if contains */ UNIV_INLINE -ibool +bool mtr_memo_contains( /*==============*/ mtr_t* mtr, /*!< in: mtr */ const void* object, /*!< in: object to search */ ulint type) /*!< in: type of object */ { - mtr_memo_slot_t* slot; - dyn_array_t* memo; - ulint offset; - ut_ad(mtr); ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->state == MTR_ACTIVE || mtr->state == MTR_COMMITTING); - memo = &(mtr->memo); - - offset = dyn_array_get_data_size(memo); - - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); - - slot = (mtr_memo_slot_t*) dyn_array_get_element(memo, offset); - - if ((object == slot->object) && (type == slot->type)) { - - return(TRUE); + for (const dyn_block_t* block = dyn_array_get_last_block(&mtr->memo); + block; + block = dyn_array_get_prev_block(&mtr->memo, block)) { + const mtr_memo_slot_t* start + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block)); + mtr_memo_slot_t* slot + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block) + + dyn_block_get_used(block)); + + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); + + while (slot-- != start) { + if (object == slot->object && type == slot->type) { + return(true); + } } } - return(FALSE); + return(false); } # endif /* UNIV_DEBUG */ #endif /* !UNIV_HOTBACKUP */ diff --git a/storage/xtradb/include/row0ftsort.h b/storage/xtradb/include/row0ftsort.h index 4a486450efc..4e04a099140 100644 --- a/storage/xtradb/include/row0ftsort.h +++ b/storage/xtradb/include/row0ftsort.h @@ -84,10 +84,13 @@ struct fts_psort_t { row_merge_block_t* block_alloc[FTS_NUM_AUX_INDEX]; /*!< buffer to allocated */ ulint child_status; /*!< child thread status */ - ulint state; /*!< child thread state */ + ulint state; /*!< parent thread state */ fts_doc_list_t fts_doc_list; /*!< doc list to process */ fts_psort_common_t* psort_common; /*!< ptr to all psort info */ os_thread_t thread_hdl; /*!< thread handler */ + dberr_t error; /*!< db error during psort */ + ulint memory_used; /*!< memory used by fts_doc_list */ + ib_mutex_t mutex; /*!< mutex for fts_doc_list */ }; /** Structure stores information from string tokenization operation */ @@ -124,6 +127,7 @@ typedef struct fts_psort_insert fts_psort_insert_t; /** status bit used for communication between parent and child thread */ #define FTS_PARENT_COMPLETE 1 +#define FTS_PARENT_EXITING 2 #define FTS_CHILD_COMPLETE 1 #define FTS_CHILD_EXITING 2 diff --git a/storage/xtradb/include/srv0conc.h b/storage/xtradb/include/srv0conc.h index 9aee1b17bf0..cf61ef5528d 100644 --- a/storage/xtradb/include/srv0conc.h +++ b/storage/xtradb/include/srv0conc.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2012, Oracle and/or its affiliates. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described diff --git a/storage/xtradb/include/srv0mon.h b/storage/xtradb/include/srv0mon.h index 209894833a0..e2ab81bf53a 100644 --- a/storage/xtradb/include/srv0mon.h +++ b/storage/xtradb/include/srv0mon.h @@ -308,7 +308,11 @@ enum monitor_id_t { /* Index related counters */ MONITOR_MODULE_INDEX, MONITOR_INDEX_SPLIT, - MONITOR_INDEX_MERGE, + MONITOR_INDEX_MERGE_ATTEMPTS, + MONITOR_INDEX_MERGE_SUCCESSFUL, + MONITOR_INDEX_REORG_ATTEMPTS, + MONITOR_INDEX_REORG_SUCCESSFUL, + MONITOR_INDEX_DISCARD, /* Adaptive Hash Index related counters */ MONITOR_MODULE_ADAPTIVE_HASH, diff --git a/storage/xtradb/include/srv0mon.ic b/storage/xtradb/include/srv0mon.ic index 17411d77a8b..225390c6b6f 100644 --- a/storage/xtradb/include/srv0mon.ic +++ b/storage/xtradb/include/srv0mon.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2010, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2012, 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 diff --git a/storage/xtradb/include/sync0arr.h b/storage/xtradb/include/sync0arr.h index bb4d1037a62..15dbdcb540d 100644 --- a/storage/xtradb/include/sync0arr.h +++ b/storage/xtradb/include/sync0arr.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -37,10 +37,27 @@ struct sync_cell_t; struct sync_array_t; /******************************************************************//** +Get an instance of the sync wait array and reserve a wait array cell +in the instance for waiting for an object. The event of the cell is +reset to nonsignalled state. +If reserving cell of the instance fails, try to get another new +instance until we can reserve an empty cell of it. +@return the instance found, never NULL. */ +UNIV_INLINE +sync_array_t* +sync_array_get_and_reserve_cell( +/*============================*/ + void* object, /*!< in: pointer to the object to wait for */ + ulint type, /*!< in: lock request type */ + const char* file, /*!< in: file where requested */ + ulint line, /*!< in: line where requested */ + ulint* index); /*!< out: index of the reserved cell */ +/******************************************************************//** Reserves a wait array cell for waiting for an object. -The event of the cell is reset to nonsignalled state. */ +The event of the cell is reset to nonsignalled state. +@return true if free cell is found, otherwise false */ UNIV_INTERN -void +bool sync_array_reserve_cell( /*====================*/ sync_array_t* arr, /*!< in: wait array */ diff --git a/storage/xtradb/include/sync0arr.ic b/storage/xtradb/include/sync0arr.ic index 0114a1ff5a2..18a46dd0a41 100644 --- a/storage/xtradb/include/sync0arr.ic +++ b/storage/xtradb/include/sync0arr.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -24,3 +24,41 @@ Inline code Created 9/5/1995 Heikki Tuuri *******************************************************/ + +/** User configured sync array size */ +extern ulong srv_sync_array_size; + +/******************************************************************//** +Get an instance of the sync wait array and reserve a wait array cell +in the instance for waiting for an object. The event of the cell is +reset to nonsignalled state. +If reserving cell of the instance fails, try to get another new +instance until we can reserve an empty cell of it. +@return the instance found, never NULL. */ +UNIV_INLINE +sync_array_t* +sync_array_get_and_reserve_cell( +/*============================*/ + void* object, /*!< in: pointer to the object to wait for */ + ulint type, /*!< in: lock request type */ + const char* file, /*!< in: file where requested */ + ulint line, /*!< in: line where requested */ + ulint* index) /*!< out: index of the reserved cell */ +{ + sync_array_t* sync_arr; + bool reserved = false; + + for (ulint i = 0; i < srv_sync_array_size && !reserved; ++i) { + sync_arr = sync_array_get(); + reserved = sync_array_reserve_cell(sync_arr, object, type, + file, line, index); + } + + /* This won't be true every time, for the loop above may execute + more than srv_sync_array_size times to reserve a cell. + But an assertion here makes the code more solid. */ + ut_a(reserved); + + return sync_arr; +} + diff --git a/storage/xtradb/include/sync0rw.h b/storage/xtradb/include/sync0rw.h index ace3a0993c8..a215d4d3f60 100644 --- a/storage/xtradb/include/sync0rw.h +++ b/storage/xtradb/include/sync0rw.h @@ -780,13 +780,13 @@ struct prio_rw_lock_t { provides the lock word etc. for the priority rw lock */ volatile ulint high_priority_s_waiters; - /* If 1, high priority S - waiters exist */ + /* Number of high priority S + waiters */ os_event_t high_priority_s_event; /* High priority wait array event for S waiters */ volatile ulint high_priority_x_waiters; - /* If 1, high priority X - waiters exist */ + /* Number of high priority X + waiters */ os_event_t high_priority_x_event; /* High priority wait arraay event for X waiters */ diff --git a/storage/xtradb/include/sync0rw.ic b/storage/xtradb/include/sync0rw.ic index c625ee39035..097adfded37 100644 --- a/storage/xtradb/include/sync0rw.ic +++ b/storage/xtradb/include/sync0rw.ic @@ -94,8 +94,8 @@ rw_lock_get_waiters( const prio_rw_lock_t* lock) /*!< in: rw-lock */ { return rw_lock_get_waiters(&lock->base_lock) - | lock->high_priority_s_waiters - | lock->high_priority_x_waiters; + || lock->high_priority_s_waiters + || lock->high_priority_x_waiters; } /********************************************************************//** @@ -619,32 +619,14 @@ rw_lock_s_unlock_func( if (lock_word == 0) { /* A waiting next-writer exists, either high priority or - regular. Wake up the first waiter in this order: 1) high - priority next-writer; 2) high priority X waiters; 3) high - priority S waiters; 4) regular priority next-waiter. This - allows high priority requests to overtake an already-waiting - regular priority next-waiter. */ + regular, sharing the same wait event. */ if (lock->high_priority_wait_ex_waiter) { lock->high_priority_wait_ex_waiter = 0; - /* Note that we do not have a separate high priority - next-waiter event. There can be only one such waiter, - here we already know it's high priority, no - regular-priority wakeup may happen. */ - os_event_set(lock->base_lock.wait_ex_event); - } else if (lock->high_priority_x_waiters) { - - lock->high_priority_x_waiters = 0; - os_event_set(lock->high_priority_x_event); - } else if (lock->high_priority_s_waiters) { - - lock->high_priority_s_waiters = 0; - os_event_set(lock->high_priority_s_event); - } else { - - os_event_set(lock->base_lock.wait_ex_event); } + os_event_set(lock->base_lock.wait_ex_event); sync_array_object_signalled(); + } else if (lock_word == X_LOCK_DECR) { /* S-waiters may exist during an S unlock if a high-priority @@ -765,6 +747,8 @@ rw_lock_x_unlock_func( #endif &lock->base_lock); + ut_ad(lock->high_priority_wait_ex_waiter == 0); + if (rw_lock_lock_word_incr(&lock->base_lock, x_lock_incr) == X_LOCK_DECR) { @@ -776,12 +760,10 @@ rw_lock_x_unlock_func( if (lock->high_priority_x_waiters) { - lock->high_priority_x_waiters = 0; os_event_set(lock->high_priority_x_event); sync_array_object_signalled(); } else if (lock->high_priority_s_waiters) { - lock->high_priority_s_waiters = 0; os_event_set(lock->high_priority_s_event); sync_array_object_signalled(); } else if (lock->base_lock.waiters) { diff --git a/storage/xtradb/include/sync0sync.h b/storage/xtradb/include/sync0sync.h index f54c6d59af9..19cfcddd1f5 100644 --- a/storage/xtradb/include/sync0sync.h +++ b/storage/xtradb/include/sync0sync.h @@ -86,6 +86,7 @@ extern mysql_pfs_key_t fts_bg_threads_mutex_key; extern mysql_pfs_key_t fts_delete_mutex_key; extern mysql_pfs_key_t fts_optimize_mutex_key; extern mysql_pfs_key_t fts_doc_id_mutex_key; +extern mysql_pfs_key_t fts_pll_tokenize_mutex_key; extern mysql_pfs_key_t hash_table_mutex_key; extern mysql_pfs_key_t ibuf_bitmap_mutex_key; extern mysql_pfs_key_t ibuf_mutex_key; @@ -198,10 +199,10 @@ necessary only if the memory block containing it is freed. */ pfs_mutex_enter_nowait_func((M), __FILE__, __LINE__) # define mutex_enter_first(M) \ - pfs_mutex_enter_func((M), __FILE__, __LINE__, HIGH_PRIO) + pfs_mutex_enter_func((M), __FILE__, __LINE__, IB_HIGH_PRIO) # define mutex_enter_last(M) \ - pfs_mutex_enter_func((M), __FILE__, __LINE__, LOW_PRIO) + pfs_mutex_enter_func((M), __FILE__, __LINE__, IB_LOW_PRIO) # define mutex_exit(M) pfs_mutex_exit_func(M) @@ -230,10 +231,10 @@ original non-instrumented functions */ mutex_enter_nowait_func((M), __FILE__, __LINE__) # define mutex_enter_first(M) \ - mutex_enter_func((M), __FILE__, __LINE__, HIGH_PRIO) + mutex_enter_func((M), __FILE__, __LINE__, IB_HIGH_PRIO) # define mutex_enter_last(M) \ - mutex_enter_func((M), __FILE__, __LINE__, LOW_PRIO) + mutex_enter_func((M), __FILE__, __LINE__, IB_LOW_PRIO) # define mutex_exit(M) mutex_exit_func(M) @@ -325,8 +326,8 @@ directly. Locks a priority mutex for the current thread. If the mutex is reserved the function spins a preset time (controlled by SYNC_SPIN_ROUNDS) waiting for the mutex before suspending the thread. If the thread is suspended, the priority argument value determines the relative order for its wake up. Any -HIGH_PRIO waiters will be woken up before any LOW_PRIO waiters. In case of -DEFAULT_PRIO, the relative priority will be set according to +IB_HIGH_PRIO waiters will be woken up before any IB_LOW_PRIO waiters. In case of +IB_DEFAULT_PRIO, the relative priority will be set according to srv_current_thread_priority. */ UNIV_INLINE void @@ -336,7 +337,7 @@ mutex_enter_func( const char* file_name, /*!< in: file name where locked */ ulint line, /*!< in: line where locked */ - enum ib_sync_priority priority = DEFAULT_PRIO); + enum ib_sync_priority priority = IB_DEFAULT_PRIO); /*!<in: mutex acquisition priority */ /********************************************************************//** @@ -357,7 +358,7 @@ NOTE! Use the corresponding macro in the header file, not this function directly. Tries to lock the mutex for the current thread. If the lock is not acquired immediately, returns with return value 1. @return 0 if succeed, 1 if not */ -UNIV_INTERN +UNIV_INLINE ulint mutex_enter_nowait_func( /*====================*/ @@ -453,7 +454,7 @@ pfs_mutex_enter_func( const char* file_name, /*!< in: file name where locked */ ulint line, /*!< in: line where locked */ - enum ib_sync_priority priority = DEFAULT_PRIO); + enum ib_sync_priority priority = IB_DEFAULT_PRIO); /*!<in: mutex acquisition priority */ /********************************************************************//** @@ -888,6 +889,7 @@ or row lock! */ #define SYNC_LOG 170 #define SYNC_LOG_FLUSH_ORDER 147 #define SYNC_RECV 168 +#define SYNC_FTS_TOKENIZE 167 #define SYNC_FTS_CACHE_INIT 166 /* Used for FTS cache initialization */ #define SYNC_FTS_BG_THREADS 165 #define SYNC_FTS_OPTIMIZE 164 // FIXME: is this correct number, test @@ -977,12 +979,11 @@ struct ib_prio_mutex_t { word etc. for the priority mutex */ os_event_t high_priority_event; /* High priority wait array event */ - volatile ulint high_priority_waiters; /* Set to 1 if there are (or - may be) threads that asked for this - mutex to be acquired with high priority - in the global wait array for this mutex - to be released. Otherwise, this is - 0. */ + volatile ulint high_priority_waiters; /* Number of threads that asked + for this mutex to be acquired with high + priority in the global wait array + waiting for this mutex to be + released. */ }; /** Constant determining how long spin wait is continued before suspending diff --git a/storage/xtradb/include/sync0sync.ic b/storage/xtradb/include/sync0sync.ic index 6339adeec91..0c9d530abcb 100644 --- a/storage/xtradb/include/sync0sync.ic +++ b/storage/xtradb/include/sync0sync.ic @@ -227,7 +227,6 @@ mutex_exit_func( /* Wake up any high priority waiters first. */ if (mutex->high_priority_waiters != 0) { - mutex->high_priority_waiters = 0; os_event_set(mutex->high_priority_event); sync_array_object_signalled(); @@ -281,8 +280,8 @@ directly. Locks a priority mutex for the current thread. If the mutex is reserved the function spins a preset time (controlled by SYNC_SPIN_ROUNDS) waiting for the mutex before suspending the thread. If the thread is suspended, the priority argument value determines the relative order for its wake up. Any -HIGH_PRIO waiters will be woken up before any LOW_PRIO waiters. In case of -DEFAULT_PRIO, the relative priority will be set according to +IB_HIGH_PRIO waiters will be woken up before any IB_LOW_PRIO waiters. In case +of IB_DEFAULT_PRIO, the relative priority will be set according to srv_current_thread_priority. */ UNIV_INLINE void @@ -312,14 +311,31 @@ mutex_enter_func( return; /* Succeeded! */ } - if (UNIV_LIKELY(priority == DEFAULT_PRIO)) { + if (UNIV_LIKELY(priority == IB_DEFAULT_PRIO)) { high_priority = srv_current_thread_priority; } else { - high_priority = (priority == HIGH_PRIO); + high_priority = (priority == IB_HIGH_PRIO); } mutex_spin_wait(mutex, high_priority, file_name, line); } +/********************************************************************//** +NOTE! Use the corresponding macro in the header file, not this function +directly. Tries to lock the mutex for the current thread. If the lock is not +acquired immediately, returns with return value 1. +@return 0 if succeed, 1 if not */ +UNIV_INLINE +ulint +mutex_enter_nowait_func( +/*====================*/ + ib_prio_mutex_t* mutex, /*!< in: pointer to mutex */ + const char* file_name, /*!< in: file name where mutex + requested */ + ulint line) /*!< in: line where + requested */ +{ + return mutex_enter_nowait_func(&mutex->base_mutex, file_name, line); +} #ifdef UNIV_PFS_MUTEX /******************************************************************//** diff --git a/storage/xtradb/include/sync0types.h b/storage/xtradb/include/sync0types.h index 67f613ab8ae..04baaa0339d 100644 --- a/storage/xtradb/include/sync0types.h +++ b/storage/xtradb/include/sync0types.h @@ -36,9 +36,9 @@ struct ib_prio_mutex_t; /** Priority mutex and rwlatch acquisition priorities */ enum ib_sync_priority { - DEFAULT_PRIO, - LOW_PRIO, - HIGH_PRIO + IB_DEFAULT_PRIO, + IB_LOW_PRIO, + IB_HIGH_PRIO }; #endif diff --git a/storage/xtradb/include/trx0trx.h b/storage/xtradb/include/trx0trx.h index 18a178d5e94..5d3358af4b4 100644 --- a/storage/xtradb/include/trx0trx.h +++ b/storage/xtradb/include/trx0trx.h @@ -1024,6 +1024,10 @@ struct trx_t{ ulint start_line; /*!< Track where it was started from */ const char* start_file; /*!< Filename where it was started */ #endif /* UNIV_DEBUG */ + /*------------------------------*/ + bool api_trx; /*!< trx started by InnoDB API */ + bool api_auto_commit;/*!< automatic commit */ + bool read_write; /*!< if read and write operation */ /*------------------------------*/ char detailed_error[256]; /*!< detailed error message for last diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i index c9447245124..eaf2262481c 100644 --- a/storage/xtradb/include/univ.i +++ b/storage/xtradb/include/univ.i @@ -44,10 +44,10 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 5 #define INNODB_VERSION_MINOR 6 -#define INNODB_VERSION_BUGFIX 14 +#define INNODB_VERSION_BUGFIX 15 #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 62.0 +#define PERCONA_INNODB_VERSION 63.0 #endif /* Enable UNIV_LOG_ARCHIVE in XtraDB */ diff --git a/storage/xtradb/include/ut0bh.h b/storage/xtradb/include/ut0bh.h index 84ea6dd915a..1085736c7ab 100644 --- a/storage/xtradb/include/ut0bh.h +++ b/storage/xtradb/include/ut0bh.h @@ -1,6 +1,6 @@ /***************************************************************************//** -Copyright (c) 2011, Oracle Corpn. All Rights Reserved. +Copyright (c) 2011, 2013, Oracle Corpn. 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 diff --git a/storage/xtradb/include/ut0bh.ic b/storage/xtradb/include/ut0bh.ic index a604237665d..b11de5b8b3e 100644 --- a/storage/xtradb/include/ut0bh.ic +++ b/storage/xtradb/include/ut0bh.ic @@ -1,6 +1,6 @@ /***************************************************************************//** -Copyright (c) 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2013, 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 diff --git a/storage/xtradb/log/log0log.cc b/storage/xtradb/log/log0log.cc index 403ceda7a10..7783fc1ac13 100644 --- a/storage/xtradb/log/log0log.cc +++ b/storage/xtradb/log/log0log.cc @@ -30,6 +30,13 @@ Database log Created 12/9/1995 Heikki Tuuri *******************************************************/ +#include "config.h" +#ifdef HAVE_ALLOCA_H +#include "alloca.h" +#elif defined(HAVE_MALLOC_H) +#include "malloc.h" +#endif + #include "log0log.h" #ifdef UNIV_NONINL @@ -237,6 +244,86 @@ log_check_tracking_margin( return tracked_lsn_age + lsn_advance > log_sys->max_checkpoint_age; } +/** Extends the log buffer. +@param[in] len requested minimum size in bytes */ +static +void +log_buffer_extend( + ulint len) +{ + ulint move_start; + ulint move_end; + byte *tmp_buf = (byte*)alloca(OS_FILE_LOG_BLOCK_SIZE); + + mutex_enter(&(log_sys->mutex)); + + while (log_sys->is_extending) { + /* Another thread is trying to extend already. + Needs to wait for. */ + mutex_exit(&(log_sys->mutex)); + + log_buffer_flush_to_disk(); + + mutex_enter(&(log_sys->mutex)); + + if (srv_log_buffer_size > len / UNIV_PAGE_SIZE) { + /* Already extended enough by the others */ + mutex_exit(&(log_sys->mutex)); + return; + } + } + + log_sys->is_extending = true; + + while (log_sys->n_pending_writes != 0 + || ut_calc_align_down(log_sys->buf_free, + OS_FILE_LOG_BLOCK_SIZE) + != ut_calc_align_down(log_sys->buf_next_to_write, + OS_FILE_LOG_BLOCK_SIZE)) { + /* Buffer might have >1 blocks to write still. */ + mutex_exit(&(log_sys->mutex)); + + log_buffer_flush_to_disk(); + + mutex_enter(&(log_sys->mutex)); + } + + move_start = ut_calc_align_down( + log_sys->buf_free, + OS_FILE_LOG_BLOCK_SIZE); + move_end = log_sys->buf_free; + + /* store the last log block in buffer */ + ut_memcpy(tmp_buf, log_sys->buf + move_start, + move_end - move_start); + + log_sys->buf_free -= move_start; + log_sys->buf_next_to_write -= move_start; + + /* reallocate log buffer */ + srv_log_buffer_size = len / UNIV_PAGE_SIZE + 1; + mem_free(log_sys->buf_ptr); + log_sys->buf_ptr = static_cast<byte*>( + mem_zalloc(LOG_BUFFER_SIZE + OS_FILE_LOG_BLOCK_SIZE)); + log_sys->buf = static_cast<byte*>( + ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE)); + log_sys->buf_size = LOG_BUFFER_SIZE; + log_sys->max_buf_free = log_sys->buf_size / LOG_BUF_FLUSH_RATIO + - LOG_BUF_FLUSH_MARGIN; + + /* restore the last log block */ + ut_memcpy(log_sys->buf, tmp_buf, move_end - move_start); + + ut_ad(log_sys->is_extending); + log_sys->is_extending = false; + + mutex_exit(&(log_sys->mutex)); + + ib_logf(IB_LOG_LEVEL_INFO, + "innodb_log_buffer_size was extended to %lu.", + LOG_BUFFER_SIZE); +} + /************************************************************//** Opens the log for log_write_low. The log must be closed with log_close. @return start lsn of the log record */ @@ -253,11 +340,38 @@ log_open( ulint dummy; #endif /* UNIV_LOG_ARCHIVE */ ulint count = 0; + ulint tcount = 0; + + if (len >= log->buf_size / 2) { + DBUG_EXECUTE_IF("ib_log_buffer_is_short_crash", + DBUG_SUICIDE();); - ut_a(len < log->buf_size / 2); + /* log_buffer is too small. try to extend instead of crash. */ + ib_logf(IB_LOG_LEVEL_WARN, + "The transaction log size is too large" + " for innodb_log_buffer_size (%lu >= %lu / 2). " + "Trying to extend it.", + len, LOG_BUFFER_SIZE); + + log_buffer_extend((len + 1) * 2); + } loop: ut_ad(!recv_no_log_write); + if (log->is_extending) { + + mutex_exit(&(log->mutex)); + + /* Log buffer size is extending. Writing up to the next block + should wait for the extending finished. */ + + os_thread_sleep(100000); + + ut_ad(++count < 50); + + goto loop; + } + /* Calculate an upper limit for the space the string may take in the log buffer */ @@ -281,21 +395,6 @@ loop: goto loop; } - if (log_check_tracking_margin(len_upper_limit) && (++count < 50)) { - - /* This log write would violate the untracked LSN free space - margin. Limit this to 50 retries as there might be situations - where we have no choice but to proceed anyway, i.e. if the log - is about to be overflown, log tracking or not. */ - mutex_exit(&(log->mutex)); - - os_thread_sleep(10000); - - mutex_enter(&(log->mutex)); - - goto loop; - } - #ifdef UNIV_LOG_ARCHIVE if (log->archiving_state != LOG_ARCH_OFF) { @@ -320,6 +419,22 @@ loop: } #endif /* UNIV_LOG_ARCHIVE */ + if (log_check_tracking_margin(len_upper_limit) && + (++tcount + count < 50)) { + + /* This log write would violate the untracked LSN free space + margin. Limit this to 50 retries as there might be situations + where we have no choice but to proceed anyway, i.e. if the log + is about to be overflown, log tracking or not. */ + mutex_exit(&(log->mutex)); + + os_thread_sleep(10000); + + mutex_enter(&(log->mutex)); + + goto loop; + } + #ifdef UNIV_LOG_DEBUG log->old_buf_free = log->buf_free; log->old_lsn = log->lsn; @@ -845,6 +960,7 @@ log_init(void) ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE)); log_sys->buf_size = LOG_BUFFER_SIZE; + log_sys->is_extending = false; log_sys->max_buf_free = log_sys->buf_size / LOG_BUF_FLUSH_RATIO - LOG_BUF_FLUSH_MARGIN; diff --git a/storage/xtradb/log/log0online.cc b/storage/xtradb/log/log0online.cc index 8c2bc5602a9..127e09e0448 100644 --- a/storage/xtradb/log/log0online.cc +++ b/storage/xtradb/log/log0online.cc @@ -34,14 +34,6 @@ Online database log parsing for changed page tracking #include "trx0sys.h" #include "ut0rbt.h" -#ifdef __WIN__ -/* error LNK2001: unresolved external symbol _debug_sync_C_callback_ptr */ -# define DEBUG_SYNC_C(dummy) ((void) 0) -#else -# include "m_string.h" /* for my_sys.h */ -# include "my_sys.h" /* DEBUG_SYNC_C */ -#endif - enum { FOLLOW_SCAN_SIZE = 4 * (UNIV_PAGE_SIZE_MAX) }; #ifdef UNIV_PFS_MUTEX @@ -1782,7 +1774,7 @@ log_online_purge_changed_page_bitmaps( mutex_enter(&log_bmp_sys->mutex); } - if (!log_online_setup_bitmap_file_range(&bitmap_files, 0, lsn)) { + if (!log_online_setup_bitmap_file_range(&bitmap_files, 0, LSN_MAX)) { if (srv_track_changed_pages) { mutex_exit(&log_bmp_sys->mutex); } @@ -1797,8 +1789,19 @@ log_online_purge_changed_page_bitmaps( } for (i = 0; i < bitmap_files.count; i++) { - if (bitmap_files.files[i].seq_num == 0 - || bitmap_files.files[i].start_lsn >= lsn) { + + /* We consider the end LSN of the current bitmap, derived from + the start LSN of the subsequent bitmap file, to determine + whether to remove the current bitmap. Note that bitmap_files + does not contain an entry for the bitmap past the given LSN so + we must check the boundary conditions as well. For example, + consider 1_0.xdb and 2_10.xdb and querying LSN 5. bitmap_files + will only contain 1_0.xdb and we must not delete it since it + represents LSNs 0-9. */ + if ((i + 1 == bitmap_files.count + || bitmap_files.files[i + 1].seq_num == 0 + || bitmap_files.files[i + 1].start_lsn > lsn) + && (lsn != LSN_MAX)) { break; } diff --git a/storage/xtradb/log/log0recv.cc b/storage/xtradb/log/log0recv.cc index d0b833f2bba..cb4b988e46c 100644 --- a/storage/xtradb/log/log0recv.cc +++ b/storage/xtradb/log/log0recv.cc @@ -920,9 +920,9 @@ log_block_checksum_is_ok_or_old_format( return(TRUE); } - if (srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_CRC32 || - srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB || - srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_NONE) { + if (srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_CRC32 || + srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB || + srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_NONE) { const char* algo = NULL; @@ -965,8 +965,8 @@ log_block_checksum_is_ok_or_old_format( "so we intentionally assert here."); } - ut_ad(srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_CRC32 || - srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_INNODB); + ut_ad(srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_CRC32 || + srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_INNODB); if (block_checksum == LOG_NO_CHECKSUM_MAGIC || block_checksum == log_block_calc_checksum_crc32(block) || diff --git a/storage/xtradb/mtr/mtr0mtr.cc b/storage/xtradb/mtr/mtr0mtr.cc index 02e8cbdbfcc..a4877f175a1 100644 --- a/storage/xtradb/mtr/mtr0mtr.cc +++ b/storage/xtradb/mtr/mtr0mtr.cc @@ -171,26 +171,29 @@ mtr_memo_note_modifications( /*========================*/ mtr_t* mtr) /*!< in: mtr */ { - dyn_array_t* memo; - ulint offset; - ut_ad(!srv_read_only_mode); ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->state == MTR_COMMITTING); /* Currently only used in commit */ - memo = &mtr->memo; - - offset = dyn_array_get_data_size(memo); - - while (offset > 0) { - mtr_memo_slot_t* slot; - offset -= sizeof(mtr_memo_slot_t); + for (const dyn_block_t* block = dyn_array_get_last_block(&mtr->memo); + block; + block = dyn_array_get_prev_block(&mtr->memo, block)) { + const mtr_memo_slot_t* start + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block)); + mtr_memo_slot_t* slot + = reinterpret_cast<mtr_memo_slot_t*>( + dyn_block_get_data(block) + + dyn_block_get_used(block)); - slot = static_cast<mtr_memo_slot_t*>( - dyn_array_get_element(memo, offset)); + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); - mtr_memo_slot_note_modification(mtr, slot); + while (slot-- != start) { + if (slot->object != NULL) { + mtr_memo_slot_note_modification(mtr, slot); + } + } } } diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc index 3f65e9f59b2..3070df3434b 100644 --- a/storage/xtradb/os/os0file.cc +++ b/storage/xtradb/os/os0file.cc @@ -1565,18 +1565,32 @@ os_file_set_nocache( } #elif defined(O_DIRECT) if (fcntl(fd, F_SETFL, O_DIRECT) == -1) { - int errno_save = errno; - - ib_logf(IB_LOG_LEVEL_ERROR, - "Failed to set O_DIRECT on file %s: %s: %s, " - "continuing anyway", - file_name, operation_name, strerror(errno_save)); - + int errno_save = errno; + static bool warning_message_printed = false; if (errno_save == EINVAL) { - ib_logf(IB_LOG_LEVEL_ERROR, - "O_DIRECT is known to result in 'Invalid " - "argument' on Linux on tmpfs, see MySQL " - "Bug#26662"); + if (!warning_message_printed) { + warning_message_printed = true; +# ifdef UNIV_LINUX + ib_logf(IB_LOG_LEVEL_WARN, + "Failed to set O_DIRECT on file " + "%s: %s: %s, continuing anyway. " + "O_DIRECT is known to result " + "in 'Invalid argument' on Linux on " + "tmpfs, see MySQL Bug#26662.", + file_name, operation_name, + strerror(errno_save)); +# else /* UNIV_LINUX */ + goto short_warning; +# endif /* UNIV_LINUX */ + } + } else { +# ifndef UNIV_LINUX +short_warning: +# endif + ib_logf(IB_LOG_LEVEL_WARN, + "Failed to set O_DIRECT on file %s: %s: %s, " + "continuing anyway.", + file_name, operation_name, strerror(errno_save)); } } #endif /* defined(UNIV_SOLARIS) && defined(DIRECTIO_ON) */ @@ -1791,6 +1805,9 @@ os_file_create_func( } else { *success = TRUE; retry = FALSE; + if (srv_use_native_aio && ((attributes & FILE_FLAG_OVERLAPPED) != 0)) { + ut_a(CreateIoCompletionPort(file, completion_port, 0, 0)); + } } } while (retry); @@ -1934,10 +1951,8 @@ os_file_create_func( } #endif /* USE_FILE_LOCK */ - if (file != -1 - && srv_use_atomic_writes - && type == OS_DATA_FILE - && !os_file_set_atomic_writes(name, file)) { + if (srv_use_atomic_writes && type == OS_DATA_FILE + && file != -1 && !os_file_set_atomic_writes(name, file)) { *success = FALSE; close(file); diff --git a/storage/xtradb/os/os0thread.cc b/storage/xtradb/os/os0thread.cc index 685e89d48be..13099e243cd 100644 --- a/storage/xtradb/os/os0thread.cc +++ b/storage/xtradb/os/os0thread.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -203,6 +203,9 @@ os_thread_create_func( #ifndef UNIV_HPUX10 pthread_attr_destroy(&attr); #endif + + ut_a(os_thread_count <= OS_THREAD_MAX_N); + if (thread_id) { *thread_id = pthread; } diff --git a/storage/xtradb/plugin_exports b/storage/xtradb/plugin_exports new file mode 100644 index 00000000000..235ae3d5e72 --- /dev/null +++ b/storage/xtradb/plugin_exports @@ -0,0 +1,14 @@ +{ + global: + _maria_plugin_interface_version_; + _maria_sizeof_struct_st_plugin_; + _maria_plugin_declarations_; + my_snprintf_service; + thd_alloc_service; + thd_autoinc_service; + thd_error_context_service; + thd_kill_statement_service; + thd_wait_service; + local: + *; +}; diff --git a/storage/xtradb/row/row0ftsort.cc b/storage/xtradb/row/row0ftsort.cc index c0d996e24ea..7a673feae9b 100644 --- a/storage/xtradb/row/row0ftsort.cc +++ b/storage/xtradb/row/row0ftsort.cc @@ -268,6 +268,9 @@ row_fts_psort_info_init( psort_info[j].child_status = 0; psort_info[j].state = 0; psort_info[j].psort_common = common_info; + psort_info[j].error = DB_SUCCESS; + psort_info[j].memory_used = 0; + mutex_create(fts_pll_tokenize_mutex_key, &psort_info[j].mutex, SYNC_FTS_TOKENIZE); } /* Initialize merge_info structures parallel merge and insert @@ -315,6 +318,8 @@ row_fts_psort_info_destroy( } mem_free(psort_info[j].merge_file[i]); } + + mutex_free(&psort_info[j].mutex); } os_event_free(merge_info[0].psort_common->sort_event); @@ -548,6 +553,35 @@ row_merge_fts_doc_tokenize( } /*********************************************************************//** +Get next doc item from fts_doc_list */ +UNIV_INLINE +void +row_merge_fts_get_next_doc_item( +/*============================*/ + fts_psort_t* psort_info, /*!< in: psort_info */ + fts_doc_item_t** doc_item) /*!< in/out: doc item */ +{ + if (*doc_item != NULL) { + ut_free(*doc_item); + } + + mutex_enter(&psort_info->mutex); + + *doc_item = UT_LIST_GET_FIRST(psort_info->fts_doc_list); + if (*doc_item != NULL) { + UT_LIST_REMOVE(doc_list, psort_info->fts_doc_list, + *doc_item); + + ut_ad(psort_info->memory_used >= sizeof(fts_doc_item_t) + + (*doc_item)->field->len); + psort_info->memory_used -= sizeof(fts_doc_item_t) + + (*doc_item)->field->len; + } + + mutex_exit(&psort_info->mutex); +} + +/*********************************************************************//** Function performs parallel tokenization of the incoming doc strings. It also performs the initial in memory sort of the parsed records. @return OS_THREAD_DUMMY_RETURN */ @@ -560,7 +594,6 @@ fts_parallel_tokenization( fts_psort_t* psort_info = (fts_psort_t*) arg; ulint i; fts_doc_item_t* doc_item = NULL; - fts_doc_item_t* prev_doc_item = NULL; row_merge_buf_t** buf; ibool processed = FALSE; merge_file_t** merge_file; @@ -578,7 +611,7 @@ fts_parallel_tokenization( dict_field_t* idx_field; fts_tokenize_ctx_t t_ctx; ulint retried = 0; - ut_ad(psort_info); + dberr_t error = DB_SUCCESS; ut_ad(psort_info); @@ -602,11 +635,7 @@ fts_parallel_tokenization( block = psort_info->merge_block; zip_size = dict_table_zip_size(table); - doc_item = UT_LIST_GET_FIRST(psort_info->fts_doc_list); - - if (doc_item) { - prev_doc_item = doc_item; - } + row_merge_fts_get_next_doc_item(psort_info, &doc_item); t_ctx.cached_stopword = table->fts->cache->stopword_info.cached_stopword; processed = TRUE; @@ -616,17 +645,8 @@ loop: last_doc_id = doc_item->doc_id; - if (!(dfield->data) - || dfield_get_len(dfield) == UNIV_SQL_NULL) { - num_doc_processed++; - doc_item = UT_LIST_GET_NEXT(doc_list, doc_item); - - /* Always remember the last doc_item we processed */ - if (doc_item) { - prev_doc_item = doc_item; - } - continue; - } + ut_ad (dfield->data != NULL + && dfield_get_len(dfield) != UNIV_SQL_NULL); /* If finish processing the last item, update "doc" with strings in the doc_item, otherwise continue processing last @@ -674,11 +694,13 @@ loop: num_doc_processed++; if (fts_enable_diag_print && num_doc_processed % 10000 == 1) { - fprintf(stderr, "number of doc processed %d\n", + ib_logf(IB_LOG_LEVEL_INFO, + "number of doc processed %d\n", (int) num_doc_processed); #ifdef FTS_INTERNAL_DIAG_PRINT for (i = 0; i < FTS_NUM_AUX_INDEX; i++) { - fprintf(stderr, "ID %d, partition %d, word " + ib_logf(IB_LOG_LEVEL_INFO, + "ID %d, partition %d, word " "%d\n",(int) psort_info->psort_id, (int) i, (int) mycount[i]); } @@ -687,19 +709,10 @@ loop: mem_heap_empty(blob_heap); - if (doc_item->field->data) { - ut_free(doc_item->field->data); - doc_item->field->data = NULL; - } - - doc_item = UT_LIST_GET_NEXT(doc_list, doc_item); + row_merge_fts_get_next_doc_item(psort_info, &doc_item); - /* Always remember the last doc_item we processed */ - if (doc_item) { - prev_doc_item = doc_item; - if (last_doc_id != doc_item->doc_id) { - t_ctx.init_pos = 0; - } + if (doc_item && last_doc_id != doc_item->doc_id) { + t_ctx.init_pos = 0; } } @@ -710,9 +723,14 @@ loop: row_merge_buf_write(buf[t_ctx.buf_used], merge_file[t_ctx.buf_used], block[t_ctx.buf_used]); - row_merge_write(merge_file[t_ctx.buf_used]->fd, - merge_file[t_ctx.buf_used]->offset++, - block[t_ctx.buf_used]); + + if (!row_merge_write(merge_file[t_ctx.buf_used]->fd, + merge_file[t_ctx.buf_used]->offset++, + block[t_ctx.buf_used])) { + error = DB_TEMP_FILE_WRITE_FAILURE; + goto func_exit; + } + UNIV_MEM_INVALID(block[t_ctx.buf_used][0], srv_sort_buf_size); buf[t_ctx.buf_used] = row_merge_buf_empty(buf[t_ctx.buf_used]); mycount[t_ctx.buf_used] += t_ctx.rows_added[t_ctx.buf_used]; @@ -724,13 +742,13 @@ loop: /* Parent done scanning, and if finish processing all the docs, exit */ if (psort_info->state == FTS_PARENT_COMPLETE) { - if (num_doc_processed >= UT_LIST_GET_LEN( - psort_info->fts_doc_list)) { + if (UT_LIST_GET_LEN(psort_info->fts_doc_list) == 0) { goto exit; } else if (retried > 10000) { ut_ad(!doc_item); /* retied too many times and cannot get new record */ - fprintf(stderr, "InnoDB: FTS parallel sort processed " + ib_logf(IB_LOG_LEVEL_ERROR, + "InnoDB: FTS parallel sort processed " "%lu records, the sort queue has " "%lu records. But sort cannot get " "the next records", num_doc_processed, @@ -738,21 +756,18 @@ loop: psort_info->fts_doc_list)); goto exit; } + } else if (psort_info->state == FTS_PARENT_EXITING) { + /* Parent abort */ + goto func_exit; } - if (doc_item) { - doc_item = UT_LIST_GET_NEXT(doc_list, doc_item); - } else if (prev_doc_item) { - os_thread_yield(); - doc_item = UT_LIST_GET_NEXT(doc_list, prev_doc_item); - } else { + if (doc_item == NULL) { os_thread_yield(); - doc_item = UT_LIST_GET_FIRST(psort_info->fts_doc_list); } - if (doc_item) { - prev_doc_item = doc_item; + row_merge_fts_get_next_doc_item(psort_info, &doc_item); + if (doc_item != NULL) { if (last_doc_id != doc_item->doc_id) { t_ctx.init_pos = 0; } @@ -802,9 +817,12 @@ exit: never flush to temp file, it can be held all in memory */ if (merge_file[i]->offset != 0) { - row_merge_write(merge_file[i]->fd, + if (!row_merge_write(merge_file[i]->fd, merge_file[i]->offset++, - block[i]); + block[i])) { + error = DB_TEMP_FILE_WRITE_FAILURE; + goto func_exit; + } UNIV_MEM_INVALID(block[i][0], srv_sort_buf_size); @@ -820,19 +838,24 @@ exit: } for (i = 0; i < FTS_NUM_AUX_INDEX; i++) { - if (!merge_file[i]->offset) { continue; } tmpfd[i] = row_merge_file_create_low(); if (tmpfd[i] < 0) { + error = DB_OUT_OF_MEMORY; + goto func_exit; + } + + error = row_merge_sort(psort_info->psort_common->trx, + psort_info->psort_common->dup, + merge_file[i], block[i], &tmpfd[i]); + if (error != DB_SUCCESS) { + close(tmpfd[i]); goto func_exit; } - row_merge_sort(psort_info->psort_common->trx, - psort_info->psort_common->dup, - merge_file[i], block[i], &tmpfd[i]); total_rec += merge_file[i]->n_rec; close(tmpfd[i]); } @@ -844,6 +867,19 @@ func_exit: mem_heap_free(blob_heap); + mutex_enter(&psort_info->mutex); + psort_info->error = error; + mutex_exit(&psort_info->mutex); + + if (UT_LIST_GET_LEN(psort_info->fts_doc_list) > 0) { + ut_ad(error != DB_SUCCESS); + } + + /* Free fts doc list in case of error. */ + do { + row_merge_fts_get_next_doc_item(psort_info, &doc_item); + } while (doc_item != NULL); + psort_info->child_status = FTS_CHILD_COMPLETE; os_event_set(psort_info->psort_common->sort_event); psort_info->child_status = FTS_CHILD_EXITING; diff --git a/storage/xtradb/row/row0import.cc b/storage/xtradb/row/row0import.cc index b753574158a..c513320afc1 100644 --- a/storage/xtradb/row/row0import.cc +++ b/storage/xtradb/row/row0import.cc @@ -3659,8 +3659,8 @@ row_import_for_mysql( row_mysql_unlock_data_dictionary(trx); ib_senderrf(trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_FILE_NOT_FOUND, - filepath, err, ut_strerr(err)); + ER_GET_ERRMSG, + err, ut_strerr(err), filepath); mem_free(filepath); diff --git a/storage/xtradb/row/row0log.cc b/storage/xtradb/row/row0log.cc index 49f9eb842b1..0c5ae2d3125 100644 --- a/storage/xtradb/row/row0log.cc +++ b/storage/xtradb/row/row0log.cc @@ -1199,8 +1199,7 @@ row_log_table_blob_alloc( /******************************************************//** Converts a log record to a table row. -@return converted row, or NULL if the conversion fails -or the transaction has been rolled back */ +@return converted row, or NULL if the conversion fails */ static __attribute__((nonnull, warn_unused_result)) const dtuple_t* row_log_table_apply_convert_mrec( @@ -1653,9 +1652,6 @@ dberr_t row_log_table_apply_update( /*=======================*/ que_thr_t* thr, /*!< in: query graph */ - ulint trx_id_col, /*!< in: position of - DB_TRX_ID in the - old clustered index */ ulint new_trx_id_col, /*!< in: position of DB_TRX_ID in the new clustered index */ @@ -1716,14 +1712,14 @@ row_log_table_apply_update( if (page_rec_is_infimum(btr_pcur_get_rec(&pcur)) || btr_pcur_get_low_match(&pcur) < index->n_uniq) { + ut_ad(0); + error = DB_CORRUPTION; +func_exit: mtr_commit(&mtr); -insert: +func_exit_committed: ut_ad(mtr.state == MTR_COMMITTED); - /* The row was not found. Insert it. */ - error = row_log_table_apply_insert_low( - thr, row, trx_id, offsets_heap, heap, dup); + if (error != DB_SUCCESS) { -err_exit: /* Report the erroneous row using the new version of the table. */ innobase_row_to_mysql(dup->table, log->table, row); @@ -1750,26 +1746,17 @@ err_exit: goto func_exit; } - if (rec_offs_any_extern(cur_offsets)) { + const bool pk_updated + = upd_get_nth_field(update, 0)->field_no < new_trx_id_col; + + if (pk_updated || rec_offs_any_extern(cur_offsets)) { /* If the record contains any externally stored columns, perform the update by delete and insert, because we will not write any undo log that would allow purge to free any orphaned externally stored columns. */ -delete_insert: - error = row_log_table_apply_delete_low( - &pcur, cur_offsets, NULL, heap, &mtr); - ut_ad(mtr.state == MTR_COMMITTED); - - if (error != DB_SUCCESS) { - goto err_exit; - } - goto insert; - } - - if (upd_get_nth_field(update, 0)->field_no < new_trx_id_col) { - if (dup->index->online_log->same_pk) { + if (pk_updated && dup->index->online_log->same_pk) { /* The ROW_T_UPDATE log record should only be written when the PRIMARY KEY fields of the record did not change in the old table. We @@ -1781,40 +1768,16 @@ delete_insert: goto func_exit; } - /* The PRIMARY KEY columns have changed. - Delete the record with the old PRIMARY KEY value, - provided that it carries the same - DB_TRX_ID,DB_ROLL_PTR. Then, insert the new row. */ - ulint len; - const byte* cur_trx_roll = rec_get_nth_field( - mrec, offsets, trx_id_col, &len); - ut_ad(len == DATA_TRX_ID_LEN); - const dfield_t* new_trx_roll = dtuple_get_nth_field( - old_pk, new_trx_id_col); - /* We assume that DB_TRX_ID,DB_ROLL_PTR are stored - in one contiguous block. */ - ut_ad(rec_get_nth_field(mrec, offsets, trx_id_col + 1, &len) - == cur_trx_roll + DATA_TRX_ID_LEN); - ut_ad(len == DATA_ROLL_PTR_LEN); - ut_ad(new_trx_roll->len == DATA_TRX_ID_LEN); - ut_ad(dtuple_get_nth_field(old_pk, new_trx_id_col + 1) - -> len == DATA_ROLL_PTR_LEN); - ut_ad(static_cast<const byte*>( - dtuple_get_nth_field(old_pk, new_trx_id_col + 1) - ->data) - == static_cast<const byte*>(new_trx_roll->data) - + DATA_TRX_ID_LEN); - - if (!memcmp(cur_trx_roll, new_trx_roll->data, - DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN)) { - /* The old row exists. Remove it. */ - goto delete_insert; - } - - /* Unless we called row_log_table_apply_delete_low(), - this will likely cause a duplicate key error. */ - mtr_commit(&mtr); - goto insert; + error = row_log_table_apply_delete_low( + &pcur, cur_offsets, NULL, heap, &mtr); + ut_ad(mtr.state == MTR_COMMITTED); + + if (error == DB_SUCCESS) { + error = row_log_table_apply_insert_low( + thr, row, trx_id, offsets_heap, heap, dup); + } + + goto func_exit_committed; } dtuple_t* old_row; @@ -1913,13 +1876,7 @@ delete_insert: mtr_start(&mtr); } -func_exit: - mtr_commit(&mtr); - if (error != DB_SUCCESS) { - goto err_exit; - } - - return(error); + goto func_exit; } /******************************************************//** @@ -2200,7 +2157,7 @@ row_log_table_apply_op( mrec, offsets, trx_id_col, &len); ut_ad(len == DATA_TRX_ID_LEN); *error = row_log_table_apply_update( - thr, trx_id_col, new_trx_id_col, + thr, new_trx_id_col, mrec, offsets, offsets_heap, heap, dup, trx_read_trx_id(db_trx_id), old_pk); } @@ -2772,7 +2729,16 @@ row_log_apply_op_low( switch (op) { case ROW_OP_DELETE: if (!exists) { - /* The record was already deleted. */ + /* The existing record matches the + unique secondary index key, but the + PRIMARY KEY columns differ. So, this + exact record does not exist. For + example, we could detect a duplicate + key error in some old index before + logging an ROW_OP_INSERT for our + index. This ROW_OP_DELETE could have + been logged for rolling back + TRX_UNDO_INSERT_REC. */ goto func_exit; } @@ -2812,7 +2778,24 @@ row_log_apply_op_low( case ROW_OP_INSERT: if (exists) { /* The record already exists. There - is nothing to be inserted. */ + is nothing to be inserted. + This could happen when processing + TRX_UNDO_DEL_MARK_REC in statement + rollback: + + UPDATE of PRIMARY KEY can lead to + statement rollback if the updated + value of the PRIMARY KEY already + exists. In this case, the UPDATE would + be mapped to DELETE;INSERT, and we + only wrote undo log for the DELETE + part. The duplicate key error would be + triggered before logging the INSERT + part. + + Theoretically, we could also get a + similar situation when a DELETE operation + is blocked by a FOREIGN KEY constraint. */ goto func_exit; } @@ -2823,17 +2806,18 @@ row_log_apply_op_low( goto insert_the_rec; } - /* Duplicate key error */ - ut_ad(dict_index_is_unique(index)); - row_merge_dup_report(dup, entry->fields); - goto func_exit; + goto duplicate; } } else { switch (op) { rec_t* rec; big_rec_t* big_rec; case ROW_OP_DELETE: - /* The record does not exist. */ + /* The record does not exist. For example, we + could detect a duplicate key error in some old + index before logging an ROW_OP_INSERT for our + index. This ROW_OP_DELETE could be logged for + rolling back TRX_UNDO_INSERT_REC. */ goto func_exit; case ROW_OP_INSERT: if (dict_index_is_unique(index) @@ -2843,8 +2827,11 @@ row_log_apply_op_low( >= dict_index_get_n_unique(index)) && (!index->n_nullable || !dtuple_contains_null(entry))) { +duplicate: /* Duplicate key */ + ut_ad(dict_index_is_unique(index)); row_merge_dup_report(dup, entry->fields); + *error = DB_DUPLICATE_KEY; goto func_exit; } insert_the_rec: @@ -3368,7 +3355,7 @@ row_log_apply( error = DB_SUCCESS; } - if (error != DB_SUCCESS || dup.n_dup) { + if (error != DB_SUCCESS) { ut_a(!dict_table_is_discarded(index->table)); /* We set the flag directly instead of invoking dict_set_corrupted_index_cache_only(index) here, @@ -3376,12 +3363,9 @@ row_log_apply( index->type |= DICT_CORRUPT; index->table->drop_aborted = TRUE; - if (error == DB_SUCCESS) { - error = DB_DUPLICATE_KEY; - } - dict_index_set_online_status(index, ONLINE_INDEX_ABORTED); } else { + ut_ad(dup.n_dup == 0); dict_index_set_online_status(index, ONLINE_INDEX_COMPLETE); } diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc index 08a3ecb5732..80cda9078ff 100644 --- a/storage/xtradb/row/row0merge.cc +++ b/storage/xtradb/row/row0merge.cc @@ -64,6 +64,9 @@ static ibool row_merge_print_block_write; /* Whether to disable file system cache */ UNIV_INTERN char srv_disable_sort_file_cache; +/* Maximum pending doc memory limit in bytes for a fts tokenization thread */ +#define FTS_PENDING_DOC_MEMORY_LIMIT 1000000 + #ifdef UNIV_DEBUG /******************************************************//** Display a merge tuple. */ @@ -325,6 +328,9 @@ row_merge_buf_add( if (index->type & DICT_FTS) { fts_doc_item_t* doc_item; byte* value; + void* ptr; + const ulint max_trial_count = 10000; + ulint trial_count = 0; /* fetch Doc ID if it already exists in the row, and not supplied by the @@ -354,13 +360,12 @@ row_merge_buf_add( continue; } - doc_item = static_cast<fts_doc_item_t*>( - mem_heap_alloc( - buf->heap, - sizeof(*doc_item))); + ptr = ut_malloc(sizeof(*doc_item) + + field->len); - value = static_cast<byte*>( - ut_malloc(field->len)); + doc_item = static_cast<fts_doc_item_t*>(ptr); + value = static_cast<byte*>(ptr) + + sizeof(*doc_item); memcpy(value, field->data, field->len); field->data = value; @@ -369,10 +374,29 @@ row_merge_buf_add( bucket = *doc_id % fts_sort_pll_degree; - UT_LIST_ADD_LAST( - doc_list, - psort_info[bucket].fts_doc_list, - doc_item); + /* Add doc item to fts_doc_list */ + mutex_enter(&psort_info[bucket].mutex); + + if (psort_info[bucket].error == DB_SUCCESS) { + UT_LIST_ADD_LAST( + doc_list, + psort_info[bucket].fts_doc_list, + doc_item); + psort_info[bucket].memory_used += + sizeof(*doc_item) + field->len; + } else { + ut_free(doc_item); + } + + mutex_exit(&psort_info[bucket].mutex); + + /* Sleep when memory used exceeds limit*/ + while (psort_info[bucket].memory_used + > FTS_PENDING_DOC_MEMORY_LIMIT + && trial_count++ < max_trial_count) { + os_thread_sleep(1000); + } + n_row_added = 1; continue; } @@ -1577,12 +1601,28 @@ write_buffers: max_doc_id = doc_id; } + if (buf->index->type & DICT_FTS) { + /* Check if error occurs in child thread */ + for (ulint j = 0; j < fts_sort_pll_degree; j++) { + if (psort_info[j].error != DB_SUCCESS) { + err = psort_info[j].error; + trx->error_key_num = i; + break; + } + } + + if (err != DB_SUCCESS) { + break; + } + } + continue; } - if ((buf->index->type & DICT_FTS) - && (!row || !doc_id)) { - continue; + if (buf->index->type & DICT_FTS) { + if (!row || !doc_id) { + continue; + } } /* The buffer must be sufficiently large @@ -1640,7 +1680,7 @@ write_buffers: if (!row_merge_write(file->fd, file->offset++, block)) { - err = DB_OUT_OF_FILE_SPACE; + err = DB_TEMP_FILE_WRITE_FAILURE; trx->error_key_num = i; break; } @@ -1695,11 +1735,25 @@ all_done: ulint trial_count = 0; const ulint max_trial_count = 10000; +wait_again: + /* Check if error occurs in child thread */ + for (ulint j = 0; j < fts_sort_pll_degree; j++) { + if (psort_info[j].error != DB_SUCCESS) { + err = psort_info[j].error; + trx->error_key_num = j; + break; + } + } + /* Tell all children that parent has done scanning */ for (ulint i = 0; i < fts_sort_pll_degree; i++) { - psort_info[i].state = FTS_PARENT_COMPLETE; + if (err == DB_SUCCESS) { + psort_info[i].state = FTS_PARENT_COMPLETE; + } else { + psort_info[i].state = FTS_PARENT_EXITING; + } } -wait_again: + /* Now wait all children to report back to be completed */ os_event_wait_time_low(fts_parallel_sort_event, 1000000, sig_count); @@ -1754,9 +1808,15 @@ wait_again: /* Update the next Doc ID we used. Table should be locked, so no concurrent DML */ - if (max_doc_id) { - fts_update_next_doc_id( - 0, new_table, old_table->name, max_doc_id); + if (max_doc_id && err == DB_SUCCESS) { + /* Sync fts cache for other fts indexes to keep all + fts indexes consistent in sync_doc_id. */ + err = fts_sync_table(const_cast<dict_table_t*>(new_table)); + + if (err == DB_SUCCESS) { + fts_update_next_doc_id( + 0, new_table, old_table->name, max_doc_id); + } } trx->op_info = ""; @@ -3395,6 +3455,7 @@ row_merge_build_indexes( fts_psort_t* psort_info = NULL; fts_psort_t* merge_info = NULL; ib_int64_t sig_count = 0; + bool fts_psort_initiated = false; DBUG_ENTER("row_merge_build_indexes"); ut_ad(!srv_read_only_mode); @@ -3451,6 +3512,10 @@ row_merge_build_indexes( row_fts_psort_info_init( trx, dup, new_table, opt_doc_id_size, &psort_info, &merge_info); + + /* "We need to ensure that we free the resources + allocated */ + fts_psort_initiated = true; } } @@ -3573,6 +3638,7 @@ wait_again: if (indexes[i]->type & DICT_FTS) { row_fts_psort_info_destroy(psort_info, merge_info); + fts_psort_initiated = false; } else if (error != DB_SUCCESS || !online) { /* Do not apply any online log. */ } else if (old_table != new_table) { @@ -3609,6 +3675,12 @@ func_exit: error = DB_TOO_MANY_CONCURRENT_TRXS; trx->error_state = error;); + if (fts_psort_initiated) { + /* Clean up FTS psort related resource */ + row_fts_psort_info_destroy(psort_info, merge_info); + fts_psort_initiated = false; + } + row_merge_file_destroy_low(tmpfd); for (i = 0; i < n_indexes; i++) { diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc index 7748bd747d9..b590a04b3e8 100644 --- a/storage/xtradb/row/row0mysql.cc +++ b/storage/xtradb/row/row0mysql.cc @@ -3630,7 +3630,7 @@ next_rec: if (has_internal_doc_id && table->fts->cache) { table->fts->fts_status |= TABLE_DICT_LOCKED; fts_update_next_doc_id(trx, table, NULL, 0); - fts_cache_clear(table->fts->cache, TRUE); + fts_cache_clear(table->fts->cache); fts_cache_init(table->fts->cache); table->fts->fts_status &= ~TABLE_DICT_LOCKED; } diff --git a/storage/xtradb/row/row0quiesce.cc b/storage/xtradb/row/row0quiesce.cc index 79cced1c533..a59a6088ad6 100644 --- a/storage/xtradb/row/row0quiesce.cc +++ b/storage/xtradb/row/row0quiesce.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2013, 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 diff --git a/storage/xtradb/row/row0sel.cc b/storage/xtradb/row/row0sel.cc index 95ebc143e61..c68b4de1125 100644 --- a/storage/xtradb/row/row0sel.cc +++ b/storage/xtradb/row/row0sel.cc @@ -3225,48 +3225,78 @@ sel_restore_position_for_mysql( mtr_t* mtr) /*!< in: mtr; CAUTION: may commit mtr temporarily! */ { - ibool success; - ulint relative_position; - - relative_position = pcur->rel_pos; + ibool success; success = btr_pcur_restore_position(latch_mode, pcur, mtr); *same_user_rec = success; - if (relative_position == BTR_PCUR_ON) { - if (success) { - return(FALSE); - } - - if (moves_up) { - btr_pcur_move_to_next(pcur, mtr); - } - - return(TRUE); + ut_ad(!success || pcur->rel_pos == BTR_PCUR_ON); +#ifdef UNIV_DEBUG + if (pcur->pos_state == BTR_PCUR_IS_POSITIONED_OPTIMISTIC) { + ut_ad(pcur->rel_pos == BTR_PCUR_BEFORE + || pcur->rel_pos == BTR_PCUR_AFTER); + } else { + ut_ad(pcur->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad((pcur->rel_pos == BTR_PCUR_ON) + == btr_pcur_is_on_user_rec(pcur)); } +#endif - if (relative_position == BTR_PCUR_AFTER - || relative_position == BTR_PCUR_AFTER_LAST_IN_TREE) { + /* The position may need be adjusted for rel_pos and moves_up. */ - if (moves_up) { + switch (pcur->rel_pos) { + case BTR_PCUR_ON: + if (!success && moves_up) { +next: + btr_pcur_move_to_next(pcur, mtr); return(TRUE); } - - if (btr_pcur_is_on_user_rec(pcur)) { + return(!success); + case BTR_PCUR_AFTER_LAST_IN_TREE: + case BTR_PCUR_BEFORE_FIRST_IN_TREE: + return(TRUE); + case BTR_PCUR_AFTER: + /* positioned to record after pcur->old_rec. */ + pcur->pos_state = BTR_PCUR_IS_POSITIONED; +prev: + if (btr_pcur_is_on_user_rec(pcur) && !moves_up) { btr_pcur_move_to_prev(pcur, mtr); } - return(TRUE); + case BTR_PCUR_BEFORE: + /* For non optimistic restoration: + The position is now set to the record before pcur->old_rec. + + For optimistic restoration: + The position also needs to take the previous search_mode into + consideration. */ + + switch (pcur->pos_state) { + case BTR_PCUR_IS_POSITIONED_OPTIMISTIC: + pcur->pos_state = BTR_PCUR_IS_POSITIONED; + if (pcur->search_mode == PAGE_CUR_GE) { + /* Positioned during Greater or Equal search + with BTR_PCUR_BEFORE. Optimistic restore to + the same record. If scanning for lower then + we must move to previous record. + This can happen with: + HANDLER READ idx a = (const); + HANDLER READ idx PREV; */ + goto prev; + } + return(TRUE); + case BTR_PCUR_IS_POSITIONED: + if (moves_up && btr_pcur_is_on_user_rec(pcur)) { + goto next; + } + return(TRUE); + case BTR_PCUR_WAS_POSITIONED: + case BTR_PCUR_NOT_POSITIONED: + break; + } } - - ut_ad(relative_position == BTR_PCUR_BEFORE - || relative_position == BTR_PCUR_BEFORE_FIRST_IN_TREE); - - if (moves_up && btr_pcur_is_on_user_rec(pcur)) { - btr_pcur_move_to_next(pcur, mtr); - } - + ut_ad(0); return(TRUE); } @@ -4368,6 +4398,14 @@ wrong_offs: btr_pcur_store_position(pcur, &mtr); + /* The found record was not a match, but may be used + as NEXT record (index_next). Set the relative position + to BTR_PCUR_BEFORE, to reflect that the position of + the persistent cursor is before the found/stored row + (pcur->old_rec). */ + ut_ad(pcur->rel_pos == BTR_PCUR_ON); + pcur->rel_pos = BTR_PCUR_BEFORE; + err = DB_RECORD_NOT_FOUND; #if 0 ut_print_name(stderr, trx, FALSE, index->name); @@ -4409,6 +4447,14 @@ wrong_offs: btr_pcur_store_position(pcur, &mtr); + /* The found record was not a match, but may be used + as NEXT record (index_next). Set the relative position + to BTR_PCUR_BEFORE, to reflect that the position of + the persistent cursor is before the found/stored row + (pcur->old_rec). */ + ut_ad(pcur->rel_pos == BTR_PCUR_ON); + pcur->rel_pos = BTR_PCUR_BEFORE; + err = DB_RECORD_NOT_FOUND; #if 0 ut_print_name(stderr, trx, FALSE, index->name); @@ -5119,6 +5165,7 @@ normal_return: pre-fetch queue, but we definitely wrote to the record buffer passed to use by MySQL. */ + DEBUG_SYNC_C("row_search_cached_row"); err = DB_SUCCESS; } diff --git a/storage/xtradb/srv/srv0mon.cc b/storage/xtradb/srv/srv0mon.cc index d98315ae9a2..ea346566e57 100644 --- a/storage/xtradb/srv/srv0mon.cc +++ b/storage/xtradb/srv/srv0mon.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2010, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2010, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -884,13 +884,33 @@ static monitor_info_t innodb_counter_info[] = MONITOR_MODULE, MONITOR_DEFAULT_START, MONITOR_MODULE_INDEX}, - {"index_splits", "index", "Number of index splits", + {"index_page_splits", "index", "Number of index page splits", MONITOR_NONE, MONITOR_DEFAULT_START, MONITOR_INDEX_SPLIT}, - {"index_merges", "index", "Number of index merges", + {"index_page_merge_attempts", "index", + "Number of index page merge attempts", MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_INDEX_MERGE}, + MONITOR_DEFAULT_START, MONITOR_INDEX_MERGE_ATTEMPTS}, + + {"index_page_merge_successful", "index", + "Number of successful index page merges", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_INDEX_MERGE_SUCCESSFUL}, + + {"index_page_reorg_attempts", "index", + "Number of index page reorganization attempts", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_INDEX_REORG_ATTEMPTS}, + + {"index_page_reorg_successful", "index", + "Number of successful index page reorganizations", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_INDEX_REORG_SUCCESSFUL}, + + {"index_page_discards", "index", "Number of index pages discarded", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_INDEX_DISCARD}, /* ========== Counters for Adaptive Hash Index ========== */ {"module_adaptive_hash", "adaptive_hash_index", "Adpative Hash Index", diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc index 3ddfd9ab3a4..64d2d4cc896 100644 --- a/storage/xtradb/srv/srv0start.cc +++ b/storage/xtradb/srv/srv0start.cc @@ -38,6 +38,9 @@ Starts the InnoDB database server Created 2/16/1996 Heikki Tuuri *************************************************************************/ +#include "mysqld.h" +#include "pars0pars.h" +#include "row0ftsort.h" #include "ut0mem.h" #include "mem0mem.h" #include "data0data.h" @@ -1533,6 +1536,10 @@ innobase_start_or_create_for_mysql(void) char* logfile0 = NULL; size_t dirnamelen; + if (srv_force_recovery > SRV_FORCE_NO_TRX_UNDO) { + srv_read_only_mode = true; + } + if (srv_read_only_mode) { ib_logf(IB_LOG_LEVEL_INFO, "Started in read only mode"); } @@ -1798,23 +1805,34 @@ innobase_start_or_create_for_mysql(void) maximum number of threads that can wait in the 'srv_conc array' for their time to enter InnoDB. */ - if (srv_buf_pool_size >= 1000 * 1024 * 1024) { - /* If buffer pool is less than 1000 MB, - assume fewer threads. Also use only one - buffer pool instance */ - srv_max_n_threads = 50000; - - } else if (srv_buf_pool_size >= 8 * 1024 * 1024) { - +#define BUF_POOL_SIZE_THRESHOLD (1024 * 1024 * 1024) + srv_max_n_threads = 1 /* io_ibuf_thread */ + + 1 /* io_log_thread */ + + 1 /* lock_wait_timeout_thread */ + + 1 /* srv_error_monitor_thread */ + + 1 /* srv_monitor_thread */ + + 1 /* srv_master_thread */ + + 1 /* srv_purge_coordinator_thread */ + + 1 /* buf_dump_thread */ + + 1 /* dict_stats_thread */ + + 1 /* fts_optimize_thread */ + + 1 /* recv_writer_thread */ + + 1 /* buf_flush_page_cleaner_thread */ + + 1 /* trx_rollback_or_clean_all_recovered */ + + 128 /* added as margin, for use of + InnoDB Memcached etc. */ + + max_connections + + srv_n_read_io_threads + + srv_n_write_io_threads + + srv_n_purge_threads + /* FTS Parallel Sort */ + + fts_sort_pll_degree * FTS_NUM_AUX_INDEX + * max_connections; + + if (srv_buf_pool_size < BUF_POOL_SIZE_THRESHOLD) { + /* If buffer pool is less than 1 GB, + use only one buffer pool instance */ srv_buf_pool_instances = 1; - srv_max_n_threads = 10000; - } else { - srv_buf_pool_instances = 1; - - /* Saves several MB of memory, especially in - 64-bit computers */ - - srv_max_n_threads = 1000; } srv_boot(); @@ -2629,9 +2647,8 @@ files_checked: srv_undo_tablespaces, srv_undo_logs); if (srv_available_undo_logs == ULINT_UNDEFINED) { - /* Can only happen if force recovery is set. */ - ut_a(srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO - || srv_read_only_mode); + /* Can only happen if server is read only. */ + ut_a(srv_read_only_mode); srv_undo_logs = ULONG_UNDEFINED; } diff --git a/storage/xtradb/sync/sync0arr.cc b/storage/xtradb/sync/sync0arr.cc index 3eed5ae47f7..9dd0259b3f9 100644 --- a/storage/xtradb/sync/sync0arr.cc +++ b/storage/xtradb/sync/sync0arr.cc @@ -315,9 +315,10 @@ sync_cell_get_event( /******************************************************************//** Reserves a wait array cell for waiting for an object. -The event of the cell is reset to nonsignalled state. */ +The event of the cell is reset to nonsignalled state. +@return true if free cell is found, otherwise false */ UNIV_INTERN -void +bool sync_array_reserve_cell( /*====================*/ sync_array_t* arr, /*!< in: wait array */ @@ -374,13 +375,12 @@ sync_array_reserve_cell( cell->thread = os_thread_get_curr_id(); - return; + return(true); } } - ut_error; /* No free cell found */ - - return; + /* No free cell found */ + return false; } /******************************************************************//** @@ -499,7 +499,7 @@ sync_array_cell_print( if (type == SYNC_PRIO_MUTEX) { fprintf(file, - "high-priority waiters flag %lu\n", + "high-priority waiters count %lu\n", (ulong) prio_mutex->high_priority_waiters); } @@ -566,8 +566,8 @@ sync_array_cell_print( } if (prio_rwlock) { - fprintf(file, "high priority S waiters flag %lu, " - "high priority X waiters flag %lu, " + fprintf(file, "high priority S waiters count %lu, " + "high priority X waiters count %lu, " "wait-exclusive waiter is " "high priority if exists: %lu\n", prio_rwlock->high_priority_s_waiters, @@ -1165,7 +1165,7 @@ sync_array_init( ut_a(sync_wait_array == NULL); ut_a(srv_sync_array_size > 0); - ut_a(n_threads > srv_sync_array_size); + ut_a(n_threads > 0); sync_array_size = srv_sync_array_size; diff --git a/storage/xtradb/sync/sync0rw.cc b/storage/xtradb/sync/sync0rw.cc index 785e877d14c..2ff75b55cf6 100644 --- a/storage/xtradb/sync/sync0rw.cc +++ b/storage/xtradb/sync/sync0rw.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -33,6 +33,7 @@ Created 9/11/1995 Heikki Tuuri #include "sync0rw.h" #ifdef UNIV_NONINL #include "sync0rw.ic" +#include "sync0arr.ic" #endif #include "os0thread.h" @@ -408,8 +409,6 @@ rw_lock_validate( /*=============*/ prio_rw_lock_t* lock) /*!< in: rw-lock */ { - ut_ad(lock->high_priority_s_waiters < 2); - ut_ad(lock->high_priority_x_waiters < 2); return(rw_lock_validate(&lock->base_lock)); } @@ -491,26 +490,32 @@ lock_loop: return; /* Success */ } else { + prio_rw_lock_t* prio_rw_lock = NULL; + if (i > 0 && i < SYNC_SPIN_ROUNDS) { goto lock_loop; } rw_lock_stats.rw_s_spin_round_count.add(counter_index, i); - sync_arr = sync_array_get(); - - sync_array_reserve_cell( - sync_arr, lock, - high_priority ? PRIO_RW_LOCK_SHARED : RW_LOCK_SHARED, - file_name, line, &index); + sync_arr = sync_array_get_and_reserve_cell(lock, + high_priority + ? PRIO_RW_LOCK_SHARED + : RW_LOCK_SHARED, + file_name, + line, &index); /* Set waiters before checking lock_word to ensure wake-up signal is sent. This may lead to some unnecessary signals. */ if (high_priority) { - prio_rw_lock_t* prio_rw_lock - = (prio_rw_lock_t *) _lock; - prio_rw_lock->high_priority_s_waiters = 1; + + prio_rw_lock = reinterpret_cast<prio_rw_lock_t *> + (_lock); + os_atomic_increment_ulint( + &prio_rw_lock->high_priority_s_waiters, + 1); } else { + rw_lock_set_waiter_flag(lock); } @@ -519,6 +524,12 @@ lock_loop: && (TRUE == rw_lock_s_lock_low(lock, pass, file_name, line))) { sync_array_free_cell(sync_arr, index); + if (prio_rw_lock) { + + os_atomic_decrement_ulint( + &prio_rw_lock->high_priority_s_waiters, + 1); + } return; /* Success */ } @@ -536,6 +547,13 @@ lock_loop: sync_array_wait_event(sync_arr, index); + if (prio_rw_lock) { + + os_atomic_decrement_ulint( + &prio_rw_lock->high_priority_s_waiters, + 1); + } + i = 0; goto lock_loop; } @@ -584,6 +602,7 @@ rw_lock_x_lock_wait( ulint i = 0; sync_array_t* sync_arr; size_t counter_index; + prio_rw_lock_t* prio_rw_lock = NULL; /* We reuse the thread id to index into the counter, cache it here for efficiency. */ @@ -604,15 +623,14 @@ rw_lock_x_lock_wait( /* If there is still a reader, then go to sleep.*/ rw_lock_stats.rw_x_spin_round_count.add(counter_index, i); - sync_arr = sync_array_get(); - - sync_array_reserve_cell( - sync_arr, lock, RW_LOCK_WAIT_EX, - file_name, line, &index); + sync_arr = sync_array_get_and_reserve_cell(lock, + RW_LOCK_WAIT_EX, + file_name, + line, &index); if (high_priority) { - prio_rw_lock_t* prio_rw_lock + prio_rw_lock = reinterpret_cast<prio_rw_lock_t *>(lock); prio_rw_lock->high_priority_wait_ex_waiter = 1; } @@ -643,6 +661,10 @@ rw_lock_x_lock_wait( We must pass the while-loop check to proceed.*/ } else { sync_array_free_cell(sync_arr, index); + if (prio_rw_lock) { + + prio_rw_lock->high_priority_wait_ex_waiter = 0; + } } } rw_lock_stats.rw_x_spin_round_count.add(counter_index, i); @@ -739,6 +761,7 @@ rw_lock_x_lock_func( sync_array_t* sync_arr; ibool spinning = FALSE; size_t counter_index; + prio_rw_lock_t* prio_lock = NULL; /* We reuse the thread id to index into the counter, cache it here for efficiency. */ @@ -810,24 +833,31 @@ lock_loop: } } - sync_arr = sync_array_get(); - - sync_array_reserve_cell( - sync_arr, lock, - high_priority ? PRIO_RW_LOCK_EX : RW_LOCK_EX, - file_name, line, &index); + sync_arr = sync_array_get_and_reserve_cell(lock, + high_priority + ? PRIO_RW_LOCK_EX + : RW_LOCK_EX, + file_name, line, &index); /* Waiters must be set before checking lock_word, to ensure signal is sent. This could lead to a few unnecessary wake-up signals. */ if (high_priority) { - prio_rw_lock_t* prio_lock = (prio_rw_lock_t *)lock; - prio_lock->high_priority_x_waiters = 1; + + prio_lock = reinterpret_cast<prio_rw_lock_t *>(lock); + os_atomic_increment_ulint(&prio_lock->high_priority_x_waiters, + 1); } else { rw_lock_set_waiter_flag(lock); } if (rw_lock_x_lock_low(lock, high_priority, pass, file_name, line)) { sync_array_free_cell(sync_arr, index); + if (prio_lock) { + + os_atomic_decrement_ulint( + &prio_lock->high_priority_x_waiters, + 1); + } return; /* Locking succeeded */ } @@ -845,6 +875,12 @@ lock_loop: sync_array_wait_event(sync_arr, index); + if (prio_lock) { + + os_atomic_decrement_ulint(&prio_lock->high_priority_x_waiters, + 1); + } + i = 0; goto lock_loop; } diff --git a/storage/xtradb/sync/sync0sync.cc b/storage/xtradb/sync/sync0sync.cc index e4c34faf13d..84854892d7b 100644 --- a/storage/xtradb/sync/sync0sync.cc +++ b/storage/xtradb/sync/sync0sync.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -33,6 +33,7 @@ Created 9/5/1995 Heikki Tuuri #include "sync0sync.h" #ifdef UNIV_NONINL #include "sync0sync.ic" +#include "sync0arr.ic" #endif #include "sync0rw.h" @@ -126,7 +127,7 @@ it and did not see the waiters byte set to 1, a case which would lead the other thread to an infinite wait. LEMMA 1: After a thread resets the event of a mutex (or rw_lock), some -======= +====== thread will eventually call os_event_set() on that particular event. Thus no infinite wait is possible in this case. @@ -139,7 +140,7 @@ os_event_set() with the mutex as an argument. Q.E.D. LEMMA 2: If an os_event_set() call is made after some thread has called -======= +====== the os_event_reset() and before it starts wait on that event, the call will not be lost to the second thread. This is true even if there is an intervening call to os_event_reset() by another thread. @@ -550,7 +551,8 @@ mutex_spin_wait( /* The typecast below is performed for some of the priority mutexes too, when !high_priority. This exploits the fact that regular mutex is a prefix of the priority mutex in memory. */ - ib_mutex_t* mutex = (ib_mutex_t *) _mutex; + ib_mutex_t* mutex = (ib_mutex_t *) _mutex; + ib_prio_mutex_t* prio_mutex = NULL; counter_index = (size_t) os_thread_get_curr_id(); @@ -611,11 +613,11 @@ spin_loop: goto spin_loop; } - sync_arr = sync_array_get(); - - sync_array_reserve_cell( - sync_arr, mutex, high_priority ? SYNC_PRIO_MUTEX : SYNC_MUTEX, - file_name, line, &index); + sync_arr = sync_array_get_and_reserve_cell(mutex, + high_priority + ? SYNC_PRIO_MUTEX + : SYNC_MUTEX, + file_name, line, &index); /* The memory order of the array reservation and the change in the waiters field is important: when we suspend a thread, we first @@ -624,8 +626,12 @@ spin_loop: then the event is set to the signaled state. */ if (high_priority) { - ((ib_prio_mutex_t *)_mutex)->high_priority_waiters = 1; + + prio_mutex = reinterpret_cast<ib_prio_mutex_t *>(_mutex); + os_atomic_increment_ulint(&prio_mutex->high_priority_waiters, + 1); } else { + mutex_set_waiters(mutex, 1); } @@ -641,6 +647,11 @@ spin_loop: mutex_set_debug_info(mutex, file_name, line); #endif + if (prio_mutex) { + os_atomic_decrement_ulint( + &prio_mutex->high_priority_waiters, + 1); + } return; /* Note that in this case we leave the waiters field @@ -658,6 +669,7 @@ spin_loop: mutex->count_os_wait++; sync_array_wait_event(sync_arr, index); + goto mutex_loop; } @@ -1216,6 +1228,7 @@ sync_thread_add_level( case SYNC_RECV: case SYNC_FTS_BG_THREADS: case SYNC_WORK_QUEUE: + case SYNC_FTS_TOKENIZE: case SYNC_FTS_OPTIMIZE: case SYNC_FTS_CACHE: case SYNC_FTS_CACHE_INIT: diff --git a/storage/xtradb/trx/trx0purge.cc b/storage/xtradb/trx/trx0purge.cc index 3dfcf23c3f5..9d9fe73de6e 100644 --- a/storage/xtradb/trx/trx0purge.cc +++ b/storage/xtradb/trx/trx0purge.cc @@ -1261,11 +1261,13 @@ run_synchronously: ut_a(purge_sys->n_submitted == purge_sys->n_completed); #ifdef UNIV_DEBUG + rw_lock_x_lock(&purge_sys->latch); if (purge_sys->limit.trx_no == 0) { purge_sys->done = purge_sys->iter; } else { purge_sys->done = purge_sys->limit; } + rw_lock_x_unlock(&purge_sys->latch); #endif /* UNIV_DEBUG */ if (truncate) { diff --git a/storage/xtradb/trx/trx0sys.cc b/storage/xtradb/trx/trx0sys.cc index b40721838a5..ed3d177820f 100644 --- a/storage/xtradb/trx/trx0sys.cc +++ b/storage/xtradb/trx/trx0sys.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -1020,7 +1020,7 @@ trx_sys_create_rsegs( ut_a(n_spaces < TRX_SYS_N_RSEGS); ut_a(n_rsegs <= TRX_SYS_N_RSEGS); - if (srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO || srv_read_only_mode) { + if (srv_read_only_mode) { return(ULINT_UNDEFINED); } diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc index 0e2b821738e..04423ea3662 100644 --- a/storage/xtradb/trx/trx0trx.cc +++ b/storage/xtradb/trx/trx0trx.cc @@ -276,6 +276,12 @@ trx_create(void) trx->op_info = ""; + trx->api_trx = false; + + trx->api_auto_commit = false; + + trx->read_write = true; + heap = mem_heap_create(sizeof(ib_vector_t) + sizeof(void*) * 8); heap_alloc = ib_heap_allocator_create(heap); @@ -560,7 +566,6 @@ trx_list_rw_insert_ordered( if (trx2 == NULL) { UT_LIST_ADD_FIRST(trx_list, trx_sys->rw_trx_list, trx); - ut_d(trx_sys->rw_max_trx_id = trx->id); } else { UT_LIST_INSERT_AFTER( trx_list, trx_sys->rw_trx_list, trx2, trx); @@ -569,6 +574,12 @@ trx_list_rw_insert_ordered( UT_LIST_ADD_LAST(trx_list, trx_sys->rw_trx_list, trx); } +#ifdef UNIV_DEBUG + if (trx->id > trx_sys->rw_max_trx_id) { + trx_sys->rw_max_trx_id = trx->id; + } +#endif /* UNIV_DEBUG */ + ut_ad(!trx->in_rw_trx_list); ut_d(trx->in_rw_trx_list = TRUE); } @@ -927,7 +938,7 @@ trx_assign_rseg_low( trx_rseg_t* rseg; static ulint latest_rseg = 0; - if (srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO || srv_read_only_mode) { + if (srv_read_only_mode) { ut_a(max_undo_logs == ULONG_UNDEFINED); return(NULL); } @@ -943,7 +954,9 @@ trx_assign_rseg_low( the array. Once we implement more flexible rollback segment management this may not hold. The assertion checks for that case. */ - ut_a(trx_sys->rseg_array[0] != NULL); + if (trx_sys->rseg_array[0] == NULL) { + return(NULL); + } /* Skip the system tablespace if we have more than one tablespace defined for rollback segments. We want all UNDO records to be in @@ -998,10 +1011,12 @@ trx_start_low( ut_ad(UT_LIST_GET_LEN(trx->lock.trx_locks) == 0); /* Check whether it is an AUTOCOMMIT SELECT */ - trx->auto_commit = thd_trx_is_auto_commit(trx->mysql_thd); + trx->auto_commit = (trx->api_trx && trx->api_auto_commit) + || thd_trx_is_auto_commit(trx->mysql_thd); trx->read_only = - (!trx->ddl && thd_trx_is_read_only(trx->mysql_thd)) + (trx->api_trx && !trx->read_write) + || (!trx->ddl && thd_trx_is_read_only(trx->mysql_thd)) || srv_read_only_mode; if (!trx->auto_commit) { @@ -1060,7 +1075,12 @@ trx_start_low( ut_ad(!trx_is_autocommit_non_locking(trx)); UT_LIST_ADD_FIRST(trx_list, trx_sys->rw_trx_list, trx); ut_d(trx->in_rw_trx_list = TRUE); - ut_d(trx_sys->rw_max_trx_id = trx->id); + +#ifdef UNIV_DEBUG + if (trx->id > trx_sys->rw_max_trx_id) { + trx_sys->rw_max_trx_id = trx->id; + } +#endif /* UNIV_DEBUG */ trx_reserve_descriptor(trx); } @@ -1190,11 +1210,11 @@ trx_write_serialisation_history( MONITOR_INC(MONITOR_TRX_COMMIT_UNDO); #ifdef WITH_WSREP - sys_header = trx_sysf_get(&mtr); + sys_header = trx_sysf_get(mtr); /* Update latest MySQL wsrep XID in trx sys header. */ - if (wsrep_is_wsrep_xid(&trx->xid)) + if (wsrep_is_wsrep_xid((const void *)&trx->xid)) { - trx_sys_update_wsrep_checkpoint(&trx->xid, sys_header, &mtr); + trx_sys_update_wsrep_checkpoint(&trx->xid, sys_header, mtr); } #endif /* WITH_WSREP */ @@ -1208,7 +1228,7 @@ trx_write_serialisation_history( trx_sys_update_mysql_binlog_offset( trx->mysql_log_file_name, trx->mysql_log_offset, - TRX_SYS_MYSQL_LOG_INFO, + TRX_SYS_MYSQL_LOG_INFO, #ifdef WITH_WSREP sys_header, #endif /* WITH_WSREP */ @@ -1522,7 +1542,7 @@ trx_commit_in_memory( trx->lock.was_chosen_as_deadlock_victim = FALSE; } #endif - ut_ad(trx_sys->descr_n_used <= UT_LIST_GET_LEN(trx_sys->rw_trx_list)); + trx->dict_operation = TRX_DICT_OP_NONE; trx->error_state = DB_SUCCESS; diff --git a/storage/xtradb/ut/ut0ut.cc b/storage/xtradb/ut/ut0ut.cc index f8a1593937a..f600ba1a895 100644 --- a/storage/xtradb/ut/ut0ut.cc +++ b/storage/xtradb/ut/ut0ut.cc @@ -821,6 +821,8 @@ ut_strerr( return("Identifier name is too long"); case DB_FTS_EXCEED_RESULT_CACHE_LIMIT: return("FTS query exceeds result cache limit"); + case DB_TEMP_FILE_WRITE_FAILURE: + return("Temp file write failure"); /* do not add default: in order to produce a warning if new code is added to the enum but not added here */ diff --git a/strings/CMakeLists.txt b/strings/CMakeLists.txt index 1b26b3d962a..e1cee8d9824 100644 --- a/strings/CMakeLists.txt +++ b/strings/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2010, Oracle and/or its affiliates +# Copyright (c) 2006, 2013, Oracle and/or its affiliates # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -35,3 +35,8 @@ ADD_CONVENIENCE_LIBRARY(strings ${STRINGS_SOURCES}) ADD_EXECUTABLE(conf_to_src EXCLUDE_FROM_ALL conf_to_src.c) TARGET_LINK_LIBRARIES(conf_to_src strings) + +INSTALL_DEBUG_SYMBOLS(strings) +IF(MSVC) + INSTALL_DEBUG_TARGET(strings DESTINATION ${INSTALL_LIBDIR}/debug) +ENDIF() diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 52dae7912af..6e861f38ae4 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -276,36 +276,43 @@ void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len, ulong *nr1, ulong *nr2) { - const uchar *pos = key; - + ulong tmp1= *nr1; + ulong tmp2= *nr2; + /* Remove trailing spaces. We have to do this to be able to compare 'A ' and 'A' as identical */ - key= skip_trailing_space(key, len); + const uchar *end = skip_trailing_space(key, len); - for (; pos < (uchar*) key ; pos++) + for (; key < end ; key++) { - nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); - nr2[0]+=3; + tmp1^= (ulong) ((((uint) tmp1 & 63) + tmp2) * + ((uint) *key)) + (tmp1 << 8); + tmp2+= 3; } + + *nr1= tmp1; + *nr2= tmp2; } void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2) { - const uchar *pos = key; - - key+= len; - - for (; pos < (uchar*) key ; pos++) + const uchar *end = key + len; + ulong tmp1= *nr1; + ulong tmp2= *nr2; + + for (; key < end ; key++) { - nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); - nr2[0]+=3; + tmp1^= (ulong) ((((uint) tmp1 & 63) + tmp2) * + ((uint) *key)) + (tmp1 << 8); + tmp2+= 3; } + + *nr1= tmp1; + *nr2= tmp2; } diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index 4c3256e2db8..f4e70fd1dd5 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2009-2011, Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -680,18 +680,16 @@ void my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2) { - const uchar *pos = key; - /* Remove trailing spaces. We have to do this to be able to compare 'A ' and 'A' as identical */ - key= skip_trailing_space(key, len); + const uchar *end = skip_trailing_space(key, len); - for (; pos < (uchar*) key ; pos++) + for (; key < end ; key++) { nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); + ((uint)*key)) + (nr1[0] << 8); nr2[0]+=3; } } diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 7a06570d5b5..f5484965314 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -1,6 +1,5 @@ -/* Copyright (c) 2002-2007 MySQL AB, 2009 Sun Microsystems, Inc. - Copyright (c) 2009-2011, Monty Program Ab - Use is subject to license terms. +/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 87c441bf40b..5165a43e852 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -1,5 +1,5 @@ -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. - Copyright (c) 2009, 2011, Monty Program Ab +/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -22467,7 +22467,7 @@ wstr_to_str(char *str, size_t length, my_wc_t *wc, size_t wlength) static void my_charset_loader_error_for_rule(MY_CHARSET_LOADER *loader, - const MY_COLL_RULE *r, + const MY_COLL_RULE *r __attribute__((unused)), const char *name, my_wc_t *wc, size_t wlength) { diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index 8a5e92fd6ce..a7f948ebe3a 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -1,5 +1,5 @@ -/* Copyright (c) 2003, 2012, Oracle and/or its affiliates - Copyright (c) 2009, 2013, Monty Program Ab. +/* Copyright (c) 2003, 2013, Oracle and/or its affiliates + Copyright (c) 2009, 2014, SkySQL Ab. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -3311,17 +3311,15 @@ static void my_hash_sort_ucs2_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2) { - const uchar *pos = key; - - key+= len; + const uchar *end = key + len; - while (key > pos+1 && key[-1] == ' ' && key[-2] == '\0') - key-= 2; + while (end > key+1 && end[-1] == ' ' && end[-2] == '\0') + end-= 2; - for (; pos < (uchar*) key ; pos++) + for (; key < (uchar*) end ; key++) { nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); + ((uint)*key)) + (nr1[0] << 8); nr2[0]+=3; } } diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index e564a85c828..aba179b154c 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -26,6 +26,7 @@ #define EILSEQ ENOENT #endif +#define IS_CONTINUATION_BYTE(c) (((c) ^ 0x80) < 0x40) #define MY_UTF8MB3_GENERAL_CI MY_UTF8MB3 "_general_ci" #define MY_UTF8MB3_GENERAL_CS MY_UTF8MB3 "_general_cs" @@ -56,6 +57,46 @@ #define HAVE_UNIDATA #endif + +#if defined(HAVE_CHARSET_utf8) || defined(HAVE_CHARSET_utf8mb4) + +static inline +int my_valid_mbcharlen_utf8mb3(const uchar *s, const uchar *e) +{ + uchar c; + + DBUG_ASSERT(s < e); + c= s[0]; + if (c < 0x80) + return 1; + + if (c < 0xc2) + return MY_CS_ILSEQ; + + if (c < 0xe0) + { + if (s+2 > e) /* We need 2 characters */ + return MY_CS_TOOSMALL2; + + if (!(IS_CONTINUATION_BYTE(s[1]))) + return MY_CS_ILSEQ; + + return 2; + } + + DBUG_ASSERT(c < 0xf0); + if (s+3 > e) /* We need 3 characters */ + return MY_CS_TOOSMALL3; + + if (!(IS_CONTINUATION_BYTE(s[1]) && IS_CONTINUATION_BYTE(s[2]) && + (c >= 0xe1 || s[1] >= 0xa0))) + return MY_CS_ILSEQ; + + return 3; +} + +#endif /*HAVE_CHARSET_utf8 || HAVE_CHARSET_utf8mb4*/ + #ifdef HAVE_UNIDATA #include "my_uctype.h" @@ -4806,7 +4847,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if (s+2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; - if (!((s[1] ^ 0x80) < 0x40)) + if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc = ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); @@ -4817,7 +4858,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if (s+3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; - if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && IS_CONTINUATION_BYTE(s[2]) && (c >= 0xe1 || s[1] >= 0xa0))) return MY_CS_ILSEQ; @@ -4833,9 +4874,9 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if (s+4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && (c >= 0xf1 || s[1] >= 0x90))) return MY_CS_ILSEQ; @@ -4851,10 +4892,10 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if (s+5 >e) /* We need 5 characters */ return MY_CS_TOOSMALL5; - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && - (s[4] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + IS_CONTINUATION_BYTE(s[4]) && (c >= 0xf9 || s[1] >= 0x88))) return MY_CS_ILSEQ; @@ -4870,11 +4911,11 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if ( s+6 >e ) /* We need 6 characters */ return MY_CS_TOOSMALL6; - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && - (s[4] ^ 0x80) < 0x40 && - (s[5] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + IS_CONTINUATION_BYTE(s[4]) && + IS_CONTINUATION_BYTE(s[5]) && (c >= 0xfd || s[1] >= 0x84))) return MY_CS_ILSEQ; @@ -4918,11 +4959,11 @@ static int my_utf8_uni_no_range(CHARSET_INFO *cs __attribute__((unused)), *pwc = ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); return 2; } - + if (c < 0xf0) { - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && (c >= 0xe1 || s[1] >= 0xa0))) return MY_CS_ILSEQ; @@ -5404,10 +5445,90 @@ int my_wildcmp_utf8(CHARSET_INFO *cs, } +static +int my_valid_mbcharlen_utf8(CHARSET_INFO *cs __attribute__((unused)), + const uchar *s, const uchar *e) +{ + uchar c; + + if (s >= e) + return MY_CS_TOOSMALL; + + c= s[0]; + if (c < 0xf0) + return my_valid_mbcharlen_utf8mb3(s, e); + +#ifdef UNICODE_32BIT + if (c < 0xf8 && sizeof(my_wc_t)*8 >= 32) + { + if (s+4 > e) /* We need 4 characters */ + return MY_CS_TOOSMALL4; + + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + (c >= 0xf1 || s[1] >= 0x90))) + return MY_CS_ILSEQ; + + return 4; + } + if (c < 0xfc && sizeof(my_wc_t)*8 >= 32) + { + if (s+5 >e) /* We need 5 characters */ + return MY_CS_TOOSMALL5; + + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + IS_CONTINUATION_BYTE(s[4]) && + (c >= 0xf9 || s[1] >= 0x88))) + return MY_CS_ILSEQ; + + return 5; + } + if (c < 0xfe && sizeof(my_wc_t)*8 >= 32) + { + if ( s+6 >e ) /* We need 6 characters */ + return MY_CS_TOOSMALL6; + + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + IS_CONTINUATION_BYTE(s[4]) && + IS_CONTINUATION_BYTE(s[5]) && + (c >= 0xfd || s[1] >= 0x84))) + return MY_CS_ILSEQ; + + return 6; + } +#endif + return MY_CS_ILSEQ; +} + +static size_t +my_well_formed_len_utf8(CHARSET_INFO *cs, const char *b, const char *e, + size_t pos, int *error) +{ + const char *b_start= b; + *error= 0; + while (pos) + { + int mb_len; + + if ((mb_len= my_valid_mbcharlen_utf8(cs, (uchar*) b, (uchar*) e)) <= 0) + { + *error= b < e ? 1 : 0; + break; + } + b+= mb_len; + pos--; + } + return (size_t) (b - b_start); +} + static uint my_ismbchar_utf8(CHARSET_INFO *cs,const char *b, const char *e) { - my_wc_t wc; - int res= my_utf8_uni(cs,&wc, (const uchar*)b, (const uchar*)e); + int res= my_valid_mbcharlen_utf8(cs, (const uchar*)b, (const uchar*)e); return (res>1) ? res : 0; } @@ -5472,7 +5593,7 @@ MY_CHARSET_HANDLER my_charset_utf8_handler= my_mbcharlen_utf8, my_numchars_mb, my_charpos_mb, - my_well_formed_len_mb, + my_well_formed_len_utf8, my_lengthsp_8bit, my_numcells_mb, my_utf8_uni, @@ -7244,7 +7365,7 @@ my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), if (s + 2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; - if (!((s[1] ^ 0x80) < 0x40)) + if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); @@ -7255,7 +7376,7 @@ my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), if (s + 3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; - if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && IS_CONTINUATION_BYTE(s[2]) && (c >= 0xe1 || s[1] >= 0xa0))) return MY_CS_ILSEQ; @@ -7288,9 +7409,9 @@ my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), [F4][80..8F][80..BF][80..BF] */ - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && (c >= 0xf1 || s[1] >= 0x90) && (c <= 0xf3 || s[1] <= 0x8F))) return MY_CS_ILSEQ; @@ -7326,17 +7447,17 @@ my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)), if (c < 0xe0) { - if (!((s[1] ^ 0x80) < 0x40)) + if (!IS_CONTINUATION_BYTE(s[1])) return MY_CS_ILSEQ; *pwc = ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); return 2; } - + if (c < 0xf0) { - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && (c >= 0xe1 || s[1] >= 0xa0))) return MY_CS_ILSEQ; *pwc= ((my_wc_t) (c & 0x0f) << 12) | @@ -7347,9 +7468,9 @@ my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)), } else if (c < 0xf5) { - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && (c >= 0xf1 || s[1] >= 0x90) && (c <= 0xf3 || s[1] <= 0x8F))) return MY_CS_ILSEQ; @@ -7836,11 +7957,84 @@ my_wildcmp_utf8mb4(CHARSET_INFO *cs, } +static int +my_valid_mbcharlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), + const uchar *s, const uchar *e) +{ + uchar c; + + if (s >= e) + return MY_CS_TOOSMALL; + + c= s[0]; + if (c < 0xf0) + return my_valid_mbcharlen_utf8mb3(s, e); + + if (c < 0xf5) + { + if (s + 4 > e) /* We need 4 characters */ + return MY_CS_TOOSMALL4; + + /* + UTF-8 quick four-byte mask: + 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + Encoding allows to encode U+00010000..U+001FFFFF + + The maximum character defined in the Unicode standard is U+0010FFFF. + Higher characters U+00110000..U+001FFFFF are not used. + + 11110000.10010000.10xxxxxx.10xxxxxx == F0.90.80.80 == U+00010000 (min) + 11110100.10001111.10111111.10111111 == F4.8F.BF.BF == U+0010FFFF (max) + + Valid codes: + [F0][90..BF][80..BF][80..BF] + [F1][80..BF][80..BF][80..BF] + [F2][80..BF][80..BF][80..BF] + [F3][80..BF][80..BF][80..BF] + [F4][80..8F][80..BF][80..BF] + */ + + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + (c >= 0xf1 || s[1] >= 0x90) && + (c <= 0xf3 || s[1] <= 0x8F))) + return MY_CS_ILSEQ; + + return 4; + } + + return MY_CS_ILSEQ; +} + + +static +size_t my_well_formed_len_utf8mb4(CHARSET_INFO *cs, + const char *b, const char *e, + size_t pos, int *error) +{ + const char *b_start= b; + *error= 0; + while (pos) + { + int mb_len; + + if ((mb_len= my_valid_mbcharlen_utf8mb4(cs, (uchar*) b, (uchar*) e)) <= 0) + { + *error= b < e ? 1 : 0; + break; + } + b+= mb_len; + pos--; + } + return (size_t) (b - b_start); +} + + static uint my_ismbchar_utf8mb4(CHARSET_INFO *cs, const char *b, const char *e) { - my_wc_t wc; - int res= my_mb_wc_utf8mb4(cs,&wc, (const uchar*)b, (const uchar*)e); + int res= my_valid_mbcharlen_utf8mb4(cs, (const uchar*)b, (const uchar*)e); return (res > 1) ? res : 0; } @@ -7901,7 +8095,7 @@ MY_CHARSET_HANDLER my_charset_utf8mb4_handler= my_mbcharlen_utf8mb4, my_numchars_mb, my_charpos_mb, - my_well_formed_len_mb, + my_well_formed_len_utf8mb4, my_lengthsp_8bit, my_numcells_mb, my_mb_wc_utf8mb4, @@ -7963,7 +8157,8 @@ struct charset_info_st my_charset_utf8mb4_general_ci= struct charset_info_st my_charset_utf8mb4_bin= { 46,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_UNICODE_SUPPLEMENT, /* state */ + MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_STRNXFRM|MY_CS_UNICODE| + MY_CS_UNICODE_SUPPLEMENT, /* state */ MY_UTF8MB4, /* cs name */ MY_UTF8MB4_BIN, /* name */ "UTF-8 Unicode", /* comment */ diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index 20449788584..244cfdc9b3c 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -1,6 +1,5 @@ -/* Copyright (c) 2001 Jan Pazdziora. - Copyright (c) 2002-2007 MySQL AB - Copyright (c) 2009-2011, Monty Program Ab +/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/strings/ctype.c b/strings/ctype.c index c78736f10c8..566dc0331c4 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -1,7 +1,5 @@ -/* Copyright (c) 2000-2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc. - Copyright (c) 2009-2011, Monty Program Ab - Use is subject to license terms. - Copyright (c) 2009-2011, Monty Program Ab +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/strings/decimal.c b/strings/decimal.c index 6d39d9aec78..2156e095315 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -353,7 +353,7 @@ int decimal2string(const decimal_t *from, char *to, int *to_len, if (!(intg_len= fixed_precision ? fixed_intg : intg)) intg_len= 1; frac_len= fixed_precision ? fixed_decimals : frac; - len= from->sign + intg_len + test(frac) + frac_len; + len= from->sign + intg_len + MY_TEST(frac) + frac_len; if (fixed_precision) { if (frac > fixed_decimals) @@ -379,7 +379,7 @@ int decimal2string(const decimal_t *from, char *to, int *to_len, } else frac-=j; - len= from->sign + intg_len + test(frac) + frac_len; + len= from->sign + intg_len + MY_TEST(frac) + frac_len; } *to_len=len; s[len]=0; diff --git a/strings/t_ctype.h b/strings/t_ctype.h index 8198d3eada8..a4fdd267c3f 100644 --- a/strings/t_ctype.h +++ b/strings/t_ctype.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2001, 2003 MySQL AB + Use is subject to license terms 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 diff --git a/support-files/MySQL-shared-compat.spec.sh b/support-files/MySQL-shared-compat.spec.sh index a8d5dd7c8c9..46935d83d17 100644 --- a/support-files/MySQL-shared-compat.spec.sh +++ b/support-files/MySQL-shared-compat.spec.sh @@ -1,4 +1,4 @@ -# Copyright 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc. +# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. # # MySQL-shared-compat.spec # diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp index ef8d68a09d2..de390839704 100644 --- a/support-files/compiler_warnings.supp +++ b/support-files/compiler_warnings.supp @@ -52,6 +52,12 @@ log/log0log\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer t log/log0online\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer type # +# Xtradb engine +# +storage/xtradb/handler/ha_innodb\.cc: ignoring return value of +storage/xtradb/row/row0log\.cc: ignoring return value of + +# # bdb is not critical to keep up to date # .*/bdb/.* : .*discards qualifiers from pointer target type.* @@ -172,6 +178,15 @@ vio/viosslfactories\.c: discards ~const~ qualifier from pointer target type # jemalloc # jemalloc/src/jemalloc\.c: always_inline function might not be inlinable +jemalloc/src/jemalloc\.c: set but not used + +# +# Connect engine +# +storage/connect/connect\.cc: might be clobbered by ~longjmp~ +storage/connect/filamvct\.cpp: ignoring return value of +storage/connect/filamvct\.cpp: might be clobbered by ~longjmp~ +storage/connect/xindex\.cpp: ignoring return value of # # Unexplanable (?) stuff diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 8da75c92a6c..b763117188f 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -148,74 +148,12 @@ parse_server_arguments() { datadir_set=1 ;; --pid-file=*) mysqld_pid_file_path=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; + --socket=*) socket=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --service-startup-timeout=*) service_startup_timeout=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; esac done } -wait_for_pid () { - verb="$1" # created | removed - pid="$2" # process ID of the program operating on the pid-file - pid_file_path="$3" # path to the PID file. - - sst_progress_file=$datadir/sst_in_progress - i=0 - avoid_race_condition="by checking again" - - while test $i -ne $service_startup_timeout ; do - - case "$verb" in - 'created') - # wait for a PID-file to pop into existence. - test -s "$pid_file_path" && i='' && break - ;; - 'removed') - # wait for this PID-file to disappear - test ! -s "$pid_file_path" && i='' && break - ;; - *) - echo "wait_for_pid () usage: wait_for_pid created|removed pid pid_file_path" - exit 1 - ;; - esac - - # if server isn't running, then pid-file will never be updated - if test -n "$pid"; then - if kill -0 "$pid" 2>/dev/null; then - : # the server still runs - else - # The server may have exited between the last pid-file check and now. - if test -n "$avoid_race_condition"; then - avoid_race_condition="" - continue # Check again. - fi - - # there's nothing that will affect the file. - log_failure_msg "The server quit without updating PID file ($pid_file_path)." - return 1 # not waiting any more. - fi - fi - - if test -e $sst_progress_file && [ $startup_sleep -ne 10 ];then - echo $echo_n "SST in progress, setting sleep higher" - startup_sleep=10 - fi - - echo $echo_n ".$echo_c" - i=`expr $i + 1` - sleep $startup_sleep - - done - - if test -z "$i" ; then - log_success_msg - return 0 - else - log_failure_msg - return 1 - fi -} - # Get arguments from the my.cnf file, # the only group, which is read from now on is [mysqld] if test -x ./bin/my_print_defaults @@ -273,6 +211,75 @@ fi parse_server_arguments `$print_defaults $extra_args mysqld server mysql_server mysql.server` +# wait for the pid file to disappear +wait_for_gone () { + pid="$1" # process ID of the program operating on the pid-file + pid_file_path="$2" # path to the PID file. + + i=0 + crash_protection="by checking again" + + while test $i -ne $service_startup_timeout ; do + + if kill -0 "$pid" 2>/dev/null; then + : # the server still runs + else + if test ! -s "$pid_file_path"; then + # no server process and no pid-file? great, we're done! + log_success_msg + return 0 + fi + + # pid-file exists, the server process doesn't. + # it must've crashed, and mysqld_safe will restart it + if test -n "$crash_protection"; then + crash_protection="" + sleep 5 + continue # Check again. + fi + + # Cannot help it + log_failure_msg "The server quit without updating PID file ($pid_file_path)." + return 1 # not waiting any more. + fi + + echo $echo_n ".$echo_c" + i=`expr $i + 1` + sleep 1 + + done + + log_failure_msg + return 1 +} + +wait_for_ready () { + + test -n "$socket" && sockopt="--socket=$socket" + + sst_progress_file=$datadir/sst_in_progress + i=0 + while test $i -ne $service_startup_timeout ; do + + if $bindir/mysqladmin $sockopt ping >/dev/null 2>&1; then + log_success_msg + return 0 + fi + + if test -e $sst_progress_file && [ $startup_sleep -ne 10 ];then + echo $echo_n "SST in progress, setting sleep higher" + startup_sleep=10 + fi + + echo $echo_n ".$echo_c" + i=`expr $i + 1` + sleep $startup_sleep + + done + + log_failure_msg + return 1 +} # # Set pid file if not given # @@ -299,7 +306,7 @@ case "$mode" in # Give extra arguments to mysqld with the my.cnf file. This script # may be overwritten at next upgrade. $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 & - wait_for_pid created "$!" "$mysqld_pid_file_path"; return_value=$? + wait_for_ready; return_value=$? # Make lock for RedHat / SuSE if test -w "$lockdir" @@ -326,7 +333,7 @@ case "$mode" in echo $echo_n "Shutting down MySQL" kill $mysqld_pid # mysqld should remove the pid file when it exits, so wait for it. - wait_for_pid removed "$mysqld_pid" "$mysqld_pid_file_path"; return_value=$? + wait_for_gone $mysqld_pid "$mysqld_pid_file_path"; return_value=$? else log_failure_msg "MySQL server process #$mysqld_pid is not running!" rm "$mysqld_pid_file_path" diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index c36937c9514..254c1ea197c 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1105,7 +1105,9 @@ echo "=====" >> $STATUS_HISTORY %doc release/support-files/wsrep_notify %endif +%if 0%{?commercial} %doc %attr(644, root, root) %{_infodir}/mysql.info* +%endif %doc %attr(644, root, man) %{_mandir}/man1/innochecksum.1* %doc %attr(644, root, man) %{_mandir}/man1/my_print_defaults.1* @@ -1276,6 +1278,9 @@ echo "=====" >> $STATUS_HISTORY # merging BK trees) ############################################################################## %changelog +* Wed Oct 30 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> +- Removed non gpl file docs/mysql.info from community packages + * Mon Sep 09 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - Updated logic to get the correct count of PID files diff --git a/support-files/rpm/server-postun.sh b/support-files/rpm/server-postun.sh index 652d59154ae..dcf67173a02 100644 --- a/support-files/rpm/server-postun.sh +++ b/support-files/rpm/server-postun.sh @@ -1,7 +1,8 @@ if [ $1 -ge 1 ]; then if [ -x %{_sysconfdir}/init.d/mysql ] ; then # only restart the server if it was alredy running - %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1 && \ - %{_sysconfdir}/init.d/mysql restart + if %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then + %{_sysconfdir}/init.d/mysql restart + fi fi fi diff --git a/tests/connect_test.c b/tests/connect_test.c index 3e23922031b..f30d0f2edba 100644 --- a/tests/connect_test.c +++ b/tests/connect_test.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002-2004 MySQL AB + Use is subject to license terms 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 diff --git a/tests/fork_big.pl b/tests/fork_big.pl index 506a2fb0d8e..b866b899f8d 100755 --- a/tests/fork_big.pl +++ b/tests/fork_big.pl @@ -1,7 +1,8 @@ #!/usr/bin/perl -w -# Copyright (C) 2001 MySQL AB -# +# Copyright (c) 2001, 2006 MySQL AB +# Use is subject to license terms + # 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. diff --git a/tests/fork_big2.pl b/tests/fork_big2.pl index 516e8ff9478..e92cf869e52 100644 --- a/tests/fork_big2.pl +++ b/tests/fork_big2.pl @@ -1,7 +1,8 @@ #!/usr/bin/perl -w -# Copyright (C) 2002, 2005 MySQL AB -# +# Copyright (c) 2002, 2003, 2005, 2006 MySQL AB +# Use is subject to license terms + # 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. diff --git a/tests/insert_test.c b/tests/insert_test.c index e67d03dd435..f09766088aa 100644 --- a/tests/insert_test.c +++ b/tests/insert_test.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000-2004 MySQL AB + Use is subject to license terms 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 diff --git a/tests/list_test.c b/tests/list_test.c index 5b984b9eca9..2e8cd3654a3 100644 --- a/tests/list_test.c +++ b/tests/list_test.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2003, 2004 MySQL AB + Use is subject to license terms 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 diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 509e0e73777..7fd68fec308 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -5976,6 +5976,10 @@ static void test_bind_date_conv(uint row_count) MYSQL_TIME tm[4]; ulong second_part; uint year, month, day, hour, minute, sec; + uint now_year= 1990, now_month= 3, now_day= 13; + + rc= mysql_query(mysql, "SET timestamp=UNIX_TIMESTAMP('1990-03-13')"); + myquery(rc); stmt= mysql_simple_prepare(mysql, "INSERT INTO test_date VALUES(?, ?, ?, ?)"); check_stmt(stmt); @@ -6076,9 +6080,15 @@ static void test_bind_date_conv(uint row_count) i, tm[i].year, tm[i].month, tm[i].day, tm[i].hour, tm[i].minute, tm[i].second, tm[i].second_part); - DIE_UNLESS(tm[i].year == 0 || tm[i].year == year+count); - DIE_UNLESS(tm[i].month == 0 || tm[i].month == month+count); - DIE_UNLESS(tm[i].day == 0 || tm[i].day == day+count); + DIE_UNLESS(tm[i].year == 0 || tm[i].year == year + count || + (tm[i].year == now_year && + my_bind[i].buffer_type == MYSQL_TYPE_TIME)); + DIE_UNLESS(tm[i].month == 0 || tm[i].month == month + count || + (tm[i].month == now_month && + my_bind[i].buffer_type == MYSQL_TYPE_TIME)); + DIE_UNLESS(tm[i].day == 0 || tm[i].day == day + count || + (tm[i].day == now_day && + my_bind[i].buffer_type == MYSQL_TYPE_TIME)); DIE_UNLESS(tm[i].hour == 0 || tm[i].hour == hour+count); DIE_UNLESS(tm[i].minute == 0 || tm[i].minute == minute+count); @@ -18749,6 +18759,109 @@ static void test_bug12337762() DBUG_VOID_RETURN; } +/* + MDEV-4603: mysql_stmt_reset doesn't clear + all result sets (from stored procedures). + This test requires also fix for MDEV-4604 +*/ +static void test_mdev4603() +{ + MYSQL *my; + MYSQL_STMT *stmt; + int i, rc; + int a[] = {10,20,30}; + MYSQL_BIND bind[3]; + + myheader("test_mdev4603"); + my= mysql_client_init(NULL); + + if (!mysql_real_connect(my, opt_host, opt_user, + opt_password, current_db, opt_port, + opt_unix_socket, CLIENT_MULTI_RESULTS)) + DIE("mysql_real_connect failed"); + + /* 1st test: + use a procedure with out param + */ + rc= mysql_query(my, "DROP PROCEDURE IF EXISTS p1"); + myquery(rc); + + rc= mysql_query(mysql, "CREATE PROCEDURE p1(OUT p_out VARCHAR(19), IN p_in INT, INOUT p_inout INT)" + "BEGIN " + " SET p_in = 300, p_out := 'This is OUT param', p_inout = 200; " + " SELECT p_inout, p_in, substring(p_out, 9);" + "END"); + myquery(rc); + + stmt= mysql_stmt_init(mysql); + DIE_UNLESS(stmt != NULL); + + rc= mysql_stmt_prepare(stmt, "CALL P1(?,?,?)", 14); + DIE_UNLESS(rc == 0); + + DIE_UNLESS(mysql_stmt_param_count(stmt) == 3); + + memset(bind, 0, sizeof(MYSQL_BIND) * 3); + for (i=0; i < 3; i++) + { + bind[i].buffer= &a[i]; + bind[i].buffer_type= MYSQL_TYPE_LONG; + } + bind[0].buffer_type= MYSQL_TYPE_NULL; + rc= mysql_stmt_bind_param(stmt, bind); + DIE_UNLESS(rc == 0); + + rc= mysql_stmt_execute(stmt); + DIE_UNLESS(rc == 0); + + rc= mysql_stmt_fetch(stmt); + DIE_UNLESS(rc == 0); + + rc= mysql_stmt_reset(stmt); + DIE_UNLESS(rc == 0); + + /*connection shouldn't be blocked now */ + + rc= mysql_query(mysql, "DROP PROCEDURE p1"); + myquery(rc); + + /* 2nd test: + reset all result sets */ + rc= mysql_query(my, "CREATE PROCEDURE p1() " + "BEGIN" + " SELECT 1,2,3 FROM DUAL;" + " SELECT 'foo' FROM DUAL;" + "END"); + myquery(rc); + + rc= mysql_stmt_prepare(stmt, "CALL P1()", 9); + DIE_UNLESS(rc == 0); + + rc= mysql_stmt_execute(stmt); + DIE_UNLESS(rc == 0); + + rc= mysql_stmt_reset(stmt); + DIE_UNLESS(rc == 0); + + /* 3rd test: + mysql_stmt_close should also flush all pending + result sets + */ + + rc= mysql_stmt_prepare(stmt, "CALL P1()", 9); + DIE_UNLESS(rc == 0); + + rc= mysql_stmt_execute(stmt); + DIE_UNLESS(rc == 0); + + rc= mysql_stmt_close(stmt); + DIE_UNLESS(rc == 0); + + rc= mysql_query(my, "DROP PROCEDURE p1"); + myquery(rc); + + mysql_close(my); +} /* BUG 11754979 - 46675: ON DUPLICATE KEY UPDATE AND UPDATECOUNT() POSSIBLY WRONG @@ -19289,6 +19402,7 @@ static struct my_tests_st my_tests[]= { { "test_bug57058", test_bug57058 }, { "test_bug56976", test_bug56976 }, { "test_mdev3885", test_mdev3885 }, + { "test_mdev4603", test_mdev4603 }, { "test_bug11766854", test_bug11766854 }, { "test_bug12337762", test_bug12337762 }, { "test_progress_reporting", test_progress_reporting }, diff --git a/tests/select_test.c b/tests/select_test.c index f85a7bee2bf..9a144c59292 100644 --- a/tests/select_test.c +++ b/tests/select_test.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002-2004 MySQL AB + Use is subject to license terms 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 diff --git a/tests/showdb_test.c b/tests/showdb_test.c index 05c42b531cd..555a8511e61 100644 --- a/tests/showdb_test.c +++ b/tests/showdb_test.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2003, 2004 MySQL AB + Use is subject to license terms 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 diff --git a/tests/ssl_test.c b/tests/ssl_test.c index 3793538b4d2..2cd4b4b868b 100644 --- a/tests/ssl_test.c +++ b/tests/ssl_test.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2003, 2004, 2007 MySQL AB + Use is subject to license terms 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 diff --git a/unittest/mysys/CMakeLists.txt b/unittest/mysys/CMakeLists.txt index 6ea764070f1..a6003b7c51d 100644 --- a/unittest/mysys/CMakeLists.txt +++ b/unittest/mysys/CMakeLists.txt @@ -14,8 +14,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql - ${CMAKE_BINARY_DIR}/pcre - ${CMAKE_SOURCE_DIR}/pcre + ${PCRE_INCLUDES} ${CMAKE_SOURCE_DIR}/extra/yassl/include) MY_ADD_TESTS(bitmap base64 my_vsnprintf my_atomic my_rdtsc lf my_malloc diff --git a/unittest/mysys/bitmap-t.c b/unittest/mysys/bitmap-t.c index 0666f4eaa15..c4588779c9b 100644 --- a/unittest/mysys/bitmap-t.c +++ b/unittest/mysys/bitmap-t.c @@ -129,8 +129,8 @@ my_bool test_compare_operators(MY_BITMAP *map, uint bitsize) MY_BITMAP *map2= &map2_obj, *map3= &map3_obj; my_bitmap_map map2buf[MAX_TESTED_BITMAP_SIZE]; my_bitmap_map map3buf[MAX_TESTED_BITMAP_SIZE]; - bitmap_init(&map2_obj, map2buf, bitsize, FALSE); - bitmap_init(&map3_obj, map3buf, bitsize, FALSE); + my_bitmap_init(&map2_obj, map2buf, bitsize, FALSE); + my_bitmap_init(&map3_obj, map3buf, bitsize, FALSE); bitmap_clear_all(map2); bitmap_clear_all(map3); for (i=0; i < no_loops; i++) @@ -374,7 +374,7 @@ my_bool test_compare(MY_BITMAP *map, uint bitsize) uint32 map2buf[MAX_TESTED_BITMAP_SIZE]; uint i, test_bit; uint no_loops= bitsize > 128 ? 128 : bitsize; - if (bitmap_init(&map2, map2buf, bitsize, FALSE)) + if (my_bitmap_init(&map2, map2buf, bitsize, FALSE)) { diag("init error for bitsize %d", bitsize); return TRUE; @@ -433,7 +433,7 @@ my_bool test_intersect(MY_BITMAP *map, uint bitsize) MY_BITMAP map2; uint32 map2buf[MAX_TESTED_BITMAP_SIZE]; uint i, test_bit1, test_bit2, test_bit3; - if (bitmap_init(&map2, map2buf, bitsize2, FALSE)) + if (my_bitmap_init(&map2, map2buf, bitsize2, FALSE)) { diag("init error for bitsize %d", bitsize2); return TRUE; @@ -481,7 +481,7 @@ my_bool do_test(uint bitsize) { MY_BITMAP map; my_bitmap_map buf[MAX_TESTED_BITMAP_SIZE]; - if (bitmap_init(&map, buf, bitsize, FALSE)) + if (my_bitmap_init(&map, buf, bitsize, FALSE)) { diag("init error for bitsize %d", bitsize); goto error; diff --git a/unittest/mysys/ma_dyncol-t.c b/unittest/mysys/ma_dyncol-t.c index 37e41d87def..51e84bc4e40 100644 --- a/unittest/mysys/ma_dyncol-t.c +++ b/unittest/mysys/ma_dyncol-t.c @@ -28,6 +28,7 @@ #include <my_global.h> #include <my_sys.h> +#include <m_string.h> #include <ma_dyncol.h> #include <tap.h> diff --git a/vio/CMakeLists.txt b/vio/CMakeLists.txt index 43171179e66..72059f1ec08 100644 --- a/vio/CMakeLists.txt +++ b/vio/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2013, 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 @@ -20,3 +20,8 @@ ADD_DEFINITIONS(${SSL_DEFINES}) SET(VIO_SOURCES vio.c viosocket.c viossl.c viopipe.c vioshm.c viosslfactories.c) ADD_CONVENIENCE_LIBRARY(vio ${VIO_SOURCES}) TARGET_LINK_LIBRARIES(vio ${LIBSOCKET}) + +INSTALL_DEBUG_SYMBOLS(vio) +IF(MSVC) + INSTALL_DEBUG_TARGET(vio DESTINATION ${INSTALL_LIBDIR}/debug) +ENDIF() diff --git a/vio/vio.c b/vio/vio.c index ea95758f212..97e3d49be21 100644 --- a/vio/vio.c +++ b/vio/vio.c @@ -234,7 +234,7 @@ my_bool vio_reset(Vio* vio, enum enum_vio_type type, if (old_vio.write_timeout >= 0) ret|= vio_timeout(vio, 1, old_vio.write_timeout); - DBUG_RETURN(test(ret)); + DBUG_RETURN(MY_TEST(ret)); } diff --git a/vio/viosocket.c b/vio/viosocket.c index 892783d2ac4..5576dfc48d8 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -362,7 +362,7 @@ int vio_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode) #endif DBUG_ENTER("vio_blocking"); - *old_mode= test(!(vio->fcntl_mode & O_NONBLOCK)); + *old_mode= MY_TEST(!(vio->fcntl_mode & O_NONBLOCK)); DBUG_PRINT("enter", ("set_blocking_mode: %d old_mode: %d", (int) set_blocking_mode, (int) *old_mode)); @@ -407,7 +407,7 @@ int vio_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode) r = ioctlsocket(sd,FIONBIO,(void*) &arg); } else - r= test(!(vio->fcntl_mode & O_NONBLOCK)) != set_blocking_mode; + r= MY_TEST(!(vio->fcntl_mode & O_NONBLOCK)) != set_blocking_mode; #endif /* !defined(__WIN__) */ DBUG_PRINT("exit", ("%d", r)); DBUG_RETURN(r); @@ -1060,16 +1060,16 @@ int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout) switch (event) { case VIO_IO_EVENT_READ: - ret= test(FD_ISSET(fd, &readfds)); + ret= MY_TEST(FD_ISSET(fd, &readfds)); break; case VIO_IO_EVENT_WRITE: case VIO_IO_EVENT_CONNECT: - ret= test(FD_ISSET(fd, &writefds)); + ret= MY_TEST(FD_ISSET(fd, &writefds)); break; } /* Error conditions pending? */ - ret|= test(FD_ISSET(fd, &exceptfds)); + ret|= MY_TEST(FD_ISSET(fd, &exceptfds)); /* Not a timeout, ensure that a condition was met. */ DBUG_ASSERT(ret); @@ -1154,7 +1154,7 @@ vio_socket_connect(Vio *vio, struct sockaddr *addr, socklen_t len, int timeout) #else errno= error; #endif - ret= test(error); + ret= MY_TEST(error); } } @@ -1166,7 +1166,7 @@ vio_socket_connect(Vio *vio, struct sockaddr *addr, socklen_t len, int timeout) DBUG_RETURN(TRUE); } - DBUG_RETURN(test(ret)); + DBUG_RETURN(MY_TEST(ret)); } diff --git a/vio/viossl.c b/vio/viossl.c index c6f6dbd49c9..a4f0a1bd213 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index c492770cc97..ef3dfb1f5b0 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, 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 diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index 68799947e44..0be1f976b39 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2013, 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,3 +23,8 @@ SET(ZLIB_SOURCES adler32.c compress.c crc32.c crc32.h deflate.c deflate.h gzio. ADD_CONVENIENCE_LIBRARY(zlib ${ZLIB_SOURCES}) RESTRICT_SYMBOL_EXPORTS(zlib) +INSTALL_DEBUG_SYMBOLS(zlib) +IF(MSVC) + INSTALL_DEBUG_TARGET(zlib DESTINATION ${INSTALL_LIBDIR}/debug) +ENDIF() + |